CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC

Updated by

CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC turns off auto-updates, telemetry, error reporting, /feedback, release notes and feature-flag fetching in one switch; model API calls are unaffected. Default: unset, so nonessential traffic is allowed. Values: Any non-empty value turns it on, including 0 and false; unset it to turn it off. Present since v2.1.69 or earlier and still present in v2.1.332. It is listed in the official reference.

StatusPresent in v2.1.332
AddedPresent since v2.1.69 or earlier
Defaultunset, so nonessential traffic is allowed
ValuesAny non-empty value turns it on, including 0 and false; unset it to turn it off
CategoryFeature toggles
Official docsListed
Checked againstv2.1.330

How to set it

For one session, export it in the shell that starts Claude Code:

export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
claude

1 air-gapped or strict-egress machines that should only reach the model API.

To apply it to every session, add it to the env object of a settings file:

// ~/.claude/settings.json
{
  "env": {
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
  }
}

Known issues

  • Setting it to 0 or false still disables the traffic. Only removing the variable turns it back on. Source: docs: env vars.
  • It also stops feature-flag fetching, so Remote Control and other flag-gated features are unavailable. A user report shows the newest model missing from the /model picker when flags are skipped; /model with the full model ID still works. Source: issue #108726.
  • Early 2026 versions dropped subscribers from the 1-hour prompt cache to 5 minutes when telemetry was off. That was fixed in April 2026; to pin the TTL, set CLAUDE_CODE_PROMPT_CACHE_TTL=1h. Source: issue #45381.

Release notes that mention it

Related variables

Frequently asked questions

What does CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC do?

Turns off auto-updates, telemetry, error reporting, /feedback, release notes and feature-flag fetching in one switch; model API calls are unaffected.

What is the default value of CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC?

Unset, so nonessential traffic is allowed.

What values does CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC accept?

Any non-empty value turns it on, including 0 and false; unset it to turn it off.

Which Claude Code version has CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC?

Present since v2.1.69 or earlier and still present in v2.1.332.

How do I set CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC?

Export it before starting Claude Code (export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1), or add it to the "env" object in ~/.claude/settings.json to apply it to every session. 1 air-gapped or strict-egress machines that should only reach the model API.

All variables, searchable: Claude Code environment variables.