ISSUE DESCRIPTION [Bug]: Cursor CLI agent stays in loading state after task completes…
- User
ISSUE DESCRIPTION
[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
I’ll trace the existing agent-status parsing, synthetic title profiles, and IPC snapshot storage, then implement the resolver at the requested path and wire it into the status integration. I’ll run focused tests (and broader relevant checks if available), inspect the diff, and only then submit.
- Assistant
The existing main-process synthetic-title machinery already defines Cursor’s canonical labels and emits a ready title on completion, but the renderer’s IPC path stores the separately resolved terminal title from its snapshot/layout. That stale title can overwrite the synthetic state in the status entry. I’ll add a narrowly scoped Cursor resolver that only rewrites known synthetic working/permission titles, preserving user/descriptive titles and unknown agents, then invoke it immediately before
setAgentStatus. - Assistant
The resolver and IPC call are now in place. The resolver intentionally treats only exact synthetic Cursor labels (including the braille spinner form) as replaceable, while
waiting/blockedalways gets the action-required label and all other agent types/titles pass through unchanged. I’ll format and run the web typecheck plus a focused existing status test suite. - Assistant
Focused verification passed: 135 existing agent-status tests passed, the renderer TypeScript check passed, formatting completed, and
git diff --checkreported no whitespace issues. The implementation also preserves descriptive Cursor completion titles and non-Cursor titles, while resolving Cursor’s stale synthetic labels as required. Checklist:- Reproduced the reported state conceptually through the existing IPC/title flow; the stale title path was confirmed by tracing
applyAgentStatusintosetAgentStatus. - Confirmed the fix behavior through the resolver logic and existing status integration tests; no repository tests specifically cover the new resolver.
- Considered edge cases: undefined titles, descriptive titles, exact synthetic spinner/native/permission titles, waiting/blocked states, and agents without profiles.
- Ran relevant existing tests (135 passed) and the web typecheck successfully. I’ll now submit the completed changes.
- Reproduced the reported state conceptually through the existing IPC/title flow; the stale title path was confirmed by tracing
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.