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 trace the agent-status IPC flow and existing title-generation utilities/tests, then implement the resolver at the specified path and wire it into the snapshot storage point. I’ll first inspect the repository structure and search for related status/title code.
- Assistant
The repository already has explicit agent-status plumbing and synthetic title behavior, but the requested renderer utility is absent from the initial search. I’ll now inspect the status slice, IPC listeners, agent identity/profile definitions, and existing synthetic spinner logic to preserve the project’s classification rules rather than duplicating them.
- Assistant
The main process already defines synthetic profiles for Cursor, OpenCode, Droid, and Hermes, while the renderer’s IPC path currently stores the raw terminal title. I’ll add a pure resolver that recognizes only profiled agents: non-working Cursor
donestatuses replace native/spinner/permission titles withCursor ready, andwaiting/blockeduse the action-required title; descriptive titles and unprofiled agents remain untouched. Then I’ll invoke it immediately beforesetAgentStatusinuseIpcEvents. - Assistant
The resolver file was created successfully, but the environment lacks
python3, so the automated wiring step did not run. I’ll apply the two smalluseIpcEvents.tsedits with a Node script instead, then inspect the diff and run focused tests/type checking. - Assistant
The IPC integration now resolves the title before storage. The implementation preserves descriptive completed titles by checking the existing shared title classifier, while explicitly handling bare native titles (including whitespace/case variation) and all synthetic profiles. I’ll run the web typecheck and relevant existing agent-status/IPC tests to catch import, typing, or behavioral regressions.
- Assistant
The combined verification command was blocked because Corepack attempted an interactive pnpm download and timed out; no test ran. I’ll use the repository’s installed binaries directly (non-interactively), first checking their availability, then run the focused checks separately.
- Assistant
The web typecheck completed successfully. The test runner itself rejected an unsupported Vitest option before executing tests, so I’ll rerun without that option using the project’s default configuration, then perform a final diff check.
- Assistant
Both focused test files passed (146 tests), and the diff has no whitespace errors. I’ll run the project linter on the changed files as a final quality check, then review the final diff before submission.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.