Skip to content

fix(cursor): use Agent CLI build id for x-cursor-client-version - #6795

Merged
diegosouzapw merged 2 commits into
diegosouzapw:release/v3.8.47from
andrewmunsell:fix/cursor-cli-signatures
Jul 10, 2026
Merged

diegosouzapw merged 2 commits into
diegosouzapw:release/v3.8.47from
andrewmunsell:fix/cursor-cli-signatures

Conversation

@andrewmunsell

Copy link
Copy Markdown
Contributor

AgentService/Run impersonation was sending cli-${getCursorVersion()}, which reads the Cursor IDE state.vscdb (or FALLBACK_VERSION "3.9"). That produces wire values like cli-3.9 / cli-3.10.20.

History: pre-v3.8.0 the executor impersonated the IDE (x-cursor-client-type: ide, bare 3.x version, Cursor/UA + checksum). The v3.8.0 Agent Run migration switched to CLI-shaped headers (connect-es, client-type: cli) but reused the IDE detector and only prefixed cli-. Real cursor-agent embeds a dated build id (e.g. cli-2026.07.08-0c04a8a). Later UA refreshes (#5237) kept bumping the IDE pin, so the mismatch persisted.

Add getCursorAgentCliVersion(): CURSOR_AGENT_CLI_VERSION env, then local install detect (~/.local/bin shim realpath or versions dir / CURSOR_DATA_DIR), else pin 2026.07.08-0c04a8a. Keep IDE getCursorVersion() for checksum/registry paths. Align cursor-tap and document the new env var.

Validation

  • npm run lint
  • npm run test:unit
  • npm run test:coverage
  • Manually validated headers were updated with the Cursor CLI version string

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants