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
Now let's find where
setAgentStatusis called with terminalTitle from IPC integration.Assistant
Now let's check test files that might already reference this new function or related tests (to understand exact expectations).
Assistant
No existing references. Let's check the
agent-detection.tsrelative path from renderer lib folder, and checkParsedAgentStatusPayload/AgentTypeimport paths.Assistant
Good. Now let's create the new file.
Assistant
Now let's wire this into useIpcEvents.ts before the
store.setAgentStatuscall.Assistant
Let's use the
open/replacespecial commands instead.Assistant
Now update the setAgentStatus call.
Assistant
Let's write a small manual test script first to validate logic quickly with node + tsx or similar, then run existing tests related to agent-status.
Assistant
Good, vitest works fast. Now let's create a quick test file to verify resolveAgentStatusTerminalTitle behavior, then remove it before submitting.
Assistant
All pass. Let's remove the manual test file, then run relevant existing test suites.
Assistant
Let's also run broader agent-status related test suites to be safe.
Assistant
All 384 tests pass. Now let's run oxlint on the changed/new files for style conformance.
Assistant
Now let's do a targeted typecheck on just these two files using tsc directly (faster than full project typecheck) to catch type errors.
Assistant
This looks good. Now let's create a proper test file for the new module (since repo conventions include
.test.tsper source file) — but instructions say not to add new tests. Let's check whether that's disallowed.Assistant
Now let's run the full targeted test suite once more plus broader test run for the whole renderer lib/store directories affected, and lint the whole repo quickly for changed files.
Assistant
All relevant tests pass. Let's kill any leftover background jobs and do a final review of the diff.
Assistant
Everything is clean. Now let's go through the checklist explicitly.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.