CLAUDE_CODE_ENABLE_TELEMETRY
A Claude Code environment variable, read out of the shipped bundle. It has been in the build since v2.1.138, including the newest one read.
What it is
Set to 1 to enable OpenTelemetry data collection for metrics and logging. Required before configuring OTel exporters. See [Monitoring](/docs/en/monitoring-usage)
Anthropic's own wording. Read off Environment variables, captured 2026-08-28.
Presence across releases
| Releases | Reading | Declared type | Default |
|---|---|---|---|
| 2.1.245 – 2.1.250 5 releases | never mined | — | — |
| 2.1.213 – 2.1.243 30 releases | in the build | — | — |
| 2.1.160 – 2.1.212 45 releases | in the build | bool | — |
| 2.1.138 – 2.1.159 20 releases | in the build | — | — |
A row reading never mined is a release with no archived bundle behind it. Nothing was read out of it, so nothing here says whether the name was in it. A declared type or a default is only ever what that release's own bundle stated.
Changelog entries naming it
-
v2.1.248Telemetry enablement read through a helper
The telemetry on/off check moved into a helper; the same env var still controls it.
named in this entry
Documentation pages
- Environment variables reference table Claude Code CLI
- Hosting the Agent SDK mentions it Claude Code CLI
- Observability with OpenTelemetry mentions it Claude Code CLI
- Claude apps gateway configuration mentions it Claude Code CLI
- Monitoring mentions it Claude Code CLI
- Self-hosted environments reference mentions it Claude Code CLI
- Claude Code settings mentions it Claude Code CLI
- Example settings files mentions it Claude Code CLI
A reference table page is one whose own table defines this name, and it is where the description above came from. A page that mentions it carries the name somewhere in its text and may say nothing about it at all. Every page carrying it.
Names beside it
Every environment variable in the inventory starting claude_code_enable, up to twelve of them.
CLAUDE_CODE_ENABLE_APPEND_SUBAGENT_PROMPTSet to 1 to enable appending extra text to the end of the system prompt of every [subagent](/docs/en/sub-agents) other than a [forked subagent](/docs/en/sub-agents#fork-the-current-conversation). The [--append-subagent-system-prompt](/docs/en/cli-reference#cli-flags) flag supplies the appended text and sets this variable automatically, so you don't need to set it yourself. Requires Claude Code v2.1.205 or later 2.1.138
CLAUDE_CODE_ENABLE_AUTO_MODEAccepted for compatibility with older releases and has no effect. Auto mode is available by default on every provider, including Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](/docs/en/claude-apps-gateway) sessions. In v2.1.158 through v2.1.206, setting this to 1 was required to make [auto mode](/docs/en/permission-modes#eliminate-prompts-with-auto-mode) available on those providers 2.1.158
CLAUDE_CODE_ENABLE_AWAY_SUMMARYOverride [session recap](/docs/en/interactive-mode#session-recap) availability. Set to 0 to force recaps off regardless of the /config toggle. Set to 1 to force recaps on when [awaySummaryEnabled](/docs/en/settings-reference#awaysummaryenabled) is false. Takes precedence over the setting and /config toggle 2.1.138
CLAUDE_CODE_ENABLE_BACKGROUND_PLUGIN_REFRESHSet to 1 to refresh plugin state at turn boundaries in [non-interactive mode](/docs/en/headless) after a background install completes. Off by default because the refresh changes the system prompt mid-session, which invalidates [prompt caching](/docs/en/prompt-caching) for that turn 2.1.138
CLAUDE_CODE_ENABLE_CFCNo description from anybody. 2.1.138
CLAUDE_CODE_ENABLE_DESIGN_MCPNo description from anybody. 2.1.179
CLAUDE_CODE_ENABLE_DESIGN_SYNCNo description from anybody. 2.1.166
CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOLThe experimental advisor override no longer skips per-model eligibility checks, only the rank requirement. 2.1.138
CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTELSet to 1 to route the "How is Claude doing?" session quality survey to your own [OpenTelemetry collector](/docs/en/monitoring-usage) when Anthropic-bound nonessential traffic is blocked. Survey ratings are emitted only as OTEL events to your configured collector. No survey data is sent to Anthropic in this mode. Applies when CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC, DISABLE_TELEMETRY, or DO_NOT_TRACK is set, and has no effect otherwise. CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY and the organization product feedback policy take precedence 2.1.138
CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMINGControls whether tool call inputs stream from the API as Claude generates them. With this off, a large tool input such as a long file write arrives only after Claude finishes generating it, which can look like it's hanging. Enabled by default on the Anthropic API. On Amazon Bedrock and Google Cloud's Agent Platform, enabled per model where the deployed container supports it. Set to 0 to opt out. Set to 1 to force on when routing through a proxy via ANTHROPIC_BASE_URL, ANTHROPIC_VERTEX_BASE_URL, or ANTHROPIC_BEDROCK_BASE_URL. Off by default on Microsoft Foundry and [gateway](/docs/en/llm-gateway) connections 2.1.138
CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERYSet to 1 to populate the /model picker from your gateway's /v1/models endpoint when ANTHROPIC_BASE_URL points at an Anthropic-compatible gateway such as LiteLLM, Kong, or an internal proxy. Off by default because gateways backed by a shared API key would otherwise show every user every model the key can access. Discovered models are still filtered by an [availableModels](/docs/en/settings-reference#availablemodels) allowlist the session receives; deliver the list through [MDM or a managed settings file](/docs/en/managed-settings#delivery-mechanisms), since [server-managed delivery is not available on gateway configurations](/docs/en/server-managed-settings#platform-availability) 2.1.138
CLAUDE_CODE_ENABLE_LAUNCH_COMPOSERNo description from anybody. 2.1.193
Read out of the published npm bundle release by release, and out of Anthropic's own documentation as this site captured it. Nothing on this page is a description anybody here wrote about what the environment variable does. All environment variables.