[DOCS] DISABLE_TELEMETRY should document experiment-gate side effects
Documentation Type
Unclear/confusing documentation
Documentation Location
https://code.claude.com/docs/en/env-vars
https://code.claude.com/docs/en/data-usage
https://code.claude.com/docs/en/remote-control
https://code.claude.com/docs/en/changelog
Section/Topic
DISABLE_TELEMETRY, Statsig telemetry, experiment gates, and fallback defaults
Current Documentation
The current docs describe DISABLE_TELEMETRY narrowly as a Statsig telemetry opt-out:
From env-vars.md:
DISABLE_TELEMETRY| Set to1to opt out of Statsig telemetry (note that Statsig events do not include user data like code, file paths, or bash commands)
From data-usage.md:
Claude Code connects from users' machines to the Statsig service to log operational metrics such as latency, reliability, and usage patterns. This logging does not include any code or file paths. ... To opt out of Statsig telemetry, set the DISABLE_TELEMETRY environment variable.
Other docs already imply that the setting affects behavior beyond metrics collection:
data-usage.mdsays surveys are also disabled whenDISABLE_TELEMETRYis setremote-control.mdsays Remote Control eligibility can fail ifDISABLE_TELEMETRYis presentchangelog.mdnotes a fix for/loopnot being available when telemetry was disabled
What's Wrong or Missing?
The docs do not clearly explain that disabling telemetry also disables client-side experiment gates / remote gate fetches.
A recent public comment from Boris Cherny says:
"When you turn off telemetry we also disable experiment gates -- we do not call home when telemetry is off -- so Claude reads the default value."
That means DISABLE_TELEMETRY=1 is not just a metrics/privacy switch. It can also change runtime behavior for any feature controlled by experiment gates, because Claude Code falls back to built-in defaults instead of fetching gate values.
One concrete example mentioned in that comment is prompt cache TTL behavior. The current docs do not make this side effect explicit, so users can reasonably misunderstand the flag as affecting analytics only.
This matters for:
- privacy-conscious users deciding whether to disable telemetry
- debugging why behavior differs across machines or accounts
- understanding why some features, heuristics, or eligibility checks change when telemetry is disabled
Suggested Improvement
Please document explicitly that:
DISABLE_TELEMETRY=1disables Statsig telemetry collection.- It also disables fetching client-side experiment gates / remote gate values.
- When that happens, Claude Code uses built-in default values for behavior controlled by those gates.
- This may affect feature availability, heuristics, or defaults in addition to disabling telemetry.
- If possible, list known examples where this matters.
Suggested wording for env-vars.md:
DISABLE_TELEMETRY=1 opts out of Statsig telemetry. Because Claude Code does not contact Statsig when telemetry is disabled, client-side experiment gates are also not fetched. In that case, Claude Code uses built-in default values for any behavior controlled by those gates. This may affect feature availability or defaults in addition to disabling telemetry.
A cross-link from data-usage.md would also help.
Impact
Medium - Makes feature difficult to understand
Additional Context
Public developer comment:
Relevant current docs:
3 Comments
I collected the actual Statsig cached evaluations and telemetry files from my Claude Code installation (v2.0.70–2.0.76) over ~4 months.
How I found this: I compared Claude Code with Claw-Code (the open-source fork from the March 2026 leak). The diff revealed what was stripped: Statsig integration, feature gates, A/B experiments, and telemetry infrastructure. From there I examined the local cache files Claude Code had already written to my machine. Ironically, Claude Code itself cannot identify its own surveillance infrastructure — I had to use the open-source version and local uncensored LLMs to analyze it.
73 files, 36 MB of raw data showing:
variant_positive_attitude(behavioral manipulation)session_recording_rate: 1(100% of sessions recorded)All PII has been redacted. Feature gates, experiments, and configs are intact.
Download sanitized evidence: https://gofile.io/d/Nf3eBO
This supports the issue: disabling telemetry doesn't just affect metrics — it changes which experiment gates are active, which directly affects Claude Code's behavior in ways users can't see or control.
Concrete data point for the Remote Control side effect.
On a direct Anthropic setup (claude.ai subscription auth, not an enterprise
provider like Bedrock/Vertex/Foundry),
DISABLE_TELEMETRY=1forces a genuineeither/or between two first-party features that need opposite
feature-flag-fetching states:
sessions that run with feature-flag fetching off" → needs fetching OFF,
i.e. it effectively requires
DISABLE_TELEMETRY=1here.With the flag set,
claude doctorreports:Net effect: you can have SendMessage or Remote Control, never both, and
nothing surfaces the conflict — the only hint is that one
doctorline. Beyondthe doc note this issue asks for, a runtime warning when both are configured
would help. (Claude Code 2.1.232, macOS.)
Me and my Agent find some workaround for this:
Environment: Claude Code 2.1.296 (VS Code extension, native binary), Windows 10.
Summary
Setting
DISABLE_TELEMETRY=1does more than stop telemetry. It also switches off feature-flag evaluation, so every flag-gated feature silently falls back to its hard-coded default. For me the visible loss was the PowerShell tool. There is a way to keep telemetry off and get the features back; it is described below and verified in the VS Code extension.What happened
I added
"DISABLE_TELEMETRY": "1"toenvin~/.claude/settings.json. Every session started after that had Bash but no PowerShell tool. The same went for subagents, including one whose definition lists PowerShell. The version was the same before and after: all 11 sessions started before the change had the tool, all 3 started after it did not. Nothing in the session said why.Cause
DISABLE_TELEMETRYset, the traffic mode isno-telemetry, and in that mode flag evaluation is off. The cached payload in~/.claude.json(cachedGrowthBookFeatures) stays on disk but is not read, andcachedGrowthBookFeaturesAtstops moving.if(process.env.DISABLE_TELEMETRY)return"no-telemetry", whileDO_NOT_TRACKright next to it goes through a boolean parser. SoDISABLE_TELEMETRY=0should still count as opted out. I read this in the 2.1.296 bundle and did not test0.Workarounds (telemetry stays off)
"CLAUDE_CODE_USE_POWERSHELL_TOOL": "1"in the settingsenv. The tool came back at once, in a session that was already running.CLAUDE_CODE_GB_DISK_CACHE_WHEN_TELEMETRY_OFF=1. Flags are then read from the last payload cached on disk, and nothing is fetched.Test for 2: three
claude -pruns, each withDISABLE_TELEMETRY=1and no user settings. The tool list comes from theinitevent of--output-format stream-json.| Extra variable | Tools | PowerShell |
|---|---|---|
| none | 25 | no |
|
CLAUDE_CODE_GB_DISK_CACHE_WHEN_TELEMETRY_OFF=1| 28 | yes ||
CLAUDE_CODE_USE_POWERSHELL_TOOL=1| 26 | yes |Verified in the VS Code extension
I set the variable as a Windows user environment variable and restarted VS Code completely. In the next extension session:
DISABLE_TELEMETRY=1were both in the session's environment,Monitor,PushNotification),cachedGrowthBookFeaturesAtwas unchanged, so the flags came from disk and nothing was fetched.Caveats
envblock ofsettings.jsonit is ignored: it never reached the session's tool environment, whileCLAUDE_CODE_USE_POWERSHELL_TOOLfrom the same block did. In the bundle it is on a list of names that are not accepted from settings.Side observation
With flags back, a plugin marked
@synced(claude-security; its marketplace copy ships hooks) loaded again, although it is not in myenabledPlugins. It first appeared in the last session I started before the opt-out, was absent in every session with flags off, and came back now. So I assume it is flag-gated too. That is an inference from the correlation, not something I traced in the code.Suggestions
DISABLE_TELEMETRYas a boolean, likeDO_NOT_TRACK.