Repository navigation
feat(analytics): record how and where each command runs - #444
Merged
Merged
Conversation
CLI usage events could not tell new developers apart from automation, CI, or remote agents. Login problems in remote environments were also hidden among other failures. Start and End events now report how the run signed in, what kind of machine ran it, and the operating system. The CLI sends only fixed categories. It never sends token contents or environment values. Existing event properties do not change. Closes #442 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L1dGD6moc6oMbcTcBsC6pN
Codex cloud sets CODEX_EXEC_SERVER_REMOTE_BASE_URL. The local Codex CLI does not, so the variable separates cloud runs from local runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L1dGD6moc6oMbcTcBsC6pN
The runtime fell back to local when no check matched. As a result, unrecognized cloud sandboxes looked like developer machines. Unrecognized Linux machines now report unknown. Local applies to macOS, Windows, and WSL only. The runtime also recognizes Modal, E2B, CodeSandbox, Kubernetes, AWS CodeBuild, and TeamCity. Vercel counts as CI only during builds, because Vercel also sets VERCEL at runtime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L1dGD6moc6oMbcTcBsC6pN
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L1dGD6moc6oMbcTcBsC6pN
angeloashmore
marked this pull request as ready for review
October 29, 2026 22:00
Claude Code sets AI_AGENT with its version, such as claude-code_2-1-296_agent. Usage events split Claude Code into one agent value for each release. The agent value is now claude-code for every Claude Code release. Saved charts match it with "contains" or "has prefix", so they keep working. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L1dGD6moc6oMbcTcBsC6pN
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L1dGD6moc6oMbcTcBsC6pN
lihbr
approved these changes
Oct 30, 2026
Cursor cloud agents set CLOUD_AGENT_ALL_SECRET_NAMES next to CURSOR_AGENT. Local Cursor sets only CURSOR_AGENT, so the pair separates cloud runs from local runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L1dGD6moc6oMbcTcBsC6pN
Bugbot is paused — your team has an unpaid invoiceBugbot is paused because your team has an unpaid invoice. Pay it from the billing page in the Cursor dashboard and Bugbot resumes automatically. (requestId: 200ca19b-14c8-4de3-98cf-7f553801b3f7) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Resolves: #442
Description
Before this PR, CLI usage events recorded the command, the repository, and the agent. They did not show how a run signed in or what kind of machine ran it. As a result, CI jobs, remote agents, and new developers looked the same. Login problems in remote environments also stayed hidden among other failed commands.
After this PR, the
Prismic CLI StartandPrismic CLI Endevents also report:auth:login,user-token,write-token,unknown-token, ornoneruntime:local,ci,cloud,container, orunknownruntimeProvider: the CI or cloud platform, when the CLI recognizes itos: the operating systemEach value reports only what the CLI can find out. A Linux machine with no known marker reports
unknown, notlocal, so unrecognized cloud sandboxes do not look like developer machines. The CLI sends only these categories. It never sends token contents or environment values.The
agentproperty also reports Claude Code asclaude-code, without a version. Before, each Claude Code release had its own value, such asclaude-code_2-1-296_agent. Saved charts match Claude Code with "contains" or "has prefix", so they keep working. Other existing properties do not change.The CLI does not recognize v0 or Google Jules yet.
Checklist
Preview
How to QA 1
npm run build.PRISMIC_TELEMETRY_ENABLED=trueon your computer, in a CI job, and in a cloud agent.auth,runtime,runtimeProvider, andagentvalues for each run.🤖 Generated with Claude Code
https://claude.ai/code/session_01L1dGD6moc6oMbcTcBsC6pN
Footnotes
Please use these labels when submitting a review:
⚠️ #issue: Strongly suggest a change.
❓ #ask: Ask a question.
💡 #idea: Suggest an idea.
🎉 #nice: Share a compliment. ↩