Self-hosted agent becomes unrecoverable while "Planning next moves" / turn remains in flight

Describe the Bug

UI: “Planning next moves” / no updates
Coordinator: running / turn in flight
Worker: may still be executing
Worktree: healthy and usable
Chat: unrecoverable

Steps to Reproduce

Steps to Reproduce
Start or resume a coding agent on a self-hosted worker/worktree.
Have the agent perform a tool-heavy task involving multiple file operations and/or a long-running dotnet build or dotnet test.
During the active turn, observe the chat UI become stuck on “Planning next moves” or stop updating after the last tool call.
Check the coordinator status. It may continue showing running / turn in flight even though the chat is no longer usable.
Stop/cancel the affected agent.
In some cases, observe the agent transition to CANCELLED while turn in flight remains temporarily.
Start a new agent against the same self-hosted worktree.
Observe that the new agent can continue using the existing files/Git state, indicating the worktree itself remained healthy.

Frequency: Reproduced 3+ times in one afternoon, during both tool/research-heavy and long-running build/test turns.

Expected Behavior

Expected Behavior
Long-running tool operations should remain observable, responsive, and cancellable.
The agent should continue reporting progress or a heartbeat while a build/test is still running.
If communication or streaming is interrupted, the UI should show a clear error/timeout and allow the session to reconnect or recover.
Cancelling a turn should move both the agent and active turn into a consistent terminal state, with no stale turn in flight.
Recovery should not require creating a new agent against the same worktree.

Operating System

Windows 10/11

Version Information

Cursor Version: 3.25.9
Build Type: Stable
Release Track: Default
Layout: Agent Window

Self-hosted worker:

  • OS: Linux
  • Started via: cursor worker start
  • One worker per Git worktree

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey @Shanmuksai_Chakka,

When the chat sits on “Planning next moves”, the work on your worker generally keeps going and finishes. The window just stops showing the updates. The “turn in flight” you see from the coordinator right after a Stop can also lag: the coordinator counts any of the worker’s recent turns that hasn’t been closed out yet, so it can show “turn in flight” next to “last turn: cancelled” for a short while.

Before starting a new agent, it’s worth checking whether the stuck agent actually finished. If it did, a follow-up in the same chat should pick up from there, since your worktree and files are intact.

To pin this down, could you try this the next time it happens?

  1. Note the time (with your time zone) and the agent’s name.
  2. Check on the worker whether the dotnet build or test is still running.
  3. In Cursor, press Ctrl+Shift+P and run “Developer: Reload Window”.
  4. Open the same agent again in the Agents Window, or at cursor.com/agents.
  5. Send a short follow-up in that same chat.

Please reply with whether the chat updated after step 3 or 4, whether the follow-up in step 5 ran, and the time from step 1.