Guides & Tutorials2025-12-28·7 min read

What to Do When Cursor AI is Stuck on "Thinking..."

Fix the 'Thinking...' loop in Cursor AI. Learn how to debug model timeouts, clear oversized context, and reset your AI flow when the spinner never stops.

#cursor#ai-tools#debugging#productivity

FlowQL Team

AI Search Optimization Experts

Introduction

You've just sent a brilliant prompt to Cursor. You're waiting for the code that will solve your weekend-long bug. But instead of code, you see it: the "Thinking..." spinner.

One minute passes. Then two. Then five. The AI is stuck in a loop, and your productivity is grinding to a halt. In the world of "vibe coding," momentum is everything. When the spinner never ends, it's usually not your code—it's the context.

The good news: this is almost always fixable in under 30 seconds. The bad news: if it keeps happening, your project structure is telling you something important.

Why Cursor Gets Stuck

Why does Cursor get stuck on "Thinking...?"

Cursor gets stuck on "Thinking..." primarily because the request context is too massive for the model to process efficiently, or the backend API (Anthropic or OpenAI) is experiencing a high-latency spike. If you have 20+ files open or are using @Codebase on a project without a proper index, the AI spends so much time calculating relevant snippets that the connection eventually hangs.

graph LR A[User Prompt] --> B[Context Audit] B -->|Too Many Files| C[Loop: Thinking...] B -->|Network Spike| C C --> D[Connection Timeout] D --> E[/Frustrated Developer/]

style C fill:#ff9999,stroke:#333,stroke-width:2px

The "Thinking" loop is often a context management failure.

Is It Them or You? (30-Second Diagnosis)

Before you reload anything, spend 30 seconds ruling out a server-side outage. This is the most common cause of simultaneous "Thinking..." hangs, and there's nothing to fix on your end.

| Check | Where to Look | |-------|---------------| | Cursor backend | status.cursor.com | | Anthropic (Claude) | anthropicstatus.com | | OpenAI | status.openai.com | | Your internet | Try loading any website |

If any of these show degraded performance or an outage, stop troubleshooting your local setup and wait for the platform to recover.

How to Unstick the Spinner

1. The "Developer: Reload Window" Fix

Before you close the app, try the internal soft reset. This refreshes the VS Code environment without losing your saved work and re-establishes the WebSocket connection to Cursor's servers.

  1. Press Cmd + Shift + P (Mac) or Ctrl + Shift + P (Windows).
  2. Type "Developer: Reload Window" and hit Enter.
  3. Cursor will restart, and the "Thinking" state will be cleared.

This works because the "Thinking..." spinner is maintained in the UI's local state. When the underlying WebSocket connection silently drops (due to sleep, network jitter, or a server hiccup), the spinner keeps spinning because the UI never received a termination signal. A window reload forces a fresh connection.

2. Prune Your Active Chips

Look at the list of files (@file.ts) above your input box. If you have more than 5 files listed, the model is likely overwhelmed before it's processed a single token of your actual question.

The Fix:

  • Click the "x" on files that aren't strictly necessary for your current question.
  • Try to keep your context "shallow"—only reference the files the AI must see to answer.
  • Avoid @Codebase unless your project has a fully built index (look for the "indexing complete" status in Settings).

For a deeper look at managing context size before it becomes a problem, see our guide on fixing "Context Window Exceeded" in Cursor. The strategies there—especially the section on .cursorignore—directly prevent the "Thinking..." hang.

3. Start a Fresh Chat

If you've been talking to the same chat window for 2+ hours, the accumulated history is silently consuming thousands of tokens with every new request. By the time you send your 50th message, the AI is spending most of its processing time reading your conversation history before it even starts thinking about your question.

The Fix:

  • Copy any important snippets or context from the current chat.
  • Press Cmd + N (or click the + icon) to start a New Chat.
  • Paste only the essential context from your old chat.

Fresh chats have zero "baggage" and usually respond within seconds. This is the single most overlooked fix for chronic "Thinking..." issues.

4. Switch to a Different Model

If the issue is isolated to one specific model (e.g., Claude 3.5 Sonnet consistently hangs), the model may be experiencing high load or a degraded API response at that moment.

The Fix:

  1. Click the model selector at the bottom of the chat window.
  2. Switch to an alternative (e.g., from Claude 3.5 Sonnet to GPT-4o, or to cursor-small for quick tasks).
  3. Re-send your prompt.

This is a useful diagnostic too: if GPT-4o responds instantly but Claude hangs, the problem is with Anthropic's API, not your setup. If both hang, the problem is local (context, network, or window state). You can verify Cursor's supported models in the Cursor model documentation.

When It Keeps Happening

If you're unsticking the spinner 3-4 times per session, the problem isn't the spinner—it's your project structure. Common root causes:

Oversized files: A single 3,000-line component causes the AI to spend most of its budget just reading the file before it can answer. See our guide on stopping Cursor from deleting code with lazy placeholders, which covers how to break large files into AI-friendly modules.

Missing .cursorignore: If your project includes node_modules/, dist/, or large generated files in the codebase index, @Codebase searches will timeout consistently. Create a .cursorignore file (same syntax as .gitignore) to exclude non-source files.

Stale Cursor version: Cursor ships frequent performance improvements. Check Help > Check for Updates to ensure you're on the latest build. The team publishes a changelog with performance-related fixes.

FlowQL: Architecture Over Spinners

At FlowQL, we know that tools are only as good as the hands that hold them.

Getting stuck on "Thinking..." is often a sign that your project structure is becoming too complex for basic AI indexing. We help you modularize your code so that AI tools can "see" smaller, more manageable chunks. When the AI doesn't have to think as hard, you get your answers faster—and you stop losing 10 minutes per hour to spinner-waiting.

Conclusion

Your Action Plan:

  1. Check status: Visit status.cursor.com before troubleshooting locally.
  2. Reload: Use Cmd + Shift + P → "Developer: Reload Window" to force a fresh connection.
  3. Reset: Start a new chat if your history is longer than ~30 messages.
  4. Prune: Limit your @ file references to 3-5 files maximum.
  5. Switch: Try a different model if one specific model keeps hanging.

Stop waiting for the spinner. [Book a session with FlowQL] to optimize your AI development environment.


FAQ

Does "Thinking..." cost fast requests?

No, a "Thinking..." state that fails or is cancelled generally does not deduct from your daily "Fast Request" quota. Requests are only charged to your account once the model begins streaming a successful response.

How long should I wait before cancelling?

As a rule of thumb, if Cursor hasn't started streaming text within 30-45 seconds, it is likely stuck. Cancelling and re-prompting with a more specific, smaller context is almost always faster than waiting for a timeout, which can take 2-3 minutes.

Is it a server issue or a local issue?

If reloading the window and starting a new chat doesn't work, check status.cursor.com and anthropicstatus.com. If all servers are green, the issue is almost certainly an oversized context or stale WebSocket in your local project.

Why does it only happen on some prompts and not others?

Context size is the most common differentiator. Prompts with many @file chips or that follow a long conversation history are much more likely to hang. If you notice a pattern—e.g., it always hangs after you add a third file to context—that's your signal to keep context smaller by default.

Subscribe to our blog

Get the latest guides and insights delivered to your inbox.

Join the FlowQL waitlist

Get early access to our AI search optimization platform.

Related Articles