Untitled conversation
- User
[Bug]: Cursor CLI agent stays in loading state after task completes
Operating system
macOS
Orca version
Unknown (please add from Orca > About Orca if available)
Details
Summary
When running a Cursor CLI agent session in Orca, the UI continues to show a loading/running state after the agent has finished its task — as if work is still in progress.
Steps to reproduce
- Start a Cursor CLI agent session in Orca.
- Give the agent a task and wait for it to complete (agent finishes and produces final output).
- Observe the session UI state.
Expected behavior
Once the Cursor CLI agent finishes, the session should transition to an idle/completed state — loading indicators should stop and the UI should reflect that no work is in progress.
Actual behavior
The session remains in a loading/running state after the task is done, giving the impression the agent is still working.
Environment
- macOS: darwin 25.4.0
- Agent: Cursor CLI
Additional notes
- Reproduces when the agent has clearly finished (final response delivered) but Orca does not update the activity/loading indicator accordingly.
- May cause confusion about whether it is safe to send a follow-up prompt or close the session.
Evaluation contract
When a synthetic-title agent reports a non-working state, reconcile the terminal title with that agent's synthetic title profile. For Cursor,
donereplaces spinner/working titles, the bareCursor Agenttitle, and stale permission titles withCursor ready;waitingorblockedusesCursor - action required. Preserve descriptive completed titles that are not classified as working or permission, and do not rewrite agents without a synthetic-title profile. Apply this resolver before storing agent-status snapshot titles.Interface
Type: Function Name: resolveAgentStatusTerminalTitle Path: src/renderer/src/lib/agent-status-terminal-title.ts Input: payload: Pick<ParsedAgentStatusPayload, 'agentType' | 'state'>, currentTitle: string | undefined Output: string | undefined Description: Reconciles hook-reported state with synthetic terminal-title profiles. For Cursor, done maps stale spinner, working, bare native, or permission titles to "Cursor ready"; waiting/blocked maps to "Cursor - action required". Descriptive completed titles and agents without a synthetic profile are preserved. The IPC status integration must call this resolver before storing the title.
- Assistant
Investigating how agent status and terminal titles are handled so we can fix the loading state after Cursor CLI tasks complete.
- Assistant
Implementing the title resolver and integrating it into the IPC status path.
- Assistant
Adding an integration test and running the test suite.
- Assistant
Fixed the bug where Cursor CLI sessions stayed in a loading state after completion.
Root cause
When a Cursor hook reported
done, the IPC path stored the pane’s current terminal title in the agent-status snapshot. That title often lagged behind the hook — still⠋ Cursor Agentor bareCursor Agent— so title-based UI (spinners, worktree status heuristics) kept treating the session as working even though hook state wasdone.Fix
Added
resolveAgentStatusTerminalTitleinsrc/renderer/src/lib/agent-status-terminal-title.ts. For agents with synthetic title profiles (Cursor, OpenCode, Droid, Hermes), it reconciles hook state with the stored title:Hook state Title reconciliation doneSpinner, working, bare native, or stale permission titles → idle label (e.g. Cursor ready)waiting/blocked→ permission label (e.g. Cursor - action required)workingNo change Descriptive completed titles Preserved Agents without a synthetic profile Unchanged The IPC integration in
useIpcEvents.tsnow calls this resolver beforesetAgentStatus, so the snapshot title matches hook authority even when the OSC title hasn’t caught up yet.Tests
- Unit tests for the resolver (
agent-status-terminal-title.test.ts) - Integration test confirming a cursor
doneevent with a stale⠋ Cursor Agentpane title storesCursor ready
- Unit tests for the resolver (
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- fable-5Compare side by side →
- fable-5Compare side by side →