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.
ADDITIONAL ADVICE
- Assistant
I’ll inspect the repository structure and locate the agent-status IPC path, existing title logic, and tests. Then I’ll implement the resolver according to the evaluation contract, wire it into status snapshot storage, and run the focused test suite plus relevant type/lint checks.
- Assistant
The repository already has synthetic Cursor title generation and explicit agent-status plumbing. I’m narrowing the change to the renderer-side resolver and the IPC status update boundary, while checking existing profile/classification helpers so the new behavior remains consistent with current title semantics rather than duplicating fragile string rules.
- Assistant
The relevant boundary is
useIpcEvents.ts: it resolves each push and startup snapshot through the sameapplyAgentStatusfunction, then passes the pane’s current terminal title intosetAgentStatus. I’ll add the requested pure resolver at the specified path, classify only Cursor titles using the shared detector (plus Cursor’s intentionally unclassified bare native title), and invoke it immediately before storage so both live and replayed snapshots are reconciled. - Assistant
The resolver file was created, but the environment lacks
python3, so the automated wiring edit did not run. I’ll apply the same small import/call-site change using the available Node runtime, then inspect formatting and compile/test results. - Assistant
The integration is now in place and applies to both live IPC events and snapshot replay because they share
applyAgentStatus. The resolver preserves descriptive Cursor completion titles, rewrites only stale activity/permission/native titles, always emits the action-required title for waiting/blocked, and leaves other agent types unchanged. I’ll run focused tests and the web typecheck now. - Assistant
The first validation command did not reach the tests: Corepack attempted to download pnpm and stopped at an interactive confirmation prompt. I’ll use the repository’s locally available executables (or invoke Corepack non-interactively if necessary) and also run a direct temporary resolver check without modifying repository tests.
- Assistant
Focused validation passed: 3 test files and 170 tests passed, and the web typecheck completed successfully. The only command issue was an invalid oxlint CLI format argument, not a code failure; I’ll rerun lint with valid arguments, inspect the final diff, and verify there are no unintended files.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.