Every Claude Code setting on one page
> Claude Code has 240+ settings and 390+ environment variables. You probably use 5.
The full list of settings, environment variables, hooks, slash commands, CLI flags and permission rules. Each entry says what it does and links to the official docs. The first 8 of every list are open. Subscribe free to unlock the rest.
Last updated Nov 10, 2026. Checked against Claude Code 2.1.322.
Recently added
New in the last 60 days, from the Claude Code changelog.
Denies a tool call that would wait on a permission prompt, so the turn keeps going.
Nov 6 · setting
Stops feature-flag fetching without turning off telemetry.
Nov 6 · env var
Makes Write, Edit and NotebookEdit refuse paths outside the working directories.
Oct 30 · setting
Drafts auto mode environment entries from your project and recent sessions.
Oct 19 · command
Picks the model the client-side auto mode classifier uses.
Oct 16 · env var
Passes
@file mention paths to Claude instead of expanding the file contents.Oct 14 · env var
Adds
onFailure: "block"for command and HTTP hooks, so a failed hook blocks the action.Oct 8 · hook field
Opens the Claude Desktop app on the current directory.
Sep 29 · flag
Turns off the WebFetch tool.
Sep 29 · env var
Blocks specific models, even ones
availableModelsallows.Sep 25 · setting
Caps how wide Claude's prose runs in a wide terminal.
Sep 24 · setting
Reads AGENTS.md as project instructions when a project has no CLAUDE.md.
Sep 18 · feature
Settings keys
246Keys for settings.json, plus a few kept in ~/.claude.json. Official docs page
modelChange the model Claude Code starts with.
Example:
{"model": "claude-sonnet-5"}Source: docsAny settings file
permissions.allowApprove listed tool uses without a prompt.
Example:
{"permissions": {"allow": ["Bash(git diff *)", "Read(~/.zshrc)"]}}Source: docsAny settings file
permissions.denyBlock listed tool uses, including reads of files that hold secrets.
Source: docsAny settings file
permissions.defaultModeSet the default permission mode for new sessions.
Example:
{"permissions": {"defaultMode": "acceptEdits"}}Source: docsAny settings file
envSet environment variables for every session and its subprocesses.
Source: docsAny settings file
hooksRun your own commands as hooks at points in Claude Code's lifecycle.
Source: docsAny settings file
statusLineRun your own command to render a status line below the prompt.
Source: docsAny settings file
outputStyleChange Claude's role, tone, and output format with an output style.
Example:
{"outputStyle": "Explanatory"}Source: docsAny settings file
advisorModelPick which model answers when Claude asks the advisor tool.
Example:
{"advisorModel": "opus"}Source: docsAny settings file
agentStart every session as a named subagent with its prompt, tools, and model.
Example:
{"agent": "code-reviewer"}Source: docsSince v2.0.59Any settings file
agentPushNotifEnabledLet Claude send a push notification to your phone when it decides to.
Example:
{"agentPushNotifEnabled": true}Source: docsAny settings file
allowAllClaudeAiMcpsLoad the claude.ai connectors Claude Code fetches itself alongside a deployed
managed-mcp.json.Example:
{"allowAllClaudeAiMcps": true}Source: docsManaged settings only
allowClaudeInChromeWithManagedMcpLet the built-in Claude in Chrome server run alongside a deployed
managed-mcp.json.Example:
{"allowClaudeInChromeWithManagedMcp": true}Source: docsSince v2.1.282Managed settings only
allowedChannelPluginsReplace the default allowlist of channel plugins that can push messages.
Source: docsSince v2.1.84Managed settings only
allowedHttpHookUrlsLimit which URLs HTTP hooks can target.
Example:
{"allowedHttpHookUrls": ["https://hooks.example.com/*", "http://localhost:*"]}Source: docsAny settings file
allowedMcpServersAllowlist which MCP servers users can add.
Source: docsAny settings file
allowedProvidersLimit which API providers a machine may use.
Example:
{"allowedProviders": ["anthropic", "bedrock"]}Source: docsSince v2.1.285Managed settings only
allowManagedHooksOnlyRun only the hooks your organization deploys.
Example:
{"allowManagedHooksOnly": true}Source: docsManaged settings only
allowManagedMcpServersOnlyMake the managed MCP allowlist the only one that applies.
Source: docsManaged settings only
allowManagedPermissionRulesOnlyMake managed settings the only settings source of permission rules.
Example:
{"allowManagedPermissionRulesOnly": true}Source: docsManaged settings only
alwaysThinkingEnabledTurn extended thinking off for every session.
Example:
{"alwaysThinkingEnabled": false}Source: docsAny settings file
apiKeyHelperGenerate the API credential with your own command.
Example:
{"apiKeyHelper": "/bin/generate_temp_api_key.sh"}Source: docsAny settings file
appendPluginsRun your organization's mods after every mod a user installs.
Source: docsUser or managed settings
askUserQuestionTimeoutLet an unanswered question auto-continue after idle time.
Example:
{"askUserQuestionTimeout": "5m"}Source: docsUser or managed settings
attributionCustomize the attribution Claude Code adds to commits and pull requests.
Source: docsSince v2.0.62Any settings file
attribution.commitChange or hide the trailer Claude Code adds to commits.
Source: docsAny settings file
attribution.prChange or hide the attribution line in pull request descriptions.
Example:
{"attribution": {"pr": ""}}Source: docsAny settings file
attribution.sessionUrlOmit the claude.ai session link from cloud and Remote Control commits.
Example:
{"attribution": {"sessionUrl": false}}Source: docsSince v2.1.183Any settings file
autoCompactEnabledTurn automatic compaction off or on.
Example:
{"autoCompactEnabled": false}Source: docsAny settings file
autoCompactWindowSet how full the context gets before Claude Code compacts.
Example:
{"autoCompactWindow": 500000}Source: docsAny settings file
autoConnectIdeConnect to a running VS Code or JetBrains IDE automatically from an external terminal.
Example:
{"autoConnectIde": true}Source: docsGlobal config, ~/.claude.json
autoContinueAtUsageLimitWait in the open session and continue the task automatically after a claude.ai usage limit resets.
Example:
{"autoContinueAtUsageLimit": false}Source: docsSince v2.1.234User or managed settings
autoInstallIdeExtensionLet
/ideinstall the IDE extension from an external terminal.Example:
{"autoInstallIdeExtension": false}Source: docsGlobal config, ~/.claude.json
autoMemoryDirectoryStore auto memory in a directory you choose.
Example:
{"autoMemoryDirectory": "~/my-memory-dir"}Source: docsSince v2.1.74Any settings file
autoMemoryEnabledautoModeAdd your own allow and deny rules to the auto mode classifier.
Example:
{"autoMode": {"soft_deny": ["$defaults", "Never run terraform apply"]}}Source: docsUser or managed settings
autoMode.classifyAllShellSend every shell command through the auto mode classifier, even ones a narrow allow rule matches.
Example:
{"autoMode": {"classifyAllShell": true}}Source: docsSince v2.1.193User or managed settings
autoScrollEnabledFollow new output to the bottom in fullscreen rendering.
Example:
{"autoScrollEnabled": false}Source: docsSince v2.1.110Any settings file
autoUpdatesChannelFollow the stable release channel instead of latest.
Example:
{"autoUpdatesChannel": "stable"}Source: docsAny settings file
availableModelsRestrict which models people can pick.
Example:
{"availableModels": ["sonnet", "haiku"]}Source: docsAny settings file
availableModelsMatchMake each
availableModelsmodel ID entry permit only the version it names.Source: docsSince v2.1.283Managed settings only
awaySummaryEnabledTurn off the session recap shown when you come back to the terminal.
Example:
{"awaySummaryEnabled": false}Source: docsAny settings file
awsAuthRefreshRefresh expired Bedrock credentials in
.awswith your own command.Example:
{"awsAuthRefresh": "aws sso login --profile myprofile"}Source: docsAny settings file
awsCredentialExportSupply Bedrock credentials as JSON from your own command.
Example:
{"awsCredentialExport": "/bin/generate_aws_grant.sh"}Source: docsAny settings file
axScreenReaderRender screen-reader friendly output.
Example:
{"axScreenReader": true}Source: docsUser or managed settings
bashEditDiffEnabledRecord the files that changed while a Bash command ran in every permission mode.
Example:
{"bashEditDiffEnabled": true}Source: docsSince v2.1.269User or managed settings
bashOutputMaxCharsSet how much of a successful command's output Claude receives inline.
Example:
{"bashOutputMaxChars": 100000}Source: docsSince v2.1.261Any settings file
blockedMarketplacesBlock plugin marketplace sources for your organization.
Example:
{"blockedMarketplaces": [{"source": "github", "repo": "untrusted/plugins"}]}Source: docsManaged settings only
browserExternalPageToolsKeep Claude's tools off external pages in the desktop Browser pane.
Example:
{"browserExternalPageTools": "disabled"}Source: docsManaged settings only
channelsEnabledAllow channels for your organization.
Example:
{"channelsEnabled": true}Source: docsManaged settings only
claudeInChromeDefaultEnabledTurn on Chrome integration when a session starts, in the interactive CLI and the VS Code extension.
Example:
{"claudeInChromeDefaultEnabled": true}Source: docsGlobal config, ~/.claude.json
claudeMdInject organization-wide CLAUDE.md instructions from managed settings.
Source: docsManaged settings only
claudeMdExcludesSkip specific CLAUDE.md files when memory loads.
Example:
{"claudeMdExcludes": ["**/vendor/**/CLAUDE.md"]}Source: docsAny settings file
cleanupPeriodDaysChoose how many days Claude Code keeps transcripts before deleting them.
Example:
{"cleanupPeriodDays": 20}Source: docsAny settings file
companyAnnouncementsShow your organization's announcements at startup.
Source: docsSince v2.0.32Any settings file
copyFullResponseMake
/copycopy the full response without showing the picker.Example:
{"copyFullResponse": true}Source: docsGlobal config, ~/.claude.json
copyOnSelectTurn off automatic copying of text you select with the mouse in fullscreen rendering and agent view.
Example:
{"copyOnSelect": false}Source: docsGlobal config, ~/.claude.json
crossSessionInboundChoose whether Claude Code delivers, flags, or refuses messages from your other sessions.
Example:
{"crossSessionInbound": "hold"}Source: docsAny settings file
defaultShellChoose whether Bash or PowerShell runs the shell commands you type with the
!prefix.Example:
{"defaultShell": "powershell"}Source: docsAny settings file
defaultToAgentsViewOpen agent view instead of a new conversation when you run
claudewith no arguments.Example:
{"defaultToAgentsView": true}Source: docsGlobal config, ~/.claude.json
deniedMcpServersBlock specific MCP servers by URL, command, or name.
Example:
{"deniedMcpServers": [{"serverName": "filesystem"}]}Source: docsAny settings file
deniedModelsBlock specific models, even ones
availableModelspermits.Example:
{"availableModels": ["opus", "sonnet"], "deniedModels": ["claude-opus-5-5"]}Source: docsSince v2.1.283Managed settings only
desktopSessionCleanupPeriodDaysSet an age limit in days for Claude Desktop and Cowork transcripts.
Example:
{"desktopSessionCleanupPeriodDays": 90}Source: docsSince v2.1.248User or managed settings
dialogExpirySet how long Claude Code waits for a forwarded dialog to be answered before it cancels it.
Example:
{"dialogExpiry": "10m"}Source: docsSince v2.1.224User or managed settings
diffToolChoose whether Claude's proposed file changes open in the VS Code or JetBrains diff viewer or stay in the terminal.
Example:
{"diffTool": "terminal"}Source: docsGlobal config, ~/.claude.json
disableAgentViewTurn off background agents and agent view.
Example:
{"disableAgentView": true}Source: docsAny settings file
disableAllHooksTurn off hooks, a custom status line, and a custom
@file suggestion command at once.Example:
{"disableAllHooks": true}Source: docsAny settings file
disableArtifactDeprecated.
enableArtifactreplaces it.Example:
{"disableArtifact": true}Source: docsAny settings file
disableAutoModeRemove auto mode from the permission mode cycle.
Example:
{"disableAutoMode": "disable"}Source: docsAny settings file
disableBrowserExternalNavigationLimit the desktop Browser pane to localhost for people and Claude.
Example:
{"disableBrowserExternalNavigation": true}Source: docsManaged settings only
disableBundledSkillsTurn off the skills and workflows included with Claude Code.
Example:
{"disableBundledSkills": true}Source: docsSince v2.1.169Any settings file
disableClaudeAiConnectorsTurn off claude.ai connectors so Claude Code doesn't fetch them.
Example:
{"disableClaudeAiConnectors": true}Source: docsAny settings file
disableCommandPluginSourcesBlock plugins that install by running a marketplace-declared command.
Example:
{"disableCommandPluginSources": true}Source: docsSince v2.1.229Managed settings only
disableDeepLinkRegistrationStop Claude Code from registering the
claude-cli://handler.Example:
{"disableDeepLinkRegistration": "disable"}Source: docsSince v2.1.83Any settings file
disableDesktopLocalSessionsTurn off Desktop Code sessions that run on the device, leaving SSH to other hosts and cloud.
Example:
{"disableDesktopLocalSessions": true}Source: docsManaged settings only
disabledMcpjsonServersReject specific servers from a project's
.mcp.json.Example:
{"disabledMcpjsonServers": ["filesystem"]}Source: docsAny settings file
disableMobileSimulatorToolsBlock Claude's tools in the desktop iOS Simulator pane.
Example:
{"disableMobileSimulatorTools": true}Source: docsManaged settings only
disableRemoteControlTurn off Remote Control everywhere it can start.
Example:
{"disableRemoteControl": true}Source: docsAny settings file
disableSideloadFlagsReject the CLI flags that sideload plugins, subagents, and MCP servers.
Example:
{"disableSideloadFlags": true}Source: docsManaged settings only
disableSkillShellExecutionStop skills and custom commands from running inline shell.
Example:
{"disableSkillShellExecution": true}Source: docsSince v2.1.91Any settings file
disableWorkflowsTurn dynamic workflows off for everyone.
Example:
{"disableWorkflows": true}Source: docsAny settings file
editorModeUse vim key bindings in the input prompt.
Example:
{"editorMode": "vim"}Source: docsAny settings file
effortLevelSet a default effort level for models without a saved level of their own.
Example:
{"effortLevel": "xhigh"}Source: docsAny settings file
emojiCompletionEnabledTurn off
:shortcode:emoji suggestions and replacement in the prompt input.Example:
{"emojiCompletionEnabled": false}Source: docsAny settings file
enableAllProjectMcpServersApprove every server in project
.mcp.jsonfiles without a prompt.Example:
{"enableAllProjectMcpServers": true}Source: docsAny settings file
enableArtifactTurn the Artifact tool off with a
falsein any file.Example:
{"enableArtifact": false}Source: docsAny settings file
enabledMcpjsonServersApprove specific servers from a project's
.mcp.json.Example:
{"enabledMcpjsonServers": ["memory", "github"]}Source: docsAny settings file
enabledPluginsTurn individual plugins on or off per scope.
Source: docsAny settings file
enableWorkflowsTurn dynamic workflows on or off against your plan's default.
Example:
{"enableWorkflows": true}Source: docsAny settings file
enforceAvailableModelsKeep the
/modelDefault choice inside youravailableModelsallowlist.Example:
{"availableModels": ["sonnet", "haiku"], "enforceAvailableModels": true}Source: docsSince v2.1.175Any settings file
externalEditorContextShow Claude's last response as comments when you press Ctrl+G to edit.
Example:
{"externalEditorContext": true}Source: docsGlobal config, ~/.claude.json
extraKnownMarketplacesRegister marketplaces for a repository or an organization.
Source: docsAny settings file
fallbackModelName backup models for when the primary is overloaded.
Example:
{"fallbackModel": ["claude-sonnet-5", "claude-haiku-4-5"]}Source: docsSince v2.1.166Any settings file
fastModeTurn fast mode on for sessions where it's available.
Example:
{"fastMode": true}Source: docsAny settings file
fastModePerSessionOptInRequire people to turn fast mode on each session.
Example:
{"fastModePerSessionOptIn": true}Source: docsAny settings file
feedbackDraftsControl whether Claude queues feedback drafts for you to review.
Example:
{"feedbackDrafts": "quiet"}Source: docsUser or managed settings
feedbackSurveyRateChange how often the session quality survey appears.
Example:
{"feedbackSurveyRate": 0.05}Source: docsAny settings file
fileCheckpointingEnabledTurn off or on the file snapshots that
/rewindrestores.Example:
{"fileCheckpointingEnabled": false}Source: docsAny settings file
fileSuggestionSupply
@file autocomplete from your own command.Source: docsSince v2.0.65Any settings file
footerLinksRegexesMake issue or review IDs in output into clickable links below the input box.
Source: docsSince v2.1.176User or managed settings
forceLoginGatewayUrlSet the gateway URL the login screen connects to.
Example:
{"forceLoginGatewayUrl": "https://claude-gateway.example.com"}Source: docsUser or managed settings
forceLoginMethodRestrict login to claude.ai, Claude Console, or a cloud gateway.
Example:
{"forceLoginMethod": "claudeai"}Source: docsAny settings file
forceLoginOrgUUIDPin claude.ai logins to your organization.
Source: docsAny settings file
forceRemoteSettingsRefreshBlock startup until server-managed settings are freshly fetched.
Example:
{"forceRemoteSettingsRefresh": true}Source: docsSince v2.1.92Managed settings only
gatewayInternalNetworksLet
/loginreach a cloud gateway on public IPv4 space your organization uses internally.Example:
{"gatewayInternalNetworks": ["203.0.113.0/24"]}Source: docsSince v2.1.268Managed settings only
gcpAuthRefreshRefresh Google Cloud credentials with your own command.
Example:
{"gcpAuthRefresh": "gcloud auth application-default login"}Source: docsAny settings file
httpHookAllowedEnvVarsLimit which env vars HTTP hooks can put in headers.
Example:
{"httpHookAllowedEnvVars": ["MY_TOKEN", "HOOK_SECRET"]}Source: docsAny settings file
idleCompactionStop Claude Code from compacting a long conversation that you've stepped away from.
Example:
{"idleCompaction": false}Source: docsAny settings file
includeCoAuthoredByDeprecated.
attributionreplaces it.Example:
{"includeCoAuthoredBy": false}Source: docsAny settings file
includeGitInstructionsRemove the built-in commit and PR instructions from Claude's context.
Example:
{"includeGitInstructions": false}Source: docsSince v2.1.69Any settings file
inputNeededNotifEnabledGet a push notification when Claude is waiting on you.
Example:
{"inputNeededNotifEnabled": true}Source: docsAny settings file
isolatePeerMachinesAsk you before Claude messages one of your sessions on another machine.
Example:
{"isolatePeerMachines": true}Source: docsAny settings file
keybindingFlavorDeprecated, and has no effect.
Source: docsSince v2.1.238Any settings file
languageHave Claude respond in a language other than English.
Example:
{"language": "japanese"}Source: docsSince v2.1.0Any settings file
leftArrowOpensAgentsTurn off the
←shortcut that backgrounds the session and opens agent view.Example:
{"leftArrowOpensAgents": false}Source: docsGlobal config, ~/.claude.json
managedMcpServersProvide remote MCP servers to every user alongside the ones they add.
Source: docsSince v2.1.259Managed settings only
managedSourcesBehaviorCompose every managed source you deploy instead of using the highest-priority one alone.
Example:
{"managedSourcesBehavior": "merge"}Source: docsSince v2.1.242Managed settings only
maxEffortLevelCap the effort level for every model or per model, on every provider.
Source: docsSince v2.1.267Any settings file
maxProseWidthCap how wide the prose in Claude's responses runs in a wide terminal.
Example:
{"maxProseWidth": 80}Source: docsSince v2.1.282Any settings file
minimumVersionKeep auto-updates from installing anything below a version.
Example:
{"autoUpdatesChannel": "stable", "minimumVersion": "2.1.100"}Source: docsAny settings file
modelOverridesMap model IDs to your provider's IDs, such as Bedrock ARNs.
Source: docsSince v2.1.73Any settings file
modelPickerChoose which models the
/modelpicker lists, in your own order and with your own labels.Source: docsUser or managed settings
modelPricingReport spend at your organization's contracted rates instead of list price.
Source: docsManaged settings only
modelSettingsKeep a saved effort level or auto-compact window per model, or cap one model's effort.
Example:
{"modelSettings": {"claude-opus-5-5": {"effortLevel": "high"}}}Source: docsAny settings file
otelHeadersHelperGenerate rotating OpenTelemetry headers with your own command.
Example:
{"otelHeadersHelper": "/bin/generate_otel_headers.sh"}Source: docsAny settings file
parentSettingsBehaviorApply or drop restrictions an SDK or IDE host passes when you deploy managed settings.
Example:
{"parentSettingsBehavior": "merge"}Source: docsManaged settings only
permissionsSet allow, ask, and deny rules and the default permission mode.
Source: docsAny settings file
permissions.additionalDirectoriesGive Claude file access to directories outside the current one.
Example:
{"permissions": {"additionalDirectories": ["../docs/"]}}Source: docsAny settings file
permissions.askAlways prompt before listed tool uses.
Example:
{"permissions": {"ask": ["Bash(git push *)"]}}Source: docsAny settings file
permissions.blockReadsOutsideWorkingDirectoriesMake the file tools refuse reads outside the working directories in every permission mode.
Example:
{"permissions": {"blockReadsOutsideWorkingDirectories": true}}Source: docsSince v2.1.257Any settings file
permissions.blockWritesOutsideWorkingDirectoriesMake
Write,Edit, andNotebookEditrefuse paths outside the working directories.Example:
{"permissions": {"blockWritesOutsideWorkingDirectories": true}}Source: docsSince v2.1.314Any settings file
permissions.denyInsteadOfPromptingDeny tool calls that would wait on a permission prompt, so a session nobody is watching keeps working.
Example:
{"permissions": {"defaultMode": "auto", "denyInsteadOfPrompting": true}}Source: docsSince v2.1.319User or managed settings
permissions.disableBypassPermissionsModePrevent anyone from entering bypassPermissions mode.
Example:
{"permissions": {"disableBypassPermissionsMode": "disable"}}Source: docsAny settings file
plansDirectoryChoose where plan mode writes plan files.
Example:
{"plansDirectory": "./plans"}Source: docsSince v2.1.9Any settings file
pluginConfigsStore the answers you gave a plugin's configuration dialog.
Source: docsUser or managed settings
pluginSuggestionMarketplacesChoose which marketplaces can surface plugin install suggestions in
/plugin.Example:
{"pluginSuggestionMarketplaces": ["acme-corp-plugins"]}Source: docsSince v2.1.152Managed settings only
pluginTrustMessageAdd your own text to the plugin trust warning.
Example:
{"pluginTrustMessage": "All plugins from our marketplace are approved by IT"}Source: docsManaged settings only
policyHelperRun an executable that computes managed settings at startup.
Source: docsManaged settings only
policyHelper.pathName the helper executable Claude Code runs.
Example:
{"policyHelper": {"path": "/usr/local/bin/claude-policy"}}Source: docsManaged settings only
policyHelper.refreshIntervalMsRe-run the helper in the background on an interval.
Source: docsManaged settings only
policyHelper.timeoutMsSet how long Claude Code waits for the helper.
Example:
{"policyHelper": {"path": "/usr/local/bin/claude-policy", "timeoutMs": 5000}}Source: docsManaged settings only
preferredNotifChannelChoose a terminal bell or desktop notification for task completion.
Example:
{"preferredNotifChannel": "terminal_bell"}Source: docsAny settings file
prefersReducedMotionReduce or turn off spinner, shimmer, and flash animations.
Example:
{"prefersReducedMotion": true}Source: docsAny settings file
prependPluginsRun your organization's mods before every mod a user installs.
Source: docsUser or managed settings
processWrapperRun Claude Code's background processes through a corporate launcher on macOS and Linux.
Example:
{"processWrapper": "/opt/corp/launcher --profile claude"}Source: docsSince v2.1.210User or managed settings
promptCacheTtlChoose the prompt cache lifetime for the main conversation.
Example:
{"promptCacheTtl": "1h", "subagentPromptCacheTtl": "5m"}Source: docsAny settings file
promptSuggestionEnabledHide the grayed-out prompt suggestions in the input box.
Example:
{"promptSuggestionEnabled": false}Source: docsAny settings file
prStatusFooterEnabledTurn off the prompt footer's PR review status badge and the pull request check behind it.
Example:
{"prStatusFooterEnabled": false}Source: docsGlobal config, ~/.claude.json
prUrlTemplatePoint PR links at an internal code-review tool instead of github.com.
Example:
{"prUrlTemplate": "https://reviews.example.com/{owner}/{repo}/pull/{number}"}Source: docsSince v2.1.119Any settings file
remote.defaultEnvironmentIdPick the default cloud environment for
claude --cloud.Example:
{"remote": {"defaultEnvironmentId": "env_0123abcd"}}Source: docsAny settings file
remoteControlAtStartupConnect Remote Control automatically when a session starts.
Example:
{"remoteControlAtStartup": true}Source: docsAny settings file
requiredMaximumVersionRefuse to start on a version newer than your organization allows.
Example:
{"requiredMaximumVersion": "2.1.150"}Source: docsSince v2.1.163Managed settings only
requiredMinimumVersionRefuse to start on a version older than your organization requires.
Example:
{"requiredMinimumVersion": "2.1.150"}Source: docsSince v2.1.163Managed settings only
respectGitignoreKeep gitignored files out of the
@file picker.Example:
{"respectGitignore": false}Source: docsAny settings file
respondToBashCommandsStop Claude from responding after a
!shell command runs.Example:
{"respondToBashCommands": false}Source: docsAny settings file
sandboxIsolate Bash commands from your filesystem and network on macOS, Linux, and WSL2.
Source: docsAny settings file
sandbox.allowAppleEventsLet sandboxed commands send Apple Events on macOS.
Example:
{"sandbox": {"enabled": true, "allowAppleEvents": true}}Source: docsSince v2.1.181User or managed settings
sandbox.allowNestedUserNamespacesLet sandboxed commands create user namespaces on Linux and WSL2.
Example:
{"sandbox": {"enabled": true, "allowNestedUserNamespaces": true}}Source: docsSince v2.1.305User or managed settings
sandbox.allowUnsandboxedCommandsLet Claude retry a blocked command outside the sandbox, or forbid it.
Example:
{"sandbox": {"enabled": true, "allowUnsandboxedCommands": false}}Source: docsAny settings file
sandbox.autoAllowBashIfSandboxedRun sandboxed commands without a permission prompt.
Example:
{"sandbox": {"enabled": true, "autoAllowBashIfSandboxed": false}}Source: docsAny settings file
sandbox.bwrapPathPoint the sandbox at a bubblewrap binary outside
PATH.Example:
{"sandbox": {"enabled": true, "bwrapPath": "/opt/admin/bwrap"}}Source: docsManaged settings only
sandbox.credentialsHide or mask credential files and variables inside the sandbox.
Source: docsSince v2.1.187Any settings file
sandbox.credentials.allowPlaintextInjectLet masked credentials reach plain HTTP services on trusted test networks.
Example:
{"sandbox": {"credentials": {"allowPlaintextInject": true}}}Source: docsUser or managed settings
sandbox.credentials.awsPairsLink custom-named AWS key variables into one credential for re-signing.
Source: docsSince v2.1.224User or managed settings
sandbox.credentials.envVarsUnset or mask an environment variable inside the sandbox.
Source: docsAny settings file
sandbox.credentials.filesBlock or mask reads of a credential file inside the sandbox.
Source: docsAny settings file
sandbox.credentials.sigv4Choose whether streaming, presigned, or SigV4A AWS requests fail or pass through.
Example:
{"sandbox": {"credentials": {"sigv4": {"streaming": "passthrough"}}}}Source: docsSince v2.1.224User or managed settings
sandbox.enabledTurn on Bash sandboxing on macOS, Linux, and WSL2.
Example:
{"sandbox": {"enabled": true}}Source: docsAny settings file
sandbox.enableWeakerNestedSandboxRun the Linux sandbox inside an unprivileged container.
Example:
{"sandbox": {"enabled": true, "enableWeakerNestedSandbox": true}}Source: docsAny settings file
sandbox.enableWeakerNetworkIsolationLet
gh,gcloud, andterraformverify TLS behind a MITM proxy inside the sandbox on macOS.Example:
{"sandbox": {"enabled": true, "enableWeakerNetworkIsolation": true}}Source: docsSince v2.1.69Any settings file
sandbox.excludedCommandsName commands Claude Code can run outside the sandbox.
Example:
{"sandbox": {"excludedCommands": ["docker *"]}}Source: docsAny settings file
sandbox.failIfUnavailableRefuse to start when the sandbox can't, instead of running unsandboxed.
Example:
{"sandbox": {"enabled": true, "failIfUnavailable": true}}Source: docsSince v2.1.83Any settings file
sandbox.filesystemControl which paths sandboxed commands can read and write.
Source: docsAny settings file
sandbox.filesystem.allowManagedReadPathsOnlyStop developers from re-opening read paths your organization blocked.
Source: docsManaged settings only
sandbox.filesystem.allowReadRe-open reading inside a region
denyReadblocks.Example:
{"sandbox": {"filesystem": {"denyRead": ["~/"], "allowRead": ["."]}}}Source: docsAny settings file
sandbox.filesystem.allowWriteAdd paths sandboxed commands can write to.
Example:
{"sandbox": {"filesystem": {"allowWrite": ["/tmp/build", "~/.kube"]}}}Source: docsAny settings file
sandbox.filesystem.denyReadBlock sandboxed commands from reading specific paths.
Example:
{"sandbox": {"filesystem": {"denyRead": ["~/.aws/credentials"]}}}Source: docsAny settings file
sandbox.filesystem.denyWriteBlock sandboxed commands from writing to specific paths.
Example:
{"sandbox": {"filesystem": {"denyWrite": ["/etc", "/usr/local/bin"]}}}Source: docsAny settings file
sandbox.filesystem.disabledTurn off filesystem isolation while keeping network isolation.
Source: docsSince v2.1.216User or managed settings
sandbox.ignoreViolationsSilence violation reports for paths a command is expected to probe.
Example:
{"sandbox": {"ignoreViolations": {"*": ["/etc/hosts"]}}}Source: docsAny settings file
sandbox.networkControl which hosts, ports, and sockets sandboxed commands reach.
Source: docsAny settings file
sandbox.network.allowAllUnixSocketsLet sandboxed commands connect to every Unix socket.
Example:
{"sandbox": {"network": {"allowAllUnixSockets": true}}}Source: docsAny settings file
sandbox.network.allowedDomainsPre-allow domains so sandboxed commands don't prompt for them.
Source: docsAny settings file
sandbox.network.allowLocalBindingLet sandboxed commands listen on network ports and connect to localhost on macOS.
Example:
{"sandbox": {"network": {"allowLocalBinding": true}}}Source: docsAny settings file
sandbox.network.allowMachLookupLet macOS sandboxed tools like the iOS Simulator or Playwright reach their XPC services.
Example:
{"sandbox": {"network": {"allowMachLookup": ["com.apple.CoreSimulator.*"]}}}Source: docsAny settings file
sandbox.network.allowManagedDomainsOnlyLock the network allowlist to managed settings.
Source: docsManaged settings only
sandbox.network.allowUnixSocketsList Unix socket paths sandboxed commands can use on macOS.
Example:
{"sandbox": {"network": {"allowUnixSockets": ["~/.ssh/agent-socket"]}}}Source: docsAny settings file
sandbox.network.deniedDomainsBlock domains for sandboxed commands, even inside an allowed wildcard.
Example:
{"sandbox": {"network": {"deniedDomains": ["sensitive.cloud.example.com"]}}}Source: docsSince v2.1.113Any settings file
sandbox.network.httpProxyPortRoute sandbox HTTP traffic through your own proxy.
Example:
{"sandbox": {"network": {"httpProxyPort": 8080}}}Source: docsAny settings file
sandbox.network.socksProxyPortRoute sandbox SOCKS traffic through your own proxy.
Example:
{"sandbox": {"network": {"socksProxyPort": 8081}}}Source: docsAny settings file
sandbox.network.strictAllowlistDeny hosts outside the allowlist instead of prompting.
Example:
{"sandbox": {"network": {"strictAllowlist": true}}}Source: docsSince v2.1.219User or managed settings
sandbox.network.tlsTerminateHave the sandbox proxy terminate TLS so it can read HTTPS requests.
Example:
{"sandbox": {"network": {"tlsTerminate": {}}}}Source: docsUser or managed settings
sandbox.ripgrepUse your own ripgrep binary inside the sandbox.
Example:
{"sandbox": {"ripgrep": {"command": "/usr/local/bin/rg"}}}Source: docsUser or managed settings
sandbox.socatPathPoint the sandbox proxy at a
socatbinary outsidePATH.Example:
{"sandbox": {"enabled": true, "socatPath": "/opt/admin/socat"}}Source: docsManaged settings only
showClearContextOnPlanAcceptShow a "clear context" option on the plan accept screen.
Example:
{"showClearContextOnPlanAccept": true}Source: docsAny settings file
showThinkingSummariesSee summaries of Claude's thinking instead of a collapsed stub.
Example:
{"showThinkingSummaries": true}Source: docsAny settings file
showTurnDurationHide the "Cooked for" duration after each response.
Example:
{"showTurnDuration": false}Source: docsSince v2.1.7Any settings file
skillListingBudgetFractionReserve more or less context for the skill listing.
Example:
{"skillListingBudgetFraction": 0.02}Source: docsAny settings file
skillListingMaxDescCharsCap each skill's description length in the skill listing.
Example:
{"skillListingMaxDescChars": 2048}Source: docsAny settings file
skillOverridesHide or collapse a skill without editing its SKILL.md.
Example:
{"skillOverrides": {"legacy-context": "name-only", "deploy": "off"}}Source: docsAny settings file
skipAutoPermissionPromptSkip the one-time notice shown when you first enter auto mode yourself.
Example:
{"skipAutoPermissionPrompt": true}Source: docsUser or managed settings
skipDangerousModePermissionPromptSkip the confirmation dialog before bypassPermissions mode.
Example:
{"skipDangerousModePermissionPrompt": true}Source: docsUser, local, or managed
skipWebFetchPreflightSkip the WebFetch hostname check when Anthropic is unreachable.
Example:
{"skipWebFetchPreflight": true}Source: docsAny settings file
spellcheckUnderline misspelled words in the prompt input with a spell checker you install.
Example:
{"spellcheck": {"enabled": true, "language": "en_GB"}}Source: docsSince v2.1.235User or managed settings
spinnerTipsEnabledHide tips in the spinner while Claude works.
Example:
{"spinnerTipsEnabled": false}Source: docsSince v1.0.112Any settings file
spinnerTipsOverrideAdd your own tips to the spinner rotation, or replace the built-in tips.
Source: docsSince v2.1.45Any settings file
spinnerVerbsAdd or replace the verbs shown while a turn runs.
Example:
{"spinnerVerbs": {"mode": "append", "verbs": ["Pondering", "Crafting"]}}Source: docsAny settings file
sshConfigsAdd SSH connections to the Desktop environment selector.
Source: docsUser or managed settings
sshHostAllowlistLimit which hosts Desktop SSH sessions can reach.
Example:
{"sshHostAllowlist": ["*.devboxes.example.com", "bastion.example.com"]}Source: docsManaged settings only
sshHostCommandsAdd SSH connections whose host comes from a command to the Desktop environment selector.
Source: docsUser or managed settings
strictKnownMarketplacesAllowlist the marketplace sources users can add and install from.
Source: docsManaged settings only
strictPluginOnlyCustomizationBlock skills, agents, hooks, and MCP servers from user and project sources.
Example:
{"strictPluginOnlyCustomization": ["skills", "hooks"]}Source: docsManaged settings only
strictPluginOnlyCustomization.agentsBlock agents from user and project sources.
Example:
{"strictPluginOnlyCustomization": ["agents"]}Source: docsManaged settings only
strictPluginOnlyCustomization.hooksBlock hooks from user and project sources.
Example:
{"strictPluginOnlyCustomization": ["hooks"]}Source: docsManaged settings only
strictPluginOnlyCustomization.mcpBlock MCP servers from user and project sources.
Example:
{"strictPluginOnlyCustomization": ["mcp"]}Source: docsManaged settings only
strictPluginOnlyCustomization.skillsBlock skills from user and project sources.
Example:
{"strictPluginOnlyCustomization": ["skills"]}Source: docsManaged settings only
subagentPromptCacheTtlChoose the prompt cache lifetime for subagents and other requests outside the main conversation.
Example:
{"subagentPromptCacheTtl": "1h"}Source: docsAny settings file
subagentStatusLineRewrite rows in the subagent task display with your own command.
Source: docsAny settings file
switchModelsOnFlagSwitch models automatically or pause when a safety classifier flags a request.
Example:
{"switchModelsOnFlag": false}Source: docsAny settings file
syncClaudeAiPluginsStop loading the plugins enabled on your claude.ai account and stop downloading new ones.
Example:
{"syncClaudeAiPlugins": false}Source: docsSince v2.1.273User, local, or managed
syncClaudeAiSkillsStop loading the skills enabled on your claude.ai account and stop downloading new ones.
Example:
{"syncClaudeAiSkills": false}Source: docsUser, local, or managed
syntaxHighlightingDisabledTurn off syntax highlighting in diffs and code blocks.
Example:
{"syntaxHighlightingDisabled": true}Source: docsAny settings file
teammateModeChoose how agent team teammates display.
Example:
{"teammateMode": "auto"}Source: docsAny settings file
terminalProgressBarEnabledHide the terminal progress bar in terminals that support it.
Example:
{"terminalProgressBarEnabled": false}Source: docsAny settings file
terminalTitleFromRenameStop
/renameand--namefrom changing the terminal tab title.Example:
{"terminalTitleFromRename": false}Source: docsAny settings file
themePick the interface color theme, built-in or custom.
Example:
{"theme": "light-daltonized"}Source: docsAny settings file
timeFormatShow the times in the interface on a 12-hour or 24-hour clock, in UTC, or with a strftime pattern.
Example:
{"timeFormat": "24-hour"}Source: docsSince v2.1.257Any settings file
timeZoneShow the times in the interface in a time zone other than your system's.
Example:
{"timeZone": "Europe/Dublin"}Source: docsSince v2.1.257Any settings file
tuiChoose the fullscreen or classic terminal renderer.
Example:
{"tui": "fullscreen"}Source: docsAny settings file
ultracodeHave Claude plan a workflow for each substantive task without being asked.
Example:
{"ultracode": true}Source: docsAny settings file
useAutoModeDuringPlanLet the auto mode classifier review shell commands in plan mode.
Example:
{"useAutoModeDuringPlan": false}Source: docsUser, local, or managed
verboseShow full tool output instead of truncated summaries.
Example:
{"verbose": true}Source: docsAny settings file
viewModeStart every session in default, verbose, or focus view.
Example:
{"viewMode": "focus"}Source: docsAny settings file
vimInsertModeRemapsMap a two-key INSERT-mode sequence such as
jjto Escape.Example:
{"vimInsertModeRemaps": {"jj": "<Esc>"}}Source: docsSince v2.1.208User or managed settings
voiceTurn on voice dictation and pick hold or tap mode.
Example:
{"voice": {"enabled": true, "mode": "tap"}}Source: docsAny settings file
voiceEnabledTurn on voice dictation with the older single-key form.
Example:
{"voiceEnabled": true}Source: docsAny settings file
wheelScrollAccelerationEnabledTurn off mouse-wheel acceleration in fullscreen rendering.
Example:
{"wheelScrollAccelerationEnabled": false}Source: docsSince v2.1.174Any settings file
workflowKeywordTriggerEnabledLet the word
ultracodein a prompt start a workflow.Example:
{"workflowKeywordTriggerEnabled": false}Source: docsAny settings file
workflowSizeGuidelineSet the agent count Claude aims for in dynamic workflows.
Example:
{"workflowSizeGuideline": "small"}Source: docsSince v2.1.219Any settings file
worktreeConfigure how Claude Code creates git worktrees.
Example:
{"worktree": {"baseRef": "head", "symlinkDirectories": ["node_modules"]}}Source: docsAny settings file
worktree.baseRefBranch new worktrees from the remote default branch or your local HEAD.
Example:
{"worktree": {"baseRef": "head"}}Source: docsSince v2.1.133Any settings file
worktree.bgIsolationLet background sessions edit the working copy without a worktree.
Example:
{"worktree": {"bgIsolation": "none"}}Source: docsAny settings file
worktree.locationChoose where Desktop SSH sessions create their worktrees on a remote machine.
Example:
{"worktree": {"location": "~/worktrees"}}Source: docsUser settings only
worktree.sparsePathsCheck out only the directories you need in each worktree.
Example:
{"worktree": {"sparsePaths": [".claude", "packages/my-app", "shared/utils"]}}Source: docsSince v2.1.76Any settings file
worktree.symlinkDirectoriesSymlink large directories into each worktree instead of duplicating them.
Example:
{"worktree": {"symlinkDirectories": ["node_modules", ".cache"]}}Source: docsAny settings file
wslInheritsWindowsSettingsHave WSL read managed settings from the Windows policy chain.
Example:
{"wslInheritsWindowsSettings": true}Source: docsSince v2.1.282Managed settings only
> fuel for the obsessed builder
Subscribe free to see all 246
One email every Sunday with everything that changed in Claude this week, with every claim linked to its source.
Free. Unsubscribe anytime.
Environment variables
396Variables Claude Code reads from your shell or from the env setting. Official docs page
ANTHROPIC_API_KEYAPI key sent as
X-Api-Keyheader.ANTHROPIC_MODELSets which model to use.
ANTHROPIC_BASE_URLOverride the API endpoint to route requests through a proxy or gateway.
CLAUDE_CODE_EFFORT_LEVELSet the effort level for supported models.
MAX_THINKING_TOKENSSets a fixed token budget for extended thinking.
DISABLE_TELEMETRYSet to any non-empty value, such as
1, to opt out of telemetry.CLAUDE_CONFIG_DIROverride the configuration directory (default:
~/.claude).BASH_DEFAULT_TIMEOUT_MSSets the default timeout for a foreground Bash or PowerShell command, in milliseconds.
ANTHROPIC_AUTH_TOKENSets a custom
Authorizationheader value. Claude Code addsBearerin front.ANTHROPIC_AWS_API_KEYWorkspace API key for Claude Platform on AWS, generated in the AWS Console.
ANTHROPIC_AWS_BASE_URLOverride the Claude Platform on AWS endpoint URL.
ANTHROPIC_AWS_WORKSPACE_IDRequired for Claude Platform on AWS.
ANTHROPIC_BEDROCK_BASE_URLOverride the Amazon Bedrock endpoint URL.
ANTHROPIC_BEDROCK_MANTLE_BASE_URLOverride the Amazon Bedrock Mantle endpoint URL.
ANTHROPIC_BEDROCK_REGION_PREFIXSets the cross-region inference profile prefix Claude Code tries first (
us,eu,apac,jp,au, orglobal).Source: docsSince v2.1.224
ANTHROPIC_BEDROCK_SERVICE_TIERAmazon Bedrock service tier (
default,flex, orpriority).Source: docsSince v2.1.122
ANTHROPIC_BETASComma-separated list of additional
anthropic-betaheader values to include in API requests.ANTHROPIC_CUSTOM_HEADERSAdds custom headers to API requests, in
Name: Valueformat.Source: docsSince v2.1.227
ANTHROPIC_CUSTOM_MODEL_OPTIONModel ID to add as a custom entry in the
/modelpicker.Source: docsSince v2.1.78
ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTIONDisplay description for the custom model entry in the
/modelpicker.ANTHROPIC_CUSTOM_MODEL_OPTION_NAMEDisplay name for the custom model entry in the
/modelpicker.ANTHROPIC_CUSTOM_MODEL_OPTION_SUPPORTED_CAPABILITIESLists the capabilities the custom model supports, such as
effort,thinking.ANTHROPIC_DEFAULT_FABLE_MODELSets the model ID that the
fablealias points to.ANTHROPIC_DEFAULT_FABLE_MODEL_DESCRIPTIONDisplay description for the pinned Fable model in the
/modelpicker.ANTHROPIC_DEFAULT_FABLE_MODEL_NAMEDisplay name for the pinned Fable model in the
/modelpicker.ANTHROPIC_DEFAULT_FABLE_MODEL_SUPPORTED_CAPABILITIESLists the capabilities the pinned Fable model supports, such as
effort,thinking.ANTHROPIC_DEFAULT_HAIKU_MODELSets the model ID that the
haikualias points to. Also used for background tasks.ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTIONDisplay description for the pinned Haiku model in the
/modelpicker.ANTHROPIC_DEFAULT_HAIKU_MODEL_NAMEDisplay name for the pinned Haiku model in the
/modelpicker.ANTHROPIC_DEFAULT_HAIKU_MODEL_SUPPORTED_CAPABILITIESLists the capabilities the pinned Haiku model supports, such as
effort,thinking.ANTHROPIC_DEFAULT_MODELModel that new sessions start on by default.
Source: docsSince v2.1.236
ANTHROPIC_DEFAULT_OPUS_MODELSets the model ID that the
opusalias points to.opusplanuses it in Plan Mode.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTIONDisplay description for the pinned Opus model in the
/modelpicker.ANTHROPIC_DEFAULT_OPUS_MODEL_NAMEDisplay name for the pinned Opus model in the
/modelpicker.ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIESLists the capabilities the pinned Opus model supports, such as
effort,thinking.ANTHROPIC_DEFAULT_SONNET_MODELSets the model ID that the
sonnetalias points to.opusplanuses it outside Plan Mode.ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTIONDisplay description for the pinned Sonnet model in the
/modelpicker.ANTHROPIC_DEFAULT_SONNET_MODEL_NAMEDisplay name for the pinned Sonnet model in the
/modelpicker.ANTHROPIC_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIESLists the capabilities the pinned Sonnet model supports, such as
effort,thinking.ANTHROPIC_FEDERATION_RULE_IDFederation rule ID for Workload Identity Federation.
ANTHROPIC_FOUNDRY_API_KEYAPI key for Microsoft Foundry authentication (see Microsoft Foundry).
ANTHROPIC_FOUNDRY_AUTH_TOKENBearer token for Microsoft Foundry authentication, such as a Microsoft Entra access token.
Source: docsSince v2.1.203
ANTHROPIC_FOUNDRY_BASE_URLSets the full base URL of the Microsoft Foundry resource.
ANTHROPIC_FOUNDRY_RESOURCESets the Microsoft Foundry resource name.
ANTHROPIC_ORGANIZATION_IDOrganization ID for Workload Identity Federation.
ANTHROPIC_PROFILENames the Anthropic profile to sign in with, such as one made by
ant auth login.ANTHROPIC_SMALL_FAST_MODELDeprecated. Sets the Haiku-class model for background tasks.
ANTHROPIC_SMALL_FAST_MODEL_AWS_REGIONOverride AWS region for the Haiku-class model when using Amazon Bedrock or Amazon Bedrock Mantle.
ANTHROPIC_VERTEX_BASE_URLOverride Google Cloud's Agent Platform endpoint URL.
ANTHROPIC_VERTEX_PROJECT_IDGCP project ID that Google Cloud's Agent Platform requests are addressed to.
ANTHROPIC_WORKSPACE_IDWorkspace ID for workload identity federation.
Source: docsSince v2.1.141
API_FORCE_IDLE_TIMEOUTChanges the 5-minute idle timeout that stops a streaming reply when no bytes arrive.
API_TIMEOUT_MSSets how long each API request waits for response headers, in milliseconds.
AWS_BEARER_TOKEN_BEDROCKAmazon Bedrock API key for authentication (see Amazon Bedrock API keys).
BASH_MAX_OUTPUT_LENGTHSets the most characters of command output Claude Code reads back into a result.
BASH_MAX_TIMEOUT_MSSets the longest timeout the model can pick for a foreground command, in milliseconds.
BETA_TRACING_ENDPOINTSets the OTLP/HTTP endpoint for detailed beta tracing.
CCR_FORCE_BUNDLESet to
1to makeclaude --cloudupload your local repository instead of cloning it.CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTSSet to
1to turn off built-in subagent types such as Explore and Plan.CLAUDE_AGENT_SDK_MCP_NO_PREFIXSet to
1to skip themcp__<server>__prefix on tool names from SDK-created MCP servers.CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MSSets the stall timeout for subagents and workflow agents, in milliseconds.
CLAUDE_AUTO_BACKGROUND_TASKSSet to
1to move long-running agent tasks to the background automatically.CLAUDE_AUTOCOMPACT_PCT_OVERRIDESets what percent (1 to 100) of the auto-compact window triggers auto-compaction.
CLAUDE_AX_PREPARK_MSIn screen reader mode, sets how long Claude Code waits before writing a new or changed line.
Source: docsSince v2.1.233
CLAUDE_AX_SCREEN_READERSet to
1to render screen-reader friendly output: flat text without decorative borders or animations.Source: docsSince v2.1.181
CLAUDE_AX_STARTUP_QUIET_MSIn screen reader mode, sets how long Claude Code holds the first render after startup.
Source: docsSince v2.1.217
CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIRReturns to the original working directory after each Bash or PowerShell command.
CLAUDE_BYTE_STREAM_IDLE_TIMEOUT_MSSets the timeout for the byte-level streaming idle watchdog, in milliseconds.
Source: docsSince v2.1.210
CLAUDE_CLIENT_PRESENCE_FILEPoints to a file an outside tool creates when you unlock your screen and deletes when you lock it.
Source: docsSince v2.1.181
CLAUDE_CODE_ACCESSIBILITYSet to
1to keep the native cursor visible and turn off the inverted-text cursor.CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MDSet to
1to load memory files from directories added with--add-dir.CLAUDE_CODE_ALT_SCREEN_FULL_REPAINTSet to
1to repaint the whole screen on every frame in fullscreen rendering.CLAUDE_CODE_ALWAYS_ENABLE_EFFORTSet to
1to send the effort setting with every request, even for unknown model IDs.CLAUDE_CODE_API_KEY_HELPER_TTL_MSSets how often credentials from
apiKeyHelperrefresh, in milliseconds.CLAUDE_CODE_ARTIFACT_AUTO_OPENSet to
0to stop Claude Code from opening the browser when an artifact is published.CLAUDE_CODE_ARTIFACT_COMMENTSSet to
0to stop Claude from reading and replying to comments on an artifact.Source: docsSince v2.1.221
CLAUDE_CODE_ARTIFACT_COMMENTS_AUTOREACTSet to
0to stop Claude from replying to comments on its own.Source: docsSince v2.1.228
CLAUDE_CODE_ARTIFACT_PUBLISH_EDITSSet to
0to stop Claude from making small edits to an artifact's file when publishing.Source: docsSince v2.1.300
CLAUDE_CODE_ATTRIBUTION_HEADERSet to
0to leave the attribution block out of the start of the system prompt.CLAUDE_CODE_AUTO_COMPACT_WINDOWSets how full the context gets before compaction, from
100000to1000000tokens.CLAUDE_CODE_AUTO_CONNECT_IDEOverrides automatic IDE connection.
falsestops it,trueforces a try.CLAUDE_CODE_AUTO_MODE_MODELSets the model for the classifier requests Claude Code sends in auto mode.
Source: docsSince v2.1.302
CLAUDE_CODE_AUTO_MODE_SERVERControls whether Claude Code asks the server to review auto mode actions.
0uses its own classifier.CLAUDE_CODE_AWS_CHAIN_RESOLVE_TIMEOUT_MSSets how long Claude Code waits for the AWS default credential chain, in milliseconds.
Source: docsSince v2.1.207
CLAUDE_CODE_BASH_EDIT_DIFF0turns off the diff of files a Bash command changed.1records it in every permission mode.Source: docsSince v2.1.269
CLAUDE_CODE_BG_TASKS_REPORT_RUNNINGSet to
0to report an idle status at each turn end in non-interactive sessions, even with background work running.CLAUDE_CODE_BRIDGE_SESSION_IDSet automatically in shell and hook processes while a Remote Control connection is active.
Source: docsSince v2.1.199
CLAUDE_CODE_BS_AS_CTRL_BACKSPACE0reads the0x08byte as Backspace.1reads it as Ctrl+Backspace.CLAUDE_CODE_CERT_STORELists the CA certificate sources for TLS connections. The default is
bundled,system.CLAUDE_CODE_CHILD_SESSIONSet to
1in processes that Claude Code starts, such as shell tools and hooks.Source: docsSince v2.1.172
CLAUDE_CODE_CLIENT_CERTPath to client certificate file for mTLS authentication.
CLAUDE_CODE_CLIENT_KEYPath to client private key file for mTLS authentication.
CLAUDE_CODE_CLIENT_KEY_PASSPHRASEPassphrase for encrypted CLAUDE\_CODE\_CLIENT\_KEY (optional).
CLAUDE_CODE_CONFIG_LOCK_WAIT_MSSets how long
claude mcp addand similar commands wait for the~/.claude.jsonlock, in milliseconds.Source: docsSince v2.1.318
CLAUDE_CODE_DEBUG_LOG_LEVELMinimum log level written to the debug log file.
CLAUDE_CODE_DEBUG_LOGS_DIROverride the debug log file path.
CLAUDE_CODE_DISABLE_1M_CONTEXTSet to
1to turn off 1M context window support.Source: docsSince v2.1.50
CLAUDE_CODE_DISABLE_ADAPTIVE_THINKINGSet to
1to use a fixed thinking budget (MAX_THINKING_TOKENS) instead of adaptive reasoning on Opus 4.6 and Sonnet 4.6.CLAUDE_CODE_DISABLE_ADVISOR_TOOLSet to
1to disable the advisor tool.CLAUDE_CODE_DISABLE_AGENT_VIEWSet to
1to turn off background agents and agent view.CLAUDE_CODE_DISABLE_ALTERNATE_SCREENSet to
1to disable fullscreen rendering and use the classic main-screen renderer.CLAUDE_CODE_DISABLE_ARTIFACTSet to
1to turn off the Artifact tool.CLAUDE_CODE_DISABLE_ATTACHMENTSSet to
1to disable attachment processing.CLAUDE_CODE_DISABLE_AUTH_REFRESH_LOCKSet to
1to run the auth refresh command in each process instead of waiting for another process.Source: docsSince v2.1.286
CLAUDE_CODE_DISABLE_AUTO_MEMORYSet to
1to disable auto memory.CLAUDE_CODE_DISABLE_BACKGROUND_TASKSSet to
1to remove background runs, therun_in_backgroundparameter, and the Ctrl+B shortcut.Source: docsSince v2.1.4
CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_DEFAULTSet to
1to stop treating a Bedrock stream with noContent-Typeas a binary event stream.Source: docsSince v2.1.239
CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_GUARDSet to
1to skip the check that a Bedrock stream has the event-stream content type.Source: docsSince v2.1.208
CLAUDE_CODE_DISABLE_BG_EXIT_HANDOFFSet to
1to stop a background session's work when its process restarts, instead of handing it over.Source: docsSince v2.1.196
CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAPSet to
1to stop Claude Code from ending background shell commands under memory pressure.Source: docsSince v2.1.193
CLAUDE_CODE_DISABLE_BG_STABLE_PATHOn macOS with the native installer, set to
1to run background sessions from the installed binary.Source: docsSince v2.1.295
CLAUDE_CODE_DISABLE_BUNDLED_SKILLSSet to
1to remove the bundled skills and workflows.CLAUDE_CODE_DISABLE_CFC_PROMPTSet to
1to leave the Chrome section out of the system prompt while keeping the Chrome tools.Source: docsSince v2.1.257
CLAUDE_CODE_DISABLE_CLAUDE_MDSSet to
1to stop loading any CLAUDE.md memory files, including auto memory.CLAUDE_CODE_DISABLE_CRONSet to
1to disable session-scoped scheduled tasks.Source: docsSince v2.1.72
CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUTSet to
1to turn off the time limit and denials for critical-path removals inautoandbypassPermissionsmodes.Source: docsSince v2.1.281
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETASSet to
1to remove pre-release beta headers and fields from API requests.CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTSSet to
1to disable the built-in Explore and Plan subagents.Source: docsSince v2.1.198
CLAUDE_CODE_DISABLE_FAST_MODESet to
1to disable fast mode.CLAUDE_CODE_DISABLE_FEATURE_FLAGSSet to
1to turn off feature-flag fetching.Source: docsSince v2.1.319
CLAUDE_CODE_DISABLE_FEEDBACK_SURVEYSet to
1to disable the "How is Claude doing?" session quality surveys.CLAUDE_CODE_DISABLE_FILE_CHECKPOINTINGSet to
1to disable file checkpointing.CLAUDE_CODE_DISABLE_FILE_MENTIONSSet to
1to stop Claude Code from expanding@mentions of files and directories.Source: docsSince v2.1.299
CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONSSet to
1to remove the built-in commit and PR instructions and the git status snapshot.CLAUDE_CODE_DISABLE_INLINE_SHELL_RM_PROMPTSet to
1to stop reading scripts passed to a shell with-cfor critical-path removals.Source: docsSince v2.1.288
CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAPSet to
1to stop remapping Opus 4 and Opus 4.1 to the current Opus version.CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUNDSet to
1so Claude waits for an MCP task result in an interactive session.CLAUDE_CODE_DISABLE_MODEL_ACCESS_FALLBACKSet to
1to stop the switch to an older model when your account loses access mid-session.Source: docsSince v2.1.285
CLAUDE_CODE_DISABLE_MOUNTED_DRIVE_RM_PROMPTSet to
1to turn off the mounted drive prompt for paths such as/Volumes/USB.Source: docsSince v2.1.304
CLAUDE_CODE_DISABLE_MOUSESet to
1to disable mouse tracking in fullscreen rendering.CLAUDE_CODE_DISABLE_MOUSE_CLICKSSet to
1to turn off click, drag, and hover in fullscreen rendering but keep wheel scrolling.Source: docsSince v2.1.195
CLAUDE_CODE_DISABLE_MTLS_RELOAD_ON_STALE_CONNECTIONSet to
1to stop re-reading the mTLS certificate and key after a connection-level error.Source: docsSince v2.1.232
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFICSet to any non-empty value to turn off nonessential network traffic, such as auto-updates and telemetry.
CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACKSet to
1to turn off the non-streaming fallback when a streaming request fails mid-stream.Source: docsSince v2.1.83
CLAUDE_CODE_DISABLE_NOTIFICATION_PRESENCE_CHECKSet to
1to send desktop notifications even while you are typing in the terminal.Source: docsSince v2.1.193
CLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALLSet to
1to stop automatic registration of the official plugin marketplace.CLAUDE_CODE_DISABLE_PERMISSION_PROMPT_NOTIFY_HOOKSSet to
1to stopNotificationhooks from running for unanswered permission requests sent to the Agent SDK.Source: docsSince v2.1.233
CLAUDE_CODE_DISABLE_POLICY_SKILLSSet to
1to skip loading skills from the system-wide managed skills directory.CLAUDE_CODE_DISABLE_POWERSHELL_CMD_RM_DENYSet to
1to turn off the check that deniesrd,rmdir,del, anderaseon system paths in PowerShell.Source: docsSince v2.1.283
CLAUDE_CODE_DISABLE_REFUSAL_FALLBACKSet to
1to turn off the automatic model switch when a safety classifier flags a request.CLAUDE_CODE_DISABLE_STRUCTURED_OUTPUTSSet to
1to stop sending the structured-output field and its beta header.Source: docsSince v2.1.288
CLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPTSet to
1to turn off the critical-path check forrmon the output of a command substitution.Source: docsSince v2.1.281
CLAUDE_CODE_DISABLE_TERMINAL_TITLESet to
1to stop automatic terminal title updates.CLAUDE_CODE_DISABLE_THINKINGSet to
1to omit thethinkingparameter from API requests entirely.CLAUDE_CODE_DISABLE_ULTRAREVIEW_TRUST_CHECKSet to
1soclaude ultrareviewskips the trust check in an untrusted folder, such as in CI.Source: docsSince v2.1.309
CLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENTSet to
1to skip early auto-compaction when Claude Code does not know the model ID.Source: docsSince v2.1.223
CLAUDE_CODE_DISABLE_VIRTUAL_SCROLLSet to
1to turn off virtual scrolling in fullscreen rendering.CLAUDE_CODE_DISABLE_WEB_FETCHSet to
1to turn off the WebFetch tool.Source: docsSince v2.1.285
CLAUDE_CODE_DISABLE_WINDOWS_SHELL_LAUNCHERSet to
1to start PowerShell commands on Windows directly, not throughcmd.exe.Source: docsSince v2.1.269
CLAUDE_CODE_DISABLE_WORKFLOWSSet to
1to disable workflows.CLAUDE_CODE_DROP_UNAVAILABLE_DEFERRED_TOOLSet to
1to drop a deferred tool call whose tool is missing when you resume with-p.Source: docsSince v2.1.319
CLAUDE_CODE_EMIT_SESSION_STATE_EVENTSSet to
1to addsession_state_changedmessages to the message stream.CLAUDE_CODE_ENABLE_AUTO_MODEAccepted for older releases. It has no effect.
CLAUDE_CODE_ENABLE_AWAY_SUMMARYOverrides session recap availability.
0forces recaps off,1forces them on.CLAUDE_CODE_ENABLE_BACKGROUND_PLUGIN_REFRESHSet to
1to refresh plugin state at turn ends in non-interactive mode after a background install.CLAUDE_CODE_ENABLE_CFC1starts a CLI session with Chrome integration on.0starts it off.CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTELSet to
1to send the session quality survey to your own OpenTelemetry collector.Source: docsSince v2.1.136
CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMINGControls whether tool call inputs stream from the API as Claude writes them.
CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERYSet to
1to fill the/modelpicker from your gateway's/v1/modelsendpoint.CLAUDE_CODE_ENABLE_PROMPT_SUGGESTIONSet to
falseto turn off prompt suggestions, the grayed-out predictions in the prompt box.Source: docsSince v2.1.238
CLAUDE_CODE_ENABLE_SHARE_BUNDLESet to
1to make/sharesave its report and transcript to a local archive instead of sending it.Source: docsSince v2.1.299
CLAUDE_CODE_ENABLE_TASKSSelects which task-tracking tools Claude Code provides.
CLAUDE_CODE_ENABLE_TELEMETRYSet to
1to enable OpenTelemetry data collection for metrics and logging.CLAUDE_CODE_ENABLE_TODO_TOOLSSet to
1to get the task-tracking tools on every model.Source: docsSince v2.1.233
CLAUDE_CODE_EVEN_MORE_DANGEROUSLY_SKIP_PERMISSIONSSet to
1to run dangerousrmcommands with no prompt inbypassPermissionsmode.Source: docsSince v2.1.311
CLAUDE_CODE_EXIT_AFTER_STOP_DELAYSets how long to wait after the query loop goes idle before exiting, in milliseconds.
Source: docsSince v2.0.35
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMSSet to
1to enable agent teams.CLAUDE_CODE_EXTRA_BODYMerges a JSON object into the top level of model request bodies.
CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENSChanges the token limit for file reads. The default is 25,000 tokens.
Source: docsSince v2.1.0
CLAUDE_CODE_FORCE_SESSION_PERSISTENCESet to
1to save transcripts and history even when launched inside another Claude Code session.CLAUDE_CODE_FORCE_STRIKETHROUGHSet to
1to force strikethrough for~~text~~when your terminal supports it but is not detected.Source: docsSince v2.1.186
CLAUDE_CODE_FORCE_SYNC_OUTPUTSet to
1to force synchronized output when your terminal supports it but is not detected.CLAUDE_CODE_FORCE_TERMINAL_IMAGESSet to
1to draw modImageelements as pictures in terminals that support kitty graphics.CLAUDE_CODE_FORK_SUBAGENTControls fork mode, which is on by default.
0turns it off.CLAUDE_CODE_FORWARD_SUBAGENT_TEXTSet to
1to emit subagent text and thinking instream-jsonoutput.Source: docsSince v2.1.211
CLAUDE_CODE_GATEWAY_HINT_HEADERSSet to
1to send gateway hint headers on a custom proxy or third-party provider.Source: docsSince v2.1.273
CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MSSets the timeout for gateway model discovery, in milliseconds. The default is
3000.Source: docsSince v2.1.269
CLAUDE_CODE_GIT_BASH_PATHWindows only: path to the Git Bash executable (
bash.exe).CLAUDE_CODE_GLOB_HIDDENSet to
falseto leave dotfiles out of Glob tool results.CLAUDE_CODE_GLOB_NO_IGNORESet to
falseto make the Glob tool respect.gitignorepatterns.CLAUDE_CODE_GLOB_TIMEOUT_SECONDSTimeout in seconds for Glob and Grep tool searches.
CLAUDE_CODE_GOAL_CHECKIN_MINUTESSets how many minutes background work can keep a goal waiting before Claude Code asks Claude to check.
Source: docsSince v2.1.234
CLAUDE_CODE_GZIP_REQUEST_BODIESSet to
0to turn off gzip compression of request bodies sent toapi.anthropic.com.CLAUDE_CODE_HIDE_CWDSet to
1to hide the working directory in the startup logo.Source: docsSince v2.1.119
CLAUDE_CODE_IDE_HOST_OVERRIDEOverride the host address used to connect to the IDE extension.
CLAUDE_CODE_IDE_SKIP_AUTO_INSTALLSet to
1to stop/idefrom installing the IDE extension.CLAUDE_CODE_IDE_SKIP_VALID_CHECKSet to
1to skip checking IDE lockfile entries when connecting.CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENSSets the context size, in tokens, at which idle compaction applies. The default is
200000.CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTSSets how many subagents can run in one session. The default is 20.
Source: docsSince v2.1.217
CLAUDE_CODE_MAX_CONTEXT_TOKENSOverride the context window size Claude Code assumes for the active model.
CLAUDE_CODE_MAX_MCP_DESCRIPTION_LENGTHSets the most characters of MCP tool descriptions and server instructions sent to the model.
Source: docsSince v2.1.280
CLAUDE_CODE_MAX_OUTPUT_TOKENSSet the maximum number of output tokens for most requests.
CLAUDE_CODE_MAX_RETRIESOverride the number of times to retry failed API requests (default: 10).
CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTHSets how many subagent layers can sit below the main conversation. The default is 3.
Source: docsSince v2.1.217
CLAUDE_CODE_MAX_TURNSCap the number of agentic turns when no explicit limit is passed.
CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSIONCap on WebSearch calls (default: 200).
Source: docsSince v2.1.212
CLAUDE_CODE_MCP_ALLOWLIST_ENVSet to
1to start stdio MCP servers with only a safe baseline environment plus their ownenv.CLAUDE_CODE_MCP_AUTO_BACKGROUND_MSSets how long an MCP tool call runs before moving to the background, in milliseconds. The default is 120000.
Source: docsSince v2.1.212
CLAUDE_CODE_MCP_STARTUP_WAIT_MSSets how long a non-interactive first turn waits for MCP servers to connect, in milliseconds.
Source: docsSince v2.1.274
CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUTIdle timeout in milliseconds for MCP tool calls.
Source: docsSince v2.1.187
CLAUDE_CODE_MESSAGING_SOCKETSet by Claude Code. It holds the path of the session's inbox socket.
Source: docsSince v2.1.224
CLAUDE_CODE_MESSAGING_TOKENSet by Claude Code. It holds a per-session token for the inbox socket.
Source: docsSince v2.1.228
CLAUDE_CODE_NATIVE_CURSORSet to
1to show the terminal's own cursor at the input caret.CLAUDE_CODE_NEW_INITSet to
1to make/initrun an interactive setup flow.CLAUDE_CODE_NO_FLICKERSet to
1to turn on fullscreen rendering, a research preview that reduces flicker.CLAUDE_CODE_NONBLOCKING_STDOUTSet to
1to write output through a non-blocking file descriptor so a stalled terminal can't freeze Claude Code.Source: docsSince v2.1.261
CLAUDE_CODE_NONSTREAMING_TIMEOUT_RETRIESLimit how many times Claude Code re-sends a non-streaming request that times out.
Source: docsSince v2.1.285
CLAUDE_CODE_OAUTH_REFRESH_TOKENOAuth refresh token for claude.ai authentication.
CLAUDE_CODE_OAUTH_SCOPESLists the OAuth scopes the refresh token was issued with, separated by spaces.
CLAUDE_CODE_OAUTH_TOKENOAuth access token for claude.ai authentication.
CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTHSets the maximum length of content-bearing OpenTelemetry attributes. The default is 61440.
Source: docsSince v2.1.214
CLAUDE_CODE_OTEL_DIAG_STDERRSet to
1to write OpenTelemetry exporter errors to stderr.Source: docsSince v2.1.179
CLAUDE_CODE_OTEL_FLUSH_TIMEOUT_MSSets the timeout for flushing pending OpenTelemetry spans, in milliseconds. The default is 5000.
CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MSSets how often dynamic OpenTelemetry headers refresh, in milliseconds.
CLAUDE_CODE_OTEL_SHUTDOWN_TIMEOUT_MSTimeout in milliseconds for the OpenTelemetry exporter to finish on shutdown (default: 2000).
CLAUDE_CODE_OVERLOADED_RETRY_BASE_DELAY_MSSets the starting delay for retries after a
529overloaded error, in milliseconds. The default is 500.Source: docsSince v2.1.292
CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MSSets the longest delay for retries after a
529overloaded error, in milliseconds. The default is 32000.Source: docsSince v2.1.296
CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATESet to
1to let Claude Code run your package manager's upgrade command in the background.Source: docsSince v2.1.129
CLAUDE_CODE_PERFORCE_MODESet to
1to turn on Perforce-aware write protection.Source: docsSince v2.1.98
CLAUDE_CODE_PLUGIN_CACHE_DIROverrides the plugins root directory. The default is
~/.claude/plugins.CLAUDE_CODE_PLUGIN_DIR_WATCHControls whether Claude Code reloads a mod when its files change.
Source: docsSince v2.1.287
CLAUDE_CODE_PLUGIN_DIRSLists plugin directories to load for the session, like
--plugin-dir.Source: docsSince v2.1.280
CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MSSets the timeout for cloning or refreshing a plugin marketplace, in milliseconds. The default is 120000.
CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURESet to
1to keep the existing marketplace checkout when a refresh can't reach the remote.Source: docsSince v2.1.90
CLAUDE_CODE_PLUGIN_PREFER_HTTPSSet to
1to clone GitHubowner/reposources over HTTPS instead of SSH.Source: docsSince v2.1.141
CLAUDE_CODE_PLUGIN_SEED_DIRPoints to one or more read-only plugin seed directories.
CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICYSet to
1to stop passing-ExecutionPolicy Bypassto PowerShell and respect the machine's policy.CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MSSets the longest idle wait for background work after the final turn with
-p, in milliseconds.Source: docsSince v2.1.182
CLAUDE_CODE_PROCESS_WRAPPERStarts the processes Claude Code launches from its own binary through a corporate launcher.
Source: docsSince v2.1.208
CLAUDE_CODE_PROJECT_DIR_NAMEWith
CLAUDE_CONFIG_DIR, sets theprojects/directory name for a session's transcripts and auto memory.Source: docsSince v2.1.234
CLAUDE_CODE_PROMPT_CACHE_TTLSets the prompt cache TTL for the main conversation. Accepts
5mor1h.Source: docsSince v2.1.242
CLAUDE_CODE_PROPAGATE_TRACEPARENTSet to
1to pass W3C trace context whenANTHROPIC_BASE_URLpoints at a custom proxy.CLAUDE_CODE_PROVIDER_MANAGED_BY_HOSTSet by host apps that manage model provider routing for Claude Code.
CLAUDE_CODE_PROXY_RESOLVES_HOSTSSet to
1to let the proxy do DNS resolution instead of the caller.CLAUDE_CODE_REMOTESet automatically to
truewhen Claude Code is running as a cloud session.CLAUDE_CODE_REMOTE_SESSION_IDSet automatically in cloud sessions to the current session's ID.
CLAUDE_CODE_RESTRICTEDSet to
1to start the session in restricted mode, the same as passing--restricted.Source: docsSince v2.1.248
CLAUDE_CODE_RESUME_INTERRUPTED_TURNSet to
1to resume automatically if the last session ended mid-turn.CLAUDE_CODE_RESUME_INTERRUPTED_TURN_MAX_AGE_MSSets how old the last message can be for an interrupted turn to resume automatically, in milliseconds.
Source: docsSince v2.1.211
CLAUDE_CODE_RESUME_PROMPTOverrides the message Claude Code sends when it continues an interrupted turn.
CLAUDE_CODE_RESUME_SHOWS_CUT_OFF_CALLSSet to
1to keep interrupted tool calls, marked as cut off, when a turn continues.Source: docsSince v2.1.309
CLAUDE_CODE_RETRY_WATCHDOGSet to
1for unattended sessions. It retries429and529errors without limit.CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MSSets the longest each request waits out
429and529errors with the retry watchdog, in milliseconds.Source: docsSince v2.1.295
CLAUDE_CODE_RETRY_WATCHDOG_USAGE_LIMIT_RECHECK_MSSets the shortest gap between checks for a lifted usage limit with the retry watchdog, in milliseconds.
Source: docsSince v2.1.305
CLAUDE_CODE_SAFE_MODESet to
1to start in safe mode, without CLAUDE.md, skills, plugins, hooks, or MCP servers.CLAUDE_CODE_SCRIPT_CAPSSets a JSON object that limits how often named scripts can run per session.
CLAUDE_CODE_SCROLL_SPEEDSet the mouse wheel scroll multiplier in fullscreen rendering.
CLAUDE_CODE_SEND_FEEDBACKSet to
0to turn off Claude-drafted feedback for a session.CLAUDE_CODE_SESSION_IDSet automatically to the current session ID in shell, hook, and stdio MCP processes.
Source: docsSince v2.1.132
CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MSOverrides the time budget for SessionEnd hooks, in milliseconds.
CLAUDE_CODE_SHELLSet the shell Claude Code uses to run Bash tool commands.
Source: docsSince v2.0.65
CLAUDE_CODE_SHELL_PREFIXSets a command prefix that wraps shell commands Claude Code starts.
Source: docsSince v1.0.61
CLAUDE_CODE_SIMPLESet to
1to run with a minimal system prompt and only the Bash, file read, and file edit tools.CLAUDE_CODE_SIMPLE_SYSTEM_PROMPTPicks between the full system prompt and a shorter one with abbreviated tool descriptions.
CLAUDE_CODE_SKIP_ANTHROPIC_AWS_AUTHSkips client-side sign-in for Claude Platform on AWS, for gateways that sign requests.
CLAUDE_CODE_SKIP_AWS_CRED_CACHESet to
1to turn off the in-process credential cache and resolve AWS credentials on every request.Source: docsSince v2.1.207
CLAUDE_CODE_SKIP_BEDROCK_AUTHSkip AWS authentication for Amazon Bedrock (for example, when using an LLM gateway).
CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORSSet to
1to treat a failed fast mode check as available.CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECKSet to
1to skip the client-side fast mode availability check.CLAUDE_CODE_SKIP_FOUNDRY_AUTHSkips Azure sign-in for Microsoft Foundry, for a proxy that adds its own
Authorizationheader.CLAUDE_CODE_SKIP_MANTLE_AUTHSkip AWS authentication for Amazon Bedrock Mantle (for example, when using an LLM gateway).
CLAUDE_CODE_SKIP_MODEL_ACCESS_MEMORYSet to
1to stop remembering which models your account can't use on Bedrock and Google Cloud.Source: docsSince v2.1.285
CLAUDE_CODE_SKIP_PROMPT_HISTORYSet to
1to skip writing prompt history and session transcripts to disk.CLAUDE_CODE_SKIP_VERTEX_AUTHSkip Google authentication for Google Cloud's Agent Platform (for example, when using an LLM gateway).
CLAUDE_CODE_STARTUP_FAILURE_RESULTSSet to
1to write a result message when Claude Code refuses to start instream-jsonmode.Source: docsSince v2.1.274
CLAUDE_CODE_STOP_HOOK_BLOCK_CAPSets how many times in a row a Stop hook can block the turn from ending. The default is 8.
CLAUDE_CODE_SUBAGENT_MODELSets the default model for subagents, teammates, and workflow agents with no model set.
CLAUDE_CODE_SUBAGENT_MODEL_FORCESet to
1to force one model onto subagents, teammates, and workflow agents.Source: docsSince v2.1.257
CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTLSets the prompt cache TTL for subagents and background work. Accepts
5mor1h.Source: docsSince v2.1.242
CLAUDE_CODE_SUBPROCESS_ENV_SCRUBSet to
1to remove credentials from the environments of processes Claude Code starts.CLAUDE_CODE_SYNC_PLUGIN_INSTALLSet to
1with-pto wait for plugin installs to finish before the first query.CLAUDE_CODE_SYNC_PLUGIN_INSTALL_TIMEOUT_MSTimeout in milliseconds for synchronous plugin installation.
CLAUDE_CODE_SYNC_SKILLSSet to
1with-pto download your claude.ai skills and wait for them before the first query.CLAUDE_CODE_SYNC_SKILLS_INSTALL_TIMEOUT_MSSets the timeout for the mid-session skills resync in Agent SDK apps, in milliseconds. The default is 30000.
CLAUDE_CODE_SYNC_SKILLS_WAIT_TIMEOUT_MSSets how long the first query waits for the skill list, in milliseconds. The default is 5000.
CLAUDE_CODE_SYNTAX_HIGHLIGHTSet to
falseto turn off syntax highlighting in diff output.CLAUDE_CODE_TASK_LIST_IDShares a task list across sessions that use the same ID.
CLAUDE_CODE_TMPDIROverride the temp directory used for internal temp files.
Source: docsSince v2.1.5
CLAUDE_CODE_TMUX_TRUECOLORSet to any non-empty value, such as
1, to allow 24-bit truecolor output inside tmux.CLAUDE_CODE_TOOL_MEMORY_CGROUP_EXCLUDEOn Linux and WSL, lists the process kinds left out of the tool memory cap, such as
mcporlsp.Source: docsSince v2.1.246
CLAUDE_CODE_TOOL_MEMORY_LIMITOn Linux and WSL, sets a memory cap, such as
4G, for shell commands run by tools.Source: docsSince v2.1.233
CLAUDE_CODE_TRANSCRIPT_LOCAL_GCSet to
1to limit how large the transcript of a long-por Agent SDK session grows.Source: docsSince v2.1.287
CLAUDE_CODE_USE_ANTHROPIC_AWSUse Claude Platform on AWS.
CLAUDE_CODE_USE_BEDROCKUse Amazon Bedrock.
CLAUDE_CODE_USE_FOUNDRYUse Microsoft Foundry.
CLAUDE_CODE_USE_MANTLEUse the Amazon Bedrock Mantle endpoint.
CLAUDE_CODE_USE_POWERSHELL_TOOLControls the PowerShell tool. The default depends on your platform and account.
CLAUDE_CODE_USE_VERTEXUse Google Cloud's Agent Platform.
CLAUDE_CODE_USER_DIALOG_TIMEOUT_MSSets how long Claude Code waits before cancelling a dialog sent to a remote client, in milliseconds.
CLAUDE_CODE_WARN_DISK_FREE_GIBSets the free disk space, in GiB, below which Claude Code warns Claude.
Source: docsSince v2.1.304
CLAUDE_CODE_WARN_MEMORY_FREE_GIBOn Linux and WSL, sets the free memory, in GiB, below which Claude Code warns Claude.
Source: docsSince v2.1.304
CLAUDE_CODE_WEB_SEARCH_REFILLS_PER_HOURSets how fast a session's WebSearch limit refills, in calls per hour.
Source: docsSince v2.1.290
CLAUDE_CODE_WEBFETCH_CACHE_TTL_MSSets how long WebFetch caches each fetched URL, in milliseconds.
Source: docsSince v2.1.233
CLAUDE_CODE_WEBFETCH_DEADLINE_MSSets the longest WebFetch waits for a page to download, in milliseconds.
Source: docsSince v2.1.268
CLAUDE_CODE_WORKER_CHECKIN_SCHEDULEWith
CLAUDE_AUTO_BACKGROUND_TASKS, sets the waits between reminders to check on background subagents.Source: docsSince v2.1.283
CLAUDE_CODE_WORKFLOW_MAX_CONCURRENT_AGENTSSets how many agents one workflow run executes at once, from
1to256.Source: docsSince v2.1.269
CLAUDE_CODE_WORKFLOW_PREFIX_STAGGER_MSSets the longest a workflow agent waits for a sibling's first response before sending its own, in milliseconds.
Source: docsSince v2.1.229
CLAUDE_CODE_YOU_SHOULD_KNOW_DEBUGSet to
1to show a line above the prompt for each recent check by the You should know mod.Source: docsSince v2.1.287
CLAUDE_EFFORTSet automatically in shell and hook processes to the effort level:
low,medium,high,xhigh, ormax.CLAUDE_ENABLE_BYTE_WATCHDOG1forces the byte-level streaming idle watchdog on.0forces it off.CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCKSet to
1to turn on the byte-level idle watchdog for Bedrock event-stream responses.CLAUDE_ENABLE_STREAM_WATCHDOG0forces the event-level streaming idle watchdog off.1forces it on.CLAUDE_ENV_FILEPoints to a shell script that Claude Code runs before each Bash command.
CLAUDE_JOB_DIRSet by Claude Code in each background session to that session's
~/.claude/jobs/<id>directory.CLAUDE_PIDSet by Claude Code to its own process ID in the processes it starts.
Source: docsSince v2.1.214
CLAUDE_REMOTE_CONTROL_SESSION_NAME_PREFIXSets the prefix for auto-generated Remote Control session names.
CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MSSets the deadline for the first response byte of a streaming request, in milliseconds.
Source: docsSince v2.1.242
CLAUDE_STREAM_IDLE_TIMEOUT_MSSets how long the streaming idle watchdogs wait before closing a stalled connection, in milliseconds.
Source: docsSince v2.1.84
CLAUDECODESet to
1in processes that Claude Code starts, such as shell commands and hooks.DEBUGSet to
1to enable debug mode, equivalent to launching with--debug.DISABLE_AUTO_COMPACTSet to
1to turn off automatic compaction and idle compaction.DISABLE_AUTOUPDATERSet to
1to disable automatic background updates.DISABLE_COMPACTSet to
1to turn off all compaction, including the/compactcommand.DISABLE_COST_WARNINGSSet to
1to disable cost warning messages.DISABLE_DOCTOR_COMMANDSet to
1to hide the/doctorcommand and its/checkupalias.DISABLE_ERROR_REPORTINGSet to any non-empty value, such as
1, to opt out of error reporting.DISABLE_EXTRA_USAGE_COMMANDSet to
1to hide the/usage-creditscommand.DISABLE_FEEDBACK_COMMANDSet to
1to disable the/feedbackcommand and Claude-drafted feedback.DISABLE_GROWTHBOOKSet to
1to turn off feature-flag fetching.DISABLE_INSTALL_GITHUB_APP_COMMANDSet to
1to hide the/install-github-appcommand.DISABLE_INSTALLATION_CHECKSSet to
1to disable installation warnings.DISABLE_INTERLEAVED_THINKINGSet to
1to stop sending the interleaved-thinking beta header.Source: docsSince v1.0.1
DISABLE_LOGIN_COMMANDSet to
1to hide the/logincommand.DISABLE_LOGOUT_COMMANDSet to
1to hide the/logoutcommand.DISABLE_PROMPT_CACHINGSet to
1to turn off prompt caching for all models.DISABLE_PROMPT_CACHING_FABLESet to
1to disable prompt caching for Fable models.DISABLE_PROMPT_CACHING_HAIKUSet to
1to disable prompt caching for the default Haiku model, wherever it runs.DISABLE_PROMPT_CACHING_OPUSSet to
1to disable prompt caching for the default Opus model.DISABLE_PROMPT_CACHING_SONNETSet to
1to disable prompt caching for the default Sonnet model.DISABLE_UPDATESSet to
1to block all updates, includingclaude updateandclaude install.Source: docsSince v2.1.118
DISABLE_UPGRADE_COMMANDSet to
1to hide the/upgradecommand.DO_NOT_TRACKSet to
1to opt out of telemetry. It works likeDISABLE_TELEMETRY.ENABLE_BETA_TRACING_DETAILEDSet to
1, withBETA_TRACING_ENDPOINT, to turn on detailed beta tracing.ENABLE_CLAUDEAI_MCP_SERVERSSet to
falseto stop Claude Code from fetching claude.ai MCP servers.ENABLE_PROMPT_CACHING_1HSet to
1to ask for a 1-hour prompt cache TTL instead of the default 5 minutes.Source: docsSince v2.1.108
ENABLE_PROMPT_CACHING_1H_BEDROCKDeprecated.
ENABLE_PROMPT_CACHING_1Hreplaces it.ENABLE_TOOL_SEARCHControls MCP tool search.
falseloads all tools up front.FORCE_AUTOUPDATE_PLUGINSSet to
1to update plugins automatically even whenDISABLE_AUTOUPDATERis set.Source: docsSince v2.1.2
FORCE_HYPERLINKSet to
1to turn on clickable links when your terminal supports them but is not detected.FORCE_PROMPT_CACHING_5MSet to
1to force the 5-minute prompt cache TTL.HTTP_PROXYSets the HTTP proxy server.
HTTPS_PROXYSets the HTTPS proxy server.
IS_DEMOSet to any non-empty value to turn on demo mode, which hides your email and organization name.
Source: docsSince v2.1.0
MAX_MCP_OUTPUT_TOKENSSets the most tokens allowed in an MCP tool response. The default is 25000.
MAX_STRUCTURED_OUTPUT_RETRIESSets how many tries Claude Code allows when a reply fails the
--json-schemacheck with-p.MCP_CLIENT_SECRETOAuth client secret for MCP servers that require pre-configured credentials.
MCP_CONNECT_TIMEOUT_MSSets how long blocking MCP startup waits for the connection batch, in milliseconds. The default is 5000.
MCP_CONNECTION_NONBLOCKINGControls whether startup waits for MCP servers to connect. It does not wait by default.
MCP_DISCOVERY_CACHETurns the MCP discovery cache on or off.
MCP_DISCOVERY_CACHE_MAX_STALE_SSets the oldest a discovery-cache entry can be, in seconds. The default is 14400.
MCP_DISCOVERY_CACHE_STRIKESSets how many failed refreshes in a row discard a discovery-cache entry. The default is 1.
Source: docsSince v2.1.238
MCP_DISCOVERY_CACHE_TTL_SSets how long a discovery-cache entry is used without refreshing, in seconds. The default is 900.
MCP_OAUTH_CALLBACK_PORTSets a fixed port for the OAuth redirect callback when adding an MCP server.
MCP_PROTOCOL_NEGOTIATIONOn the v2 MCP client only, controls whether Claude Code probes servers for the newer MCP protocol revision.
Source: docsSince v2.1.221
MCP_REMOTE_SERVER_CONNECTION_BATCH_SIZESets how many remote MCP servers connect in parallel at startup. The default is 20.
MCP_SDK_GENERATIONPicks which MCP client runtime to use:
v1orv2.Source: docsSince v2.1.218
MCP_SERVER_CONNECTION_BATCH_SIZESets how many local MCP servers connect in parallel at startup. The default is 3.
MCP_TIMEOUTSets the timeout for MCP server startup, in milliseconds. The default is 30000.
MCP_TOOL_TIMEOUTSets the timeout for MCP tool runs, in milliseconds.
NO_PROXYLists domains and IPs that skip the proxy.
OTEL_ATTRIBUTE_VALUE_LENGTH_LIMITSets the standard OpenTelemetry limit on attribute value length.
Source: docsSince v2.1.214
OTEL_LOG_ASSISTANT_RESPONSESSet to
1to include the model's reply text inassistant_responselog events.Source: docsSince v2.1.193
OTEL_LOG_MANAGED_SETTINGSSet to
1to add redacted managed settings and a digest tomanaged_settings_resolvedlog events.Source: docsSince v2.1.274
OTEL_LOG_RAW_API_BODIESEmits Messages API request and response JSON as log events.
Source: docsSince v2.1.111
OTEL_LOG_TOOL_CONTENTSet to
1to include tool content in thetool.outputOpenTelemetry span event.OTEL_LOG_TOOL_DETAILSSet to
1to include tool input arguments.OTEL_LOG_USER_PROMPTSSet to
1to include user prompt text in OpenTelemetry traces and logs.OTEL_METRICS_INCLUDE_ACCOUNT_UUIDSet to
falseto leave the account UUID out of metric and event attributes.OTEL_METRICS_INCLUDE_ENTRYPOINTSet to
trueto add the session entrypoint to metric and event attributes.OTEL_METRICS_INCLUDE_REPOSITORYSet to
trueto tag metrics and events withvcs.*attributes for the repository.Source: docsSince v2.1.269
OTEL_METRICS_INCLUDE_RESOURCE_ATTRIBUTESSet to
falseto leaveOTEL_RESOURCE_ATTRIBUTESkeys off metric labels.OTEL_METRICS_INCLUDE_SESSION_IDSet to
falseto leave the session ID out of metric and event attributes.OTEL_METRICS_INCLUDE_VERSIONSet to
trueto add the Claude Code version to metric and event attributes.SLASH_COMMAND_TOOL_CHAR_BUDGETOverrides the character budget for skill metadata shown to the Skill tool.
USE_BUILTIN_RIPGREPSet to
0to use your installedrginstead of the one bundled with Claude Code.VERTEX_REGION_CLAUDE_3_5_HAIKUOverride region for Claude 3.5 Haiku when using Google Cloud's Agent Platform.
VERTEX_REGION_CLAUDE_3_5_SONNETOverride region for Claude 3.5 Sonnet when using Google Cloud's Agent Platform.
VERTEX_REGION_CLAUDE_3_7_SONNETOverride region for Claude 3.7 Sonnet when using Google Cloud's Agent Platform.
VERTEX_REGION_CLAUDE_4_0_OPUSOverride region for Claude Opus 4 when using Google Cloud's Agent Platform.
VERTEX_REGION_CLAUDE_4_0_SONNETOverride region for Claude Sonnet 4 when using Google Cloud's Agent Platform.
VERTEX_REGION_CLAUDE_4_1_OPUSOverride region for Claude Opus 4.1 when using Google Cloud's Agent Platform.
VERTEX_REGION_CLAUDE_4_5_OPUSOverride region for Claude Opus 4.5 when using Google Cloud's Agent Platform.
VERTEX_REGION_CLAUDE_4_5_SONNETOverride region for Claude Sonnet 4.5 when using Google Cloud's Agent Platform.
VERTEX_REGION_CLAUDE_4_6_OPUSOverride region for Claude Opus 4.6 when using Google Cloud's Agent Platform.
VERTEX_REGION_CLAUDE_4_6_SONNETOverride region for Claude Sonnet 4.6 when using Google Cloud's Agent Platform.
VERTEX_REGION_CLAUDE_4_7_OPUSOverride region for Claude Opus 4.7 when using Google Cloud's Agent Platform.
VERTEX_REGION_CLAUDE_4_8_OPUSOverride region for Claude Opus 4.8 when using Google Cloud's Agent Platform.
VERTEX_REGION_CLAUDE_5_5_OPUSOverride region for Claude Opus 5.5 when using Google Cloud's Agent Platform.
VERTEX_REGION_CLAUDE_5_5_SONNETOverride region for Claude Sonnet 5.5 when using Google Cloud's Agent Platform.
VERTEX_REGION_CLAUDE_5_OPUSOverride region for Claude Opus 5 when using Google Cloud's Agent Platform.
VERTEX_REGION_CLAUDE_5_SONNETOverride region for Claude Sonnet 5 when using Google Cloud's Agent Platform.
VERTEX_REGION_CLAUDE_FABLE_5Override region for Claude Fable 5 when using Google Cloud's Agent Platform.
VERTEX_REGION_CLAUDE_FABLE_5_1Override region for Claude Fable 5.1 when using Google Cloud's Agent Platform.
VERTEX_REGION_CLAUDE_FABLE_5_2Override region for Claude Fable 5.2 when using Google Cloud's Agent Platform.
VERTEX_REGION_CLAUDE_HAIKU_4_5Override region for Claude Haiku 4.5 when using Google Cloud's Agent Platform.
VERTEX_REGION_CLAUDE_HAIKU_5_5Override region for Claude Haiku 5.5 when using Google Cloud's Agent Platform.
> fuel for the obsessed builder
Subscribe free to see all 396
One email every Sunday with everything that changed in Claude this week, with every claim linked to its source.
Free. Unsubscribe anytime.
Hook events
33Points in a session where a hook can run. Official docs page
SessionStartFires when a session begins or resumes.
UserPromptSubmitFires when a prompt is submitted, before Claude processes it.
PreToolUseFires before a tool call runs. It can block the call.
PostToolUseFires after a tool call succeeds.
NotificationFires when Claude Code sends a notification.
StopFires when Claude finishes responding.
SubagentStopFires when a subagent finishes.
SessionEndFires when a session ends.
SetupFires with
--init-only, or with--initor--maintenancein-pmode.UserPromptExpansionFires when a typed command expands into a prompt. It can block the expansion.
PermissionRequestFires when a tool call needs a permission decision.
Source: docsSince v2.0.45
PermissionDeniedFires when auto mode denies a tool call.
Source: docsSince v2.1.89
PostToolUseFailureFires after a tool call fails.
PostToolBatchFires after a batch of parallel tool calls finishes, before the next model call.
MessageDisplayFires while assistant message text is displayed.
Source: docsSince v2.1.152
SubagentStartFires when a subagent is spawned.
Source: docsSince v2.0.43
TaskCreatedFires when a task is created with
TaskCreate.Source: docsSince v2.1.84
TaskCompletedFires when a task is marked as completed.
StopFailureFires when the turn ends because of an API error.
Source: docsSince v2.1.78
TeammateIdleFires when an agent team teammate is about to go idle.
InstructionsLoadedFires when a
CLAUDE.mdor.claude/rules/*.mdfile is loaded into context.Source: docsSince v2.1.69
ConfigChangeFires when a configuration file changes during a session.
Source: docsSince v2.1.49
CwdChangedFires when the working directory changes, such as after a
cdcommand.DirectoryAddedFires when a working directory is added mid-session with
/add-dir.Source: docsSince v2.1.219
FileChangedFires when a watched file changes on disk.
WorktreeCreateFires when a worktree is being created. It replaces the default git behavior.
WorktreeRemoveFires when a worktree that a
WorktreeCreatehook made is being removed.PreCompactFires before context compaction.
PostCompactFires after context compaction finishes.
Source: docsSince v2.1.76
PreModelSwitchFires before Claude Code applies a requested model switch. It can block the switch.
PostModelSwitchFires after the session's model changes.
ElicitationFires when an MCP server asks for user input during a tool call.
ElicitationResultFires after a user answers an MCP elicitation, before the answer goes back to the server.
> fuel for the obsessed builder
Subscribe free to see all 33
One email every Sunday with everything that changed in Claude this week, with every claim linked to its source.
Free. Unsubscribe anytime.
Slash commands
118Commands you type inside a session. Official docs page
/initCreates a starter
CLAUDE.mdguide for the project./model/clear/compact/context/memoryEdits
CLAUDE.mdfiles, turns auto memory on or off, and shows auto memory entries./permissionsManages allow, ask, and deny rules for tool permissions.
/resumeResumes a conversation by ID or name, or opens the session picker.
Usage:
/resume [session]
/add-dir/advisorTurns the advisor tool on or off. The advisor asks a second model for guidance.
Usage:
/advisor [model|off]/agentsPrints a reminder to ask Claude to create or manage subagents.
/artifact-capabilitiesLoads the reference for what a published artifact can do.
/artifact-diagrammingLoads diagramming guidance for artifacts.
/artifactsLists the artifacts you own or that are shared with you.
/auto-mode-setupDrafts
autoMode.environmententries from your project and recent sessions.Source: docsSince v2.1.304
/autocompactSets how full the context gets before Claude Code compacts it.
Usage:
/autocompact [auto|<tokens>]/autofix-prStarts a cloud session that watches your branch's PR and pushes fixes.
Usage:
/autofix-pr [prompt]/backgroundMoves the current session to a background agent and frees the terminal.
Usage:
/background [prompt]/batch/branch/btw/bug/cdMoves the session to a new working directory and keeps the conversation.
Usage:
/cd <path>Source: docsSince v2.1.169
/chromeOpens the Claude in Chrome settings.
/claude-apiLoads Claude API and Managed Agents reference material for your project's language.
Usage:
/claude-api [migrate|upgrade|api-version|managed-agents-onboard|managed-agents-secure|prompt-audit|cost-optimize|build-eval|hillclimb|preserved-thinking-migration]Source: docsSince v2.1.69
/claude-in-chromeHas Claude do a task in your browser through Claude in Chrome.
Usage:
/claude-in-chrome [task]/code-reviewReviews the current diff, or a PR, branch, or path, for correctness bugs.
Usage:
/code-review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [--max-findings n|all|default] [pr#|branch|path]/color/config/copy/costAlias for
/usage./datavizGives design guidance for charts, graphs, and dashboards.
Usage:
/dataviz [request]Source: docsSince v2.1.198
/debugTurns on debug logging and reads the debug log to find problems.
Usage:
/debug [description]Source: docsSince v2.1.30
/deep-researchSearches the web on a question, checks sources, and writes a cited report.
Usage:
/deep-research <question>/designDrafts UI mockups, screen flows, landing pages, or posters as a Claude Design artifact.
Usage:
/design [brief]/design consentGives Claude access to Claude Design.
/design revoketakes it back./design-loginSigns in for design-system access used by
/design-sync./design-syncConverts your repo's React design system and uploads it to Claude Design.
Usage:
/design-sync [hint]/desktopContinues the current session in the Claude Code Desktop app.
/diffShows the changes in your working tree, including Claude's edits.
/doctorRuns a setup checkup and proposes fixes for installation, settings, and
CLAUDE.mdproblems.Usage:
/doctor [prompt-audit [path]]/effortSets the effort level, from
lowtomax, orauto.Usage:
/effort [level|auto|status|ultracode [on|off]]Source: docsSince v2.1.76
/exitExits the CLI.
/export/fast/feedback/fewer-permission-promptsScans your transcripts for common read-only calls and adds an allowlist to project settings.
/focusToggles the focus view, which shows only your last prompt, a tool summary, and the final response.
/forkCopies the conversation into a new background session and lets you keep working here.
Usage:
/fork [prompt]/goalSets a goal. Claude keeps working across turns until the condition is met.
Usage:
/goal [condition|clear]Source: docsSince v2.1.139
/heapdumpWrites a JavaScript heap snapshot and memory breakdown to a file.
/helpShows help and the available commands.
/hooksShows your hook configurations.
/ideManages IDE integrations and shows status.
/importBrings config from OpenAI Codex, Gemini CLI, or Cursor into Claude Code.
Usage:
/import [codex|gemini|cursor] [--dry-run] [--yes]/insightsWrites an HTML report on your recent sessions.
/install-github-appInstalls the Claude GitHub App for a repository.
/install-slack-appInstalls the Claude Slack app.
/keybindingsOpens your keyboard shortcuts file.
/list-agentsLists the subagents, teammates, and other sessions Claude can message.
/loginSigns in to your Anthropic account.
/logoutSigns out of your Anthropic account.
/loopRuns a prompt again and again while the session stays open.
Usage:
/loop [interval] [prompt]Source: docsSince v2.1.71
/mcpManages MCP server connections and OAuth sign-in.
Usage:
/mcp [reconnect (<server>|all)|enable|disable [<server>|all]]/mobileShows a QR code to get the Claude mobile app.
/output-style/passesShares a free week of Claude Code with friends.
/plan/plugin/plugin-authoringLoads the reference Claude uses to write a mod.
/powerupTeaches Claude Code features through short interactive lessons.
Source: docsSince v2.1.90
/privacy-settingsShows and updates your privacy settings.
/radioOpens Claude FM lo-fi radio in your browser.
/rate-limit-optionsShows ways to keep working when a usage limit blocks a request.
Source: docsSince v2.1.284
/recapWrites a one-line summary of the current session.
/release-notesShows the changelog in a version picker.
/reload-plugins/reload-skillsRe-scans skill and command folders so new or changed skills load without a restart.
Source: docsSince v2.1.152
/remote-controlMakes this session available for Remote Control from claude.ai.
/remote-envSets the default cloud environment for cloud sessions you start from the CLI.
/rename/restartRestarts Claude Code and resumes this session.
/reviewAlias of
/code-review.Usage:
/review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [--max-findings n|all|default] [pr#|branch|path]/rewindRewinds the conversation, the code, or both to an earlier point.
/runLaunches and runs your project's app to see a change working.
/run-skill-generatorWrites a per-project skill that teaches
/runand/verifyto launch your app./sandboxTurns sandbox mode on or off.
/schedule/scroll-speedAdjusts mouse wheel scroll speed.
Source: docsSince v2.1.139
/security-reviewChecks the changes on your branch for security problems.
/setup-bedrockSets up Amazon Bedrock sign-in, region, and model pins with a wizard.
/setup-vertexSets up Google Cloud sign-in, project, region, and model pins with a wizard.
/simplifyReviews changed code for cleanup chances and applies the fixes.
Usage:
/simplify [target]/skill-doctorShows what each skill costs in context and how often it is used.
Source: docsSince v2.1.261
/skillsLists available skills.
/slides/statsAlias for
/usage./statusOpens the Status tab with version, model, account, and connection.
/statuslineSets up Claude Code's status line.
/stickersLets you order Claude Code stickers.
/stopStops the background session you are attached to.
/subtask/tasksShows background work in the current session, including finished subagents.
/team-onboardingWrites a team onboarding guide from your Claude Code usage history.
Source: docsSince v2.1.101
/teleportPulls a cloud session into this terminal.
/terminal-setupInstalls a Shift+Enter keybinding for newlines in some terminals.
/themeChanges the color theme.
/tuiSets the terminal UI renderer and relaunches into it.
Usage:
/tui [default|fullscreen]Source: docsSince v2.1.110
/ultrareviewRuns a deep, multi-agent code review in a cloud sandbox.
Usage:
/ultrareview [PR or branch]Source: docsSince v2.1.111
/update-configEdits the matching
settings.jsonfile from a change you describe.Usage:
/update-config [request]/upgradeOpens the upgrade page in your browser.
/usageShows session cost, plan limits, and activity stats.
/usage-creditsSets up usage credits, or requests them from your admin.
Source: docsSince v2.1.248
/verifyBuilds and runs your app to confirm a change does what it should.
/voice/web-setupConnects your GitHub account for cloud sessions using your local
ghlogin./workflow-authoringLoads the reference for writing dynamic workflow scripts.
/workflowsOpens the workflow progress view.
> fuel for the obsessed builder
Subscribe free to see all 118
One email every Sunday with everything that changed in Claude this week, with every claim linked to its source.
Free. Unsubscribe anytime.
CLI flags
79Flags you pass when you start claude. Official docs page
--printAlso-p--continueAlso-c--resumeAlso-rResumes a session by ID or name, or shows a picker.
Example:
claude --resume auth-refactor--modelSets the model for the session with an alias such as
sonnetor a full name.Example:
claude --model claude-sonnet-5--permission-mode--add-dirAdds working directories for Claude to read and edit files in.
Example:
claude --add-dir ../apps ../lib--output-formatSets the output format for print mode:
text,json, orstream-json.Example:
claude -p "query" --output-format json--dangerously-skip-permissionsSkips permission prompts. Same as
--permission-mode bypassPermissions.Example:
claude --dangerously-skip-permissions
--advisorTurns on the advisor tool for this session with a model alias or ID.
Example:
claude --advisor opus--agentStarts the session as a named agent. It overrides the
agentsetting.Example:
claude --agent my-custom-agent--agentsDefines custom subagents with JSON.
Example:
claude --agents '{"reviewer":{"description":"Reviews code","prompt":"You are a code reviewer"}}'--allow-dangerously-skip-permissionsAdds
bypassPermissionsto theShift+Tabmode cycle without starting in it.Example:
claude --permission-mode plan --allow-dangerously-skip-permissions--allowedToolsAlso--allowed-toolsLists tools that run without asking for permission.
Example:
claude --allowedTools "Bash(git log *)" "Bash(git diff *)" "Read"--append-subagent-system-promptAdds text to the end of every subagent's system prompt.
Example:
claude -p --append-subagent-system-prompt "Cite file paths in every answer" "query"--append-subagent-system-prompt-fileAdds text from a file to subagent system prompts.
Example:
claude -p --append-subagent-system-prompt-file ./subagent-rules.txt "query"Source: docsSince v2.1.261
--append-system-promptAdds text to the end of the default system prompt.
Example:
claude --append-system-prompt "Always use TypeScript"--append-system-prompt-fileAdds text from a file to the end of the default system prompt.
Example:
claude --append-system-prompt-file ./extra-rules.txt--autocompactSets the auto-compact window for this session without changing saved settings.
Example:
claude --autocompact 500k--ax-screen-readerRenders screen-reader friendly output with flat text and no borders or animations.
Example:
claude --ax-screen-reader--bareStarts in minimal mode, skipping hooks, skills, plugins, MCP servers, auto memory, and
CLAUDE.md.Example:
claude --bare -p "query"Source: docsSince v2.1.81
--betasAdds beta headers to API requests. For API key users only.
Example:
claude --betas interleaved-thinking--bgAlso--backgroundStarts the session as a background agent and returns right away.
Example:
claude --bg "investigate the flaky test"--channelsLists MCP servers whose channel notifications Claude listens for. A research preview.
Example:
claude --channels plugin:my-notifier@my-marketplaceSource: docsSince v2.1.80
--chrome--cloudCreates a new cloud session from a task description.
Example:
claude --cloud "Fix the login bug"--dangerously-load-development-channelsTurns on channels that are not on the approved allowlist, for local development.
Example:
claude --dangerously-load-development-channels server:webhook--debugTurns on debug mode, with optional category filters.
Example:
claude --debug='mcp,startup'--debug-fileWrites debug logs to a file path you choose.
Example:
claude --debug-file /tmp/claude-debug.log--desktopOpens the Claude Desktop app on the current directory and exits.
Example:
claude --desktopSource: docsSince v2.1.285
--disable-slash-commandsTurns off all skills and commands for this session.
Example:
claude --disable-slash-commands--disallowedToolsAlso--disallowed-toolsLists deny rules. A bare tool name removes the tool from Claude's context.
Example:
claude --disallowedTools "Bash(git log *)" "Bash(git diff *)" "Edit"--effort--environmentCreates a cloud session on the self-hosted environment with the given ID.
Example:
claude -p "Fix the login bug" --environment ccpool_abc123--exclude-dynamic-system-prompt-sectionsMoves per-user context out of the system prompt and into the first user message.
Example:
claude -p --exclude-dynamic-system-prompt-sections "query"Source: docsSince v2.1.98
--execRuns a shell command as a background job instead of starting a Claude session.
Example:
claude --bg --exec 'pytest -x'--fallback-modelSets models to fall back to when the main model is overloaded or unavailable.
Example:
claude --fallback-model sonnet,haiku--fork-sessionWhen resuming, creates a new session ID instead of reusing the old one.
Example:
claude --resume abc123 --fork-session--forward-subagent-textEmits subagent text and thinking in the output stream.
Example:
claude -p --output-format stream-json --verbose --forward-subagent-text "query"Source: docsSince v2.1.211
--from-prOpens the session picker filtered to sessions linked to a pull request.
Example:
claude --from-pr 123Source: docsSince v2.1.27
--ideConnects to your IDE on startup if exactly one valid IDE is available.
Example:
claude --ide--initRuns Setup hooks with the
initmatcher before the session. Print mode only.Example:
claude -p --init "query"--init-only--include-hook-eventsIncludes hook lifecycle events in the output stream.
Example:
claude -p --output-format stream-json --verbose --include-hook-events "query"--include-partial-messagesIncludes partial streaming events in the output.
Example:
claude -p --output-format stream-json --verbose --include-partial-messages "query"--input-formatSets the input format for print mode:
textorstream-json.Example:
claude -p --input-format stream-json --output-format stream-json --verbose--json-schemaReturns JSON output checked against a JSON Schema. Print mode only.
Example:
claude -p --json-schema '{"type":"object","properties":{...}}' "query"--maintenanceRuns Setup hooks with the
maintenancematcher before the session. Print mode only.Example:
claude -p --maintenance "query"--max-budget-usdStops the run once estimated API spend reaches this amount. Print mode only.
Example:
claude -p --max-budget-usd 5.00 "query"--max-turnsLimits the number of agentic turns. Print mode only.
Example:
claude -p --max-turns 3 "query"--mcp-config--nameAlso-nSets a display name for the session, shown in
/resumeand the terminal title.Example:
claude -n "my-feature-work"--no-chrome--no-session-persistenceStops sessions from being saved to disk, so they can't be resumed.
Example:
claude -p --no-session-persistence "query"--permission-prompt-toolNames an MCP tool that handles permission prompts in non-interactive mode.
Example:
claude -p --mcp-config ./mcp.json --permission-prompt-tool mcp__permissions__approve "query"--permission-promptsSets who answers permission prompts in print mode.
Example:
claude -p --permission-prompts none "query"--plugin-dirLoads a plugin from a directory or
.zipfor this session only.Example:
claude --plugin-dir ./my-plugin--plugin-urlFetches a plugin
.zipfrom a URL for this session only.Example:
claude --plugin-url https://example.com/plugin.zip--prompt-suggestionsEmits a predicted next prompt after each turn that makes one.
Example:
claude -p --prompt-suggestions --output-format stream-json --verbose "query"--refWith
--environment, bases the new session's checkout on a named ref.Example:
claude -p "Run the smoke test" --environment ccpool_abc123 --ref main--remote--remote-controlAlso--rcStarts an interactive session you can also control from claude.ai or the Claude app.
Example:
claude --remote-control "My Project"--remote-control-session-name-prefixSets the prefix for auto-generated Remote Control session names.
Example:
claude remote-control --remote-control-session-name-prefix dev-box--replay-user-messagesSends user messages from stdin back out on stdout.
Example:
claude -p --input-format stream-json --output-format stream-json --verbose --replay-user-messages--restricted--safe-modeStarts with all customizations turned off, to troubleshoot a broken configuration.
Example:
claude --safe-modeSource: docsSince v2.1.169
--session-idUses a specific session ID, which must be a valid UUID.
Example:
claude --session-id "550e8400-e29b-41d4-a716-446655440000"--setting-sourcesLists the setting sources to load:
user,project,local.Example:
claude --setting-sources user,project--settingsLoads a settings JSON file or an inline JSON string.
Example:
claude --settings ./settings.json--strict-mcp-configUses only MCP servers from
--mcp-configand ignores all others.Example:
claude --strict-mcp-config --mcp-config ./mcp.json--system-promptReplaces the whole system prompt with your text.
Example:
claude --system-prompt "You are a Python expert"--system-prompt-fileReplaces the system prompt with the contents of a file.
Example:
claude --system-prompt-file ./custom-prompt.txt--system-prompt-snapshotPass
offto rebuild the system prompt on every request.Example:
claude --system-prompt-snapshot off--teleport--teammate-modeSets how agent team teammates display:
in-process,auto,tmux, oriterm2.Example:
claude --teammate-mode auto--tmux--tools--verbose--versionAlso-v--worktreeAlso-w
> fuel for the obsessed builder
Subscribe free to see all 79
One email every Sunday with everything that changed in Claude this week, with every claim linked to its source.
Free. Unsubscribe anytime.
Permissions syntax
31Rule syntax and permission modes. Official docs page
Tool(specifier)A permission rule. Use only the tool name to match every use, or add a specifier to match some uses.
Example:
Bash(npm run build)BashMatches all Bash commands.
Bash(npm run build)Matches the exact command
npm run build.Bash(npm run *)Matches
npm run build,npm run test --watch, and barenpm run, but notnpm install.Read(./.env)Matches reading the
.envfile in the current directory.WebFetch(domain:example.com)Matches fetch requests to example.com.
mcp__server__*planA permission mode. Claude reads files and runs read-only commands to explore, but does not edit your source files.
ReadMatches all file reads.
WebFetchMatches all web fetch requests.
Bash(git log *)Allows only
git logcommands.Bash(git *)allows every git command.Bash(ls *)Matches
lsandls -la, but notlsof. The space before the*is part of the rule.Bash(ls*)Matches
ls -laand alsolsof, because there is no space before the*.Bash(ls:*)Another way to write
Bash(ls *). The:*form only works at the end of a pattern.Bash(* --version)Matches any program followed by
--version, such asnode --version.Tool(param:value)A deny or ask rule that matches a top-level input parameter on a built-in tool.
Example:
Bash(run_in_background:true)Agent(AgentName)mcp__servermcp__server__toolmcp__*In a deny or ask rule, matches every MCP tool across all servers.
//pathPath anchor. An absolute path from the filesystem root.
Example:
Read(//Users/alice/secrets/**)~/path/path./pathPath anchor. A path relative to the current directory. A bare
pathworks the same way.Example:
Read(*.env)PowerShell(Get-ChildItem *)A PowerShell rule. It also matches the aliases
gci,ls, anddir.Cd(~/code/**)Controls where
/cdcan move the session. This one matches~/codeand any directory under it.defaultA permission mode. Prompts for permission on first use of each tool.
acceptEditsA permission mode. Accepts file edits and common filesystem commands such as
mkdir,touch,mv, andcpin the working directory.autoA permission mode. Runs without routine prompts while a background classifier checks actions against your request.
dontAskA permission mode. Auto-denies every call that would otherwise prompt.
bypassPermissionsA permission mode. Skips permission prompts, except for actions no mode auto-approves.
> fuel for the obsessed builder
Subscribe free to see all 31
One email every Sunday with everything that changed in Claude this week, with every claim linked to its source.
Free. Unsubscribe anytime.
> fuel for the obsessed builder
Get what changes in Claude every Sunday.
One email every Sunday with everything that changed in Claude this week, with every claim linked to its source.
Free. Unsubscribe anytime.