Cursor CLI stuck on "Reconnecting" in specific directory

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

Cursor CLI stopped working (stuck on “reconnecting…” whenever a prompt is sent) when the terminal is on a specific Directory.

Steps to Reproduce

I am not sure if that is the reason this happened, but my theory is:

  1. Use cursor CLI in the directory via an external terminal tool (I Used Warp)
  2. close the terminal session while cursor is thinking, from the terminal UI without cntrl+C to cancel or /quit to stop agent session
    (In warp, this will trigger a popup ensuring you want to kill running processes on that terminal instance - confirm)
  3. In a new terminal window (any tool - native terminal or external tool) cd the same directory
  4. run “agent” to start the cursor CLI session
  5. submit any prompt
  6. The agent will get stuck in an endless “Reconnecting…” loop, only on that specific directory (even a worktree of the same repo will work fine)

Expected Behavior

The agent should be able to work on the directory.

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

cursor CLI version: 2026.06.04-5fd875e
Warp version: v0.2026.06.03.09.49.stable_02
(I don’t think Warp version matters, but in case that helps)

Additional Information

I also have the cursor Debug Logs from one bugged session, attached them to the first comment

Things I already tried:

  1. logging in and out
  2. resetting network data
  3. with/without VPN etc.
  4. resetting Warp caches, uninstalling and reinstalling warp
  5. Restarting device
  6. cleaning running agent processes via terminal

My next move will be to re-clone the repo, which I suspect will fix it as this seems like a broken cache state type situation, but either way wanted to report and to find out why it happened (I’m a curious nerd).

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

session-2026-06-10T12-21-14-996Z-55762-1.log (189.4 KB)
Here are the session logs :grinning_face_with_smiling_eyes:

Hi @Shalev Thanks for the post.
Your logs show the CLI opening the agent connection over HTTP/2, and the server closing the stream right away with NGHTTP2_ENHANCE_YOUR_CALM before any response. The CLI reads that as a temporary drop and retries the request, which results in the endless “Reconnecting…”.

Your cached-state hunch looks right. Closing the terminal mid-response left that folder’s saved conversation in a bad state. The CLI auto-loads and re-sends it on every prompt in that directory, which trips the connection, so a fresh worktree or clone works fine.

I recommend the following:

Force HTTP/1.1 for the agent. Create or edit ~/.cursor/cli-config.json:

{
  "network": {
    "useHttp1ForAgent": true
  }
}

You can also restart the CLI and then start a fresh chat. If option 1 clears it up, you can safely leave it in place. Let me know how it goes.