fix(cursor): default binary path to cursor-agent PR Description#3481
fix(cursor): default binary path to cursor-agent PR Description#3481Aditya190803 wants to merge 2 commits into
Conversation
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.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
ApprovabilityVerdict: Needs human review This PR changes the default executable binary path from 'agent' to 'cursor-agent' and adds migration logic that transforms existing configurations. Changes to which binary gets spawned affect runtime behavior and should be verified by someone familiar with the deployment environment. The author is also a new contributor to this repository. You can customize Macroscope's approvability policy. Learn more. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a4608306a6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| provider: DRIVER_KIND, | ||
| packageName: null, | ||
| updateExecutable: "agent", | ||
| updateExecutable: "cursor-agent", |
There was a problem hiding this comment.
Align Cursor recovery command with cursor-agent
When Cursor reports an old CLI version or non-lab channel, getCursorParameterizedModelPickerUnsupportedMessage still tells users to run agent set-channel lab && agent update (apps/server/src/provider/Layers/CursorProvider.ts:784). In the Grok-alongside-Cursor setup this change is fixing, that command still resolves to Grok, so affected users remain stuck in the unsupported state even though the maintenance command now uses cursor-agent; please update the hard-coded recovery command to match this executable.
Useful? React with 👍 / 👎.
Fixes #3479
When Grok CLI is installed alongside Cursor, the shared
agentcommand name resolves to Grok and breaks Cursor ACP discovery. Default Cursor tocursor-agent, map legacyagentconfigs on decode, and align update probes and spawn fallbacks with the new binary name.What Changed
binaryPathfromagenttocursor-agentbinaryPath: "agent"resolve tocursor-agent(explicit full paths are unchanged)cursor-agentWhy
T3 was invoking
agent acpfor Cursor provider discovery. On machines where both Grok CLI and Cursor are installed,agentoften resolves to Grok first, causing Cursor ACP model discovery to fail withAcpTransportErroreven thoughcursor-agentworks correctly.cursor-agentis 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-agentinstead ofagent.Checklist
Note
Low Risk
Targeted provider binary resolution and settings decode migration; no auth or data-path changes, with explicit custom binary paths preserved.
Overview
Fixes Cursor invoking the wrong CLI when Grok’s shared
agentname wins on PATH by standardizing oncursor-agentfor spawn, ACP discovery, and provider self-updates.Settings:
CursorSettings.binaryPathnow defaults tocursor-agent, withnormalizeCursorBinaryPathrewriting legacy bare"agent"on decode; explicit paths (e.g./usr/local/bin/agent) are unchanged. The settings placeholder reflects the new default.Server alignment:
buildCursorAcpSpawnInput,CursorDrivermaintenance (cursor-agent update), the model-mismatch probe script, and tests/fixtures are updated to expectcursor-agentinstead ofagent.Reviewed by Cursor Bugbot for commit e9d51bf. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Default Cursor binary path to
cursor-agentinstead ofagent"agent"to"cursor-agent"across spawn inputs, driver config, and the probe script.normalizeCursorBinaryPathinsettings.tsand a newmakeCursorBinaryPathSettingschema factory that trims, defaults to"cursor-agent", and maps the legacy value"agent"to"cursor-agent"on decode."agent"asbinaryPathwill be silently normalized to"cursor-agent"at decode time.Macroscope summarized e9d51bf.