Features and Toggles
These variables flip one feature each. Some turn off a feature that is on by default. Others force on a feature that a server flag controls. A row with the Gated badge only works when a feature flag or server gate allows it, unless the variable overrides the gate.
This page lists 66 variables. Most take 1 to turn on and 0 to turn off.
Example
export CLAUDE_CODE_SIMPLE=1
claude
Claude Code starts in its minimal mode. This is the same mode that the --bare flag turns on.
Variables
The table is sorted by name. The Gated badge tells you a flag or gate is involved. See Environment Variables for the columns.
| Variable | Status | What it does | Values and default | Notes |
|---|---|---|---|---|
AI_ | Undocumented | Carries an agent id for child tools. Claude Code fills it when it is unset or starts with claude- or claude-. | On or off | All sessions. Not set from project env before trust |
BUN_ | Undocumented Gated | Sets the Chrome binary for the artifact preview browser. It replaces the search for Playwright and system Chrome. | Text. Preview needs CLAUDE_ or a feature flag and a build that includes it | Artifact preview (feature gated) |
CLAUDE_ | Undocumented Gated | Turns artifacts on or off. A falsy value turns them off. | On or off. First-party only. A truthy value overrides the SDK default-off | First-party provider. gated by a feature flag flag. Not set from project env before trust |
CLAUDE_ | Undocumented | Turns artifact asset uploads on or off. | On, off, or unset. Without it the agent mode or the host capabilities decide. The value also sets the reported source to env | Artifacts. Not set from project env before trust |
CLAUDE_ | Undocumented Gated | Turns on a quick acknowledgement reply to artifact comments before the full reply. | On, off, or unset, false by default. Else a feature flag decides with default false. The ack text starts I'm on it | Artifacts with comment auto-react. gated by a feature flag flag. Not set from project env before trust |
CLAUDE_ | Undocumented Gated | Turns on responder dispatch for artifact comment threads. A classifier picks the lane act or pipeline. | On, off, or unset, false by default. Else a feature flag decides with default false | Artifacts with comment auto-react. gated by a feature flag flag. Not set from project env before trust |
CLAUDE_ | Documented Differs Gated | Turns the reading of artifact comments on or off. | On, off, or unset, false by default. Docs only mention 0 to stop it | Artifacts. gated by a feature flag flag. Not set from project env before trust |
CLAUDE_ | Documented Differs Gated | Lets Claude reply on its own to comments sent to it. | On, off, or unset, false by default. Docs only mention 0 to stop it | Artifacts. gated by a feature flag flag. Not set from project env before trust |
CLAUDE_ | Undocumented | Turns the artifact database feature on or off. | On, off, or unset, on by default. A falsy value turns it off. The calls go to / | Artifacts. Not set from project env before trust |
CLAUDE_ | Undocumented Gated | Turns on the str_ edit operation for artifact database documents. | On, off, or unset, false by default. Needs CLAUDE_ on. Else a feature flag decides with default false | Artifacts. gated by a feature flag flag. Not set from project env before trust |
CLAUDE_ | Undocumented Gated | Turns on artifact delete. | On, off, or unset, false by default. Else a feature flag decides with default false. Remote sessions may disable it by another check | Artifacts. gated by a feature flag flag. Not set from project env before trust |
CLAUDE_ | Undocumented | Lets artifact reads fetch fresh data from the docs store. Set to 0 to turn this off. | On, off, or unset, on by default. Only the value false turns it off | Artifacts with the docs store. Not set from project env before trust |
CLAUDE_ | Undocumented Gated | Overrides a gate for artifact hot updates. No visible effect in a print-mode probe (Probes). | On, off, or unset, off by default. A session value frozen wins first | Artifacts, gated by a feature flag |
CLAUDE_ | Undocumented Gated | Overrides the artifact inherited-type-grant gate. Claude Code logs the result as a feature flag. | Off by default. Env read | Artifacts, gated by a feature flag |
CLAUDE_ | Undocumented Gated | Forces the artifact multi-file gate on or off. No visible effect in a print-mode probe (Probes). | On, off, or unset, off by default | Artifacts, gated by a feature flag |
CLAUDE_ | Undocumented Gated | Forces the artifact open-action gate on or off. No visible effect in a print-mode probe (Probes). | On, off, or unset, off by default | Artifacts, gated by a feature flag |
CLAUDE_ | Undocumented | Set to false to turn off the artifact prefetch at session start. | On, off, or unset. Only false has an effect. Otherwise the result follows the artifact REPL tool and quickstart checks | Artifacts, when the base check passes |
CLAUDE_ | Undocumented | Turns the artifact path-pin check on or off. The check makes Claude read published files before it replaces or removes them. | On, off, or unset, true by default. A session value frozen wins first | Artifacts |
CLAUDE_ | Undocumented | Turns artifact pinning on or off. Pinning is also off in some cloud sessions. | On, off, or unset, true by default. Returns off in a CLAUDE_ session that is not a bound cloud session | Artifacts, local and cloud sessions |
CLAUDE_ | Undocumented Gated | Forces the artifact presence connection on or off. Presence keeps one live connection for each artifact slug. | On, off, or unset, off by default | Artifacts, gated by a feature flag |
CLAUDE_ | Undocumented | Set to false to turn off artifact preview. Set to true to force it on. | On, off, or unset. Unset means preview follows a browser check. In a CLAUDE_ session it may pick the emulator engine, else local Chrome | Artifacts, local and cloud sessions |
CLAUDE_ | Undocumented Gated | Pins the artifact preview emulator off or on. | On, off, or unset. false pins it off. true pins it on if the emulator skill files pass a check | Cloud sessions, gated by a feature flag |
CLAUDE_ | Documented | Lets the artifact publish tool apply small edits to a file in the same call. Set to 0 to turn that off. | On, off, or unset, true by default | Artifacts |
CLAUDE_ | Undocumented | Turns on artifact sharing when set to true in a cloud or desktop session. | On, off, or unset. Sharing needs true and a cloud or desktop surface. Presence of any value also marks the host contract | Cloud and desktop sessions |
CLAUDE_ | Undocumented Gated | Forces the artifact start kit gate on or off. No visible effect in a print-mode probe (Probes). | On, off, or unset, off by default | Artifacts, gated by a feature flag |
CLAUDE_ | Undocumented Gated | Picks the artifact tool set. When on, Claude loads the artifact tool through tool search. | On, off, or unset, off by default | Artifacts, gated by a feature flag |
CLAUDE_ | Undocumented Gated | Forces the artifact type catalog gate on or off. | On, off, or unset, off by default | Artifacts, gated by a feature flag |
CLAUDE_ | Undocumented Gated | Forces on or off the creation of a new artifact from a type in cloud sessions. | On, off, or unset, off by default | Cloud sessions, gated by a feature flag |
CLAUDE_ | Undocumented Gated | Forces the artifact types gate on or off. It works with the / endpoints. | On, off, or unset, off by default | Artifacts, gated by a feature flag |
CLAUDE_ | Undocumented Gated | Turns on artifact verify reads from /. It is always off in CLAUDE_ sessions. | On, off, or unset, off by default | Local sessions, gated by a feature flag |
CLAUDE_ | Undocumented | Sends attachments by path. It sets the upload mode to none and keeps the file delivery tool on without the first-party check. | On or off, off by default. Also keeps tool results in subagents | All sessions |
CLAUDE_ | Undocumented Gated | Forces the attribution announcement on or off. | On, off, or unset, on by default. Cached per session | All sessions, gated by a feature flag |
CLAUDE_ | Undocumented | Forces the basalt_ client-data feature on. Probe: Adds a "Communicating with the user" section and a code-comment rule to the system prompt. See Probes. | On or off. Else the basalt_ client-data entry decides | All sessions |
CLAUDE_ | Documented | Turns off the Artifact tool. No settings file can turn it back on. | On or off. Used as the env next to the enable setting | All sessions. Project env can set it before trust |
CLAUDE_ | Undocumented | Turns off the proactivity selector, which is on by default through a feature flag. | On or off. Claude Code passes 1 to background sessions it starts when set | All sessions |
CLAUDE_ | Undocumented | Sets how long a non-interactive start waits for the GrowthBook flag fetch. | A number of milliseconds, 3000 by default. Whole number of at least 0 | Non-interactive and remote startup |
CLAUDE_ | Undocumented | Starts the GrowthBook flag fetch during init. | On or off, off by default. Also recorded in the startup flag fetch event | Startup |
CLAUDE_ | Undocumented | Starts the GrowthBook flag fetch even when the disk cache is warm, for remote non-interactive starts. | On or off, off by default. Recorded in the startup flag fetch event | Remote non-interactive startup |
CLAUDE_ | Undocumented | Turns on partial message streaming in print or SDK mode, as an OR with the matching CLI option. | On or off. Combined with a local flag value | Print and SDK modes |
CLAUDE_ | Undocumented Gated | Forces the prefetch of managed config on or off. | On, off, or unset. Unset gives false unless a first-party login exists and a feature flag is not on | First-party logins |
CLAUDE_ | Undocumented Gated | Overrides a feature flag, which defaults to on. No visible effect in a print-mode probe (Probes). | On, off, or unset. Wins over the flag when set | All sessions |
CLAUDE_ | Undocumented Gated | Gates a per-turn timing feature for the model request. No visible effect in a print-mode probe (Probes). | Needs a model check and a per_ setting, else it falls back to per_ | All sessions |
CLAUDE_ | Undocumented Gated | Forces the pewter_ and pewter_ features on or off. It wins over a feature flag and a feature flags. | On, off, or unset. Without it the code checks non-interactive mode, a model allowlist (a feature flag), then the flag or client data | All sessions, gated by a feature flag |
CLAUDE_ | Undocumented Gated | Forces only the pewter_ feature on or off. When true it also changes the turn-end check that uses a feature flag. | On, off, or unset. Wins over CLAUDE_ for this one feature | All sessions, gated by a feature flag |
CLAUDE_ | Undocumented Gated | Overrides a feature flag. drop maps to drop_ and block maps to error. No visible effect in a print-mode probe (Probes). | enum of drop, block, off. Order is env, then client data, then the flag | All sessions |
CLAUDE_ | Undocumented | When true it turns on a URL cache state for the web fetch tool. It also joins an entrypoint check. No visible effect in a print-mode probe (Probes). | On or off | All sessions |
CLAUDE_ | Documented | Starts safe mode. Config such as CLAUDE., skills, plugins, hooks, and MCP servers does not load. Managed policy still applies. | On or off. Boolean 1 or true. The -- flag sets it to 1 and also sets CLAUDE_ to 1 | All sessions. The -- command refuses to run in safe mode |
CLAUDE_ | Documented | Runs a minimal mode with Bash, read, and edit tools only. Hooks, skills, plugins, MCP discovery, auto memory, and CLAUDE. do not load. | On or off. Boolean. The -- flag sets it to 1 | All sessions. Set by Claude Code for -- |
CLAUDE_ | Undocumented Gated | Sets the scope of a feature flag feature. No visible effect in a print-mode probe (Probes). | Text. Else a recorded value or the flag client data with threads, all, or off is used | All sessions, behind a feature flag |
CLAUDE_ | Undocumented | Leaves the session URL out of attribution text such as commit and PR footers. | On or off. The attribution. setting set to false has the same effect | All sessions |
CLAUDE_ | Undocumented | Selects the todo reminder mode. Env wins over the feature flag. | One of a fixed set of values, baseline by default. Enum baseline or off | All sessions |
CLAUDE_ | Undocumented | When on, workflow discovery returns only the built-in workflow list and scans no files. | - | - |
CLAUDE_ | Undocumented | Turns the workshop authoring-progress hook off when set to a false value. | - | - |
DISABLE_ | Undocumented | Stops the brief-mode check at the end of a turn. That check adds a reminder when the turn used no brief tool. No visible effect in a print-mode probe (Probes). | On or off | - |
DISABLE_ | Documented | Disables the bug report command. The message names this var. | On or off | - |
DISABLE_ | Documented | Hides the / command and its / alias. | On or off | - |
DISABLE_ | Documented | Hides the / command. | On or off | - |
DISABLE_ | Documented | Disables the feedback command. | On or off | - |
DISABLE_ | Documented | Turns off GrowthBook flag fetching. Code defaults apply. | On or off | - |
DISABLE_ | Documented | Hides the / command. | On or off | - |
DS_ | Undocumented | Gives the Chromium path to Playwright in a bundled script that renders Storybook stories. | Text, browser by default. Unset means the Playwright default browser | Bundled design-system script only |
One | Undocumented Gated | Adds the OneDrive Documents folder to the Windows profile folders that Claude Code checks for PowerShell profiles. | Text. Used only if the path exists | Windows only. Not set from project env before trust |
One | Undocumented Gated | Adds the OneDrive for Business Documents folder to the Windows profile folders that Claude Code checks. | Text. Used only if the path exists. The docs for the managed path setting also list %One | Windows only. Not set from project env before trust |
One | Undocumented Gated | Adds the personal OneDrive Documents folder to the Windows profile folders that Claude Code checks. | Text. Used only if the path exists. The managed path setting text also lists %One | Windows only. Not set from project env before trust |
P4 | Undocumented | Marks the repo as Perforce when set, and reports has in diagnostics. | Text | All platforms. Not set from project env before trust |
SAFEUSER | Undocumented | Is shown as SAFEUSER in the context block of the commit and PR commands. | Text, empty by default | Commit and PR slash commands. Not set from project env before trust |
How It Works
Claude Code asks a server for feature flags at startup. A flag turns a feature on or off for an account. Some variables override a flag. Others only work when the flag is already on. Turning telemetry off also stops flag fetching, which turns off the features that need it.
Related Pages
- Environment Variables: how Claude Code reads variables and which value wins.
- Telemetry and Debug
- Undocumented Items: every item that only the program shows.
Source: the program (variable names found in the 2.1.304 binary) and the Environment Variables page of the official docs.