t3code icon indicating copy to clipboard operation
t3code copied to clipboard

fix(cursor): default binary path to cursor-agent PR Description

Open Aditya190803 opened this issue 5 months ago • 3 comments

Fixes #3479

When Grok CLI is installed alongside Cursor, the shared agent command name resolves to Grok and breaks Cursor ACP discovery. Default Cursor to cursor-agent, map legacy agent configs on decode, and align update probes and spawn fallbacks with the new binary name.

What Changed

  • Changed the default Cursor binaryPath from agent to cursor-agent
  • Added decode-time migration so existing configs with binaryPath: "agent" resolve to cursor-agent (explicit full paths are unchanged)
  • Updated Cursor ACP spawn fallbacks, provider update probes, and related tests to use cursor-agent

Why

T3 was invoking agent acp for Cursor provider discovery. On machines where both Grok CLI and Cursor are installed, agent often resolves to Grok first, causing Cursor ACP model discovery to fail with AcpTransportError even though cursor-agent works correctly.

cursor-agent is the correct Cursor CLI binary name and avoids this collision. Mapping legacy "agent" values preserves existing user configs without requiring a manual settings change.

UI Changes

N/A — server-side provider discovery and settings default only. The settings placeholder now shows cursor-agent instead of agent.

Checklist

  • [x] This PR is small and focused
  • [x] I explained what changed and why
  • [ ] I included before/after screenshots for any UI changes
  • [ ] I included a video for animation/interaction changes

[!NOTE] Low Risk Provider discovery and settings normalization only; no auth or data-path changes, with backward-compatible decode for stored agent values.

Overview Fixes Cursor invoking the wrong CLI when agent on PATH points at Grok instead of Cursor.

Settings: CursorSettings.binaryPath now defaults to cursor-agent. Decode maps the legacy bare name agent to cursor-agent; custom paths (e.g. /usr/local/bin/agent) are unchanged. The settings placeholder reflects the new default.

Runtime: ACP spawn fallbacks, provider self-update (cursor-agent update), and the model-mismatch probe script use cursor-agent when no custom path is set. Tests and mocks were updated to match.

Reviewed by Cursor Bugbot for commit ca0cafa7597a56fafff655c875cd15c61769f608. Bugbot is set up for automated code reviews on this repo. Configure here.

[!NOTE]

Default Cursor binary path to cursor-agent instead of agent

  • Changes the default binary name from "agent" to "cursor-agent" across ACP spawning (CursorAcpSupport.ts), maintenance commands (CursorDriver.ts), and the probe script.
  • Adds normalizeCursorBinaryPath in settings.ts that maps the legacy value "agent" to "cursor-agent", preserving any other explicit path.
  • CursorSettings.binaryPath now decodes to "cursor-agent" by default and normalizes stored values of "agent" on read.
  • Behavioral Change: existing configurations with binaryPath set to "agent" will silently resolve to "cursor-agent" after this change.

Macroscope summarized ca0cafa.

Aditya190803 avatar Jun 21 '26 11:06 Aditya190803

[!IMPORTANT]

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8f94de5d-c2f9-4eba-8734-e1b663cb2918

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • [ ] 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot] avatar Jun 21 '26 11:06 coderabbitai[bot]

Approvability

Verdict: Needs human review

An unresolved review comment identifies that the user-facing recovery message at CursorProvider.ts:799 still references the old 'agent' binary name, leaving the fix incomplete. Additionally, this changes runtime behavior by altering the default executable spawned.

You can customize Macroscope's approvability policy. Learn more.

macroscopeapp[bot] avatar Jun 21 '26 11:06 macroscopeapp[bot]

@juliusmarminge hey, when you get a chance could you take a look at this? small fix for cursor binary path colliding with grok

Aditya190803 avatar Jul 10 '26 05:07 Aditya190803