What wins
All reference pagesdecisions.json · machine-readable records with offsets and hashes
For each value Claude Code decides, every source it checks, in the order it checks them, and which one takes effect. Set rungs on a card to see the outcome. 28 decisions; rungs marked Tested were checked against the requests Claude Code actually sent, and the rest were read from code. 474 knobs sit in decisions that are not traced yet.
Tools and output
Advisor tool available
Whether the advisor tool, which lets Claude consult a stronger reviewer model, can be used. When it can, Claude gets it once an advisor model is chosen, for example with the advisorModel setting.
- 1env
CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL1, true, yes or on (any case) makes the advisor available without Anthropic's flag. It also skips the model catalog check on which main and advisor models may pair. Any other value counts as unset. Read from code - 2remoteAnthropic's advisor flag turned onA remote flag that is off by default in code. When Anthropic turns it on for you, the advisor becomes available without the variable. Anthropic can change it without a release. Read from code
- 3defaultDefaultWhen nothing above turns it on: no advisor. Read from code
- Before the ladder:
CLAUDE_CODE_DISABLE_ADVISOR_TOOL. Checked before the ladder: no advisor, whatever is set below. 1, true, yes and on count as set. - Before the ladder:
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS. Checked before the ladder: turning off experimental betas also removes the advisor. A HIPAA-restricted organization gets the same result. 1, true, yes and on count as set.
- env
CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL: 1, true, yes or on (any case) makes the advisor available without Anthropic's flag. It also skips the model catalog check on which main and advisor models may pair. Any other value counts as unset. Read from code. - remote Anthropic's advisor flag turned on: A remote flag that is off by default in code. When Anthropic turns it on for you, the advisor becomes available without the variable. Anthropic can change it without a release. Read from code.
- default Default: When nothing above turns it on: no advisor. Read from code.
- After the ladder: Not on Anthropic's API. Only on Anthropic's API; a custom ANTHROPIC_BASE_URL still counts. With any other provider, including Claude Code's cloud gateway, there is no advisor, whatever is set in the ladder.
- After the ladder: The API refused the advisor. When the API refuses the advisor during a session, Claude Code stops offering it, for this process or for that host.
Source: chunk-hzevqd7x.js · offset 181626354 · sha256 91ac2727…
Bash output limit
How many characters of a Bash or PowerShell command's output Claude receives in the tool result before the rest is saved to a file and replaced by a short preview.
- 1remoteAnthropic's per-tool thresholdA table Anthropic sends can set the inline threshold for each tool by name, replacing the setting's value or the 30,000 default, even past 128,000. The table is empty in the code, so nothing changes unless Anthropic sends a value, which it can do without a release. Output past the read-back size (the setting, the environment variable up to 150,000, or 30,000) is still saved to a file, so the limit goes no higher than that. Read from code
- 2settings
bashOutputMaxCharsA whole number, used for both Bash and PowerShell. Values below 4,000 are raised to 4,000 and values above 128,000 are lowered to it; zero, negatives, fractions and non-numbers are dropped without a warning. When set, the environment variable is ignored. Read from code - 3env
BASH_MAX_OUTPUT_LENGTHUsed only when the setting is not set. It sizes how much output is read back from the command, so it can shrink the limit below 30,000 but cannot raise it past the 30,000 inline threshold unless Anthropic's per-tool table sets a higher one. Zero, negatives and non-numbers fall back to 30,000 with only a debug-log line; values above 150,000 are lowered to it. Read from code - 4defaultBuilt-in default30,000 characters. Read from code
- remote Anthropic's per-tool threshold: A table Anthropic sends can set the inline threshold for each tool by name, replacing the setting's value or the 30,000 default, even past 128,000. The table is empty in the code, so nothing changes unless Anthropic sends a value, which it can do without a release. Output past the read-back size (the setting, the environment variable up to 150,000, or 30,000) is still saved to a file, so the limit goes no higher than that. Read from code.
- settings
bashOutputMaxChars: A whole number, used for both Bash and PowerShell. Values below 4,000 are raised to 4,000 and values above 128,000 are lowered to it; zero, negatives, fractions and non-numbers are dropped without a warning. When set, the environment variable is ignored. Read from code. - env
BASH_MAX_OUTPUT_LENGTH: Used only when the setting is not set. It sizes how much output is read back from the command, so it can shrink the limit below 30,000 but cannot raise it past the 30,000 inline threshold unless Anthropic's per-tool table sets a higher one. Zero, negatives and non-numbers fall back to 30,000 with only a debug-log line; values above 150,000 are lowered to it. Read from code. - default Built-in default: 30,000 characters. Read from code.
- After the ladder: Inline size threshold. Output longer than what is read back, or longer than this threshold, is saved to a file, and Claude gets the first 2,000 characters plus the file's path instead. The threshold is the setting's value, at most 128,000, or 30,000 when the setting is not set, unless Anthropic's per-tool table replaces it; the environment variable does not change it.
Source: chunk-s7stjdxd.js · offset 182631096 · sha256 02e26ffb…
MCP output limit
How many tokens of an MCP tool's result Claude receives in the tool result before the result is saved to a file or cut short.
- 1env
MAX_MCP_OUTPUT_TOKENSA whole number of tokens. Zero, negatives and non-numbers are skipped without a warning, and the lookup moves on to Anthropic's value rather than straight to the default. There is no upper cap. Read from code - 2remoteAnthropic's per-tool table (MCP entry)Anthropic can send a token limit for all MCP tools in the same per-tool table that sets the Bash threshold, under its own MCP entry. The code's default table is empty, so this rung answers only when Anthropic sends a positive number, which it can do without a release; zero, negatives and non-numbers are skipped. Read from code
- 3defaultBuilt-in default25,000 tokens. Read from code
- env
MAX_MCP_OUTPUT_TOKENS: A whole number of tokens. Zero, negatives and non-numbers are skipped without a warning, and the lookup moves on to Anthropic's value rather than straight to the default. There is no upper cap. Read from code. - remote Anthropic's per-tool table (MCP entry): Anthropic can send a token limit for all MCP tools in the same per-tool table that sets the Bash threshold, under its own MCP entry. The code's default table is empty, so this rung answers only when Anthropic sends a positive number, which it can do without a release; zero, negatives and non-numbers are skipped. Read from code.
- default Built-in default: 25,000 tokens. Read from code.
- After the ladder: Built-in IDE connection. Checked before the ladder. Results from the built-in IDE connection are passed through without this limit.
- After the ladder: Tool declares its own result size. Checked before the ladder. An MCP tool that declares a positive anthropic/maxResultSizeChars value in its metadata skips this token limit, unless the result contains images.
- After the ladder: What happens to a result over the limit. A result whose estimated size is at most half the limit passes; above that, the tokens are counted through the API, falling back to the estimate if counting fails. A result over the limit is normally saved to a file, and Claude gets the file's path, its format and instructions for reading it. It is instead cut to four characters per token of the limit, followed by a truncation notice, when ENABLE_MCP_LARGE_OUTPUT_FILES is set to a false value, when the result contains images, or when saving fails in remote-storage sessions; in other sessions a failed save returns an error with no content.
- After the ladder: Saved-file instructions wording. MCP_TRUNCATION_PROMPT_OVERRIDE only changes the wording of the reading instructions for a saved file, not the limit: legacy picks the older wording and any other value the newer one. When it is unset, a flag Anthropic can change without a release decides, and the code's default is the older wording.
- After the ladder: General tool-result size threshold. After this check, MCP results also pass the size check every tool uses. For a tool that does not declare its own size it is 50,000 characters, so a text result under the token limit but longer than that is still saved to a file with a short preview. Anthropic's per-tool table can set this threshold for a single MCP tool by name without a release.
Source: chunk-y09rhn85.js · offset 202809293 · sha256 30694e27…
Stalled-stream watchdog
Whether Claude Code gives up on a streaming response that goes silent. On Anthropic's API it sets a deadline for the first byte and aborts the stream when no bytes arrive for the idle timeout (3 minutes by default). Some routes get only the idle abort.
- 1env
CLAUDE_ENABLE_BYTE_WATCHDOG0, false, no or off turns the watchdog off; 1, true, yes or on turns it on. Case and surrounding spaces are ignored. Any other value counts as unset. On the gateway, a custom base URL or a custom AWS address, on means only the idle abort, with no first-byte deadline. Read from code - 2remoteAnthropic's watchdog flag turned offA remote flag that is on by default in code, so the watchdog runs unless Anthropic turns it off. Anthropic can change it without a release. Read from code
- 3defaultDefaultWhen nothing above answers: on. On the gateway, a custom base URL or a custom AWS address, that means only the idle abort. Read from code
- env
CLAUDE_ENABLE_BYTE_WATCHDOG: 0, false, no or off turns the watchdog off; 1, true, yes or on turns it on. Case and surrounding spaces are ignored. Any other value counts as unset. On the gateway, a custom base URL or a custom AWS address, on means only the idle abort, with no first-byte deadline. Read from code. - remote Anthropic's watchdog flag turned off: A remote flag that is on by default in code, so the watchdog runs unless Anthropic turns it off. Anthropic can change it without a release. Read from code.
- default Default: When nothing above answers: on. On the gateway, a custom base URL or a custom AWS address, that means only the idle abort. Read from code.
- After the ladder: Provider without the watchdog. Vertex, Foundry, Mantle, Anthropic on Google Cloud, and Bedrock without CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCK (1, true, yes or on) get no watchdog, whatever the ladder says.
Source: chunk-hzevqd7x.js · offset 181702275 · sha256 fb79d128…
Workflow tool available
Whether the Workflow tool (multi-agent workflows) is offered to Claude. Settings and organization policy are checked each time; the remote flag and CLAUDE_CODE_WORKFLOWS are read once per session.
- 1managedOrganization policy denies workflowsWorkflows are allowed unless your organization's policy denies them. When it does, nothing below can turn the tool back on. Read from code
- 2remoteAnthropic's workflows flag turned offA remote flag that is on by default in code. When Anthropic turns it off, the tool is gone even with CLAUDE_CODE_WORKFLOWS or enableWorkflows set. Read once per session. Anthropic can change it without a release. Read from code
- 3env
CLAUDE_CODE_WORKFLOWS0, false, no or off turns the tool off, even with enableWorkflows set to true. 1, true, yes or on turns it on, including on the Pro plan, but enableWorkflows set to false still wins. Any other value counts as unset. Read from code - 4settings
enableWorkflowsFrom any settings file Claude Code loads, including managed settings. true turns the tool on, including on the Pro plan; false turns it off. Read from code - 5defaultDefault by planWhen nothing above answers: off on the Claude Pro plan, on for every other sign-in, including API keys. Read from code
- Before the ladder:
CLAUDE_CODE_DISABLE_WORKFLOWS. Checked before the ladder: no Workflow tool, whatever is set below. 1, true, yes and on count as set. - Before the ladder:
disableWorkflows. Checked before the ladder: disableWorkflows set to true in any settings file turns the tool off, whatever is set below.
- managed Organization policy denies workflows: Workflows are allowed unless your organization's policy denies them. When it does, nothing below can turn the tool back on. Read from code.
- remote Anthropic's workflows flag turned off: A remote flag that is on by default in code. When Anthropic turns it off, the tool is gone even with CLAUDE_CODE_WORKFLOWS or enableWorkflows set. Read once per session. Anthropic can change it without a release. Read from code.
- env
CLAUDE_CODE_WORKFLOWS: 0, false, no or off turns the tool off, even with enableWorkflows set to true. 1, true, yes or on turns it on, including on the Pro plan, but enableWorkflows set to false still wins. Any other value counts as unset. Read from code. - settings
enableWorkflows: From any settings file Claude Code loads, including managed settings. true turns the tool on, including on the Pro plan; false turns it off. Read from code. - default Default by plan: When nothing above answers: off on the Claude Pro plan, on for every other sign-in, including API keys. Read from code.
Source: chunk-7jh19beg.js · offset 179149216 · sha256 40bb2e84…
Permissions and security
API credential
Which credential Claude Code sends with requests to the Anthropic API: a subscription OAuth token (as a bearer token, with no API key), an auth token, or an API key, and from which source.
- 1env
CLAUDE_CODE_OAUTH_TOKENOn the web and in the desktop app a subscription token is checked before any API key or auth token. It is sent as a bearer token and no API key goes with it. Read from code - 2env
CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTORA subscription token read from an inherited file descriptor, or from a token file the host places at a fixed path. Read from code - 3defaultSigned in with claude.ai (/login)The saved claude.ai login. Not read when the host manages provider credentials (CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST). Read from code
- 4env
ANTHROPIC_AUTH_TOKENSent as a bearer token, and in your terminal it turns subscription sign-in off. An API key found by a lower rung is still sent with it, as x-api-key. Read from code - 5env
ANTHROPIC_API_KEYAlways used with -p (unless the client is the VS Code extension) and in bare mode. In an interactive session it is used only after you approve it at the prompt; an unapproved or rejected key is skipped. A configured apiKeyHelper is still sent alongside it as the bearer token, unless ANTHROPIC_AUTH_TOKEN is set. Read from code - 6env
CLAUDE_CODE_API_KEY_FILE_DESCRIPTORAn API key read from an inherited file descriptor, or from a key file the host places at a fixed path. Not read in bare mode. Read from code - 7settings
apiKeyHelperThe script's output is sent as the API key and, unless ANTHROPIC_AUTH_TOKEN is set, also as a bearer token; it is cached and re-run after CLAUDE_CODE_API_KEY_HELPER_TTL_MS (default 5 minutes). In bare mode only a helper passed with --settings counts, one from project settings waits for workspace trust, and it is ignored when the host manages provider credentials. Read from code - 8env
CLAUDE_CODE_OAUTH_TOKENA subscription token, sent as a bearer token with no API key. With ANTHROPIC_UNIX_SOCKET set it is checked before any API key; with ANTHROPIC_UNIX_SOCKET set and no CLAUDE_CODE_OAUTH_TOKEN, subscription sign-in is off. Read from code - 9env
CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTORA subscription token from an inherited file descriptor or a host-provided token file. It is read before a saved login, except when the host restored the token from a background snapshot. Read from code - 10defaultSigned in with claude.ai (/login)The login /login saved in the keychain or credentials file. It must carry the inference scope; a Console login does not, so it falls through to the next rung. Read from code
- 11defaultAPI key saved by /login (Console)Read from the macOS keychain or Claude Code's config file. Not read when the host manages provider credentials. Read from code
forceLoginOrgUUIDforceLoginMethod- Before the ladder:
CLAUDE_CODE_USE_BEDROCK. Checked before the ladder: with Bedrock, Vertex or another cloud provider selected, that provider's own credentials are used. Exception: with CLAUDE_CODE_SKIP_VERTEX_AUTH, or CLAUDE_CODE_SKIP_BEDROCK_AUTH and no AWS_BEARER_TOKEN_BEDROCK (likewise the Mantle and Google Cloud skip-auth switches), the bearer header from ANTHROPIC_AUTH_TOKEN or apiKeyHelper is sent instead.
- env
CLAUDE_CODE_OAUTH_TOKEN: On the web and in the desktop app a subscription token is checked before any API key or auth token. It is sent as a bearer token and no API key goes with it. Read from code. - env
CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR: A subscription token read from an inherited file descriptor, or from a token file the host places at a fixed path. Read from code. - default Signed in with claude.ai (/login): The saved claude.ai login. Not read when the host manages provider credentials (CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST). Read from code.
- env
ANTHROPIC_AUTH_TOKEN: Sent as a bearer token, and in your terminal it turns subscription sign-in off. An API key found by a lower rung is still sent with it, as x-api-key. Read from code. - env
ANTHROPIC_API_KEY: Always used with -p (unless the client is the VS Code extension) and in bare mode. In an interactive session it is used only after you approve it at the prompt; an unapproved or rejected key is skipped. A configured apiKeyHelper is still sent alongside it as the bearer token, unless ANTHROPIC_AUTH_TOKEN is set. Read from code. - env
CLAUDE_CODE_API_KEY_FILE_DESCRIPTOR: An API key read from an inherited file descriptor, or from a key file the host places at a fixed path. Not read in bare mode. Read from code. - settings
apiKeyHelper: The script's output is sent as the API key and, unless ANTHROPIC_AUTH_TOKEN is set, also as a bearer token; it is cached and re-run after CLAUDE_CODE_API_KEY_HELPER_TTL_MS (default 5 minutes). In bare mode only a helper passed with --settings counts, one from project settings waits for workspace trust, and it is ignored when the host manages provider credentials. Read from code. - env
CLAUDE_CODE_OAUTH_TOKEN: A subscription token, sent as a bearer token with no API key. With ANTHROPIC_UNIX_SOCKET set it is checked before any API key; with ANTHROPIC_UNIX_SOCKET set and no CLAUDE_CODE_OAUTH_TOKEN, subscription sign-in is off. Read from code. - env
CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR: A subscription token from an inherited file descriptor or a host-provided token file. It is read before a saved login, except when the host restored the token from a background snapshot. Read from code. - default Signed in with claude.ai (/login): The login /login saved in the keychain or credentials file. It must carry the inference scope; a Console login does not, so it falls through to the next rung. Read from code.
- default API key saved by /login (Console): Read from the macOS keychain or Claude Code's config file. Not read when the host manages provider credentials. Read from code.
- After the ladder:
forceLoginOrgUUID. Checked at sign-in and before cloud sessions, not a rung. When managed settings pin an organization, an API key, auth token or apiKeyHelper makes the check fail, and an OAuth token from another organization is refused. - After the ladder:
forceLoginMethod. Checked when you sign in, not a rung: a claude.ai or Console sign-in of the other kind is refused. It does not reorder the ladder.
Source: chunk-1vt3h958.js · offset 178658230 · sha256 04dd0841…
Starting permission mode
Which permission mode a session starts in: default, acceptEdits, plan, auto, dontAsk or bypassPermissions.
- 1flag
--dangerously-skip-permissionsAsks for bypassPermissions. In a background session where the bypass disclaimer has not been accepted, it answers default instead. Read from code - 2flag
--permission-mode <mode>manual means default. Any other value stops Claude Code with an error. bypassPermissions in a background session without the disclaimer accepted answers default. Read from code - 3agentAgent frontmatter permissionModeFrom the agent the session runs as, chosen with --agent or the agent setting. Passed over with a warning when it would widen a mode passed with --inherit-permission-mode. Read from code
- 4settings
permissions.defaultModemanual means default. On the web only acceptEdits, plan, default and auto are honored. Project and local settings cannot grant auto or widen an inherited mode, and a bypassPermissions they ask for starts the session in default unless a mode is inherited. VS Code extension sessions ignore this setting unless Anthropic turns it on remotely. Read from code - 5flag
--inherit-permission-mode <mode>A hidden flag a parent session passes on. Used only when nothing above answers. manual means default, and bypassPermissions in a background session without the disclaimer accepted answers default. Read from code - 6env
CLAUDE_CODE_BRIDGE_CHILD_AUTO_DEFAULTStarts a Remote Control machine session in auto when nothing above answers. Read from code - 7remoteAnthropic's auto-by-default rolloutA remote flag, off by default in code, that starts sessions in auto when nothing above answers. Print mode needs a second remote flag, also off by default. Anthropic can change both without a release. Read from code
- 8defaultBuilt-in defaultWhen nothing above answers, the session starts in default. Read from code
- Before the ladder:
CLAUDE_CODE_SUBPROCESS_ENV_SCRUB. Checked before the ladder: the session starts in default and every flag, agent and setting below is ignored, with a warning if one asked for another mode. Set it to 0 to opt out.
- flag
--dangerously-skip-permissions: Asks for bypassPermissions. In a background session where the bypass disclaimer has not been accepted, it answers default instead. Read from code. - flag
--permission-mode <mode>: manual means default. Any other value stops Claude Code with an error. bypassPermissions in a background session without the disclaimer accepted answers default. Read from code. - agent Agent frontmatter permissionMode: From the agent the session runs as, chosen with --agent or the agent setting. Passed over with a warning when it would widen a mode passed with --inherit-permission-mode. Read from code.
- settings
permissions.defaultMode: manual means default. On the web only acceptEdits, plan, default and auto are honored. Project and local settings cannot grant auto or widen an inherited mode, and a bypassPermissions they ask for starts the session in default unless a mode is inherited. VS Code extension sessions ignore this setting unless Anthropic turns it on remotely. Read from code. - flag
--inherit-permission-mode <mode>: A hidden flag a parent session passes on. Used only when nothing above answers. manual means default, and bypassPermissions in a background session without the disclaimer accepted answers default. Read from code. - env
CLAUDE_CODE_BRIDGE_CHILD_AUTO_DEFAULT: Starts a Remote Control machine session in auto when nothing above answers. Read from code. - remote Anthropic's auto-by-default rollout: A remote flag, off by default in code, that starts sessions in auto when nothing above answers. Print mode needs a second remote flag, also off by default. Anthropic can change both without a release. Read from code.
- default Built-in default: When nothing above answers, the session starts in default. Read from code.
- After the ladder:
permissions.disableBypassPermissionsMode. When set to disable, any rung that answers bypassPermissions is passed over with a warning and the next rung answers. - After the ladder:
permissions.disableAutoMode. When set to disable, a session that would start in auto starts in default: an explicit auto from a flag, an agent or settings resolves to auto and is switched to default once Claude Code checks whether auto is available, and the fallback to auto is blocked. In a Remote Control machine session an auto from settings is passed over instead, so an inherited mode can still answer. The top-level disableAutoMode setting does the same. - After the ladder: Anthropic's auto-mode switch. A remote flag that leaves auto mode available by default in code. When Anthropic switches auto mode off, auto answers are passed over and the next rung answers, and a session already in auto is switched to default once Claude Code checks whether auto is available. Anthropic can change it without a release.
Source: chunk-fr7r2xfj.js · offset 179164270 · sha256 50e7f44a…
Which permission rules apply
Which allow, deny and ask rules are in force for a session: every source adds its rules, and managed policy can shut most sources out.
- 1settings
permissions.allow in ~/.claude/settings.json or --settingsAllow rules from your user settings file and from --settings. Each file's rules are read on their own and keep their source; --setting-sources can leave the user file out. Read from code - 2settings
permissions.allow in .claude/settings.jsonDropped with a warning until the workspace is trusted, unless the project folder is your home folder. Deny and ask rules from the same file still apply. Read from code - 3settings
permissions.allow in .claude/settings.local.jsonAllow rules from the local project file. In a workspace that is not yet trusted these can be dropped too, depending on how the file is tracked. Read from code - 4settings
permissions.denyDeny rules from the user, project, local and --settings files; --setting-sources can leave the user, project or local file out. Not gated by workspace trust. Read from code - 5settings
permissions.askAsk rules from the user, project, local and --settings files; --setting-sources can leave the user, project or local file out. Not gated by workspace trust. Read from code - 6managedpermissions.allow in managed settingsAllow rules set by an administrator. Always loaded. Read from code
- 7managedpermissions.deny and ask in managed settingsDeny and ask rules set by an administrator. Always loaded. Read from code
- 8flag
--allowedTools, --allowed-tools <tools...>Allow rules from the command line. A rule naming a tool that does not exist is skipped with a warning. Read from code - 9flag
--disallowedTools, --disallowed-tools <tools...>Deny rules from the command line. Read from code - 10agentallowed-tools of managed or bundled skills and most pluginsWhile a skill or custom command runs, its allowed-tools frontmatter adds allow rules. These origins keep theirs even under managed-only rules. Read from code
- 11agentallowed-tools of user, project or --add-dir skills and commandsFrontmatter from your own, project or --add-dir skills and commands, including plugins found inside those skill folders. Read from code
- 12sessionApprovals given during this sessionAllow rules added when you answer a permission prompt with a don't-ask-again-this-session choice. They last only for this session. Under managed-only rules the prompt does not offer that choice, and reloading settings clears these rules. Read from code
- 13env
CLAUDE_BG_SESSION_PERMISSION_RULESBackground sessions only: the allow list from a JSON value that must carry both an allow and a deny list, or the whole value is skipped. Read from code - 14env
CLAUDE_BG_SESSION_PERMISSION_RULESBackground sessions only: the deny list from the same JSON value. Read from code - 15flag
--tools <tools...>Built-in tools left out of --tools are withheld as deny rules. Read from code
- settings
permissions.allow in ~/.claude/settings.json or --settings: Allow rules from your user settings file and from --settings. Each file's rules are read on their own and keep their source; --setting-sources can leave the user file out. Read from code. - settings
permissions.allow in .claude/settings.json: Dropped with a warning until the workspace is trusted, unless the project folder is your home folder. Deny and ask rules from the same file still apply. Read from code. - settings
permissions.allow in .claude/settings.local.json: Allow rules from the local project file. In a workspace that is not yet trusted these can be dropped too, depending on how the file is tracked. Read from code. - settings
permissions.deny: Deny rules from the user, project, local and --settings files; --setting-sources can leave the user, project or local file out. Not gated by workspace trust. Read from code. - settings
permissions.ask: Ask rules from the user, project, local and --settings files; --setting-sources can leave the user, project or local file out. Not gated by workspace trust. Read from code. - managed permissions.allow in managed settings: Allow rules set by an administrator. Always loaded. Read from code.
- managed permissions.deny and ask in managed settings: Deny and ask rules set by an administrator. Always loaded. Read from code.
- flag
--allowedTools, --allowed-tools <tools...>: Allow rules from the command line. A rule naming a tool that does not exist is skipped with a warning. Read from code. - flag
--disallowedTools, --disallowed-tools <tools...>: Deny rules from the command line. Read from code. - agent allowed-tools of managed or bundled skills and most plugins: While a skill or custom command runs, its allowed-tools frontmatter adds allow rules. These origins keep theirs even under managed-only rules. Read from code.
- agent allowed-tools of user, project or --add-dir skills and commands: Frontmatter from your own, project or --add-dir skills and commands, including plugins found inside those skill folders. Read from code.
- session Approvals given during this session: Allow rules added when you answer a permission prompt with a don't-ask-again-this-session choice. They last only for this session. Under managed-only rules the prompt does not offer that choice, and reloading settings clears these rules. Read from code.
- env
CLAUDE_BG_SESSION_PERMISSION_RULES: Background sessions only: the allow list from a JSON value that must carry both an allow and a deny list, or the whole value is skipped. Read from code. - env
CLAUDE_BG_SESSION_PERMISSION_RULES: Background sessions only: the deny list from the same JSON value. Read from code. - flag
--tools <tools...>: Built-in tools left out of --tools are withheld as deny rules. Read from code.
- After the ladder:
allowManagedPermissionRulesOnly. allowManagedPermissionRulesOnly, counted only when set in managed settings: rules from every other settings file, --allowedTools, session allow rules (background-session rules and in-session approvals) and user or project skill frontmatter are ignored. Deny rules from the command line and the session still apply. - After the ladder:
CLAUDE_CODE_EVAL_CONFINED. Drops every allow rule read from a settings file, managed policy included. Command-line and frontmatter allow rules are unaffected.
Source: chunk-4f79m39g.js · offset 179486877 · sha256 7202ecdb…
Sandbox network proxy
Which proxy a sandboxed command's network traffic is sent to: none, a proxy you already run on a local port, or Claude Code's built-in proxy.
- 1defaultSandbox without network rulesWhen the sandbox has no domain list, no proxy settings reach the command. Read from code
- 2settings
sandbox.network.httpProxyPortSends HTTP traffic to a proxy you already run on this localhost port, and Claude Code adds no proxy credentials to the proxy URLs. On Linux, commands inside the sandbox see localhost:3128, bridged to this port. Read from code - 3settings
sandbox.network.socksProxyPortSends SOCKS traffic to a proxy you already run on this localhost port. If the HTTP proxy port is not also set, the SOCKS proxy URLs still carry Claude Code's per-session credentials, so your proxy receives them. On Linux, commands inside the sandbox see localhost:1080, bridged to this port. Read from code - 4defaultClaude Code's built-in proxyOtherwise Claude Code starts one proxy that serves both HTTP and SOCKS on a random localhost port. It adds per-session credentials to the proxy URLs unless the HTTP proxy port setting is set. Read from code
- Before the ladder:
CLAUDE_CODE_EVAL_CONFINED. Checked before the ladder: when set, Claude Code ignores both proxy-port settings and uses its built-in proxy.
- default Sandbox without network rules: When the sandbox has no domain list, no proxy settings reach the command. Read from code.
- settings
sandbox.network.httpProxyPort: Sends HTTP traffic to a proxy you already run on this localhost port, and Claude Code adds no proxy credentials to the proxy URLs. On Linux, commands inside the sandbox see localhost:3128, bridged to this port. Read from code. - settings
sandbox.network.socksProxyPort: Sends SOCKS traffic to a proxy you already run on this localhost port. If the HTTP proxy port is not also set, the SOCKS proxy URLs still carry Claude Code's per-session credentials, so your proxy receives them. On Linux, commands inside the sandbox see localhost:1080, bridged to this port. Read from code. - default Claude Code's built-in proxy: Otherwise Claude Code starts one proxy that serves both HTTP and SOCKS on a random localhost port. It adds per-session credentials to the proxy URLs unless the HTTP proxy port setting is set. Read from code.
Source: chunk-9yjanq6m.js · offset 180587555 · sha256 d2026bfa…
Prompt caching and context
Auto-compact window
Whether Claude Code compacts the conversation automatically, and the window it compacts against: compaction starts once the conversation reaches the window minus room for the reply (up to 20,000 tokens) and a 13,000-token buffer.
- 1env
CLAUDE_CODE_AUTO_COMPACT_WINDOWAny whole number of tokens: below 100,000 is raised to 100,000 and above 1,000,000 is lowered to 1,000,000. A value that is not a positive number is skipped with a debug-log message. Read from code - 2settings
autoCompactWindowThe /autocompact command writes this to user settings. A value outside 100,000 to 1,000,000 is dropped when settings load. Read from code - 3remoteAnthropic's per-account windowAnthropic can send a window per model with your account data, or with your organization's startup data when you use Anthropic's API directly. None is sent by default in code. Anthropic can change it without a release. Read from code
- 4remoteAnthropic's Opus 4.8 window experimentClaude Opus 4.8 in an interactive session only; print mode (-p) and the Agent SDK skip it. Two remote flags, empty by default in code, can set a window. Anthropic can change them without a release. Read from code
- 5remoteAnthropic's desktop app window experimentClaude desktop app only, for a model whose 1M-token window is native here, when the Opus 4.8 experiment sets nothing. A remote flag, empty by default in code, can pick 600K or 500K. Anthropic can change it without a release. Read from code
- 6defaultBuilt-in 200K windowClaude Sonnet 4.6, Opus 4.6, Opus 4.8, Opus 5 and Opus 5.5 compact at 200K when their context window is under 1M. Other 1M-capable models get the same when CLAUDE_CODE_DISABLE_1M_CONTEXT is set or long-context credits are blocked. Read from code
- 7defaultBuilt-in window for Claude Sonnet 51M tokens, or 500K in Cowork and local-agent sessions. Skipped when Anthropic's organization startup data lists the model. Read from code
- 8defaultModel with a native 1M windowA model whose 1M-token window is native here uses all of it. Skipped when Anthropic's organization startup data lists the model. Read from code
- 9defaultUnrecognized modelA model Claude Code does not recognize compacts at its full context window. CLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENT skips this rung. Read from code
- 10defaultNo window configuredNothing above answers, so there is no threshold: Claude Code compacts when the API rejects a prompt as too long. On Claude Code on the web a remote flag, off by default in code, decides; while it is off, compaction runs at the full context window. Read from code
- The built-in 200K window also applies to other 1M-capable models when CLAUDE_CODE_DISABLE_1M_CONTEXT is set or long-context credits are blocked, which this ladder does not show: for those models auto-compaction starts near 200K tokens instead of waiting for the API to reject a prompt as too long.
CLAUDE_AUTOCOMPACT_PCT_OVERRIDE- Before the ladder:
DISABLE_COMPACT. Checked before the ladder: no automatic compaction, and the /compact command is turned off too. - Before the ladder:
DISABLE_AUTO_COMPACT. Checked before the ladder: no automatic compaction. /compact still works. - Before the ladder:
autoCompactEnabled. Checked before the ladder when set to false. Read from the highest-priority settings file that sets it, then from the older global config the /config toggle wrote; on by default.
- env
CLAUDE_CODE_AUTO_COMPACT_WINDOW: Any whole number of tokens: below 100,000 is raised to 100,000 and above 1,000,000 is lowered to 1,000,000. A value that is not a positive number is skipped with a debug-log message. Read from code. - settings
autoCompactWindow: The /autocompact command writes this to user settings. A value outside 100,000 to 1,000,000 is dropped when settings load. Read from code. - remote Anthropic's per-account window: Anthropic can send a window per model with your account data, or with your organization's startup data when you use Anthropic's API directly. None is sent by default in code. Anthropic can change it without a release. Read from code.
- remote Anthropic's Opus 4.8 window experiment: Claude Opus 4.8 in an interactive session only; print mode (-p) and the Agent SDK skip it. Two remote flags, empty by default in code, can set a window. Anthropic can change them without a release. Read from code.
- remote Anthropic's desktop app window experiment: Claude desktop app only, for a model whose 1M-token window is native here, when the Opus 4.8 experiment sets nothing. A remote flag, empty by default in code, can pick 600K or 500K. Anthropic can change it without a release. Read from code.
- default Built-in 200K window: Claude Sonnet 4.6, Opus 4.6, Opus 4.8, Opus 5 and Opus 5.5 compact at 200K when their context window is under 1M. Other 1M-capable models get the same when CLAUDE_CODE_DISABLE_1M_CONTEXT is set or long-context credits are blocked. Read from code.
- default Built-in window for Claude Sonnet 5: 1M tokens, or 500K in Cowork and local-agent sessions. Skipped when Anthropic's organization startup data lists the model. Read from code.
- default Model with a native 1M window: A model whose 1M-token window is native here uses all of it. Skipped when Anthropic's organization startup data lists the model. Read from code.
- default Unrecognized model: A model Claude Code does not recognize compacts at its full context window. CLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENT skips this rung. Read from code.
- default No window configured: Nothing above answers, so there is no threshold: Claude Code compacts when the API rejects a prompt as too long. On Claude Code on the web a remote flag, off by default in code, decides; while it is off, compaction runs at the full context window. Read from code.
- The built-in 200K window also applies to other 1M-capable models when CLAUDE_CODE_DISABLE_1M_CONTEXT is set or long-context credits are blocked, which this ladder does not show: for those models auto-compaction starts near 200K tokens instead of waiting for the API to reject a prompt as too long.
- After the ladder: The model's context window. A window larger than the model's context window is cut down to it.
- After the ladder:
CLAUDE_AUTOCOMPACT_PCT_OVERRIDE. Leaves the window alone but moves the trigger earlier: any percent above 0 and up to 100 of the window after the reply room, never later than the usual trigger. Other values are ignored.
Source: chunk-wyjbafrm.js · offset 183906207 · sha256 7d27ce1a…
Automatic memory
Whether Claude Code keeps automatic memory for the session: loads the project's memory folder into its instructions and may read and write files there.
- 1flag/pause-memory in this sessionChecked first: once memory is paused for the session, nothing below turns it back on, not even CLAUDE_CODE_DISABLE_AUTO_MEMORY=0. Read from code
- 2env
CLAUDE_CODE_DISABLE_AUTO_MEMORY1, true, yes or on turns auto memory off. 0, false, no or off forces it on and skips everything below, including autoMemoryEnabled set to false. Any other value counts as unset. Read from code - 3env
CLAUDE_CODE_SIMPLEBare mode turns auto memory off. CLAUDE_CODE_SIMPLE counts as set when it is 1, true, yes or on, and --bare sets the same switch. Read from code - 4env
CLAUDE_CODE_REMOTEA remote session has no auto memory unless CLAUDE_CODE_REMOTE_MEMORY_DIR or CLAUDE_COWORK_MEMORY_PATH_OVERRIDE gives it a folder. CLAUDE_CODE_REMOTE counts as set when it is 1, true, yes or on. With either folder variable set, this rung does not answer. Read from code - 5remoteAnthropic's per-model memory switchTwo remote flags: a list of model names (empty by default in code) and a switch (off by default in code). When the switch is on and the session's model name contains a listed name, auto memory is off. CLAUDE_CODE_DISABLE_AUTO_MEMORY=0 skips this check. Anthropic can change both without a release. Read from code
- 6settings
autoMemoryEnabledRead from the merged settings, so any settings file Claude Code loads can set it. true turns auto memory on, false turns it off. The /memory toggle writes this key to your user settings. Read from code - 7defaultDefaultWhen nothing above answers, auto memory is on. Read from code
- Auto memory is a folder of plain files on your machine. By default it is ~/.claude/projects/<project>/memory/, where <project> is the project's root folder path turned into a folder name, and MEMORY.md in it is the index Claude Code loads at the start of a session.
- CLAUDE_CODE_REMOTE_MEMORY_DIR replaces ~/.claude as the base of that default path. The folder itself can be moved: CLAUDE_COWORK_MEMORY_PATH_OVERRIDE wins, then autoMemoryDirectory from managed settings, --settings, local and project settings (only in a trusted folder or a non-interactive run), then user settings.
- Using the /memory toggle to turn auto memory on or off writes autoMemoryEnabled to your user settings file. Setting autoMemoryEnabled yourself in a settings file writes nothing else. /pause-memory turns auto memory off for the current session only.
- Memory stores are a separate decision: shared stores mounted next to your own memory, used when a remote flag (off by default in code) is on or CLAUDE_MEMORY_STORES is set. Whether Claude reaches memory through plain files or through memory tools is also decided separately, partly by another remote flag.
- A session that the app launching Claude Code marks as restricted also has no auto memory, whatever is set on this ladder.
- Before the ladder:
CLAUDE_CODE_SAFE_MODE. Checked before the ladder: safe mode turns auto memory off, even with CLAUDE_CODE_DISABLE_AUTO_MEMORY=0. 1, true, yes and on count as set. - Before the ladder:
--safe-mode. Checked before the ladder: --safe-mode does the same as CLAUDE_CODE_SAFE_MODE.
- flag /pause-memory in this session: Checked first: once memory is paused for the session, nothing below turns it back on, not even CLAUDE_CODE_DISABLE_AUTO_MEMORY=0. Read from code.
- env
CLAUDE_CODE_DISABLE_AUTO_MEMORY: 1, true, yes or on turns auto memory off. 0, false, no or off forces it on and skips everything below, including autoMemoryEnabled set to false. Any other value counts as unset. Read from code. - env
CLAUDE_CODE_SIMPLE: Bare mode turns auto memory off. CLAUDE_CODE_SIMPLE counts as set when it is 1, true, yes or on, and --bare sets the same switch. Read from code. - env
CLAUDE_CODE_REMOTE: A remote session has no auto memory unless CLAUDE_CODE_REMOTE_MEMORY_DIR or CLAUDE_COWORK_MEMORY_PATH_OVERRIDE gives it a folder. CLAUDE_CODE_REMOTE counts as set when it is 1, true, yes or on. With either folder variable set, this rung does not answer. Read from code. - remote Anthropic's per-model memory switch: Two remote flags: a list of model names (empty by default in code) and a switch (off by default in code). When the switch is on and the session's model name contains a listed name, auto memory is off. CLAUDE_CODE_DISABLE_AUTO_MEMORY=0 skips this check. Anthropic can change both without a release. Read from code.
- settings
autoMemoryEnabled: Read from the merged settings, so any settings file Claude Code loads can set it. true turns auto memory on, false turns it off. The /memory toggle writes this key to your user settings. Read from code. - default Default: When nothing above answers, auto memory is on. Read from code.
- Auto memory is a folder of plain files on your machine. By default it is ~/.claude/projects/<project>/memory/, where <project> is the project's root folder path turned into a folder name, and MEMORY.md in it is the index Claude Code loads at the start of a session.
- CLAUDE_CODE_REMOTE_MEMORY_DIR replaces ~/.claude as the base of that default path. The folder itself can be moved: CLAUDE_COWORK_MEMORY_PATH_OVERRIDE wins, then autoMemoryDirectory from managed settings, --settings, local and project settings (only in a trusted folder or a non-interactive run), then user settings.
- Using the /memory toggle to turn auto memory on or off writes autoMemoryEnabled to your user settings file. Setting autoMemoryEnabled yourself in a settings file writes nothing else. /pause-memory turns auto memory off for the current session only.
- Memory stores are a separate decision: shared stores mounted next to your own memory, used when a remote flag (off by default in code) is on or CLAUDE_MEMORY_STORES is set. Whether Claude reaches memory through plain files or through memory tools is also decided separately, partly by another remote flag.
- A session that the app launching Claude Code marks as restricted also has no auto memory, whatever is set on this ladder.
Source: chunk-1vt3h958.js · offset 178558861 · sha256 d3853b07…
Prompt cache TTL
How long Claude Code asks the API to keep a cached prompt prefix: 5 minutes or 1 hour, decided for every request.
- 1env
FORCE_PROMPT_CACHING_5MForces 5 minutes. 0 and false count as off. Tested - 2env
CLAUDE_CODE_PROMPT_CACHE_TTLMain-conversation requests only. Any other value is skipped without a warning. Tested - 3env
CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTLEvery request that is not the main conversation. Any other value is skipped without a warning. Read from code - 4settings
promptCacheTtlFrom any settings file Claude Code loads. Tested - 5settings
subagentPromptCacheTtlFrom any settings file Claude Code loads. Read from code - 6agentAgent frontmatter TTLWhen the request comes from an agent that sets one. A 1h value is skipped while a subscriber is on extra usage. Read from code
- 7env
ENABLE_PROMPT_CACHING_1HAsks for 1 hour. Tested - 8env
ENABLE_PROMPT_CACHING_1H_BEDROCKBedrock only. Read from code - 9defaultNot a subscriber, or on extra usageAPI-key and provider sign-ins, and subscribers using extra usage, stop here. Read from code
- 10remoteAnthropic's 1-hour allowlistA remote flag lists which request kinds get 1 hour; by default, the main conversation. Read once per session. Anthropic can change it without a release. Read from code
- Before the ladder:
DISABLE_PROMPT_CACHING. Checked before the ladder: no cache markers at all. The _OPUS, _SONNET, _HAIKU, _FABLE and _MYTHOS variants do the same for one model family.
- env
FORCE_PROMPT_CACHING_5M: Forces 5 minutes. 0 and false count as off. Tested. - env
CLAUDE_CODE_PROMPT_CACHE_TTL: Main-conversation requests only. Any other value is skipped without a warning. Tested. - env
CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL: Every request that is not the main conversation. Any other value is skipped without a warning. Read from code. - settings
promptCacheTtl: From any settings file Claude Code loads. Tested. - settings
subagentPromptCacheTtl: From any settings file Claude Code loads. Read from code. - agent Agent frontmatter TTL: When the request comes from an agent that sets one. A 1h value is skipped while a subscriber is on extra usage. Read from code.
- env
ENABLE_PROMPT_CACHING_1H: Asks for 1 hour. Tested. - env
ENABLE_PROMPT_CACHING_1H_BEDROCK: Bedrock only. Read from code. - default Not a subscriber, or on extra usage: API-key and provider sign-ins, and subscribers using extra usage, stop here. Read from code.
- remote Anthropic's 1-hour allowlist: A remote flag lists which request kinds get 1 hour; by default, the main conversation. Read once per session. Anthropic can change it without a release. Read from code.
Source: chunk-wyjbafrm.js · offset 184833859 · sha256 331089ca…
Tokens-left reminder budget
The number of tokens the padded-countdown reminder starts from, decided once when the session starts. It is used only when the reminder mode is padded-countdown.
- 1env
CLAUDE_CODE_TOTAL_TOKENS_REMINDER_BUDGETA number of tokens above zero, read from its leading digits: 2000000abc reads as 2,000,000 and fractions are cut off. Zero, negatives and values with no leading digits count as unset and the setting below decides. Read from code - 2settings
totalTokensReminderBudgetFrom any settings file Claude Code loads: a whole number of tokens above zero. The environment variable wins when both are set. Read from code - 3remoteAnthropic's per-account budgetAccount data Claude Code downloads can set a whole number above zero. Nothing is set in the code, and any other value is ignored with a warning in the debug log. Anthropic can change it without a release. Read from code
- 4remoteAnthropic's budget flagA remote flag whose default in code is 15,000,000. A value that is not a number above zero also gives 15,000,000. Anthropic can change it without a release. Read from code
- 5defaultDefaultWhen nothing above answers, 15,000,000 tokens. Read from code
- env
CLAUDE_CODE_TOTAL_TOKENS_REMINDER_BUDGET: A number of tokens above zero, read from its leading digits: 2000000abc reads as 2,000,000 and fractions are cut off. Zero, negatives and values with no leading digits count as unset and the setting below decides. Read from code. - settings
totalTokensReminderBudget: From any settings file Claude Code loads: a whole number of tokens above zero. The environment variable wins when both are set. Read from code. - remote Anthropic's per-account budget: Account data Claude Code downloads can set a whole number above zero. Nothing is set in the code, and any other value is ignored with a warning in the debug log. Anthropic can change it without a release. Read from code.
- remote Anthropic's budget flag: A remote flag whose default in code is 15,000,000. A value that is not a number above zero also gives 15,000,000. Anthropic can change it without a release. Read from code.
- default Default: When nothing above answers, 15,000,000 tokens. Read from code.
Source: chunk-wyjbafrm.js · offset 184278490 · sha256 00d9e94e…
Total tokens reminder
Whether Claude is shown a tokens-left reminder, and which number it shows, decided once when the session starts. It is on by default for every sign-in, including API keys.
- 1env
CLAUDE_CODE_TOTAL_TOKENS_REMINDERTakes a mode name, not an on/off toggle: off, infinite, fixed, countdown or padded-countdown. Spaces around it are trimmed but case matters; 1, on, OFF or any other value counts as unset and the setting below decides. Read from code - 2settings
totalTokensReminderFrom any settings file Claude Code loads. Takes the same mode names as the environment variable, which wins when both are set. Read from code - 3remoteAnthropic's per-account settingAccount data Claude Code downloads can pick a mode, or false to turn the reminder off. Nothing is set in the code, and any other value is ignored with a warning in the debug log. Anthropic can change it without a release. Read from code
- 4remoteAnthropic's reminder flagA remote flag whose default in code is padded-countdown. A value that is not a mode name also gives padded-countdown. Anthropic can change it without a release. Read from code
- 5defaultDefaultWhen nothing above answers, padded-countdown: the system prompt shows the budget, and later reminders count down from it as tokens are used. The reminder appears in the system prompt, after each batch of tool results, and after each regular user prompt unless the after-user-turn switch is off. That switch is decided by its environment variable (1, true, yes or on; 0, false, no or off; anything else is unset), then its setting, then Anthropic's per-account data and remote flag, and is on by default. With it on, padded-countdown resets to the full budget at each user prompt; with it off, the count runs down across the whole session. Read from code
- Before the ladder:
CLAUDE_CODE_DISABLE_ATTACHMENTS. Checked before the ladder: no reminder anywhere, neither in the system prompt nor after tool results or prompts. 1, true, yes and on count as set, in any case. - Before the ladder:
CLAUDE_CODE_SIMPLE. Checked before the ladder: simple mode drops the reminder everywhere, whatever is set below. 1, true, yes and on count as set, in any case.
- env
CLAUDE_CODE_TOTAL_TOKENS_REMINDER: Takes a mode name, not an on/off toggle: off, infinite, fixed, countdown or padded-countdown. Spaces around it are trimmed but case matters; 1, on, OFF or any other value counts as unset and the setting below decides. Read from code. - settings
totalTokensReminder: From any settings file Claude Code loads. Takes the same mode names as the environment variable, which wins when both are set. Read from code. - remote Anthropic's per-account setting: Account data Claude Code downloads can pick a mode, or false to turn the reminder off. Nothing is set in the code, and any other value is ignored with a warning in the debug log. Anthropic can change it without a release. Read from code.
- remote Anthropic's reminder flag: A remote flag whose default in code is padded-countdown. A value that is not a mode name also gives padded-countdown. Anthropic can change it without a release. Read from code.
- default Default: When nothing above answers, padded-countdown: the system prompt shows the budget, and later reminders count down from it as tokens are used. The reminder appears in the system prompt, after each batch of tool results, and after each regular user prompt unless the after-user-turn switch is off. That switch is decided by its environment variable (1, true, yes or on; 0, false, no or off; anything else is unset), then its setting, then Anthropic's per-account data and remote flag, and is on by default. With it on, padded-countdown resets to the full budget at each user prompt; with it off, the count runs down across the whole session. Read from code.
Source: chunk-wyjbafrm.js · offset 184278098 · sha256 a9b0ce25…
Models and reasoning
Fast mode
Whether fast mode is available in a session and, if so, whether requests go out with it on.
- 1remoteAnthropic's fast-mode kill switchA remote flag that is empty by default in code. When Anthropic sets it, fast mode is unavailable for everyone and the flag's text is shown as the reason. Anthropic can change it without a release. Read from code
- 2settings
availableModels leaves out Opus and the session modelWhen availableModels leaves out Opus, fast mode is unavailable unless the session's own model is on the list and supports fast mode and the session isn't driven over Remote Control. Read from code - 3managed
fastModefastMode set to false in managed settings means your organization turned fast mode off. Nothing below turns it back on. Read from code - 4defaultclaude -p or the Agent SDK without the --settings opt-inIn claude -p and the Agent SDK, fast mode is unavailable unless fastMode is passed with --settings, which clears this gate. A fastMode setting in a settings file is not enough there. Checked before the organization check. Read from code
- 5managedAnthropic's server says your organization can't use fast modeClaude Code asks Anthropic whether your organization may use fast mode. A no (no paid plan, turned off by an admin, or no usage credits) makes it unavailable, and fastMode in your user settings is cleared when that answer changes. Read from code
- 6defaultThe organization check hasn't answered yetBefore the organization check has started, fast mode is unavailable. CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK lifts this, and so does fastMode passed with --settings; both are ignored in cloud sessions. CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS does not. Read from code
- 7defaultThe organization check failed or is still guessingWhen the check fails on the network, or is still running with no earlier answer cached, fast mode is unavailable. CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS, CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK or fastMode passed with --settings lifts this; all three are ignored in cloud sessions. Read from code
- 8flag/fast in this session/fast turns fast mode on or off for the session and saves the choice to your user settings, unless you pick this session only. Turning it on switches to Opus when the current model can't run fast. When managed settings set fastModePerSessionOptIn, the this-session-only choice is refused. Read from code
- 9flag
fastMode: true passed with --settingsfastMode set to true in the --settings flag is how claude -p and the Agent SDK opt in. It turns fast mode on at startup, even with fastModePerSessionOptIn in your own settings, but not when managed settings set fastModePerSessionOptIn. Outside cloud sessions it also lifts the organization-check blocks above. Read from code - 10managed
fastModePerSessionOptInSet in managed settings, every session starts with fast mode off, and only /fast (saved, not this-session-only) turns it on. Read from code - 11settings
fastModePerSessionOptInSet in any other settings file, a saved fastMode no longer carries over: each session starts off until you run /fast or pass fastMode with --settings. Read from code - 12settings
fastModefastMode from the merged settings files. true starts each interactive session with fast mode on; /fast writes this for you. Read from code - 13defaultDefaultWhen nothing above answers, fast mode is available but off. Read from code
- 14env
CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORSDoes not turn fast mode on. It only lifts the failed-check block above, not the wait before the check starts. Ignored in cloud sessions. Read from code - 15env
CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECKDoes not turn fast mode on. It skips the organization check and treats the organization as allowed, which lifts both organization-check blocks above. Ignored in cloud sessions. Read from code
- Before the ladder:
CLAUDE_CODE_DISABLE_FAST_MODE. Checked before the ladder: fast mode is unavailable, whatever is set below.
- remote Anthropic's fast-mode kill switch: A remote flag that is empty by default in code. When Anthropic sets it, fast mode is unavailable for everyone and the flag's text is shown as the reason. Anthropic can change it without a release. Read from code.
- settings
availableModels leaves out Opus and the session model: When availableModels leaves out Opus, fast mode is unavailable unless the session's own model is on the list and supports fast mode and the session isn't driven over Remote Control. Read from code. - managed
fastMode: fastMode set to false in managed settings means your organization turned fast mode off. Nothing below turns it back on. Read from code. - default claude -p or the Agent SDK without the --settings opt-in: In claude -p and the Agent SDK, fast mode is unavailable unless fastMode is passed with --settings, which clears this gate. A fastMode setting in a settings file is not enough there. Checked before the organization check. Read from code.
- managed Anthropic's server says your organization can't use fast mode: Claude Code asks Anthropic whether your organization may use fast mode. A no (no paid plan, turned off by an admin, or no usage credits) makes it unavailable, and fastMode in your user settings is cleared when that answer changes. Read from code.
- default The organization check hasn't answered yet: Before the organization check has started, fast mode is unavailable. CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK lifts this, and so does fastMode passed with --settings; both are ignored in cloud sessions. CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS does not. Read from code.
- default The organization check failed or is still guessing: When the check fails on the network, or is still running with no earlier answer cached, fast mode is unavailable. CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS, CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK or fastMode passed with --settings lifts this; all three are ignored in cloud sessions. Read from code.
- flag /fast in this session: /fast turns fast mode on or off for the session and saves the choice to your user settings, unless you pick this session only. Turning it on switches to Opus when the current model can't run fast. When managed settings set fastModePerSessionOptIn, the this-session-only choice is refused. Read from code.
- flag
fastMode: true passed with --settings: fastMode set to true in the --settings flag is how claude -p and the Agent SDK opt in. It turns fast mode on at startup, even with fastModePerSessionOptIn in your own settings, but not when managed settings set fastModePerSessionOptIn. Outside cloud sessions it also lifts the organization-check blocks above. Read from code. - managed
fastModePerSessionOptIn: Set in managed settings, every session starts with fast mode off, and only /fast (saved, not this-session-only) turns it on. Read from code. - settings
fastModePerSessionOptIn: Set in any other settings file, a saved fastMode no longer carries over: each session starts off until you run /fast or pass fastMode with --settings. Read from code. - settings
fastMode: fastMode from the merged settings files. true starts each interactive session with fast mode on; /fast writes this for you. Read from code. - default Default: When nothing above answers, fast mode is available but off. Read from code.
- env
CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS: Does not turn fast mode on. It only lifts the failed-check block above, not the wait before the check starts. Ignored in cloud sessions. Read from code. - env
CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK: Does not turn fast mode on. It skips the organization check and treats the organization as allowed, which lifts both organization-check blocks above. Ignored in cloud sessions. Read from code.
- After the ladder: fastMode: true passed with --settings. Passing fastMode: true with --settings clears the claude -p and Agent SDK gate, so the rungs below it decide.
- After the ladder: Not the Anthropic API. Fast mode only runs against the Anthropic API directly. On Bedrock, Vertex, Foundry or a gateway it is unavailable.
- After the ladder: Model can't run fast. Fast mode only applies to models that support it (Opus 5 family, Opus 4.8, or models the catalog marks as fast-capable). On any other model requests go out at normal speed.
- After the ladder: Fast-mode cooldown running. While a fast-mode cooldown is running, requests go out at normal speed; fast mode comes back on its own when the cooldown ends.
Source: chunk-1vt3h958.js · offset 178318957 · sha256 6b759728…
Main conversation model
Which model the main conversation sends its requests to.
- 1flag/model during the sessionPicking a model while the session runs replaces the startup choice for the rest of the session. Read from code
- 2flag
--model <model>Aliases such as sonnet, opus, haiku and fable become the current full id of that family, and a [1m] suffix asks for the 1M-token context version. --model default asks for the built-in default. Tested - 3agentModel in the agent's frontmatterWhen the session runs as an agent whose definition names a model, and --model is not given. A value of inherit is skipped. Read from code
- 4env
ANTHROPIC_MODELAny model id or alias. It is checked before the model setting in every settings file. Tested - 5settings
modelFrom the merged settings files. An organization default model that overrides user choices can set aside a model from user or project settings; one from managed policy or --settings is kept. Tested - 6managedOrganization default modelA default model set for your organization, sent by Anthropic's servers with your account. It only applies when nothing above chose a model, and it can change without a release. Read from code
- 7env
ANTHROPIC_DEFAULT_MODELReplaces the built-in default. The haiku and opusplan aliases, default and inherit are skipped without a warning, and it is ignored while enforceAvailableModels is on. Tested - 8defaultBuilt-in defaultOpus 5.5 for a plain API-key run. The code chooses between the Opus and Sonnet families by sign-in and provider, and ANTHROPIC_DEFAULT_OPUS_MODEL or ANTHROPIC_DEFAULT_SONNET_MODEL can change the id. Read from code
availableModelsenforceAvailableModels- flag /model during the session: Picking a model while the session runs replaces the startup choice for the rest of the session. Read from code.
- flag
--model <model>: Aliases such as sonnet, opus, haiku and fable become the current full id of that family, and a [1m] suffix asks for the 1M-token context version. --model default asks for the built-in default. Tested. - agent Model in the agent's frontmatter: When the session runs as an agent whose definition names a model, and --model is not given. A value of inherit is skipped. Read from code.
- env
ANTHROPIC_MODEL: Any model id or alias. It is checked before the model setting in every settings file. Tested. - settings
model: From the merged settings files. An organization default model that overrides user choices can set aside a model from user or project settings; one from managed policy or --settings is kept. Tested. - managed Organization default model: A default model set for your organization, sent by Anthropic's servers with your account. It only applies when nothing above chose a model, and it can change without a release. Read from code.
- env
ANTHROPIC_DEFAULT_MODEL: Replaces the built-in default. The haiku and opusplan aliases, default and inherit are skipped without a warning, and it is ignored while enforceAvailableModels is on. Tested. - default Built-in default: Opus 5.5 for a plain API-key run. The code chooses between the Opus and Sonnet families by sign-in and provider, and ANTHROPIC_DEFAULT_OPUS_MODEL or ANTHROPIC_DEFAULT_SONNET_MODEL can change the id. Read from code.
- After the ladder:
availableModels. A chosen model that is not on the list is dropped. An alias such as opus can become an allowed version of that family; otherwise the default is used, and lower rungs are not tried. An empty list allows no model. - After the ladder: Managed policy's deniedModels blocks models. Read from managed policy only. A chosen model it blocks is dropped like one missing from availableModels: an alias can become a version of that family that is not blocked; otherwise the default is used, and lower rungs are not tried.
- After the ladder:
enforceAvailableModels. With availableModels, the default is also kept on the list and ANTHROPIC_DEFAULT_MODEL is ignored. It is read from managed policy; when no managed policy exists, other settings files can set it. Set in policy without availableModels, it is turned off with a warning.
Source: chunk-fr7r2xfj.js · offset 179171231 · sha256 70c93b30…
Max output tokens
The max_tokens a main-conversation request asks for: how many tokens the model may write in one response, thinking included.
- 1env
CLAUDE_CODE_MAX_OUTPUT_TOKENSAny whole number up to the model's limit. Zero, negatives and non-numbers fall back to the default, with only a debug-log line; a value above the limit is lowered to it. Text after the leading digits is ignored, and 64,000 or 6.4e4 also parse. Tested - 2remoteAnthropic's served model listOn Anthropic's own API at its default address, a model list fetched from Anthropic can give each model a default output size. Nothing is set in the code, so the built-in table applies unless Anthropic sends one, which it can change without a release. Read from code
- 3remoteAnthropic's per-account tableAccount data Claude Code downloads at startup can hold a default output size per model. Nothing is set in the code, so the built-in table applies unless Anthropic sends one, which it can change without a release. Read from code
- 4defaultBuilt-in default for the modelClaude Code's own table: 128,000 for Opus 5.5, 64,000 for other current models, 32,000 for older ones and for models it does not recognize. Claude 3.5 models get 8,192. Read from code
- env
CLAUDE_CODE_MAX_OUTPUT_TOKENS: Any whole number up to the model's limit. Zero, negatives and non-numbers fall back to the default, with only a debug-log line; a value above the limit is lowered to it. Text after the leading digits is ignored, and 64,000 or 6.4e4 also parse. Tested. - remote Anthropic's served model list: On Anthropic's own API at its default address, a model list fetched from Anthropic can give each model a default output size. Nothing is set in the code, so the built-in table applies unless Anthropic sends one, which it can change without a release. Read from code.
- remote Anthropic's per-account table: Account data Claude Code downloads at startup can hold a default output size per model. Nothing is set in the code, so the built-in table applies unless Anthropic sends one, which it can change without a release. Read from code.
- default Built-in default for the model: Claude Code's own table: 128,000 for Opus 5.5, 64,000 for other current models, 32,000 for older ones and for models it does not recognize. Claude 3.5 models get 8,192. Read from code.
- After the ladder: Model's upper limit. Whatever the ladder picks is lowered to the model's limit: 128,000 for Opus 5.5, Sonnet 4.6 and later, Fable, Mythos and unrecognized models; 64,000 for Opus 4.5, Sonnet 4 and 4.5, Haiku 4.5 and Sonnet 3.7; 32,000 for Opus 4 and 4.1; 8,192 for Claude 3.5. On Anthropic's API the served model list can set a different limit.
- After the ladder: Claude Code lowers it for its own reasons. Some internal requests ask for a smaller cap, and after a context-overflow error the request is retried with what still fits. These can only lower the value, never raise it.
Source: chunk-wyjbafrm.js · offset 184956613 · sha256 883dcf7e…
Model id for a family on each provider
Which model id Claude Code sends when it resolves a model family (Opus, Sonnet, Haiku or Fable) on the active provider.
- 1env
ANTHROPIC_DEFAULT_OPUS_MODELUsed exactly as written, on every provider, before any lookup. Read from code - 2env
ANTHROPIC_DEFAULT_SONNET_MODELUsed exactly as written, on every provider, before any lookup. Read from code - 3env
ANTHROPIC_DEFAULT_HAIKU_MODELUsed exactly as written, on every provider, before any lookup. Read from code - 4env
ANTHROPIC_DEFAULT_FABLE_MODELUsed on every provider, before any lookup. Read from code - 5remoteAnthropic's served model catalogAnthropic API only, with no custom ANTHROPIC_BASE_URL, and not for Fable. When the catalog names a model this version knows, that model's id still passes through modelOverrides, so a matching override key replaces it. Anthropic can change the catalog without a release. Read from code
- 6settings
modelOverridesThe key must be the first-party id of the model this provider uses for the family, such as claude-sonnet-4-5 for Sonnet on Bedrock; the value replaces that model's provider id. A key naming any other model, such as claude-sonnet-5 on Bedrock, leaves this family's default alone. Read from code - 7defaultInference profile found in the AWS accountBedrock only. Claude Code lists the account's inference profiles and uses the one for this model, preferring the region prefix from ANTHROPIC_BEDROCK_REGION_PREFIX, otherwise your AWS region's prefix. us-gov regions always use us-gov. Read from code
- 8defaultBuilt-in model for this providerThe bundled model catalog names a model for each family and provider, and Claude Code sends that provider's id for it. On Bedrock the id carries a region prefix, and requests made before the profile lookup finishes land here. Read from code
- env
ANTHROPIC_DEFAULT_OPUS_MODEL: Used exactly as written, on every provider, before any lookup. Read from code. - env
ANTHROPIC_DEFAULT_SONNET_MODEL: Used exactly as written, on every provider, before any lookup. Read from code. - env
ANTHROPIC_DEFAULT_HAIKU_MODEL: Used exactly as written, on every provider, before any lookup. Read from code. - env
ANTHROPIC_DEFAULT_FABLE_MODEL: Used on every provider, before any lookup. Read from code. - remote Anthropic's served model catalog: Anthropic API only, with no custom ANTHROPIC_BASE_URL, and not for Fable. When the catalog names a model this version knows, that model's id still passes through modelOverrides, so a matching override key replaces it. Anthropic can change the catalog without a release. Read from code.
- settings
modelOverrides: The key must be the first-party id of the model this provider uses for the family, such as claude-sonnet-4-5 for Sonnet on Bedrock; the value replaces that model's provider id. A key naming any other model, such as claude-sonnet-5 on Bedrock, leaves this family's default alone. Read from code. - default Inference profile found in the AWS account: Bedrock only. Claude Code lists the account's inference profiles and uses the one for this model, preferring the region prefix from ANTHROPIC_BEDROCK_REGION_PREFIX, otherwise your AWS region's prefix. us-gov regions always use us-gov. Read from code.
- default Built-in model for this provider: The bundled model catalog names a model for each family and provider, and Claude Code sends that provider's id for it. On Bedrock the id carries a region prefix, and requests made before the profile lookup finishes land here. Read from code.
Source: chunk-1vt3h958.js · offset 178396981 · sha256 68a5e0fb…
Reasoning effort
Which reasoning effort (low, medium, high, xhigh or max) Claude Code asks the API for, sent as output_config.effort on each request.
- 1env
CLAUDE_CODE_EXTRA_BODYAn output_config.effort inside CLAUDE_CODE_EXTRA_BODY is sent as written. It is not checked or capped by maxEffortLevel. Read from code - 2env
CLAUDE_CODE_EFFORT_LEVELCase does not matter, and med means medium. Any other value is ignored without a warning. It wins over agent and skill effort, --effort and settings. Tested - 3env
CLAUDE_CODE_EFFORT_LEVEL=autoauto or unset sends no effort, so the API uses its own default. If a maxEffortLevel cap is set, the model's default is sent instead. It shares its variable with the rung above, so only one of them can be set. Read from code - 4agentAgent or skill effortAn agent's effort frontmatter applies to that agent's requests, and a skill's effort applies while the skill runs. Either wins over --effort and settings. Read from code
- 5flag
--effort <level>For this session. Case does not matter, med means medium and ultracode means xhigh. Any other value prints a warning and is ignored. Tested - 6settings
effortLevel in a project, local, --settings or managed fileThe highest-priority file that sets it wins, and it replaces the user file's value. It beats a modelSettings entry in a lower-priority file, such as a per-model choice saved in your user file. max is not accepted: the model's default is used. Tested - 7settings
modelSettings.<model>.effortLevelAn effortLevel for the model in use, keyed by its canonical name; Claude Code saves per-model effort choices here. Within one file it beats that file's effortLevel. max is not accepted; any other value means the model's default. Tested - 8settings
effortLevel in the user settings fileAn older form: it applies only to models from before Claude Code started saving effort per model under modelSettings, and never to Opus 5.5. On some older installs it also skips Opus 4.7, Opus 4.8 and Fable 5. Read from code - 9defaultYour organization's default modelWhen your organization picks a default model with its own effort level and you are using that model. Anthropic provider only. Read from code
- 10remoteAnthropic's per-model defaultA remote flag can set a default effort per model. In code it sets none. Anthropic can change it without a release. Read from code
- 11defaultThe model's defaultThe model's own default from Claude Code's model list: medium for Opus 5.5, high for most others. A model with no listed default gets high. Read from code
maxEffortLevel- env
CLAUDE_CODE_EXTRA_BODY: An output_config.effort inside CLAUDE_CODE_EXTRA_BODY is sent as written. It is not checked or capped by maxEffortLevel. Read from code. - env
CLAUDE_CODE_EFFORT_LEVEL: Case does not matter, and med means medium. Any other value is ignored without a warning. It wins over agent and skill effort, --effort and settings. Tested. - env
CLAUDE_CODE_EFFORT_LEVEL=auto: auto or unset sends no effort, so the API uses its own default. If a maxEffortLevel cap is set, the model's default is sent instead. It shares its variable with the rung above, so only one of them can be set. Read from code. - agent Agent or skill effort: An agent's effort frontmatter applies to that agent's requests, and a skill's effort applies while the skill runs. Either wins over --effort and settings. Read from code.
- flag
--effort <level>: For this session. Case does not matter, med means medium and ultracode means xhigh. Any other value prints a warning and is ignored. Tested. - settings
effortLevel in a project, local, --settings or managed file: The highest-priority file that sets it wins, and it replaces the user file's value. It beats a modelSettings entry in a lower-priority file, such as a per-model choice saved in your user file. max is not accepted: the model's default is used. Tested. - settings
modelSettings.<model>.effortLevel: An effortLevel for the model in use, keyed by its canonical name; Claude Code saves per-model effort choices here. Within one file it beats that file's effortLevel. max is not accepted; any other value means the model's default. Tested. - settings
effortLevel in the user settings file: An older form: it applies only to models from before Claude Code started saving effort per model under modelSettings, and never to Opus 5.5. On some older installs it also skips Opus 4.7, Opus 4.8 and Fable 5. Read from code. - default Your organization's default model: When your organization picks a default model with its own effort level and you are using that model. Anthropic provider only. Read from code.
- remote Anthropic's per-model default: A remote flag can set a default effort per model. In code it sets none. Anthropic can change it without a release. Read from code.
- default The model's default: The model's own default from Claude Code's model list: medium for Opus 5.5, high for most others. A model with no listed default gets high. Read from code.
- After the ladder: Models without effort support get no effort at all. Models Claude Code does not treat as effort-capable, such as Claude 3, Opus 4.0 and 4.1, Sonnet 4.0 and 4.5 and Haiku 4.5, get no effort at all, even one put in CLAUDE_CODE_EXTRA_BODY. CLAUDE_CODE_ALWAYS_ENABLE_EFFORT turns effort on for model IDs Claude Code does not recognize.
- After the ladder:
maxEffortLevel. maxEffortLevel caps the result: a higher level is lowered to it. Across settings files the lowest cap wins, modelSettings.<model>.maxEffortLevel replaces it for one model, and an organization's cap for the model counts too. A cap of max changes nothing. It does not apply to CLAUDE_CODE_EXTRA_BODY. - After the ladder: max and xhigh become high on models that do not support them. Opus 5.5 supports both. Opus 4.6 and Sonnet 4.6 lack xhigh, and Opus 4.5 lacks both.
- After the ladder: With thinking turned off, levels above high become high on models that require it. Opus 5 is such a model. This also applies to a value from CLAUDE_CODE_EXTRA_BODY.
Source: chunk-fr7r2xfj.js · offset 179161385 · sha256 a65c7168…
Thinking mode
Which thinking configuration Claude Code asks the API for on the main conversation's requests, sent as the thinking field: adaptive, budgeted (enabled with budget_tokens), disabled, or no field at all.
- 1env
CLAUDE_CODE_EXTRA_BODYA thinking object inside CLAUDE_CODE_EXTRA_BODY replaces the one Claude Code built and is sent as written, even on models that reject disabled thinking and even with CLAUDE_CODE_DISABLE_THINKING set. It is ignored when your organization's policy turns off experimental betas. Tested - 2env
CLAUDE_CODE_DISABLE_THINKINGSends no thinking field at all, whatever --thinking, MAX_THINKING_TOKENS or settings say. The API then uses its own default for the model. Tested - 3flag
--thinking <mode>A hidden flag. enabled means the same as adaptive: adaptive on models that support it, a default token budget on older models. disabled is sent only to Anthropic's API and only for models that accept it; Opus 5.5 rejects disabled thinking, so the field is left out instead. Tested - 4env
MAX_THINKING_TOKENSA positive number turns thinking on. Models with adaptive thinking get adaptive and ignore the number; older models get it as budget_tokens, kept between 1024 and one less than max_tokens. 0, a negative number or anything that is not a number turns thinking off. Tested - 5flag
--max-thinking-tokens <tokens>The older, hidden form of MAX_THINKING_TOKENS for -p runs, with the same meaning. It is ignored whenever MAX_THINKING_TOKENS is set, and a negative number is ignored. Tested - 6settings
alwaysThinkingEnabled set to falseOnly false does anything: it turns thinking off. true is the same as leaving it unset. Interactive sessions can also switch thinking on or off for the session. Tested - 7defaultThinking on, shaped by the modelThinking is on by default: adaptive on models that support it, a default token budget on older models, and no thinking field for Claude 3 models. In -p runs with text output the request also carries display omitted; interactive sessions send a display only when showThinkingSummaries is on. Reasoning effort does not change this choice. Subagent and side requests, such as the title request, pick thinking on a separate path that can turn it off. Read from code
- env
CLAUDE_CODE_EXTRA_BODY: A thinking object inside CLAUDE_CODE_EXTRA_BODY replaces the one Claude Code built and is sent as written, even on models that reject disabled thinking and even with CLAUDE_CODE_DISABLE_THINKING set. It is ignored when your organization's policy turns off experimental betas. Tested. - env
CLAUDE_CODE_DISABLE_THINKING: Sends no thinking field at all, whatever --thinking, MAX_THINKING_TOKENS or settings say. The API then uses its own default for the model. Tested. - flag
--thinking <mode>: A hidden flag. enabled means the same as adaptive: adaptive on models that support it, a default token budget on older models. disabled is sent only to Anthropic's API and only for models that accept it; Opus 5.5 rejects disabled thinking, so the field is left out instead. Tested. - env
MAX_THINKING_TOKENS: A positive number turns thinking on. Models with adaptive thinking get adaptive and ignore the number; older models get it as budget_tokens, kept between 1024 and one less than max_tokens. 0, a negative number or anything that is not a number turns thinking off. Tested. - flag
--max-thinking-tokens <tokens>: The older, hidden form of MAX_THINKING_TOKENS for -p runs, with the same meaning. It is ignored whenever MAX_THINKING_TOKENS is set, and a negative number is ignored. Tested. - settings
alwaysThinkingEnabled set to false: Only false does anything: it turns thinking off. true is the same as leaving it unset. Interactive sessions can also switch thinking on or off for the session. Tested. - default Thinking on, shaped by the model: Thinking is on by default: adaptive on models that support it, a default token budget on older models, and no thinking field for Claude 3 models. In -p runs with text output the request also carries display omitted; interactive sessions send a display only when showThinkingSummaries is on. Reasoning effort does not change this choice. Subagent and side requests, such as the title request, pick thinking on a separate path that can turn it off. Read from code.
- After the ladder: Disabled thinking is sent only when the API and model accept it; otherwise no thinking field is sent. A disabled answer from --thinking, MAX_THINKING_TOKENS or alwaysThinkingEnabled becomes no field at all on Bedrock, Vertex or Foundry, on models without thinking, and on models that reject disabled thinking, such as Opus 5.5. With thinking off, some models also lower a reasoning effort above high.
Source: chunk-cpf7rt77.js · offset 191860317 · sha256 be7fe61f…
Privacy and interface
Feedback survey
Whether Claude Code shows its session feedback survey and how often, checked again before each chance to show it. After you answer, it can also ask to share the transcript.
- 1remoteAnthropic's extension and desktop survey flagVS Code extension and desktop app only. A remote flag that is off in code, so those apps get no survey unless Anthropic turns it on. Anthropic can change it without a release. Read from code
- 2env
CLAUDE_CODE_DISABLE_FEEDBACK_SURVEYTurns the survey off everywhere, including in the extension and desktop app. 1, true, yes or on count, in any letter case; any other value is ignored. Read from code - 3env
DISABLE_TELEMETRYTurning telemetry off also turns the survey off. Any value counts, even 0 or false. CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL undoes this. Read from code - 4env
DO_NOT_TRACKWorks like DISABLE_TELEMETRY here, but only 1, true, yes or on count. CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL undoes this. Read from code - 5env
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFICTurns the survey off. Any value counts, even 0 or false. CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL brings the survey back, but never the transcript ask. Read from code - 6managedOrganization policy denies product feedbackWhen your organization's policy denies product feedback, there is no survey and no transcript ask, whatever is set below. Read from code
- 7env
CLAUDE_FORCE_DISPLAY_SURVEYTerminal only. 1, true, yes or on shows the survey at the first chance in each session, skipping the model list, timing and rate below; after that the normal rules apply. Everything above still turns it off. Read from code - 8remoteAnthropic's survey model listTerminal only. Anthropic's survey config lists the models the survey runs for; in code the list covers every model. Anthropic can change it without a release. Read from code
- 9settings
feedbackSurveyRateFrom any settings file Claude Code loads: the chance, from 0 to 1, that the survey appears at each prompt once the timing rules allow it. 0 turns it off. It replaces Anthropic's rate, including the rate passed to the extension and desktop app. Read from code - 10remoteAnthropic's survey rateA remote config that is 0.005 in code: once the timing rules allow a survey, each prompt has a half-percent chance. In code the first chance comes after 10 minutes and 5 prompts, later ones at least an hour and 10 prompts apart, and never within about 28 hours of a survey in any session. Anthropic can change it without a release. Read from code
- 11env
CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTELPicks no rate itself. 1, true, yes or on stops DISABLE_TELEMETRY, DO_NOT_TRACK and CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC from turning the survey off, so the other rules decide. Read from code
- As shipped, Claude Code never asks to share the transcript: after you answer bad, fine or good, the chance of asking is 0 in code for each answer.
- Anthropic can raise those chances remotely without a release.
- It never asks, whatever those chances are, when CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC is set (even with CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL), when your organization's policy denies product feedback, when DISABLE_FEEDBACK_COMMAND or DISABLE_BUG_COMMAND is set, or after you choose don't ask again.
- Nothing is shared unless you answer yes.
- remote Anthropic's extension and desktop survey flag: VS Code extension and desktop app only. A remote flag that is off in code, so those apps get no survey unless Anthropic turns it on. Anthropic can change it without a release. Read from code.
- env
CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY: Turns the survey off everywhere, including in the extension and desktop app. 1, true, yes or on count, in any letter case; any other value is ignored. Read from code. - env
DISABLE_TELEMETRY: Turning telemetry off also turns the survey off. Any value counts, even 0 or false. CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL undoes this. Read from code. - env
DO_NOT_TRACK: Works like DISABLE_TELEMETRY here, but only 1, true, yes or on count. CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL undoes this. Read from code. - env
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: Turns the survey off. Any value counts, even 0 or false. CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL brings the survey back, but never the transcript ask. Read from code. - managed Organization policy denies product feedback: When your organization's policy denies product feedback, there is no survey and no transcript ask, whatever is set below. Read from code.
- env
CLAUDE_FORCE_DISPLAY_SURVEY: Terminal only. 1, true, yes or on shows the survey at the first chance in each session, skipping the model list, timing and rate below; after that the normal rules apply. Everything above still turns it off. Read from code. - remote Anthropic's survey model list: Terminal only. Anthropic's survey config lists the models the survey runs for; in code the list covers every model. Anthropic can change it without a release. Read from code.
- settings
feedbackSurveyRate: From any settings file Claude Code loads: the chance, from 0 to 1, that the survey appears at each prompt once the timing rules allow it. 0 turns it off. It replaces Anthropic's rate, including the rate passed to the extension and desktop app. Read from code. - remote Anthropic's survey rate: A remote config that is 0.005 in code: once the timing rules allow a survey, each prompt has a half-percent chance. In code the first chance comes after 10 minutes and 5 prompts, later ones at least an hour and 10 prompts apart, and never within about 28 hours of a survey in any session. Anthropic can change it without a release. Read from code.
- env
CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL: Picks no rate itself. 1, true, yes or on stops DISABLE_TELEMETRY, DO_NOT_TRACK and CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC from turning the survey off, so the other rules decide. Read from code.
- As shipped, Claude Code never asks to share the transcript: after you answer bad, fine or good, the chance of asking is 0 in code for each answer.
- Anthropic can raise those chances remotely without a release.
- It never asks, whatever those chances are, when CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC is set (even with CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL), when your organization's policy denies product feedback, when DISABLE_FEEDBACK_COMMAND or DISABLE_BUG_COMMAND is set, or after you choose don't ask again.
- Nothing is shared unless you answer yes.
Source: chunk-mzg9kbjz.js · offset 204532371 · sha256 6f94b4ed…
Native terminal cursor
Whether Claude Code shows the terminal's own cursor at the input caret instead of drawing a block cursor, decided once per terminal.
- 1env
CLAUDE_CODE_ACCESSIBILITY1, true, yes or on (any case) turns the native cursor on, whatever is set below. Any other value counts as unset. Read from code - 2env
CLAUDE_AX_SCREEN_READERScreen reader mode also turns the native cursor on. It comes from --ax-screen-reader, this variable, or the axScreenReader setting; 0, false, no or off here overrides the setting. A remote gate that is on by default in code can still keep screen reader mode off. Read from code - 3env
CLAUDE_CODE_DECSTBMTurning on the scroll-region renderer keeps the drawn cursor. It only takes effect in an interactive terminal that supports it, and when other internal conditions allow. 0 or false does not turn the renderer off; it leaves the choice to Anthropic's flag below. Read from code - 4remoteAnthropic's scroll-region renderer flag turned onA remote flag that is off by default in code. When Anthropic turns it on, the scroll-region renderer runs in supported terminals and the cursor stays drawn, even with CLAUDE_CODE_NATIVE_CURSOR set. Anthropic can change it without a release. Read from code
- 5env
CLAUDE_CODE_NATIVE_CURSOR1, true, yes or on (any case) turns the native cursor on. Only accessibility or screen reader mode beats it, and the scroll-region renderer above keeps the cursor drawn. Any other value counts as unset. Read from code - 6remoteAnthropic's native cursor flag turned onA remote flag that is off by default in code. When Anthropic turns it on, you get the native cursor without setting anything. Anthropic can change it without a release. Read from code
- 7defaultDefaultWhen nothing above answers: the drawn block cursor. Read from code
- env
CLAUDE_CODE_ACCESSIBILITY: 1, true, yes or on (any case) turns the native cursor on, whatever is set below. Any other value counts as unset. Read from code. - env
CLAUDE_AX_SCREEN_READER: Screen reader mode also turns the native cursor on. It comes from --ax-screen-reader, this variable, or the axScreenReader setting; 0, false, no or off here overrides the setting. A remote gate that is on by default in code can still keep screen reader mode off. Read from code. - env
CLAUDE_CODE_DECSTBM: Turning on the scroll-region renderer keeps the drawn cursor. It only takes effect in an interactive terminal that supports it, and when other internal conditions allow. 0 or false does not turn the renderer off; it leaves the choice to Anthropic's flag below. Read from code. - remote Anthropic's scroll-region renderer flag turned on: A remote flag that is off by default in code. When Anthropic turns it on, the scroll-region renderer runs in supported terminals and the cursor stays drawn, even with CLAUDE_CODE_NATIVE_CURSOR set. Anthropic can change it without a release. Read from code.
- env
CLAUDE_CODE_NATIVE_CURSOR: 1, true, yes or on (any case) turns the native cursor on. Only accessibility or screen reader mode beats it, and the scroll-region renderer above keeps the cursor drawn. Any other value counts as unset. Read from code. - remote Anthropic's native cursor flag turned on: A remote flag that is off by default in code. When Anthropic turns it on, you get the native cursor without setting anything. Anthropic can change it without a release. Read from code.
- default Default: When nothing above answers: the drawn block cursor. Read from code.
Source: chunk-6sap1w9m.js · offset 188768875 · sha256 c5ff43c6…
Prompt suggestions
Whether Claude Code suggests your next prompt after a reply, decided when the session starts.
- 1flag
--prompt-suggestions [value]Print mode and the Agent SDK only, where it is checked first. Given alone it means true. When true, the environment variable decides if it is set, otherwise the setting. Any other value stops Claude Code with an error. Read from code - 2defaultPrint mode without the flagPrint mode and the Agent SDK make no suggestions unless asked for them, even when the environment variable is on. Read from code
- 3env
CLAUDE_CODE_ENABLE_PROMPT_SUGGESTIONChecked before Anthropic's flag, so on turns suggestions on even while the flag is off, and off turns them off everywhere. Case does not matter. Any other value is skipped without a warning. Read from code - 4remoteAnthropic's rollout flagInteractive sessions only. A remote flag switches the feature on; in code it is off, so suggestions stay off unless the environment variable turns them on. Read when the session starts. Anthropic can change it without a release. Read from code
- 5defaultAgent-team teammateA session running as a teammate in an agent team makes no suggestions. Read from code
- 6settings
promptSuggestionEnabledYour preference, from any settings file Claude Code loads. Only false turns suggestions off; leaving it out keeps them on. Read from code - 7defaultBuilt-in defaultSuggestions are on. Read from code
- flag
--prompt-suggestions [value]: Print mode and the Agent SDK only, where it is checked first. Given alone it means true. When true, the environment variable decides if it is set, otherwise the setting. Any other value stops Claude Code with an error. Read from code. - default Print mode without the flag: Print mode and the Agent SDK make no suggestions unless asked for them, even when the environment variable is on. Read from code.
- env
CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION: Checked before Anthropic's flag, so on turns suggestions on even while the flag is off, and off turns them off everywhere. Case does not matter. Any other value is skipped without a warning. Read from code. - remote Anthropic's rollout flag: Interactive sessions only. A remote flag switches the feature on; in code it is off, so suggestions stay off unless the environment variable turns them on. Read when the session starts. Anthropic can change it without a release. Read from code.
- default Agent-team teammate: A session running as a teammate in an agent team makes no suggestions. Read from code.
- settings
promptSuggestionEnabled: Your preference, from any settings file Claude Code loads. Only false turns suggestions off; leaving it out keeps them on. Read from code. - default Built-in default: Suggestions are on. Read from code.
Source: chunk-jgrsnx4w.js · offset 190608683 · sha256 1fa72111…
What the model is told
Git instructions and status
Whether Claude Code sends the model its built-in git commit and pull request instructions, and a snapshot of the repository's git status at the start of the conversation.
- 1env
CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONSChecked first, in any letter case. 1, true, yes or on turns off both the instructions and the status snapshot; 0, false, no or off turns them on even when a setting says false. Any other value is ignored. Read from code - 2settings
includeGitInstructionsFrom any settings file Claude Code loads. false turns off both the instructions and the status snapshot. Read from code - 3defaultBuilt-in defaultBoth are included. The instructions go in the Bash tool's description; the status snapshot (branch, main branch, git user, status and recent commits) goes in the session context. Turning them off also stops the remote-session notice about commit and pull request attribution, unless that notice has something else to report, such as a session link. Read from code
- env
CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS: Checked first, in any letter case. 1, true, yes or on turns off both the instructions and the status snapshot; 0, false, no or off turns them on even when a setting says false. Any other value is ignored. Read from code. - settings
includeGitInstructions: From any settings file Claude Code loads. false turns off both the instructions and the status snapshot. Read from code. - default Built-in default: Both are included. The instructions go in the Bash tool's description; the status snapshot (branch, main branch, git user, status and recent commits) goes in the session context. Turning them off also stops the remote-session notice about commit and pull request attribution, unless that notice has something else to report, such as a session link. Read from code.
- After the ladder:
CLAUDE_CODE_REMOTE. Remote session A remote session gets no new status snapshot. The git instructions still follow the ladder. A snapshot already announced earlier in the conversation, for example before a compaction or on resume, is carried forward instead. - After the ladder: Custom system prompt. In non-interactive runs (claude -p and the SDK), a system prompt that replaces the default one gets no new status snapshot. A snapshot already announced earlier in the conversation, for example before a compaction or on resume, is carried forward instead.
- After the ladder: Explore or Plan subagent. The built-in Explore and Plan subagents get no new status snapshot. A snapshot already announced earlier in the conversation, for example before a compaction or on resume, is carried forward instead.
- After the ladder: Not a git repository. Outside a git repository, or when the git commands fail, there is no status snapshot.
Source: chunk-wyjbafrm.js · offset 183539667 · sha256 1d982528…
To-do list reminders
Whether Claude Code reminds Claude about its to-do list or tasks when it has not used them for 10 turns, at most once every 10 turns.
- 1env
CLAUDE_CODE_TODO_REMINDER_MODEExactly baseline or off, in lower case; surrounding spaces are ignored. Any other value, such as 0 or false, counts as unset. Read from code - 2remoteAnthropic's reminder flag set to offA remote flag that is baseline by default in code; only the value off turns reminders off. Anthropic can change it without a release. Read from code
- 3defaultDefaultWhen nothing above answers: reminders on. Read from code
- env
CLAUDE_CODE_TODO_REMINDER_MODE: Exactly baseline or off, in lower case; surrounding spaces are ignored. Any other value, such as 0 or false, counts as unset. Read from code. - remote Anthropic's reminder flag set to off: A remote flag that is baseline by default in code; only the value off turns reminders off. Anthropic can change it without a release. Read from code.
- default Default: When nothing above answers: reminders on. Read from code.
Source: chunk-wyjbafrm.js · offset 186065293 · sha256 77261e49…
Workflow size guideline
Which size guideline Claude is given for the multi-agent workflows it writes, fixed when the session starts and added to the Workflow tool's description whenever that tool is offered.
- 1settings
workflowSizeGuidelineFrom any settings file Claude Code loads, including managed settings. It beats the /config choice, and /config hides its row while a settings file sets the key. Any other value is ignored, so the /config choice applies even though its row stays hidden. Read from code - 2settingsDynamic workflow size in /configYour choice in /config, saved in the global config file (~/.claude.json). Changing it, or the settings key, during a session reaches Claude as a short note with your next prompt. A hand-edited value outside the four names is ignored. Read from code
- 3defaultDefault by planWhen neither answers: small on the Claude Pro plan, medium for every other sign-in. Claude is told this is the default and that the user can raise or remove it in /config. Read from code
- settings
workflowSizeGuideline: From any settings file Claude Code loads, including managed settings. It beats the /config choice, and /config hides its row while a settings file sets the key. Any other value is ignored, so the /config choice applies even though its row stays hidden. Read from code. - settings Dynamic workflow size in /config: Your choice in /config, saved in the global config file (~/.claude.json). Changing it, or the settings key, during a session reaches Claude as a short note with your next prompt. A hand-edited value outside the four names is ignored. Read from code.
- default Default by plan: When neither answers: small on the Claude Pro plan, medium for every other sign-in. Claude is told this is the default and that the user can raise or remove it in /config. Read from code.
Source: chunk-d0hsttwq.js · offset 182875918 · sha256 d18045ef…
Settings and environment
Where a setting's value comes from
Claude Code reads settings from five sources, over settings that plugins supply as the lowest layer. A single value comes from the highest source that sets it; lists combine across all of them.
- 1fileManaged policy (managed-settings.json)Set by an administrator. Always loaded. Read from code
- 2file--settings file or JSONLoaded even when --setting-sources leaves the other files out. Read from code
- 3file.claude/settings.local.jsonThis project, this machine; not checked in. Read from code
- 4file.claude/settings.jsonThis project, shared with the team. Read from code
- 5file~/.claude/settings.jsonAll your projects. Read from code
- Credential-helper keys (apiKeyHelper, awsAuthRefresh, awsCredentialExport, gcpAuthRefresh, otelHeadersHelper, proxyAuthHelper) can be removed from a source before the merge, so for them the highest source that sets one does not always win.
- Some keys are read from particular sources rather than from this combined value, and can ignore the project files. Permission rules are one: see their own ladder.
- file Managed policy (managed-settings.json): Set by an administrator. Always loaded. Read from code.
- file --settings file or JSON: Loaded even when --setting-sources leaves the other files out. Read from code.
- file .claude/settings.local.json: This project, this machine; not checked in. Read from code.
- file .claude/settings.json: This project, shared with the team. Read from code.
- file ~/.claude/settings.json: All your projects. Read from code.
- Credential-helper keys (apiKeyHelper, awsAuthRefresh, awsCredentialExport, gcpAuthRefresh, otelHeadersHelper, proxyAuthHelper) can be removed from a source before the merge, so for them the highest source that sets one does not always win.
- Some keys are read from particular sources rather than from this combined value, and can ignore the project files. Permission rules are one: see their own ladder.
- After the ladder: Managed policy's availableModels, enforceAvailableModels and modelPicker replace every other source's values. deniedModels is read only from managed policy; a value in any other source is dropped.
Source: chunk-18sktzq8.js · offset 176397453 · sha256 1a863fe3…
Where an environment variable's value comes from
When the shell, settings files and managed settings set the same environment variable, which value Claude Code runs with.
- 1envLaunch environmentWhen the desktop app or a runner starts the session, a variable already in the launch environment keeps its value. Every settings entry for it is ignored with a warning, managed settings included. Read from code
- 2managed
Managed settings envApplied last, so it overrides every settings file and the shell. Trusted before the trust prompt. Read from code - 3flag
--settings envThe env block of a --settings file or JSON string. Always read, even when --setting-sources leaves other files out, and trusted before the trust prompt. Tested - 4settings
Local project settings envThe env block in .claude/settings.local.json. Until the trust prompt is accepted only safe-list entries apply; the rest are applied once it is. Keys that pick folders or Claude Code's own plumbing are ignored here with a warning, except a few that are accepted when the value only turns something off and no higher source sets them. Read from code - 5settings
Project settings envThe env block in the project's .claude/settings.json. Same limits as the local file: safe-list entries only until the trust prompt is accepted, and folder or plumbing keys are ignored with a warning. Read from code - 6settings
User settings envThe env block in ~/.claude/settings.json. Trusted before the trust prompt. Not read when --setting-sources leaves user settings out. Tested - 7settingsGlobal config env (~/.claude.json)The env field in ~/.claude.json. Applied before any settings file, so it only overrides the shell. Read from code
- 8envShell environmentThe environment Claude Code was started with. Any settings source that sets the same variable overwrites it. Tested
- env Launch environment: When the desktop app or a runner starts the session, a variable already in the launch environment keeps its value. Every settings entry for it is ignored with a warning, managed settings included. Read from code.
- managed
Managed settings env: Applied last, so it overrides every settings file and the shell. Trusted before the trust prompt. Read from code. - flag
--settings env: The env block of a --settings file or JSON string. Always read, even when --setting-sources leaves other files out, and trusted before the trust prompt. Tested. - settings
Local project settings env: The env block in .claude/settings.local.json. Until the trust prompt is accepted only safe-list entries apply; the rest are applied once it is. Keys that pick folders or Claude Code's own plumbing are ignored here with a warning, except a few that are accepted when the value only turns something off and no higher source sets them. Read from code. - settings
Project settings env: The env block in the project's .claude/settings.json. Same limits as the local file: safe-list entries only until the trust prompt is accepted, and folder or plumbing keys are ignored with a warning. Read from code. - settings
User settings env: The env block in ~/.claude/settings.json. Trusted before the trust prompt. Not read when --setting-sources leaves user settings out. Tested. - settings Global config env (~/.claude.json): The env field in ~/.claude.json. Applied before any settings file, so it only overrides the shell. Read from code.
- env Shell environment: The environment Claude Code was started with. Any settings source that sets the same variable overwrites it. Tested.
Source: chunk-aqj8t7yt.js · offset 179705965 · sha256 4d70da99…