Skip to main content

Features and Toggles

These variables flip one feature each. Some turn off a feature that is on by default. Others turn on a feature that a server flag controls. A row with the Gated badge works only when a feature flag or server gate allows it. A variable that overrides the gate works without that permission.

This page lists 67 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.

VariableStatusWhat it doesValues and defaultNotes
AI_AGENT
Undocumented: Only the program shows this item. It can change without notice.
Carries an agent id for child tools. Claude Code sets it when it is unset or starts with claude-code_ or claude-code/.On or offAll sessions. Not set from project env before trust
BUN_CHROME_PATH
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. Works only behind a feature flag or server gate
Sets the Chrome binary for the artifact preview browser. It replaces the search for Playwright and system Chrome.Text. Preview needs CLAUDE_CODE_ARTIFACT_PREVIEW or a feature flag and a build that includes itArtifact preview (feature gated)
CLAUDE_CODE_ARTIFACT
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. A feature flag or server gate decides by default. This variable overrides it
Turns artifacts on or off. A falsy value turns them off.On or off. First-party only. A truthy value overrides the SDK default-offFirst-party provider. gated by a feature flag. Not set from project env before trust
CLAUDE_CODE_ARTIFACT_ASK_FIRST
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. A feature flag or server gate decides by default. This variable overrides it
Makes Claude ask about an artifact (audience, sections, tone) before it builds one. New in 2.1.310.On, off, or unset. Unset uses the feature flag cai_proud_planet, default off. Only for a session with the artifact widget tools, and not in a subagentArtifacts
CLAUDE_CODE_ARTIFACT_ASSETS
Undocumented: Only the program shows this item. It can change without notice.
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 envArtifacts. Not set from project env before trust
CLAUDE_CODE_ARTIFACT_COMMENT_FAST_ACK
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. Works only behind a feature flag or server gate
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 itArtifacts with comment auto-react. gated by a feature flag. Not set from project env before trust
CLAUDE_CODE_ARTIFACT_COMMENT_RESPONDER
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. Works only behind a feature flag or server gate
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 falseArtifacts with comment auto-react. gated by a feature flag. Not set from project env before trust
CLAUDE_CODE_ARTIFACT_COMMENTS
Documented: An official docs page names this item.
Differs: The official docs and the program disagree. The row says how. The official docs and the program disagree. The row says how.
Gated: Works only behind a flag or a server gate. Works only behind a feature flag or server gate
Turns the reading of artifact comments on or off.On, off, or unset, false by default. Docs only mention 0 to stop itArtifacts. gated by a feature flag. Not set from project env before trust
CLAUDE_CODE_ARTIFACT_COMMENTS_AUTOREACT
Documented: An official docs page names this item.
Differs: The official docs and the program disagree. The row says how. The official docs and the program disagree. The row says how.
Gated: Works only behind a flag or a server gate. Works only behind a feature flag or server gate
Lets Claude reply on its own to comments sent to it.On, off, or unset, false by default. Docs only mention 0 to stop itArtifacts. gated by a feature flag. Not set from project env before trust
CLAUDE_CODE_ARTIFACT_DB
Undocumented: Only the program shows this item. It can change without notice.
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 /api/frame/db/agentArtifacts. Not set from project env before trust
CLAUDE_CODE_ARTIFACT_DB_STR_REPLACE
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. Works only behind a feature flag or server gate
Turns on the str_replace edit operation for artifact database documents.On, off, or unset, false by default. Needs CLAUDE_CODE_ARTIFACT_DB on. Else a feature flag decides with default falseArtifacts. gated by a feature flag. Not set from project env before trust
CLAUDE_CODE_ARTIFACT_DELETE
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. Works only behind a feature flag or server gate
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 checkArtifacts. gated by a feature flag. Not set from project env before trust
CLAUDE_CODE_ARTIFACT_FRESH_READ
Undocumented: Only the program shows this item. It can change without notice.
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 offArtifacts with the docs store. Not set from project env before trust
CLAUDE_CODE_ARTIFACT_HOT
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. A feature flag or server gate decides by default. This variable overrides it
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 frozenHotUpdate wins firstArtifacts, gated by a feature flag
CLAUDE_CODE_ARTIFACT_INHERITED_TYPE_GRANT
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. A feature flag or server gate decides by default. This variable overrides it
Overrides the artifact inherited-type-grant gate. Claude Code logs the result as a feature flag.Off by default. Env readArtifacts, gated by a feature flag
CLAUDE_CODE_ARTIFACT_MULTI_FILE
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. A feature flag or server gate decides by default. This variable overrides it
Forces the artifact multi-file gate on or off. No visible effect in a print-mode probe (Probes).On, off, or unset, off by defaultArtifacts, gated by a feature flag
CLAUDE_CODE_ARTIFACT_OPEN_ACTION
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. A feature flag or server gate decides by default. This variable overrides it
Forces the artifact open-action gate on or off. No visible effect in a print-mode probe (Probes).On, off, or unset, off by defaultArtifacts, gated by a feature flag
CLAUDE_CODE_ARTIFACT_OPENING_PREFETCH
Undocumented: Only the program shows this item. It can change without notice.
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 checksArtifacts, when the base check passes
CLAUDE_CODE_ARTIFACT_PATH_PIN
Undocumented: Only the program shows this item. It can change without notice.
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 frozenPathPin wins firstArtifacts
CLAUDE_CODE_ARTIFACT_PIN
Undocumented: Only the program shows this item. It can change without notice.
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_CODE_REMOTE session that is not a bound cloud sessionArtifacts, local and cloud sessions
CLAUDE_CODE_ARTIFACT_PRESENCE
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. A feature flag or server gate decides by default. This variable overrides it
Forces the artifact presence connection on or off. Presence keeps one live connection for each artifact slug.On, off, or unset, off by defaultArtifacts, gated by a feature flag
CLAUDE_CODE_ARTIFACT_PREVIEW
Undocumented: Only the program shows this item. It can change without notice.
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_CODE_REMOTE session it may pick the emulator engine, else local ChromeArtifacts, local and cloud sessions
CLAUDE_CODE_ARTIFACT_PREVIEW_EMULATOR
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. Works only behind a feature flag or server gate
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 checkCloud sessions, gated by a feature flag
CLAUDE_CODE_ARTIFACT_PUBLISH_EDITS
Documented: An official docs page names this item.
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 defaultArtifacts
CLAUDE_CODE_ARTIFACT_SHARE
Undocumented: Only the program shows this item. It can change without notice.
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 contractCloud and desktop sessions
CLAUDE_CODE_ARTIFACT_SHARE_PROBE_REUSE_MS
Undocumented: Only the program shows this item. It can change without notice.
Sets how long the result of an artifact share check can be reused, in ms.A number of milliseconds, 1000 by default. A larger value is capped at 1000, so it can only shorten the time. Since 2.1.309Artifact sharing
CLAUDE_CODE_ARTIFACT_START_KIT
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. A feature flag or server gate decides by default. This variable overrides it
Forces the artifact start kit gate on or off. No visible effect in a print-mode probe (Probes).On, off, or unset, off by defaultArtifacts, gated by a feature flag
CLAUDE_CODE_ARTIFACT_TOOLSET
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. Works only behind a feature flag or server gate
Picks the artifact tool set. When on, Claude loads the artifact tool through tool search.On, off, or unset, off by defaultArtifacts, gated by a feature flag
CLAUDE_CODE_ARTIFACT_TYPE_CATALOG
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. A feature flag or server gate decides by default. This variable overrides it
Forces the artifact type catalog gate on or off.On, off, or unset, off by defaultArtifacts, gated by a feature flag
CLAUDE_CODE_ARTIFACT_TYPE_CLOUD_CREATE
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. A feature flag or server gate decides by default. This variable overrides it
Forces on or off the creation of a new artifact from a type in cloud sessions.On, off, or unset, off by defaultCloud sessions, gated by a feature flag
CLAUDE_CODE_ARTIFACT_TYPES
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. A feature flag or server gate decides by default. This variable overrides it
Forces the artifact types gate on or off. It works with the /api/frame/types endpoints.On, off, or unset. Unset uses the feature flag tengu_cobalt_plinth_larch, whose default is on since 2.1.310 (off before)Artifacts, gated by a feature flag
CLAUDE_CODE_ARTIFACT_VERIFY
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. Works only behind a feature flag or server gate
Turns on artifact verify reads from /api/frame/diag. It is always off in CLAUDE_CODE_REMOTE sessions.On, off, or unset, off by defaultLocal sessions, gated by a feature flag
CLAUDE_CODE_ATTACHMENTS_BY_PATH
Undocumented: Only the program shows this item. It can change without notice.
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 subagentsAll sessions
CLAUDE_CODE_ATTRIBUTION_ANNOUNCEMENT
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. A feature flag or server gate decides by default. This variable overrides it
Forces the attribution announcement on or off.On, off, or unset, on by default. Cached per sessionAll sessions, gated by a feature flag
CLAUDE_CODE_BASALT_COVE
Undocumented: Only the program shows this item. It can change without notice.
Forces the basalt_cove client-data feature on. In a probe, it adds a "Communicating with the user" section and a code-comment rule to the system prompt. See Probes.On or off. Else the basalt_cove client-data entry decidesAll sessions
CLAUDE_CODE_DISABLE_ARTIFACT
Documented: An official docs page names this item.
Turns off the Artifact tool. No settings file can turn it back on.On or off. Used as the envDisableVar next to the enableArtifact settingAll sessions. Project env can set it before trust
CLAUDE_CODE_DISABLE_PROACTIVITY
Undocumented: Only the program shows this item. It can change without notice.
Turns off the proactivity selector, which is on by default through a feature flag.On or off. When set, Claude Code passes 1 to the background sessions that it startsAll sessions
CLAUDE_CODE_FLAG_FETCH_WAIT_MS
Undocumented: Only the program shows this item. It can change without notice.
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 0Non-interactive and remote startup
CLAUDE_CODE_GROWTHBOOK_KICK_FROM_INIT
Undocumented: Only the program shows this item. It can change without notice.
Starts the GrowthBook flag fetch during init.On or off, off by default. Also recorded in the startup flag fetch eventStartup
CLAUDE_CODE_GROWTHBOOK_KICK_ON_WARM_CACHE
Undocumented: Only the program shows this item. It can change without notice.
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 eventRemote non-interactive startup
CLAUDE_CODE_INCLUDE_PARTIAL_MESSAGES
Undocumented: Only the program shows this item. It can change without notice.
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 valuePrint and SDK modes
CLAUDE_CODE_MANAGED_CONFIG_PREFETCH
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. A feature flag or server gate decides by default. This variable overrides it
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 onFirst-party logins
CLAUDE_CODE_PARSED_WILLOW
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. A feature flag or server gate decides by default. This variable overrides it
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 setAll sessions
CLAUDE_CODE_PER_TURN_TIMING
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. Works only behind a feature flag or server gate
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_turn_timing setting, else it falls back to per_turn_effortAll sessions
CLAUDE_CODE_PEWTER_OWL
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. A feature flag or server gate decides by default. This variable overrides it
Forces the pewter_owl_tool and pewter_owl_brief features on or off. It wins over 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 dataAll sessions, gated by a feature flag
CLAUDE_CODE_PEWTER_OWL_TOOL
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. A feature flag or server gate decides by default. This variable overrides it
Forces only the pewter_owl_tool 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_CODE_PEWTER_OWL for this one featureAll sessions, gated by a feature flag
CLAUDE_CODE_POLISHED_DEWDROP
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. A feature flag or server gate decides by default. This variable overrides it
Overrides a feature flag. drop maps to drop_block 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 flagAll sessions
CLAUDE_CODE_PROJECTS_SESSION
Undocumented: Only the program shows this item. It can change without notice.
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 offAll sessions
CLAUDE_CODE_SAFE_MODE
Documented: An official docs page names this item.
Starts safe mode. Config such as CLAUDE.md, skills, plugins, hooks, and MCP servers does not load. Managed policy still applies.On or off. Boolean 1 or true. The --safe-mode flag sets it to 1 and also sets CLAUDE_CODE_DISABLE_CLAUDE_MDS to 1All sessions. The --desktop command refuses to run in safe mode
CLAUDE_CODE_SIMPLE
Documented: An official docs page names this item.
Runs a minimal mode with Bash, read, and edit tools only. Hooks, skills, plugins, MCP discovery, auto memory, and CLAUDE.md do not load.On or off. Boolean. The --bare flag sets it to 1All sessions. Set by Claude Code for --bare
CLAUDE_CODE_SLEEPY_SNOWFLAKE
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. Works only behind a feature flag or server gate
Sets the scope of a feature flag feature. No visible effect in a print-mode probe (Probes).Text. Else Claude Code uses a recorded value or the flag client data with threads, all, or offAll sessions, behind a feature flag
CLAUDE_CODE_SUPPRESS_SESSION_ATTRIBUTION
Undocumented: Only the program shows this item. It can change without notice.
Leaves the session URL out of attribution text such as commit and PR footers.On or off. The attribution.sessionUrl setting set to false has the same effectAll sessions
CLAUDE_CODE_TODO_REMINDER_MODE
Undocumented: Only the program shows this item. It can change without notice.
Selects the todo reminder mode. Env wins over the feature flag.One of a fixed set of values, baseline by default. Enum baseline or offAll sessions
CLAUDE_WORKFLOW_NAME_ONLY
Undocumented: Only the program shows this item. It can change without notice.
When on, workflow discovery returns only the built-in workflow list and scans no files.--
DISABLE_BRIEF_MODE_STOP_HOOK
Undocumented: Only the program shows this item. It can change without notice.
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_BUG_COMMAND
Documented: An official docs page names this item.
Disables the bug report command. The message names this variable.On or off-
DISABLE_DOCTOR_COMMAND
Documented: An official docs page names this item.
Hides the /doctor command and its /checkup alias.On or off-
DISABLE_EXTRA_USAGE_COMMAND
Documented: An official docs page names this item.
Hides the /usage-credits command.On or off-
DISABLE_FEEDBACK_COMMAND
Documented: An official docs page names this item.
Disables the feedback command.On or off-
DISABLE_GROWTHBOOK
Documented: An official docs page names this item.
Turns off GrowthBook flag fetching. Code defaults apply.On or off-
DISABLE_INSTALL_GITHUB_APP_COMMAND
Documented: An official docs page names this item.
Hides the /install-github-app command.On or off-
DS_CHROMIUM_PATH
Undocumented: Only the program shows this item. It can change without notice.
Gives the Chromium path to Playwright in a bundled script that renders Storybook stories.Text, browser by default. Unset means the Playwright default browserBundled design-system script only
OneDrive
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. Works only behind a feature flag or server gate
Adds the OneDrive Documents folder to the Windows profile folders that Claude Code checks for PowerShell profiles.Text. Used only if the path existsWindows only. Not set from project env before trust
OneDriveCommercial
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. Works only behind a feature flag or server gate
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 %OneDriveCommercial%Windows only. Not set from project env before trust
OneDriveConsumer
Undocumented: Only the program shows this item. It can change without notice.
Gated: Works only behind a flag or a server gate. Works only behind a feature flag or server gate
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 %OneDriveConsumer%Windows only. Not set from project env before trust
P4PORT
Undocumented: Only the program shows this item. It can change without notice.
Marks the repo as Perforce when set, and reports hasP4Port in diagnostics.TextAll platforms. Not set from project env before trust
SAFEUSER
Undocumented: Only the program shows this item. It can change without notice.
Claude Code shows it as SAFEUSER in the context block of the commit and PR commands.Text, empty by defaultCommit 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. If you turn telemetry off, Claude Code also stops flag fetching. This turns off the features that need it.

Source: the program (variable names found in the 2.1.312 binary) and the Environment Variables page of the official docs.