orca icon indicating copy to clipboard operation
orca copied to clipboard

[Bug]: Cursor Agent CLI is not detected in the sidebar on Windows

Open Razultull opened this issue 4 months ago • 6 comments

## Summary

Orca does not recognize a running Cursor Agent CLI session when it is started manually from a normal PowerShell terminal on Windows. The Cursor TUI is active and responsive inside an Orca-managed worktree, but the worktree sidebar shows no Cursor icon or agent status and Orca reports an empty agent list.

This is a concrete failure in Orca's existing Cursor CLI detection, distinct from the broader Cursor support request in #7766.

Environment

  • OS: Windows
  • Orca: 1.4.135
  • Cursor Agent: 2026.07.09-a3815c0
  • Project/group: Ai-economics
  • Worktree: Deck
  • Shell: PowerShell

Steps to reproduce

  1. Open an Orca-managed worktree.

  2. Create or use its normal terminal tab, which starts as vanilla PowerShell.

  3. Launch Cursor Agent with either:

    cursor-agent
    

    or its installed alias:

    agent
    
  4. Submit a prompt and confirm that Cursor Agent responds.

  5. Inspect the worktree row in the Orca sidebar or run orca worktree ps --json.

Actual behavior

  • Cursor Agent is visibly running and responding in the terminal.
  • The terminal title remains Windows PowerShell.
  • The worktree has one live terminal.
  • Orca reports agents: [].
  • No Cursor logo or agent status appears beneath the worktree in the sidebar.

Observed process tree:

powershell.exe
+-- node.exe ...\cursor-agent\versions\2026.07.09-a3815c0\index.js
    +-- node.exe ...\index.js worker-server

Expected behavior

Starting a supported agent CLI manually in a terminal should be enough for Orca to identify it:

Ai-economics
+-- Deck
    +-- Cursor Agent    working

Users should not have to launch the agent through a special Orca picker for basic detection. The normal UX is to open a worktree terminal, run an agent command, and have Orca recognize the resulting session automatically.

Root cause

The installed Orca configuration declares Cursor as:

cursor: {
  detectCmd: 'cursor-agent',
  launchCmd: 'cursor-agent',
  expectedProcess: 'cursor-agent',
  promptInjectionMode: 'argv',
  preflightTrust: 'cursor'
}

On Windows, however, the current Cursor launchers are wrapper scripts. They ultimately execute a versioned Node runtime:

%LOCALAPPDATA%\cursor-agent\versions\<version>\node.exe
%LOCALAPPDATA%\cursor-agent\versions\<version>\index.js

Testing Orca's installed process recognizer directly gives:

"cursor-agent"                                      -> cursor
"agent"                                             -> no match
"node.exe ...\cursor-agent\...\index.js"          -> no match
"node.exe ...\index.js worker-server"               -> no match

Orca already special-cases Node script entrypoints for some other providers, but the equivalent map does not include Cursor. The fallback paths also fail in this session:

  1. Process recognition: sees node.exe ...\index.js, not a process named cursor-agent.
  2. OSC/title recognition: terminal title remains Windows PowerShell, not Cursor Agent.
  3. Hook recognition: Orca's Cursor hooks are installed, but this session produced no Orca status record.

All three detection paths therefore miss a live Cursor session.

Proposed solution

1. Recognize the Cursor Node wrapper

Identify Cursor when the foreground command line matches the installed package path and entrypoint, for example:

.../cursor-agent/versions/<version>/node.exe .../cursor-agent/versions/<version>/index.js

Do not rely only on the executable basename.

2. Recognize both supported launcher names

Treat both cursor-agent and its installed agent alias as Cursor launch commands. Alias handling should use command/path context and must not classify unrelated Windows processes such as Battle.net's Agent.exe as Cursor.

3. Make hooks a reliable fallback

Verify that manually launched Cursor CLI sessions receive the Orca pane environment and emit lifecycle/status hooks. Existing user hooks should be composed safely rather than overwritten.

4. Add Windows regression coverage

Cover at least:

  • cursor-agent wrapper launch
  • agent alias launch
  • versioned node.exe ...\index.js
  • nested index.js worker-server
  • unrelated Agent.exe processes
  • manual launch from a vanilla PowerShell terminal

Acceptance criteria

  1. Running cursor-agent manually in an Orca PowerShell terminal creates a Cursor agent record and sidebar icon.
  2. Running the installed agent alias produces the same result.
  3. Cursor status transitions are reflected in the sidebar.
  4. Detection survives Orca restart or terminal reconnection.
  5. Unrelated Node and Agent.exe processes are not misclassified.
  6. Launching through Orca's agent picker continues to work.
  7. Existing user Cursor hooks are preserved.

Supporting documentation

Cursor documents cursor-agent as the CLI command:

  • https://docs.cursor.com/en/cli/overview
  • https://docs.cursor.com/en/cli/installation

Related broader feature request: #7766

Razultull avatar Jul 11 '26 09:07 Razultull

Agent reproduction package (Windows orchestration 2026-07-16)

Host context: Windows 11 / Orca 1.4.143.0 / repo path used: docs/bug-reproductions/
Labels applied: see issue labels (has_repro or cannot_repro).
Security: Do not run user-uploaded binaries from issue attachments. Recreate fixtures from the steps/scripts below.


Issue 8258 — Cursor Agent CLI not detected in sidebar on Windows

Status: needs_setup
Host: Windows 11 10.0.26200, Orca 1.4.143.0
Label: (none — not live-repro conclusive; missing cursor-agent)
Issue: https://github.com/stablyai/orca/issues/8258

Summary

Reporter: running cursor-agent / agent in an Orca PowerShell terminal does not create a Cursor agent row. Root-cause writeup in the issue matches current mainline config.

Environment

Item Value
cursor-agent on PATH NOT FOUND
%LOCALAPPDATA%\cursor-agent absent
agent on PATH C:\Users\neil\.grok\bin\agent.exe (Grok), not Cursor

Config / code (matches issue)

// src/shared/tui-agent-config.ts — cursor entry
detectCmd: 'cursor-agent',
launchCmd: 'cursor-agent',
expectedProcess: 'cursor-agent',
// src/shared/agent-process-recognition.ts
NODE_PACKAGE_SCRIPT_ENTRYPOINTS = {
  codex: ['node_modules/@openai/codex/'],
  gemini: ['node_modules/@google/gemini-cli/']
  // no cursor / cursor-agent entry
}
  • Hooks: orca agent hooks status → cursor: installed (~\.cursor\hooks.json) even without the CLI.
  • Process tests do not map bare agent or node.exe ...\cursor-agent\...\index.js to Cursor (see issue body + agent-detection.test.ts title rules).

Evidence

  • docs/bug-reproductions/evidence/8258-agent-alias-is-grok.txt — agent → Grok
  • docs/bug-reproductions/evidence/hooks-status.json — cursor hooks installed, CLI absent
  • docs/bug-reproductions/issues/8258.json
  • Host inventory: no cursor-agent binary

Expected vs actual

Expected Manual cursor-agent / Cursor Node wrapper shows sidebar Cursor status
Actual on this host Cannot run CLI; detection config still matches reporter’s failure mode

Repro when Cursor CLI is installed

# Install Cursor Agent CLI, then:
orca terminal create --worktree path:C:/Users/neil/orca/orca --command "cursor-agent" --json
Start-Sleep 10
orca worktree ps --json   # expect agentType: cursor
# Also try alias that must NOT collide with Grok/Battle.net Agent.exe

Conclusion

needs_setup — no Cursor Agent CLI on this machine. Source still implements the weak recognition paths described in the issue (name cursor-agent only; no Node package map for Cursor).


How another agent should use this

  1. Read this comment fully (status, expected vs actual, blockers).
  2. If a script is included above, copy it to a temp file and run it on a Windows 11 host with Orca installed (prefer production install under %LOCALAPPDATA%\Programs\orca).
  3. Capture evidence (CLI --json, screenshots, logs) under a local folder; optionally comment results back here.
  4. If status is cannot_repro / needs_setup, satisfy the listed prerequisites first, then re-attempt and flip labels: remove cannot_repro, add has_repro when conclusive.

OrcaWin avatar Jul 17 '26 00:07 OrcaWin

Linked duplicate closed

Closing #8259 as a Discord-bot mirror of this issue. The Discord post restates the same Cursor Agent sidebar-detection failure on Windows and links here; no independent reproduction beyond what's already in this report.

AmethystLiang avatar Aug 01 '26 23:08 AmethystLiang

I have same issue

Snuux avatar Aug 02 '26 08:08 Snuux

Same issue when orchestrating cursor agents there is no indicator of it running

NiklasDor avatar Aug 02 '26 22:08 NiklasDor

Related newer report: #14434 (Windows, Orca 1.4.180). Sidebar shows opencode status but not cursor cli when both tabs are in the same workspace. Unclear whether Cursor is undetected entirely (this issue) or a dual-agent status-display gap. Leaving #14434 open until that's distinguished.

AmethystLiang avatar Aug 14 '26 06:08 AmethystLiang

Resolved by merged PR #8266 (commit 4c7bbed2), which detects the Cursor Agent Node wrapper on Windows. Closing as completed.

nwparker avatar Aug 31 '26 00:08 nwparker