fix(cursor): use Agent CLI build id for x-cursor-client-version - #6795
Merged
diegosouzapw merged 2 commits intoJul 10, 2026
Merged
diegosouzapw merged 2 commits into
diegosouzapw merged 2 commits into
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 lintnpm run test:unitnpm run test:coverage