Skip to main content

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.

VariableStatusWhat it doesValues and defaultNotes
AI_AGENTUndocumentedCarries an agent id for child tools. Claude Code fills 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_PATHUndocumented GatedSets 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_ARTIFACTUndocumented GatedTurns 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 flag. Not set from project env before trust
CLAUDE_CODE_ARTIFACT_ASSETSUndocumentedTurns 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_ACKUndocumented GatedTurns 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 flag. Not set from project env before trust
CLAUDE_CODE_ARTIFACT_COMMENT_RESPONDERUndocumented GatedTurns 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 flag. Not set from project env before trust
CLAUDE_CODE_ARTIFACT_COMMENTSDocumented Differs GatedTurns 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 flag. Not set from project env before trust
CLAUDE_CODE_ARTIFACT_COMMENTS_AUTOREACTDocumented Differs GatedLets 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 flag. Not set from project env before trust
CLAUDE_CODE_ARTIFACT_DBUndocumentedTurns 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_REPLACEUndocumented GatedTurns 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 flag. Not set from project env before trust
CLAUDE_CODE_ARTIFACT_DELETEUndocumented GatedTurns 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 flag. Not set from project env before trust
CLAUDE_CODE_ARTIFACT_FRESH_READUndocumentedLets 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_HOTUndocumented GatedOverrides 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_GRANTUndocumented GatedOverrides 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_FILEUndocumented GatedForces 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_ACTIONUndocumented GatedForces 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_PREFETCHUndocumentedSet 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_PINUndocumentedTurns 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_PINUndocumentedTurns 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_PRESENCEUndocumented GatedForces 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_PREVIEWUndocumentedSet 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_EMULATORUndocumented GatedPins 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_EDITSDocumentedLets 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_SHAREUndocumentedTurns 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_START_KITUndocumented GatedForces 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_TOOLSETUndocumented GatedPicks 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_CATALOGUndocumented GatedForces 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_CREATEUndocumented GatedForces 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_TYPESUndocumented GatedForces the artifact types gate on or off. It works with the /api/frame/types endpoints.On, off, or unset, off by defaultArtifacts, gated by a feature flag
CLAUDE_CODE_ARTIFACT_VERIFYUndocumented GatedTurns 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_PATHUndocumentedSends 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_ANNOUNCEMENTUndocumented GatedForces 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_COVEUndocumentedForces the basalt_cove 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_cove client-data entry decidesAll sessions
CLAUDE_CODE_DISABLE_ARTIFACTDocumentedTurns 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_PROACTIVITYUndocumentedTurns 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 setAll sessions
CLAUDE_CODE_FLAG_FETCH_WAIT_MSUndocumentedSets 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_INITUndocumentedStarts 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_CACHEUndocumentedStarts 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_MESSAGESUndocumentedTurns 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_PREFETCHUndocumented GatedForces 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_WILLOWUndocumented GatedOverrides 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_TIMINGUndocumented GatedGates 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_OWLUndocumented GatedForces the pewter_owl_tool and pewter_owl_brief 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 dataAll sessions, gated by a feature flag
CLAUDE_CODE_PEWTER_OWL_TOOLUndocumented GatedForces 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_DEWDROPUndocumented GatedOverrides 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_SESSIONUndocumentedWhen 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_MODEDocumentedStarts 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_SIMPLEDocumentedRuns 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_SNOWFLAKEUndocumented GatedSets 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 usedAll sessions, behind a feature flag
CLAUDE_CODE_SUPPRESS_SESSION_ATTRIBUTIONUndocumentedLeaves 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_MODEUndocumentedSelects 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_ONLYUndocumentedWhen on, workflow discovery returns only the built-in workflow list and scans no files.--
CLAUDE_WORKSHOP_PROGRESSUndocumentedTurns the workshop authoring-progress hook off when set to a false value.--
DISABLE_BRIEF_MODE_STOP_HOOKUndocumentedStops 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_COMMANDDocumentedDisables the bug report command. The message names this var.On or off-
DISABLE_DOCTOR_COMMANDDocumentedHides the /doctor command and its /checkup alias.On or off-
DISABLE_EXTRA_USAGE_COMMANDDocumentedHides the /usage-credits command.On or off-
DISABLE_FEEDBACK_COMMANDDocumentedDisables the feedback command.On or off-
DISABLE_GROWTHBOOKDocumentedTurns off GrowthBook flag fetching. Code defaults apply.On or off-
DISABLE_INSTALL_GITHUB_APP_COMMANDDocumentedHides the /install-github-app command.On or off-
DS_CHROMIUM_PATHUndocumentedGives 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
OneDriveUndocumented GatedAdds 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
OneDriveCommercialUndocumented GatedAdds 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
OneDriveConsumerUndocumented GatedAdds 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
P4PORTUndocumentedMarks the repo as Perforce when set, and reports hasP4Port in diagnostics.TextAll platforms. Not set from project env before trust
SAFEUSERUndocumentedIs shown 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. Turning telemetry off also stops flag fetching, which turns off the features that need it.

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