Skip to content
TheChatArchiveThe Chat Archive
composer-2.5· unknownHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

Untitled conversation

  1. 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

    1. Start a Cursor CLI agent session in Orca.
    2. Give the agent a task and wait for it to complete (agent finishes and produces final output).
    3. 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, done replaces spinner/working titles, the bare Cursor Agent title, and stale permission titles with Cursor ready; waiting or blocked uses Cursor - 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.

  2. Assistant

    Investigating how agent status and terminal titles are handled so we can implement the title resolver and fix the stuck loading state.

  3. Assistant

    Implementing the title resolver and integrating it into the IPC status path.

  4. Assistant

    Simplifying the implementation — the last block was redundant.

  5. Assistant

    Fixed the stuck loading state by reconciling hook-reported agent state with synthetic terminal titles before storing the agent-status snapshot.

    Root cause

    Cursor CLI keeps emitting stale OSC titles (spinner frames like ⠋ Cursor Agent, the bare native Cursor Agent, or permission titles) even after the hook reports done. Those titles were stored as-is in agentStatusByPaneKey.terminalTitle, so parts of the UI that read the title still treated the session as working.

    Fix

    Added resolveAgentStatusTerminalTitle in src/renderer/src/lib/agent-status-terminal-title.ts and wired it into the IPC status path in useIpcEvents.ts before setAgentStatus runs.

    For agents with synthetic title profiles (Cursor, OpenCode, Droid, Hermes):

    Hook stateTitle reconciliation
    doneReplace stale spinner, working, bare native, or permission titles with the idle label (Cursor ready, etc.); preserve descriptive completed titles
    waiting / blockedMap to the permission label (Cursor - action required, etc.)
    workingLeave the current title unchanged

    Agents without a synthetic profile (Codex, Claude, etc.) are unchanged.

    Tests

    • 12 unit tests in agent-status-terminal-title.test.ts (all passing)
    • Integration test added in useIpcEvents.test.ts for the Cursor done + spinner title case

    After a Cursor CLI agent finishes, the stored title becomes Cursor ready instead of staying on a spinner, so loading indicators clear and the session shows idle/completed.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.