fix(telemetry): count coding agents as machines, no project id outside git
Merged
OK
2mo ago+77+77+01234567890123456789-64-64-01234567890123456789
Telemetry merged real users into shared ids and created project ids nobody returns to. That skews retention.
- Coding agents count as machines. Agents often set
CI=1in the shells they spawn. With no CI vendor marker, those runs all collapsed intoci:unknown. NowCI+ a detected coding agent + no vendor uses the machine id (packages/e2e/src/telemetry/environment.ts). PlainCIwith no vendor and no agent staysci:unknown. - More CI vendors recognized: EAS Build, Bitrise, Codemagic and Xcode Cloud.
- No project id outside git. Outside git or in a shallow clone,
project_idis nownullinstead of a hash of the path with a per-machine salt. Those ids were the same project on one machine only, so a scratch dir looked like a project that churned. - The salt is still written to
telemetry.json. Older versions replace the machine id when the file has no salt, and machines often have several versions installed.
Data from PostHog, last 60 days, canary builds excluded:
ci:unknown: about 3.5k sessions. Most came from coding agents: Claude Code 2,223 (67 projects), Codex 137, Cursor 65. 998 had no agent.- Projects that ran once: 1,691 of 4,899.
Verified
Ran it locally: yes
- Packed CLI from this branch installed in
/tmp,E2E_TELEMETRY_DEBUG=1 node node_modules/e2e/dist/cli/bin.js telemetry status, reading the printed payload. "main" is the publishede2e@0.17.0.
| env | main | this branch |
|---|---|---|
| non-git dir, local | project_id: 389d… (salted path) | project_id: null |
non-git dir, CI=1 CLAUDECODE=1 | distinct_id: ci:unknown | distinct_id: cd15… (machine id) |
non-git dir, CI=1 | ci:unknown | ci:unknown |
git repo, CI=1 EAS_BUILD=true | ci:unknown | ci:eas, project_id: 7cd3… |
git repo, CI GITHUB_ACTIONS CLAUDECODE | ci:github-actions | ci:github-actions |
The new telemetry.json still contains salt.