Environment variables
Environment variables Vendor docs
config
| name | type | required | meaning | concept | |
|---|---|---|---|---|---|
| ANTHROPIC_API_KEY | string |
API key sent as `X-Api-Key` header. When set, this key is used instead of your Claude Pro, Max, Team, or Enterprise subscription even if you are logged in. In non-interactive mode (`-p`), the key is always used when present. In interactive mode, you are prompted to approve the key once before it overrides your subscription. To use your subscription instead, run `unset ANTHROPIC_API_KEY`
|
docs ↗ | ||
| ANTHROPIC_AUTH_TOKEN | string |
Custom value for the `Authorization` header (the value you set here will be prefixed with `Bearer `)
|
docs ↗ | ||
| ANTHROPIC_AWS_API_KEY | string |
Workspace API key for Claude Platform on AWS, generated in the AWS Console. Sent as `x-api-key` and takes precedence over AWS SigV4
|
docs ↗ | ||
| ANTHROPIC_AWS_BASE_URL | string |
Override the Claude Platform on AWS endpoint URL. Use for custom regions or when routing through an LLM gateway. Defaults to `https://aws-external-anthropic.{region}.api.aws`. Claude Code resolves the region with the same precedence as on Amazon Bedrock
|
docs ↗ | ||
| ANTHROPIC_AWS_WORKSPACE_ID | string |
Required for Claude Platform on AWS. Sent on every request as the `anthropic-workspace-id` header
|
docs ↗ | ||
| ANTHROPIC_BASE_URL | string |
Override the API endpoint to route requests through a proxy or gateway. When set to a non-first-party host, MCP tool search is disabled by default. Set `ENABLE_TOOL_SEARCH=true` if your proxy forwards `tool_reference` blocks. As of v2.1.196, Remote Control is disabled when this points at a host other than `api.anthropic.com`, matching its behavior on Amazon Bedrock, Google Cloud's Agent Platform, and Microsoft Foundry
|
docs ↗ | ||
| ANTHROPIC_BEDROCK_BASE_URL | string |
Override the Amazon Bedrock endpoint URL. Use for custom Amazon Bedrock endpoints or when routing through an LLM gateway. See Amazon Bedrock
|
docs ↗ | ||
| ANTHROPIC_BEDROCK_MANTLE_BASE_URL | string |
Override the Amazon Bedrock Mantle endpoint URL. See Mantle endpoint
|
docs ↗ | ||
| ANTHROPIC_BEDROCK_REGION_PREFIX | string |
Cross-region inference profile prefix (`us`, `eu`, `apac`, `jp`, `au`, or `global`) Claude Code tries first instead of the one derived from the AWS region. Ignored in AWS GovCloud regions. Requires Claude Code v2.1.224 or later. See Amazon Bedrock
|
docs ↗ | ||
| ANTHROPIC_BEDROCK_SERVICE_TIER | string |
Amazon Bedrock service tier (`default`, `flex`, or `priority`). Sent as the `X-Amzn-Bedrock-Service-Tier` header. See Amazon Bedrock
|
docs ↗ | ||
| ANTHROPIC_BETAS | string |
Comma-separated list of additional `anthropic-beta` header values to include in API requests. Claude Code already sends the beta headers it needs; use this to opt into an Anthropic API beta before Claude Code adds native support. Unlike the `--betas` flag, which requires API key authentication, this variable works with all auth methods including Claude.ai subscription
|
docs ↗ | ||
| ANTHROPIC_CUSTOM_HEADERS | string |
Custom headers to add to requests (`Name: Value` format, newline-separated for multiple headers). If a name or value contains a character an HTTP header can't carry, such as a curly quote or a zero-width space, the request fails with an error that identifies the pair by position. Requires Claude Code v2.1.227 or later. Invalid request header value lists the exact character set and where the check runs. A value that sets a credential, org or tenant, routing, or API-behavior header, such as `Authorization` or `Host`, counts as a setting that needs approval when server-managed settings deliver it. From project or local settings, such a value follows the rules for when `env` values apply
|
docs ↗ | ||
| ANTHROPIC_CUSTOM_MODEL_OPTION | string |
Model ID to add as a custom entry in the `/model` picker. Use this to make a non-standard or gateway-specific model selectable without replacing built-in aliases. See Model configuration
|
docs ↗ | ||
| ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION | string |
Display description for the custom model entry in the `/model` picker. Defaults to `Custom model (<model-id>)` when not set
|
docs ↗ | ||
| ANTHROPIC_CUSTOM_MODEL_OPTION_NAME | string |
Display name for the custom model entry in the `/model` picker. Defaults to the model ID when not set
|
docs ↗ | ||
| ANTHROPIC_CUSTOM_MODEL_OPTION_SUPPORTED_CAPABILITIES | string |
Comma-separated list of capabilities the custom model supports, for example `effort,thinking`. See Model configuration
|
docs ↗ | ||
| ANTHROPIC_DEFAULT_FABLE_MODEL | string |
Model ID that the `fable` alias resolves to, and the ID Claude Code recognizes as a Fable model for automatic model fallback on third-party providers. See Model configuration
|
docs ↗ | ||
| ANTHROPIC_DEFAULT_FABLE_MODEL_DESCRIPTION | string |
Display description for the pinned Fable model in the `/model` picker. Defaults to `Custom Fable model` when not set. See Model configuration
|
docs ↗ | ||
| ANTHROPIC_DEFAULT_FABLE_MODEL_NAME | string |
Display name for the pinned Fable model in the `/model` picker. Defaults to the model ID when not set. See Model configuration
|
docs ↗ | ||
| ANTHROPIC_DEFAULT_FABLE_MODEL_SUPPORTED_CAPABILITIES | string |
Comma-separated list of capabilities the pinned Fable model supports, for example `effort,thinking`. See Model configuration
|
docs ↗ | ||
| ANTHROPIC_DEFAULT_HAIKU_MODEL | string |
Model ID that the `haiku` alias resolves to, also used for background functionality. See Model configuration
|
docs ↗ | ||
| ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION | string |
Display description for the pinned Haiku model in the `/model` picker. Defaults to `Custom Haiku model` when not set. See Model configuration
|
docs ↗ | ||
| ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME | string |
Display name for the pinned Haiku model in the `/model` picker. Defaults to the model ID when not set. See Model configuration
|
docs ↗ | ||
| ANTHROPIC_DEFAULT_HAIKU_MODEL_SUPPORTED_CAPABILITIES | string |
Comma-separated list of capabilities the pinned Haiku model supports, for example `effort,thinking`. See Model configuration
|
docs ↗ | ||
| ANTHROPIC_DEFAULT_MODEL | string |
Model that new sessions start on by default. Requires Claude Code v2.1.236 or later. See Set a default model for new sessions
|
docs ↗ | ||
| ANTHROPIC_DEFAULT_OPUS_MODEL | string |
Model ID that the `opus` alias resolves to, and that `opusplan` uses while Plan Mode is active. See Model configuration
|
docs ↗ | ||
| ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION | string |
Display description for the pinned Opus model in the `/model` picker. When not set, defaults to `Custom Opus model`, or `Custom Opus model (1M context)` if the pinned model ID has the `[1m]` suffix and `CLAUDE_CODE_DISABLE_1M_CONTEXT` isn't turned on. See Model configuration
|
docs ↗ | ||
| ANTHROPIC_DEFAULT_OPUS_MODEL_NAME | string |
Display name for the pinned Opus model in the `/model` picker. Defaults to the model ID when not set. See Model configuration
|
docs ↗ | ||
| ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES | string |
Comma-separated list of capabilities the pinned Opus model supports, for example `effort,thinking`. See Model configuration
|
docs ↗ | ||
| ANTHROPIC_DEFAULT_SONNET_MODEL | string |
Model ID that the `sonnet` alias resolves to, and that `opusplan` uses when Plan Mode is not active. See Model configuration
|
docs ↗ | ||
| ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION | string |
Display description for the pinned Sonnet model in the `/model` picker. When not set, defaults to `Custom Sonnet model`, or `Custom Sonnet model (1M context)` if the pinned model ID has the `[1m]` suffix and `CLAUDE_CODE_DISABLE_1M_CONTEXT` isn't turned on. See Model configuration
|
docs ↗ | ||
| ANTHROPIC_DEFAULT_SONNET_MODEL_NAME | string |
Display name for the pinned Sonnet model in the `/model` picker. Defaults to the model ID when not set. See Model configuration
|
docs ↗ | ||
| ANTHROPIC_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIES | string |
Comma-separated list of capabilities the pinned Sonnet model supports, for example `effort,thinking`. See Model configuration
|
docs ↗ | ||
| ANTHROPIC_FEDERATION_RULE_ID | string |
Federation rule ID for Workload Identity Federation. When you set it together with `ANTHROPIC_ORGANIZATION_ID`, Claude Code selects federation credentials, which rank above your `/login` credential. See authentication precedence
|
docs ↗ | ||
| ANTHROPIC_FOUNDRY_API_KEY | string |
API key for Microsoft Foundry authentication (see Microsoft Foundry)
|
docs ↗ | ||
| ANTHROPIC_FOUNDRY_AUTH_TOKEN | string |
Bearer token for Microsoft Foundry authentication, such as a Microsoft Entra access token. Claude Code sends it as the `Authorization: Bearer` header. Takes precedence over `ANTHROPIC_FOUNDRY_API_KEY` and over the Azure default credential chain. See Microsoft Foundry. Requires Claude Code v2.1.203 or later
|
docs ↗ | ||
| ANTHROPIC_FOUNDRY_BASE_URL | string |
Full base URL for the Microsoft Foundry resource (for example, `https://my-resource.services.ai.azure.com/anthropic`). Alternative to `ANTHROPIC_FOUNDRY_RESOURCE` (see Microsoft Foundry)
|
docs ↗ | ||
| ANTHROPIC_FOUNDRY_RESOURCE | string |
Microsoft Foundry resource name (for example, `my-resource`). Required if `ANTHROPIC_FOUNDRY_BASE_URL` is not set (see Microsoft Foundry)
|
docs ↗ | ||
| ANTHROPIC_MODEL | string |
Name of the model setting to use (see Model Configuration)
|
docs ↗ | ||
| ANTHROPIC_ORGANIZATION_ID | string |
Organization ID for Workload Identity Federation. Set it together with `ANTHROPIC_FEDERATION_RULE_ID`. See authentication precedence
|
docs ↗ | ||
| ANTHROPIC_PROFILE | string |
Name of the Anthropic profile to authenticate with, such as one created by `ant auth login` or by signing in to a Console account without an API key. See authentication precedence
|
docs ↗ | ||
| ANTHROPIC_SMALL_FAST_MODEL | string |
\[DEPRECATED] Name of Haiku-class model for background tasks
|
docs ↗ | ||
| ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION | string |
Override AWS region for the Haiku-class model when using Amazon Bedrock or Amazon Bedrock Mantle. On Amazon Bedrock, this only takes effect when `ANTHROPIC_DEFAULT_HAIKU_MODEL` or the deprecated `ANTHROPIC_SMALL_FAST_MODEL` is also set, since Amazon Bedrock otherwise runs background tasks on the default Sonnet model or the primary model in the session region
|
docs ↗ | ||
| ANTHROPIC_VERTEX_BASE_URL | string |
Override Google Cloud's Agent Platform endpoint URL. Use for custom Google Cloud's Agent Platform endpoints or when routing through an LLM gateway. See Google Cloud's Agent Platform
|
docs ↗ | ||
| ANTHROPIC_VERTEX_PROJECT_ID | string |
GCP project ID for Google Cloud's Agent Platform requests. Overridden by `GCLOUD_PROJECT`, `GOOGLE_CLOUD_PROJECT`, or the project in your `GOOGLE_APPLICATION_CREDENTIALS` credential file. See Google Cloud's Agent Platform
|
docs ↗ | ||
| ANTHROPIC_WORKSPACE_ID | string |
Workspace ID for workload identity federation. Set this when your federation rule is scoped to more than one workspace so the token exchange knows which workspace to target
|
docs ↗ | ||
| API_FORCE_IDLE_TIMEOUT | string |
Override the 5-minute body idle timeout that aborts a streaming model response when no bytes arrive. Set to `0` to turn the timeout off, for example when a slow gateway or local model pauses longer than 5 minutes between chunks, or `1` to keep it on for every provider. When unset, the timeout is active on providers other than the direct Anthropic API and Claude Platform on AWS. The stream watchdogs run independently of it and abort a long silent pause even when you set `0` here. Requires Claude Code v2.1.169 or later
|
docs ↗ | ||
| API_TIMEOUT_MS | string |
Timeout for API requests in milliseconds (default: 600000, or 10 minutes; maximum: 2147483647). Increase this when requests time out on slow networks or when routing through a proxy. Values above the maximum overflow the underlying timer and cause requests to fail immediately
|
docs ↗ | ||
| AWS_BEARER_TOKEN_BEDROCK | string |
Amazon Bedrock API key for authentication (see Amazon Bedrock API keys)
|
docs ↗ | ||
| BASH_DEFAULT_TIMEOUT_MS | string |
Default timeout for long-running bash commands (default: 120000, or 2 minutes)
|
docs ↗ | ||
| BASH_MAX_OUTPUT_LENGTH | string |
Maximum number of characters of bash output that Claude Code reads back into a command's result (default: 30000; maximum: 150000). See Output limits
|
docs ↗ | ||
| BASH_MAX_TIMEOUT_MS | string |
Maximum timeout the model can set for long-running bash commands (default: 600000, or 10 minutes). The effective ceiling is the larger of this and `BASH_DEFAULT_TIMEOUT_MS`
|
docs ↗ | ||
| BETA_TRACING_ENDPOINT | string |
OTLP endpoint for detailed beta tracing: with `ENABLE_BETA_TRACING_DETAILED=1`, logs and traces go there instead of to the configured exporters. Set it in your shell, user settings, or managed settings. Ignored in project and local settings
|
docs ↗ | ||
| CCR_FORCE_BUNDLE | string |
Set to `1` to force `claude --cloud` to bundle and upload your local repository even when GitHub access is available
|
docs ↗ | ||
| CLAUDECODE | string |
Set to `1` in subprocesses Claude Code spawns (Bash and PowerShell tools, tmux sessions, hook commands, status line commands, stdio MCP server subprocesses). IDE extensions also set this in their integrated terminals. Use to detect when a script is running inside a subprocess spawned by Claude Code. To check whether the current process was spawned directly by a tool call or hook, rather than inside a stdio MCP server that Claude Code started, use `CLAUDE_CODE_CHILD_SESSION` instead
|
docs ↗ | ||
| CLAUDE_AFK_COUNTDOWN_MS | string |
How many milliseconds before auto-continue the on-screen countdown appears on an unanswered `AskUserQuestion` dialog. Default `20000` (20 seconds), capped at the auto-continue timeout. Has no effect unless auto-continue is on; see the `askUserQuestionTimeout` setting and `CLAUDE_AFK_TIMEOUT_MS`. Requires Claude Code v2.1.198 or later
|
docs ↗ | ||
| CLAUDE_AFK_TIMEOUT_MS | string |
How many milliseconds of idle time before an unanswered `AskUserQuestion` dialog auto-continues without you. Auto-continue is off by default; opt in with the `askUserQuestionTimeout` setting. This variable is an override for demos and automated tests: when set, it takes precedence over that setting and turns auto-continue on even when the setting is unset or `never`. Setting `0` doesn't turn the timeout off; it closes the dialog immediately. In v2.1.198 and v2.1.199, auto-continue was on by default with a `60000` (60 seconds) timeout. Requires Claude Code v2.1.198 or later
|
docs ↗ | ||
| CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS | string |
Set to `1` to disable all built-in subagent types such as Explore and Plan. Only applies in non-interactive mode (the `-p` flag). Useful for SDK users who want a blank slate. This also removes `general-purpose`, the subagent Claude Code runs when an Agent tool call omits `subagent_type`. Such a call then fails with `subagent_type is required`
|
docs ↗ | ||
| CLAUDE_AGENT_SDK_MCP_NO_PREFIX | string |
Set to `1` to skip the `mcp__<server>__` prefix on tool names from SDK-created MCP servers. Tools use their original names. SDK usage only
|
docs ↗ | ||
| CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS | string |
Stall timeout in milliseconds for subagents. Default `600000` (10 minutes); if you raise `CLAUDE_STREAM_IDLE_TIMEOUT_MS` while the stream watchdog is on, the default rises with it, as Handle slow or stalled API responses describes. The timer resets on each streaming progress event; if no progress arrives within the window, Claude Code aborts the subagent and reports the stall to the parent
|
docs ↗ | ||
| CLAUDE_AUTOCOMPACT_PCT_OVERRIDE | string |
Set the percentage (1-100) of the auto-compact window at which auto-compaction triggers. Use lower values like `50` to compact earlier; the variable can't raise the threshold, so values above the default percentage are ignored. It applies only in sessions that compact before the model's context limit. Applies to both main conversations and subagents
|
docs ↗ | ||
| CLAUDE_AUTO_BACKGROUND_TASKS | string |
Set to `1` to force-enable automatic backgrounding of long-running agent tasks. When enabled, subagents are moved to the background after running for approximately two minutes. Also enables automatic backgrounding of long MCP tool calls in non-interactive mode on Claude Code v2.1.212 or later
|
docs ↗ | ||
| CLAUDE_AX_PREPARK_MS | string |
In screen reader mode, how many milliseconds Claude Code waits, with the cursor at the start of the line, before it writes a new or changed line. Default `50`. Set `0` to write immediately. Claude Code caps the wait at `5000`. Requires Claude Code v2.1.233 or later
|
docs ↗ | ||
| CLAUDE_AX_SCREEN_READER | string |
Set to `1` to render screen-reader friendly output: flat text without decorative borders or animations. Set to `0` to force screen-reader mode off even when `axScreenReader` is `true`. The `--ax-screen-reader` flag takes precedence. Requires Claude Code v2.1.181 or later
|
docs ↗ | ||
| CLAUDE_AX_STARTUP_QUIET_MS | string |
In screen reader mode, how many milliseconds Claude Code holds the first interface render after the startup confirmation line, so your screen reader can speak the line in full before new output interrupts it. Default `3000`. Set `0` to render immediately. Claude Code caps the hold at `600000` (10 minutes). Your first keystroke ends the hold early. Requires Claude Code v2.1.217 or later
|
docs ↗ | ||
| CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR | string |
Return to the original working directory after each Bash or PowerShell command in the main session
|
docs ↗ | ||
| CLAUDE_BYTE_STREAM_IDLE_TIMEOUT_MS | string |
Timeout in milliseconds for the byte-level streaming idle watchdog; when set, it takes precedence over `CLAUDE_STREAM_IDLE_TIMEOUT_MS` for that watchdog and leaves the event-level watchdog unchanged. Claude Code clamps this variable to between 10 seconds and 30 minutes. Requires Claude Code v2.1.210 or later
|
docs ↗ | ||
| CLAUDE_CLIENT_PRESENCE_FILE | string |
Path to a file that an external tool, such as a screen-lock listener, creates when you unlock your screen and deletes when you lock it. While the file exists, Claude Code skips Remote Control mobile push notifications, so you stop getting pushes while you are actively using the computer. When the file is absent or unreadable, notifications are sent as normal. Claude Code checks the file once per push-triggering event rather than polling it. Requires Claude Code v2.1.181 or later
|
docs ↗ | ||
| CLAUDE_CODE_ACCESSIBILITY | string |
Set to `1` to keep the native terminal cursor visible and disable the inverted-text cursor indicator. Allows screen magnifiers like macOS Zoom to track cursor position
|
docs ↗ | ||
| CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD | string |
Set to `1` to load memory files from directories specified with `--add-dir`. Loads `CLAUDE.md`, `.claude/CLAUDE.md`, `.claude/rules/*.md`, and `CLAUDE.local.md`. By default, additional directories do not load memory files
|
docs ↗ | ||
| CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT | string |
Set to `1` to repaint the entire screen on every frame in fullscreen rendering instead of sending incremental updates. Use this if fullscreen mode shows stale or misplaced text fragments. Claude Code enables this automatically for background sessions and agent view on Windows
|
docs ↗ | ||
| CLAUDE_CODE_ALWAYS_ENABLE_EFFORT | string |
Set to `1` to send the effort parameter with every request, even when Claude Code does not recognize the model ID as effort-capable. Use this when routing through an LLM gateway or third-party provider that serves models under custom identifiers. Models that reject the effort parameter at the API, including Claude 3 models, Sonnet 4.0 and 4.5, Opus 4.0 and 4.1, and Haiku 4.5, are still excluded so requests do not fail
|
docs ↗ | ||
| CLAUDE_CODE_API_KEY_HELPER_TTL_MS | string |
Interval in milliseconds at which credentials should be refreshed (when using `apiKeyHelper`)
|
docs ↗ | ||
| CLAUDE_CODE_ARTIFACT_AUTO_OPEN | string |
Set to `0` to stop Claude Code from opening the browser automatically when a new artifact is published. Republishing an existing artifact does not open the browser regardless of this setting
|
docs ↗ | ||
| CLAUDE_CODE_ARTIFACT_COMMENTS | string |
Set to `0` to stop Claude reading and replying to comments on an artifact. Has no effect when `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` has turned artifacts off. Requires Claude Code v2.1.221 or later
|
docs ↗ | ||
| CLAUDE_CODE_ARTIFACT_COMMENTS_AUTOREACT | string |
Set to `0` to stop Claude replying on its own to comments sent to it. Requires Claude Code v2.1.228 or later
|
docs ↗ | ||
| CLAUDE_CODE_ATTRIBUTION_HEADER | string |
Set to `0` to omit the attribution block, which carries the client version and a prompt fingerprint, from the start of the system prompt. Caching on a direct connection to the Anthropic API is unaffected either way. In some direct-connection setups, Claude Code keeps the block on auto mode classifier requests even when you set `0`. In System prompt attribution block, check which connections and credentials this covers. Before v2.1.181 the block included a per-request token on custom base URLs and Microsoft Foundry connections, so on those versions set it to `0` when your LLM gateway caches on the request body or forwards requests to a third-party provider, or when you connect to Microsoft Foundry directly
|
docs ↗ | ||
| CLAUDE_CODE_AUTO_BACKGROUND_WORKER_CHECKIN_SECONDS | string |
When `CLAUDE_AUTO_BACKGROUND_TASKS` is enabled, seconds between reminders to Claude to check on background subagents that are still running. Accepts a plain integer from `1` to `86400` only; any other value or spelling reads as unset. When unset, there are no check-in reminders. Requires Claude Code v2.1.248 or later
|
docs ↗ | ||
| CLAUDE_CODE_AUTO_COMPACT_WINDOW | string |
Set the auto-compact window in tokens, from `100000` to `1000000`. Accepts a plain integer such as `500000` only: a value like `500k` reads as `500` and clamps to the 100K minimum. The effective window is also capped at the model's context window. Takes precedence over the `/autocompact` command, the `--autocompact` flag, and the `autoCompactWindow` setting. The status line's `used_percentage` always measures against the model's full context window, so once this variable is set, that percentage no longer indicates when compaction will run
|
docs ↗ | ||
| CLAUDE_CODE_AUTO_CONNECT_IDE | string |
Override automatic IDE connection. By default, Claude Code connects automatically when launched inside a supported IDE's integrated terminal. Set to `false` to prevent this. Set to `true` to force a connection attempt when auto-detection fails, such as when tmux obscures the parent terminal. Takes precedence over the `autoConnectIde` global config setting
|
docs ↗ | ||
| CLAUDE_CODE_AWS_CHAIN_RESOLVE_TIMEOUT_MS | string |
Time in milliseconds Claude Code waits for the AWS default credential provider chain to produce credentials before the request fails with `AWS default-chain credential resolve timed out` (default: `60000`). Raise it when a step in your chain legitimately needs longer, such as a browser-based SSO sign-in with MFA through a wrapper like `aws-vault`. Applies wherever Claude Code signs with the default chain: Amazon Bedrock, Claude Platform on AWS, and the Mantle endpoint. Requires Claude Code v2.1.207 or later
|
docs ↗ | ||
| CLAUDE_CODE_BRIDGE_SESSION_ID | string |
Set automatically in Bash tool and hook command subprocesses while the session has an active Remote Control connection, and removed when the connection ends. The value is the session's ID in `session_` form, the same identifier that appears in the session's `claude.ai/code` URL, so a script can link back to the session that ran it. Requires Claude Code v2.1.199 or later. In cloud sessions, read `CLAUDE_CODE_REMOTE_SESSION_ID` instead
|
docs ↗ | ||
| CLAUDE_CODE_BS_AS_CTRL_BACKSPACE | string |
Set to `0` to make Claude Code read the `0x08` byte, also written `^H`, as plain Backspace, or `1` to read it as Ctrl+Backspace. Either value replaces the platform default. By default, Claude Code reads it as Ctrl+Backspace on Windows, except when `TERM_PROGRAM` is `mintty` or `TERM` is `cygwin`, and as plain Backspace on macOS and Linux. Set `0` in a Windows terminal where Backspace deletes a whole word
|
docs ↗ | ||
| CLAUDE_CODE_CERT_STORE | string |
Comma-separated list of CA certificate sources for TLS connections. `bundled` is the Mozilla CA set shipped with Claude Code. `system` is the operating system trust store, read only on runtimes with `tls.getCACertificates`: the native binary, or Node 22.15 or later for npm installs. See CA certificate store. Default is `bundled,system`
|
docs ↗ | ||
| CLAUDE_CODE_CHILD_SESSION | string |
Set to `1` in subprocesses Claude Code spawns via the Bash, PowerShell, and Monitor tools, hook commands, and status line commands. Not set for stdio MCP server subprocesses, which are long-lived and outlive the session that spawned them. Unlike `CLAUDECODE`, this is only set by Claude Code itself when it launches a subprocess and not by IDE extensions, so it reliably distinguishes a nested session from a top-level `claude` launched in an IDE-integrated terminal. A nested interactive `claude` TUI started this way is automatically excluded from `--resume`, `--continue`, up-arrow history, and the `claude agents` list. Non-interactive `claude -p` sessions still persist. Set `CLAUDE_CODE_FORCE_SESSION_PERSISTENCE=1` to override this exclusion. Requires Claude Code v2.1.172 or later
|
docs ↗ | ||
| CLAUDE_CODE_CLIENT_CERT | string |
Path to client certificate file for mTLS authentication
|
docs ↗ | ||
| CLAUDE_CODE_CLIENT_KEY | string |
Path to client private key file for mTLS authentication
|
docs ↗ | ||
| CLAUDE_CODE_CLIENT_KEY_PASSPHRASE | string |
Passphrase for encrypted CLAUDE\_CODE\_CLIENT\_KEY (optional)
|
docs ↗ | ||
| CLAUDE_CODE_CONNECT_TIMEOUT_MS | string |
Removed in v2.1.186 and now a no-op. Previously set a separate timeout for the connect, TLS, and response-header phase of a streaming API request. Use `API_TIMEOUT_MS` for the per-request timeout. For the response-header phase of a streaming request, see `CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS`
|
docs ↗ | ||
| CLAUDE_CODE_DEBUG_LOGS_DIR | string |
Override the debug log file path. Despite the name, this is a file path, not a directory. Requires debug mode to be enabled separately via `--debug`, `/debug`, or the `DEBUG` environment variable: setting this variable alone does not enable logging. The `--debug-file` flag does both at once. Defaults to `~/.claude/debug/<session-id>.txt`
|
docs ↗ | ||
| CLAUDE_CODE_DEBUG_LOG_LEVEL | string |
Minimum log level written to the debug log file. Values: `verbose`, `debug` (default), `info`, `warn`, `error`. Set to `verbose` to include high-volume diagnostics like full status line command output, or raise to `error` to reduce noise
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_1M_CONTEXT | string |
Set to `1` to disable 1M context window support. When set, 1M model variants are unavailable in the model picker, and Claude Code holds sessions on models with a native 1M window, such as Sonnet 5 and the Fable models, to a 200K window; see Extended context for how the hold is enforced. Useful for enterprise environments with compliance requirements. For its role in correcting the window for an unrecognized `[1m]` model ID, see Correct the window for a gateway or custom model ID
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING | string |
Set to `1` to disable adaptive reasoning on Opus 4.6 and Sonnet 4.6 and fall back to the fixed thinking budget controlled by `MAX_THINKING_TOKENS`. Has no effect on Fable models, Sonnet 5, or Opus 4.7 and later, which always use adaptive reasoning
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_ADMIN_ENV_UNION | string |
Set to `1` to stop Claude Code from merging managed settings `env` blocks per key across admin sources, so only the highest-priority source's whole `env` block applies, as before v2.1.223. Set it in the environment that launches Claude Code, since Claude Code ignores a copy delivered through a settings `env` block. Requires Claude Code v2.1.223 or later
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_ADVISOR_TOOL | string |
Set to `1` to disable the advisor tool. The `/advisor` command becomes unavailable, any configured `advisorModel` is ignored, and the `--advisor` flag is accepted but has no effect, so existing scripts that pass it continue to work without errors
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_AGENT_VIEW | string |
Set to `1` to turn off background agents and agent view: `claude agents`, `--bg`, `/background`, and the on-demand supervisor. Equivalent to the `disableAgentView` setting
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN | string |
Set to `1` to disable fullscreen rendering and use the classic main-screen renderer. The conversation stays in your terminal's native scrollback so `Cmd+f` and tmux copy mode work as usual. Takes precedence over `CLAUDE_CODE_NO_FLICKER` and the `tui` setting. You can also switch with `/tui default`. Does not apply to background sessions opened from agent view, which always use fullscreen rendering
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_ARTIFACT | string |
Set to `1` to turn off the Artifact tool, which publishes session output as a private web page on claude.ai. Once you set it, no settings file turns the tool back on. To turn the tool off from a settings file instead, set `enableArtifact` to `false`; the deprecated `disableArtifact` key also turns it off
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_ATTACHMENTS | string |
Set to `1` to disable attachment processing. File mentions with `@` syntax are sent as plain text instead of being expanded into file content
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_AUTO_MEMORY | string |
Set to `1` to disable auto memory. Set to `0` to force auto memory on even when `--bare` mode or `autoMemoryEnabled: false` would otherwise disable it. When disabled, Claude does not create or load auto memory files
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_BACKGROUND_TASKS | string |
Set to `1` to disable all background task functionality, including the `run_in_background` parameter on Bash and subagent tools, auto-backgrounding, and the Ctrl+B shortcut
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_DEFAULT | string |
Set to `1` to stop Claude Code from treating an Amazon Bedrock streaming response with a missing or empty `Content-Type` header as Amazon Bedrock's binary event stream. By default, Claude Code assumes a gateway dropped the header from an otherwise unmodified response, so it decodes the body and streaming keeps working. Set this only for a gateway that also re-emits the stream as server-sent events; Claude Code then reads the header-less body as server-sent events instead. Requires Claude Code v2.1.239 or later
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_GUARD | string |
Set to `1` to skip the check that an Amazon Bedrock streaming response carries the `application/vnd.amazon.eventstream` content-type. Without this variable, when a response carries a different content-type, Claude Code fails the request with an error naming that type, which means a gateway or proxy is transforming the response. Configure the gateway to forward the `Content-Type` header and body unmodified rather than setting this variable. Requires Claude Code v2.1.208 or later
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_BG_EXIT_HANDOFF | string |
Set to `1` to stop a background session's running background shell commands, dynamic workflows, and, as of v2.1.198, background subagents when the supervisor stops, restarts, or updates that session's process, instead of handing them to the session's next process. Affects only that handoff: backgrounding a session with `←` or `/background` still carries in-flight work over, and `CLAUDE_DISABLE_ADOPT` turns off both. Requires Claude Code v2.1.196 or later
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP | string |
Set to `1` to stop Claude Code from terminating background shell commands when the operating system reports memory pressure. By default, on macOS and Linux, Claude Code terminates a background shell started in the main session on a memory-pressure signal once the session has been idle for 30 minutes and no turn or subagent is running. Windows has no memory-pressure signal, so this variable has no effect there. Requires Claude Code v2.1.193 or later
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_BUNDLED_SKILLS | string |
Set to `1` to disable the skills and workflows included with Claude Code: bundled skills and workflows are removed entirely, while built-in commands like `/init` stay typable but are hidden from the model. `/doctor` stays typable like the built-in commands; hide it with `DISABLE_DOCTOR_COMMAND` instead. Skills from plugins, `.claude/skills/`, and `.claude/commands/` are unaffected. Equivalent to the `disableBundledSkills` setting
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_CFC_PROMPT | string |
Set to `1` to keep the Claude in Chrome browser tools available while omitting the Chrome section of the system prompt and the `/claude-in-chrome` bundled skill. For hosts that embed Claude Code and supply their own browser guidance. Requires Claude Code v2.1.257 or later
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_CLAUDE_MDS | string |
Set to `1` to prevent loading any CLAUDE.md memory files into context, including user, project, and auto memory files
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_CRON | string |
Set to `1` to disable scheduled tasks. The `/loop` skill and cron tools become unavailable and any already-scheduled tasks stop firing, including tasks that are already running mid-session
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS | string |
Set to `1` to strip Anthropic-specific `anthropic-beta` request headers and beta tool-schema fields (such as `defer_loading` and `eager_input_streaming`) from API requests. Use this when a proxy gateway rejects requests with errors like "Unexpected value(s) for the `anthropic-beta` header" or "Extra inputs are not permitted". Standard fields (`name`, `description`, `input_schema`, `cache_control`) are preserved. MCP tool search is disabled and all MCP tools load upfront, even when you set `ENABLE_TOOL_SEARCH`. On Claude Code v2.1.227 or later, managed settings can keep tool search on. Disable pre-release capabilities covers where the override applies
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS | string |
Set to `1` to disable the built-in Explore and Plan subagents. Claude explores with its search tools or the general-purpose subagent instead, and plan mode reads files directly rather than launching Explore and Plan agents. Custom subagents named `Explore` or `Plan` are unaffected. To remove every built-in subagent type in the Agent SDK or non-interactive mode, use `CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS` instead. Requires Claude Code v2.1.198 or later
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_FAST_MODE | string |
Set to `1` to disable fast mode
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY | string |
Set to `1` to disable the "How is Claude doing?" session quality surveys. Surveys are also disabled when `DISABLE_TELEMETRY`, `DO_NOT_TRACK`, or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set, unless `CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL` opts back in. To set a sample rate instead of disabling outright, use the `feedbackSurveyRate` setting. See Session quality surveys
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING | string |
Set to `1` to disable file checkpointing. The `/rewind` command will not be able to restore code changes. Overrides the `fileCheckpointingEnabled` setting
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS | string |
Set to `1` to remove built-in commit and PR workflow instructions and the git status snapshot from Claude's system prompt. Useful when using your own git workflow skills. Takes precedence over the `includeGitInstructions` setting when set
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP | string |
Set to `1` to prevent automatic remapping of Opus 4.0 and 4.1 to the current Opus version on the Anthropic API. Use when you intentionally want to pin an older model. The remap does not run on Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_MOUSE | string |
Set to `1` to disable mouse tracking in fullscreen rendering. Keyboard scrolling with `PgUp` and `PgDn` still works. Use this to keep your terminal's native copy-on-select behavior
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_MOUSE_CLICKS | string |
Set to `1` to disable click, drag, and hover handling in fullscreen rendering while keeping mouse-wheel scrolling. Use this when you want wheel scroll to work inside Claude Code but don't want clicks to position the cursor, expand tool output, or open links. `CLAUDE_CODE_DISABLE_MOUSE` takes precedence when both are set. Requires Claude Code v2.1.195 or later
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_MTLS_RELOAD_ON_STALE_CONNECTION | string |
Set to `1` to stop Claude Code from re-reading the mTLS client certificate and key when an API request fails with a connection-level error, such as a connection reset or a TLS handshake error. With the reload disabled, Claude Code loads rotated files only when it next applies settings or at the next startup. Requires Claude Code v2.1.232 or later
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC | string |
Set to any non-empty value, such as `1`, to disable nonessential network traffic: auto-updates, telemetry, error reporting, the `/feedback` command, Claude-drafted feedback, release notes, the PR and MR status badge checks, gateway model discovery refreshes, and availability checks such as the fast mode check. It also stops the background runs of plugin `command` sources, which are local commands rather than network traffic, because they can trigger dependency installs. **Setting it to `0` or `false` still disables this traffic**, unlike most on/off variables; unset the variable to allow it again. Also disables feature-flag fetching, which makes Remote Control and the other features that need feature-flag fetching unavailable. Official plugin marketplace auto-install isn't covered; disable it with `CLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALL`
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK | string |
Set to `1` to disable the non-streaming fallback when a streaming request fails mid-stream. Streaming errors propagate to the retry layer instead. Useful when a proxy or gateway causes the fallback to produce duplicate tool execution
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_NOTIFICATION_PRESENCE_CHECK | string |
Set to `1` to send the `PushNotification` tool's desktop notification even while you are typing in or focused on the terminal. By default the tool skips both the desktop notification and the mobile push when it detects recent keyboard activity or terminal focus. This variable disables only that local check, so the server can still suppress the mobile push when it detects that you are active. Requires Claude Code v2.1.193 or later
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALL | string |
Set to `1` to disable automatic registration of the official plugin marketplace. Claude Code reads the variable when it is about to register the marketplace, usually during a machine's first interactive launch. If the variable is set at that point, Claude Code skips the registration permanently. Unsetting the variable later doesn't undo the skip. Run `claude plugin marketplace add anthropics/claude-plugins-official` to register the marketplace at any time
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_PERMISSION_PROMPT_NOTIFY_HOOKS | string |
Set to `1` to stop Claude Code from running your `Notification` hooks for unanswered permission requests in sessions where Claude Code sends them to the Agent SDK's `canUseTool` callback, which is how Claude Desktop and the VS Code extension host Claude Code. Has no effect in terminal sessions. Requires Claude Code v2.1.233 or later
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_POLICY_SKILLS | string |
Set to `1` to skip loading skills from the system-wide managed skills directory. Useful for container or CI sessions that should not load operator-provisioned skills
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_TERMINAL_TITLE | string |
Set to `1` to disable automatic terminal title updates based on conversation context. In Agent SDK and `claude -p` sessions, this also skips the background small/fast-model request that generates the session title
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_THINKING | string |
Set to `1` to omit the `thinking` parameter from API requests entirely. This is a compatibility option for proxies and gateways that reject the parameter. The variable's behavior is unchanged from earlier versions; on models that think by default, omitting the parameter means the model may still think. To explicitly disable extended thinking on the Anthropic API, use `MAX_THINKING_TOKENS=0` instead, which is also ineffective on Fable models since they can't have thinking turned off. On third-party providers, `0` likewise omits the parameter, so the two variables behave the same there
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENT | string |
Set to `1` to skip proactive auto-compaction when Claude Code doesn't recognize the model ID, such as an LLM gateway alias. Without this variable, Claude Code compacts at the context window it assumes for the ID. `CLAUDE_CODE_MAX_CONTEXT_TOKENS` can correct the assumed window instead; see Correct the window for a gateway or custom model ID for when each variable applies. Requires Claude Code v2.1.223 or later
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL | string |
Set to `1` to disable virtual scrolling in fullscreen rendering and render every message in the transcript. Use this if scrolling in fullscreen mode shows blank regions where messages should appear
|
docs ↗ | ||
| CLAUDE_CODE_DISABLE_WORKFLOWS | string |
Set to `1` to disable workflows. Equivalent to the `disableWorkflows` setting
|
docs ↗ | ||
| CLAUDE_CODE_EFFORT_LEVEL | string |
Set the effort level for supported models. Values: `low`, `medium`, `high`, `xhigh`, `max`, or `auto` to use the model default. Available levels depend on the model. Takes precedence over `--effort`, `/effort`, and the `modelSettings` and `effortLevel` settings. See Adjust effort level
|
docs ↗ | ||
| CLAUDE_CODE_ENABLE_APPEND_SUBAGENT_PROMPT | string |
Set to `1` to enable appending extra text to the end of the system prompt of every subagent other than a forked subagent. The `--append-subagent-system-prompt` flag supplies the appended text and sets this variable automatically, so you don't need to set it yourself. Requires Claude Code v2.1.205 or later
|
docs ↗ | ||
| CLAUDE_CODE_ENABLE_AUTO_MODE | string |
Accepted for compatibility with older releases and has no effect. Auto mode is available by default on every provider, including Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry, and signed-in Claude apps gateway sessions. In v2.1.158 through v2.1.206, setting this to `1` was required to make auto mode available on those providers
|
docs ↗ | ||
| CLAUDE_CODE_ENABLE_AWAY_SUMMARY | string |
Override session recap availability. Set to `0` to force recaps off regardless of the `/config` toggle. Set to `1` to force recaps on when `awaySummaryEnabled` is `false`. Takes precedence over the setting and `/config` toggle
|
docs ↗ | ||
| CLAUDE_CODE_ENABLE_BACKGROUND_PLUGIN_REFRESH | string |
Set to `1` to refresh plugin state at turn boundaries in non-interactive mode after a background install completes. Off by default because the refresh changes the system prompt mid-session, which invalidates prompt caching for that turn
|
docs ↗ | ||
| CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL | string |
Set to `1` to route the "How is Claude doing?" session quality survey to your own OpenTelemetry collector when Anthropic-bound nonessential traffic is blocked. Survey ratings are emitted only as OTEL events to your configured collector. No survey data is sent to Anthropic in this mode. Applies when `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, `DISABLE_TELEMETRY`, or `DO_NOT_TRACK` is set, and has no effect otherwise. `CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY` and the organization product feedback policy take precedence
|
docs ↗ | ||
| CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING | string |
Controls whether tool call inputs stream from the API as Claude generates them. With this off, a large tool input such as a long file write arrives only after Claude finishes generating it, which can look like it's hanging. Enabled by default on the Anthropic API. On Amazon Bedrock and Google Cloud's Agent Platform, enabled per model where the deployed container supports it. Set to `0` to opt out. Set to `1` to force on when routing through a proxy via `ANTHROPIC_BASE_URL`, `ANTHROPIC_VERTEX_BASE_URL`, or `ANTHROPIC_BEDROCK_BASE_URL`. Off by default on Microsoft Foundry and gateway connections
|
docs ↗ | ||
| CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY | string |
Set to `1` to populate the `/model` picker from your gateway's `/v1/models` endpoint when `ANTHROPIC_BASE_URL` points at an Anthropic-compatible gateway such as LiteLLM, Kong, or an internal proxy. Off by default because gateways backed by a shared API key would otherwise show every user every model the key can access. Discovered models are still filtered by an `availableModels` allowlist the session receives; deliver the list through MDM or a managed settings file, since server-managed delivery is not available on gateway configurations
|
docs ↗ | ||
| CLAUDE_CODE_ENABLE_OPUS_4_7_FAST_MODE | string |
Removed in v2.1.142, when the fast mode default moved from Opus 4.6 to Opus 4.7
|
docs ↗ | ||
| CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION | string |
Set to `false` to turn off prompt suggestions, the grayed-out predictions that appear in your prompt input. Takes precedence over the `promptSuggestionEnabled` setting, which is what the **Prompt suggestions** toggle in `/config` writes. Claude Code also pauses suggestions while your account is close to or at its usage limit. Set to `true` to keep them on until you reach the limit. Requires Claude Code v2.1.238 or later. See Prompt suggestions
|
docs ↗ | ||
| CLAUDE_CODE_ENABLE_TASKS | string |
Selects which task-tracking tools Claude Code provides in sessions that have them. By default, Claude Code provides the Task tools `TaskCreate`, `TaskUpdate`, `TaskGet`, and `TaskList`. Set to `0` to get the legacy `TodoWrite` tool instead. See Task list
|
docs ↗ | ||
| CLAUDE_CODE_ENABLE_TELEMETRY | string |
Set to `1` to enable OpenTelemetry data collection for metrics and logging. Required before configuring OTel exporters. See Monitoring
|
docs ↗ | ||
| CLAUDE_CODE_ENABLE_TODO_TOOLS | string |
Set to `1` to get the task-tracking tools on the models listed under Task tool availability, where Claude Code otherwise leaves them out. `CLAUDE_CODE_ENABLE_TASKS` still selects the Task tools or `TodoWrite`. Requires Claude Code v2.1.233 or later
|
docs ↗ | ||
| CLAUDE_CODE_EXIT_AFTER_STOP_DELAY | string |
Time in milliseconds to wait after the query loop becomes idle before automatically exiting. Useful for automated workflows and scripts using SDK mode
|
docs ↗ | ||
| CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS | string |
Set to `1` to enable agent teams. Agent teams are experimental and disabled by default
|
docs ↗ | ||
| CLAUDE_CODE_EXTRA_BODY | string |
JSON object to merge into the top level of every API request body. Useful for passing provider-specific parameters that Claude Code doesn't expose directly. A value exported in your shell also applies to the background sessions you dispatch with `claude agents` or `--bg`. Before v2.1.206, background sessions ignored a shell-exported value and used whatever copy the background supervisor process inherited
|
docs ↗ | ||
| CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS | string |
Override the default token limit for file reads. Useful when you need to read larger files in full
|
docs ↗ | ||
| CLAUDE_CODE_FORCE_SESSION_PERSISTENCE | string |
Set to `1` to force transcript persistence, prompt history, and `claude agents` registration even when this `claude` was launched from inside another Claude Code session. Use when an inherited `CLAUDE_CODE_CHILD_SESSION` value, for example from a `screen` session or a background launcher first started by Claude Code's Bash tool, causes a genuine top-level session to be misclassified as nested. As of v2.1.178, Claude Code detects the tmux case automatically and ignores the inherited marker, so tmux no longer needs this variable. Also honored on v2.1.169 and earlier; has no effect on v2.1.170 and v2.1.171, where the nested-session detection it overrides was removed
|
docs ↗ | ||
| CLAUDE_CODE_FORCE_STRIKETHROUGH | string |
Set to `1` to force strikethrough rendering for `~~text~~` in Claude's responses when your terminal supports it but is not auto-detected, such as over SSH without `TERM_PROGRAM` forwarded. Without this, undetected terminals show the literal `~~` markers instead of rendering the text as strikethrough. Requires Claude Code v2.1.186 or later
|
docs ↗ | ||
| CLAUDE_CODE_FORCE_SYNC_OUTPUT | string |
Set to `1` to force-enable DEC private mode 2026 synchronized output when your terminal supports it but is not auto-detected. Useful for emulators such as Emacs `eat` that implement BSU/ESU but do not reply to the capability probe. Has no effect under tmux. Unlike `CLAUDE_CODE_NO_FLICKER`, which switches to fullscreen rendering, this doesn't change the renderer
|
docs ↗ | ||
| CLAUDE_CODE_FORK_SUBAGENT | string |
Controls fork mode, which lets Claude spawn forked subagents itself and is on by default in interactive sessions only. Set to `1` to turn it on in `claude -p` and the Agent SDK as well, or `0` to turn it off in every kind of session. You can run `/subtask` whether or not fork mode is on. The interactive default requires Claude Code v2.1.232 or later; on earlier versions, set the variable to `1` to turn fork mode on
|
docs ↗ | ||
| CLAUDE_CODE_FORWARD_SUBAGENT_TEXT | string |
Set to `1` to emit subagent text and thinking blocks in `claude -p --output-format stream-json` output, the same behavior as the `--forward-subagent-text` flag. Use the variable when a harness invokes `claude` and can't pass the flag itself. Unlike the flag, which exits with an error outside non-interactive mode with stream-json output, the variable is ignored there so that nested invocations keep working when it's set process-wide. Requires Claude Code v2.1.211 or later
|
docs ↗ | ||
| CLAUDE_CODE_GIT_BASH_PATH | string |
Windows only: path to the Git Bash executable (`bash.exe`). Use when Git Bash is installed but not in your PATH. If the path doesn't exist or the file isn't named `bash.exe`, `sh.exe`, `bash`, or `sh`, Claude Code ignores the variable and auto-detects Git Bash as if it were unset, logging a warning visible with `--debug`. Before v2.1.219, Claude Code exited at startup when the path didn't exist, and used any existing file as the shell without checking that it was bash or sh. See Windows setup
|
docs ↗ | ||
| CLAUDE_CODE_GLOB_HIDDEN | string |
Set to `false` to exclude dotfiles from results when Claude invokes the Glob tool. Included by default. Does not affect `@` file autocomplete, `ls`, Grep, or Read
|
docs ↗ | ||
| CLAUDE_CODE_GLOB_NO_IGNORE | string |
Set to `false` to make the Glob tool respect `.gitignore` patterns. By default, Glob returns all matching files including gitignored ones. Does not affect `@` file autocomplete, which has its own `respectGitignore` setting
|
docs ↗ | ||
| CLAUDE_CODE_GLOB_TIMEOUT_SECONDS | string |
Timeout in seconds for Glob tool file discovery. Defaults to 20 seconds on most platforms and 60 seconds on WSL
|
docs ↗ | ||
| CLAUDE_CODE_GOAL_CHECKIN_MINUTES | string |
How many minutes background work can keep an active goal waiting before Claude Code asks Claude to check on it. Default `30`. Set `0` to turn check-ins off. Give whole minutes in plain digits, at most `10080`, which is one week. Claude Code treats any other value as unset and uses the default. Requires Claude Code v2.1.234 or later
|
docs ↗ | ||
| CLAUDE_CODE_HIDE_CWD | string |
Set to `1` to hide the working directory in the startup logo. Useful for screenshares or recordings where the path exposes your OS username
|
docs ↗ | ||
| CLAUDE_CODE_IDE_HOST_OVERRIDE | string |
Override the host address used to connect to the IDE extension. By default Claude Code auto-detects the correct address, including WSL-to-Windows routing
|
docs ↗ | ||
| CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL | string |
Set to `1` to skip auto-installation of IDE extensions. Equivalent to setting `autoInstallIdeExtension` to `false`
|
docs ↗ | ||
| CLAUDE_CODE_IDE_SKIP_VALID_CHECK | string |
Set to `1` to skip validation of IDE lockfile entries during connection. Use when auto-connect fails to find your IDE despite it running
|
docs ↗ | ||
| CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS | string |
How many subagents can be running in one session before the Agent tool refuses to spawn another (default: 20). Accepts a positive whole number in plain digits; anything else is ignored, so the variable can adjust the cap but can't disable it. Requires Claude Code v2.1.217 or later
|
docs ↗ | ||
| CLAUDE_CODE_MAX_CONTEXT_TOKENS | string |
Override the context window size Claude Code assumes for the active model. As of v2.1.193, how it applies depends on how Claude Code resolves the model ID; see Correct the window for a gateway or custom model ID. Use this when routing to a model through `ANTHROPIC_BASE_URL` whose context window does not match the built-in size for its name
|
docs ↗ | ||
| CLAUDE_CODE_MAX_OUTPUT_TOKENS | string |
Set the maximum number of output tokens for most requests. Defaults and caps vary by model; see max output tokens. Claude Code defaults to 32000 for model IDs it doesn't recognize, such as gateway-specific names, and lowers values above a model's cap to the cap. Increasing this value reduces the effective context window available before auto-compaction triggers
|
docs ↗ | ||
| CLAUDE_CODE_MAX_RETRIES | string |
Override the number of times to retry failed API requests (default: 10). Capped at 15 as of v2.1.186; as of v2.1.199, `CLAUDE_CODE_RETRY_WATCHDOG` raises the default and removes the cap. For unattended sessions that need to wait through longer outages, set `CLAUDE_CODE_RETRY_WATCHDOG` instead
|
docs ↗ | ||
| CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION | string |
Removed in v2.1.224 and now a no-op. Previously capped the total number of subagents Claude could spawn with the Agent tool in one session (default: 200); spawning past the cap failed with `Subagent spawn limit reached`. The concurrent subagent limit and the depth limit still apply
|
docs ↗ | ||
| CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH | string |
Number of subagent layers allowed below the main conversation (default: 3). At the default, subagents can spawn their own subagents, and a subagent at the third layer can't spawn further; set `1` to turn nesting off. In v2.1.217 through v2.1.218, the default was 1, so a subagent couldn't spawn its own unless you raised the limit; v2.1.219 raised the default to 3. Accepts a positive whole number in plain digits; anything else is ignored, so the limit can be adjusted but not removed. Requires Claude Code v2.1.217 or later
|
docs ↗ | ||
| CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY | string |
Maximum number of read-only tools and subagents that can execute in parallel (default: 10). Higher values increase parallelism but consume more resources
|
docs ↗ | ||
| CLAUDE_CODE_MAX_TURNS | string |
Cap the number of agentic turns when no explicit limit is passed. Equivalent to passing `--max-turns`, which takes precedence when both are set. A value that is not a positive integer is rejected at startup with an error rather than treated as no cap
|
docs ↗ | ||
| CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION | string |
Cap on the total number of WebSearch calls one session can make (default: 200). When Claude reaches the cap, further WebSearch calls return a notice telling it to continue with the information it already gathered. Accepts a positive whole number with no upper bound. Anything else is ignored and the default applies, so the cap can be raised but not turned off. Requires Claude Code v2.1.212 or later
|
docs ↗ | ||
| CLAUDE_CODE_MCP_ALLOWLIST_ENV | string |
Set to `1` to spawn stdio MCP servers with only a safe baseline environment plus the server's configured `env`, instead of inheriting your shell environment
|
docs ↗ | ||
| CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS | string |
Elapsed time in milliseconds before a still-running MCP tool call moves to a background task (default: 120000, or 2 minutes). Set to `0` to turn automatic backgrounding off. Requires Claude Code v2.1.212 or later
|
docs ↗ | ||
| CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT | string |
Idle timeout in milliseconds for MCP tool calls. When a stdio, HTTP, SSE, WebSocket, or claude.ai connector MCP server sends no response and no progress notification for this long, the tool call aborts with an error instead of waiting for the overall `MCP_TOOL_TIMEOUT`. Overrides the per-transport defaults of 300000 (5 minutes) for network servers and 1800000 (30 minutes) for stdio servers. Set to `0` to disable the idle check. Values below 1000 are raised to one second, and the value is capped at the effective `MCP_TOOL_TIMEOUT`. A per-server `timeout` in `.mcp.json` of at least 1000 raises that server's idle window to at least the `timeout` value. Doesn't apply to IDE servers or SDK in-process servers. Requires Claude Code v2.1.187 or later. Before v2.1.203, stdio servers were exempt from the idle timeout
|
docs ↗ | ||
| CLAUDE_CODE_MESSAGING_SOCKET | string |
Set by Claude Code, not by you: in sessions that bind an inbox socket, Claude Code exports that socket's path to hooks and Bash commands when it binds the socket. In a session that starts with messaging on, Claude Code binds the socket before any hook runs. Other sessions on the machine deliver messages to this path. Each session exports its own socket rather than one inherited from a parent, and messages arriving on it go through the session's inbound controls. Settings `env` blocks can't set it. Requires Claude Code v2.1.224 or later
|
docs ↗ | ||
| CLAUDE_CODE_MESSAGING_TOKEN | string |
Set by Claude Code, not by you: in sessions that bind an inbox socket, Claude Code exports this per-session token to hooks and Bash commands alongside `CLAUDE_CODE_MESSAGING_SOCKET`. A script posting to the socket can send `{"type":"auth","token":"<token>"}` as its first line to prove it belongs to the session. On native Windows, Claude Code requires this line and closes any connection that doesn't open with a valid one. The own-child rules say when Claude Code consults the token. Each session exports its own token, never one inherited from a parent session. Settings `env` blocks can't set it. Requires Claude Code v2.1.228 or later
|
docs ↗ | ||
| CLAUDE_CODE_NATIVE_CURSOR | string |
Set to `1` to show the terminal's own cursor at the input caret instead of a drawn block. The cursor respects the terminal's blink, shape, and focus settings
|
docs ↗ | ||
| CLAUDE_CODE_NEW_INIT | string |
Set to `1` to make `/init` run an interactive setup flow. The flow asks which files to generate, including CLAUDE.md, skills, and hooks, before exploring the codebase and writing them. Without this variable, `/init` generates a CLAUDE.md automatically without prompting
|
docs ↗ | ||
| CLAUDE_CODE_NO_FLICKER | string |
Set to `1` to enable fullscreen rendering, a research preview that reduces flicker and keeps memory flat in long conversations. Overrides the `tui` setting; you can also switch with `/tui fullscreen`
|
docs ↗ | ||
| CLAUDE_CODE_OAUTH_REFRESH_TOKEN | string |
OAuth refresh token for Claude.ai authentication. When set, `claude auth login` exchanges this token directly instead of opening a browser. Requires `CLAUDE_CODE_OAUTH_SCOPES`. Useful for provisioning authentication in automated environments
|
docs ↗ | ||
| CLAUDE_CODE_OAUTH_SCOPES | string |
Space-separated OAuth scopes the refresh token was issued with, such as `"user:profile user:inference user:sessions:claude_code"`. Required when `CLAUDE_CODE_OAUTH_REFRESH_TOKEN` is set
|
docs ↗ | ||
| CLAUDE_CODE_OAUTH_TOKEN | string |
OAuth access token for claude.ai authentication. Alternative to `/login` for SDK and automated environments. Takes precedence over keychain-stored credentials. Generate one with `claude setup-token`. Unless you run `/login`, Claude Code uses the token you set for the whole session. To replace an expired token, generate a new one and restart
|
docs ↗ | ||
| CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE | string |
Removed in v2.1.160 and now a no-op. Previously pinned fast mode to Claude Opus 4.6 instead of the current default. Opus 4.6 no longer supports fast mode
|
docs ↗ | ||
| CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH | string |
Maximum length of content-bearing OpenTelemetry attributes (model responses, tool content, system prompts, raw API bodies), truncation marker included, in UTF-16 code units (default: 61440, i.e. 60 KB). Raise it only if your telemetry backend accepts attribute values larger than 64 KB, or lower it to cut telemetry volume. Requires Claude Code v2.1.214 or later. See Monitoring
|
docs ↗ | ||
| CLAUDE_CODE_OTEL_DIAG_STDERR | string |
Set to `1` to write OpenTelemetry exporter diagnostic errors to stderr. By default these errors only appear with `--debug`, so a misconfigured exporter such as a Prometheus port collision otherwise fails silently. Requires Claude Code v2.1.179 or later. See Monitoring
|
docs ↗ | ||
| CLAUDE_CODE_OTEL_FLUSH_TIMEOUT_MS | string |
Timeout in milliseconds for flushing pending OpenTelemetry spans (default: 5000). See Monitoring
|
docs ↗ | ||
| CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS | string |
Interval for refreshing dynamic OpenTelemetry headers in milliseconds (default: 1740000 / 29 minutes). See Dynamic headers
|
docs ↗ | ||
| CLAUDE_CODE_OTEL_SHUTDOWN_TIMEOUT_MS | string |
Timeout in milliseconds for the OpenTelemetry exporter to finish on shutdown (default: 2000). Increase if metrics are dropped at exit. See Monitoring
|
docs ↗ | ||
| CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE | string |
Set to `1` to let Claude Code run your package manager's upgrade command in the background when a new version is available. Applies to Homebrew and WinGet installations. Other package managers continue to show the upgrade command without running it. See Auto updates
|
docs ↗ | ||
| CLAUDE_CODE_PERFORCE_MODE | string |
Set to `1` to enable Perforce-aware write protection. When set, Edit, Write, and NotebookEdit fail with a `p4 edit <file>` hint if the target file lacks the owner-write bit, which Perforce clears on synced files until `p4 edit` opens them. This prevents Claude Code from bypassing Perforce change tracking
|
docs ↗ | ||
| CLAUDE_CODE_PLUGIN_CACHE_DIR | string |
Override the plugins root directory. Despite the name, this sets the parent directory, not the cache itself: marketplaces and the plugin cache live in subdirectories under this path. Defaults to `~/.claude/plugins`
|
docs ↗ | ||
| CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS | string |
Timeout in milliseconds for git operations when installing or updating plugins (default: 120000). Increase this value for large repositories or slow network connections. See Git operations time out
|
docs ↗ | ||
| CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE | string |
Set to `1` to skip the re-clone attempt and keep using the existing marketplace cache when a `git pull` fails. Useful in offline or airgapped environments where re-cloning would fail the same way. See Marketplace updates fail in offline environments
|
docs ↗ | ||
| CLAUDE_CODE_PLUGIN_PREFER_HTTPS | string |
Set to `1` to clone GitHub `owner/repo` shorthand sources over HTTPS instead of SSH. Applies to plugin install and update, and to `/plugin marketplace add` and `update`. Useful in CI runners, containers, or any environment without a configured SSH key for `github.com`
|
docs ↗ | ||
| CLAUDE_CODE_PLUGIN_SEED_DIR | string |
Path to one or more read-only plugin seed directories, separated by `:` on Unix or `;` on Windows. Use this to bundle a pre-populated plugins directory into a container image. Claude Code registers marketplaces from these directories at startup and uses pre-cached plugins without re-cloning. See Pre-populate plugins for containers
|
docs ↗ | ||
| CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY | string |
Set to `1` to stop Claude Code from passing `-ExecutionPolicy Bypass` when spawning PowerShell for tool calls, hooks, and status line commands, and respect the machine's effective execution policy instead. By default Claude Code bypasses execution policy at process scope so `.ps1` scripts and module imports work on default-Restricted Windows installs. Process-scope bypass never overrides Group Policy `MachinePolicy` or `UserPolicy` regardless of this setting
|
docs ↗ | ||
| CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS | string |
Ceiling in milliseconds on continuous idle waiting after the final turn in non-interactive mode with the `-p` flag, while background subagents and workflows whose result is part of the output finish. Each turn that handles queued background results starts the count again. Default: `600000`, or 10 minutes. When idle waiting reaches the ceiling, Claude Code stops waiting for the remaining background tasks and exits. Set to `0` to wait indefinitely. This cap is separate from the five-second grace period that applies to plain background shells. Requires Claude Code v2.1.182 or later
|
docs ↗ | ||
| CLAUDE_CODE_PROCESS_WRAPPER | string |
Launch the processes Claude Code starts from its own binary, such as the background service that hosts agent view sessions, through a corporate launcher given as an argv prefix like `/opt/corp/launcher`. Set it in the `env` block of user or managed settings, not as a shell export, so the detached background service inherits it; project and local settings can't set it. Equivalent to the `processWrapper` setting, which requires Claude Code v2.1.210 or later; this variable takes precedence when both are set. The VS Code extension configures its own launcher separately through its `claudeProcessWrapper` setting. Ignored on Windows. See Run Claude Code behind a corporate launcher for the value format, what the launcher covers, and the contract the launcher must satisfy. Requires Claude Code v2.1.208 or later
|
docs ↗ | ||
| CLAUDE_CODE_PROJECT_DIR_NAME | string |
Set together with `CLAUDE_CONFIG_DIR` to choose the `projects/` directory name Claude Code stores that session's transcripts and auto memory under, in place of one derived from the working directory path. For example, starting Claude Code with `CLAUDE_CONFIG_DIR=/srv/tenant-a CLAUDE_CODE_PROJECT_DIR_NAME=work claude` stores them under `/srv/tenant-a/projects/work/`. Claude Code ignores this variable when `CLAUDE_CONFIG_DIR` is unset, and reads it only from the environment you start `claude` from, never from a settings file `env` block. See Name the project directory yourself. Requires Claude Code v2.1.234 or later
|
docs ↗ | ||
| CLAUDE_CODE_PROMPT_CACHE_TTL | string |
Set `5m` or `1h`, the only values Claude Code accepts, to choose the prompt cache TTL for the main conversation: your interactive, `-p`, and SDK turns, plus the helpers that run inline with them. Takes precedence over the `promptCacheTtl` setting and over `ENABLE_PROMPT_CACHING_1H`, and `FORCE_PROMPT_CACHING_5M` overrides it. The API bills 1-hour cache writes at a higher rate. Requires Claude Code v2.1.242 or later
|
docs ↗ | ||
| CLAUDE_CODE_PROPAGATE_TRACEPARENT | string |
Set to `1` to propagate W3C trace context when `ANTHROPIC_BASE_URL` points at a custom proxy. Propagation covers the `traceparent` header on model and HTTP MCP requests and the `TRACEPARENT` environment variable for Bash, PowerShell, and hook subprocesses. By default, propagation is enabled only when connected directly to the Anthropic API. Added in v2.1.152. See Traces (beta)
|
docs ↗ | ||
| CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST | string |
Set by host platforms that embed Claude Code and manage model provider routing on its behalf. When set, Claude Code ignores provider-selection, endpoint, and authentication variables such as `CLAUDE_CODE_USE_BEDROCK`, `ANTHROPIC_BASE_URL`, and `ANTHROPIC_API_KEY` in settings files, so user settings can't override the host's routing. Claude Code also ignores model-selection keys such as `model`, `fallbackModel`, and `modelOverrides` in managed settings, whichever managed source delivers them, so the host's model configuration takes precedence over an out-of-date managed model pin. Claude Code also ignores model-selection variables such as `ANTHROPIC_MODEL` and the `ANTHROPIC_DEFAULT_*_MODEL` family in a managed `env` block; an `availableModels` allowlist in managed settings still applies unless the host supplies its own. Claude Code also skips the automatic telemetry opt-out it otherwise applies on third-party providers such as Amazon Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform, and Microsoft Foundry, so telemetry follows the standard `DISABLE_TELEMETRY` opt-out. See Default behaviors by API provider
|
docs ↗ | ||
| CLAUDE_CODE_PROXY_RESOLVES_HOSTS | string |
Set to `1` to allow the proxy to perform DNS resolution instead of the caller. Opt-in for environments where the proxy should handle hostname resolution
|
docs ↗ | ||
| CLAUDE_CODE_REMOTE | string |
Set automatically to `true` when Claude Code is running as a cloud session. Read this from a hook or setup script to detect whether you are in a cloud session
|
docs ↗ | ||
| CLAUDE_CODE_REMOTE_SESSION_ID | string |
Set automatically in cloud sessions to the current session's ID. Read this to construct a link back to the session transcript. See Link output back to the session
|
docs ↗ | ||
| CLAUDE_CODE_RESTRICTED | string |
Set to `1` to start the session in restricted mode, the same as passing `--restricted`. Claude Code ignores this variable in a settings file's `env` block. Requires Claude Code v2.1.248 or later
|
docs ↗ | ||
| CLAUDE_CODE_RESUME_INTERRUPTED_TURN | string |
Set to `1` to automatically resume if the previous session ended mid-turn. Used in SDK mode so the model continues without requiring the SDK to re-send the prompt. To turn this off, unset the variable or set it to `0`. Before v2.1.221, Claude Code ignored `0` and other falsy values, so setting `0` still triggered the resume in non-interactive mode and unsetting the variable was the only way to turn it off
|
docs ↗ | ||
| CLAUDE_CODE_RESUME_INTERRUPTED_TURN_MAX_AGE_MS | string |
Maximum age in milliseconds of the last transcript message for a session that ended mid-turn to continue automatically on resume. When the last message is older than this bound, Claude Code skips both the `CLAUDE_CODE_RESUME_INTERRUPTED_TURN` automatic resume and the injected `CLAUDE_CODE_RESUME_PROMPT` continuation message, and the session starts idle so you continue explicitly. Unset or `0` means no bound; a negative or non-numeric value applies a one-hour bound. Spawn scripts for long-running agents can set this so a restart against an old transcript doesn't re-run a stale prompt. Claude Code sets a one-hour bound itself when it restarts a crashed agent view session that inherited its conversation from an interactive session. Requires Claude Code v2.1.211 or later
|
docs ↗ | ||
| CLAUDE_CODE_RESUME_PROMPT | string |
Override the continuation message injected when resuming a session that ended mid-turn. Defaults to `Continue from where you left off.`. Spawn scripts for long-running agents can set this to a more directive boot message. An empty string uses the default
|
docs ↗ | ||
| CLAUDE_CODE_RETRY_WATCHDOG | string |
Set to `1` for unattended sessions such as eval harnesses, CI jobs, or remote workers. Retries `429` and `529` capacity errors indefinitely instead of failing after `CLAUDE_CODE_MAX_RETRIES` attempts. Claude Code fails at once on a `429` that reports a spend limit or exhausted usage credits, even one from a gateway spend cap that resets on a schedule. Before v2.1.239, the watchdog retried these indefinitely. The watchdog backs off up to 5 minutes between attempts, or until the limit resets when the response carries a rate-limit reset time, so a session that hits a usage limit waits out the remaining window. On v2.1.199 or later it also raises the default retry count for other transient errors, such as server errors, timeouts, and dropped connections, to 300, roughly three hours of backoff, and removes the cap of 15 on `CLAUDE_CODE_MAX_RETRIES` if you set that variable explicitly. Requires Claude Code v2.1.186 or later
|
docs ↗ | ||
| CLAUDE_CODE_SAFE_MODE | string |
Set to `1` to start in safe mode: CLAUDE.md, skills, plugins, hooks, MCP servers, custom commands and agents, output styles, workflows, custom themes, custom keybindings, status line and file-suggestion commands, LSP servers, and auto memory do not load, for troubleshooting a broken configuration. Managed settings policy still applies, including policy-configured hooks, status line, and file-suggestion commands; managed plugins, managed skills, managed CLAUDE.md, and policy-configured MCP servers do not. Equivalent to passing `--safe-mode`. Directly spawned child processes inherit the variable
|
docs ↗ | ||
| CLAUDE_CODE_SCRIPT_CAPS | string |
JSON object limiting how many times specific scripts may be invoked per session when `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB` is set. Keys are substrings matched against the command text; values are integer call limits. For example, `{"deploy.sh": 2}` allows `deploy.sh` to be called at most twice. Matching is substring-based so shell-expansion tricks like `./scripts/deploy.sh $(evil)` still count against the cap. Runtime fan-out via `xargs` or `find -exec` is not detected; this is a defense-in-depth control
|
docs ↗ | ||
| CLAUDE_CODE_SCROLL_SPEED | string |
Set the mouse wheel scroll multiplier in fullscreen rendering. Accepts any positive value up to 20, including fractional values below 1 such as `0.5` to slow accelerated trackpad and wheel scrolling in terminals that already amplify wheel events. Set to `3` to match `vim` if your terminal sends one wheel event per notch without amplification. Ignored in the JetBrains IDE terminal, where Claude Code uses its own scroll handling
|
docs ↗ | ||
| CLAUDE_CODE_SEND_FEEDBACK | string |
Set to `0` to turn off Claude-drafted feedback for a session. Set to `1` to turn it on where your account already has access; the variable can't grant access itself, and the other switches that turn feedback off, such as `DISABLE_FEEDBACK_COMMAND` and the `feedbackDrafts` setting's `off` value, still apply
|
docs ↗ | ||
| CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS | string |
Override the time budget in milliseconds for SessionEnd hooks. Applies to session exit, `/clear`, and switching sessions via interactive `/resume`. By default the budget is 1.5 seconds, automatically raised to the highest per-hook `timeout` configured in settings files, up to 60 seconds. Timeouts on plugin-provided hooks do not raise the budget
|
docs ↗ | ||
| CLAUDE_CODE_SESSION_ID | string |
Set automatically to the current session ID in Bash and PowerShell tool subprocesses, hook command subprocesses, and stdio MCP server subprocesses. For Bash, PowerShell, and hooks this matches the `session_id` field in the hook JSON input and is updated on `/clear`. An MCP server subprocess retains the ID it was spawned with. On `--resume <session-id>` it receives the resumed ID, matching hooks and Bash. On `--continue` or `--resume` without an explicit ID it may receive the initial startup ID instead. Use to correlate scripts and external tools with the Claude Code session that launched them
|
docs ↗ | ||
| CLAUDE_CODE_SHELL | string |
Set the shell Claude Code uses to run Bash tool commands. Accepts a path to a `bash` or `zsh` binary, for example `/opt/homebrew/bin/bash`. Other shells such as `fish` are not supported. If the value is not a working `bash` or `zsh` path, Claude Code ignores it and falls back to auto-detection. Auto-detection uses your `$SHELL` when it points to `bash` or `zsh`, otherwise it picks the first working `zsh` then `bash` found on your `PATH` and standard install locations
|
docs ↗ | ||
| CLAUDE_CODE_SHELL_PREFIX | string |
Command prefix that wraps shell commands Claude Code spawns: Bash tool calls, hook commands, status line commands, and stdio MCP server startup commands. PowerShell hooks and exec-form hooks run without the prefix. Useful for logging or auditing. Setting a bare executable path such as `/path/to/logger.sh` runs each command as `/path/to/logger.sh '<command>'`. The wrapper receives the command line as a single shell-quoted argument in `$1`, so the wrapper must re-evaluate `$1` with a shell, for example `exec bash -c "$1"`. Treating `$1` as a bare executable path breaks stdio MCP servers that pass arguments such as `npx -y <package>`. For Bash tool calls, `$1` contains the full shell invocation Claude Code assembles, including environment setup, not only the command Claude ran
|
docs ↗ | ||
| CLAUDE_CODE_SIMPLE | string |
Set to `1` to run with a minimal system prompt and only the Bash, file read, and file edit tools. MCP tools from `--mcp-config` are still available. Disables auto-discovery of hooks, skills, custom commands, subagents, plugins, MCP servers, auto memory, and CLAUDE.md. Skills in a directory you pass with `--add-dir` still load. OAuth tokens and keychain credentials are not read, so Anthropic authentication must come from `ANTHROPIC_API_KEY` or an `apiKeyHelper` in `--settings`. Equivalent to passing `--bare`
|
docs ↗ | ||
| CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT | string |
Set to `1` to use a shorter system prompt and abbreviated tool descriptions on any model. Set to `0`, `false`, `no`, or `off` to opt out even on models where the experiment or server configuration would otherwise enable it. The full tool set, hooks, MCP servers, and CLAUDE.md discovery remain enabled
|
docs ↗ | ||
| CLAUDE_CODE_SKIP_ANTHROPIC_AWS_AUTH | string |
Skip client-side authentication for Claude Platform on AWS, for gateways that sign requests themselves
|
docs ↗ | ||
| CLAUDE_CODE_SKIP_AWS_CRED_CACHE | string |
Set to `1` to turn off the in-process cache of credentials resolved from the AWS default credential provider chain, so Claude Code resolves the chain on every API request. With the cache off, an SSO-backed profile requests credentials from IAM Identity Center on every request. See credential caching and resolution timeout. Requires Claude Code v2.1.207 or later
|
docs ↗ | ||
| CLAUDE_CODE_SKIP_BEDROCK_AUTH | string |
Skip AWS authentication for Amazon Bedrock (for example, when using an LLM gateway)
|
docs ↗ | ||
| CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS | string |
Set to `1` to treat a failed fast mode availability check as available, for networks that block the check's direct request to `api.anthropic.com`. Claude Code still honors a "disabled by your organization" response
|
docs ↗ | ||
| CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK | string |
Set to `1` to skip the client-side fast mode availability check, for proxies that intercept the check's request rather than refuse it. The API still rejects fast mode requests when your organization has fast mode disabled
|
docs ↗ | ||
| CLAUDE_CODE_SKIP_FOUNDRY_AUTH | string |
Skip Azure authentication for Microsoft Foundry, for a proxy or gateway that injects its own `Authorization` header. Claude Code sends requests without an Azure credential and preserves the `Authorization` header you supply, for example through `ANTHROPIC_CUSTOM_HEADERS`. Ignored when `ANTHROPIC_FOUNDRY_API_KEY` or `ANTHROPIC_FOUNDRY_AUTH_TOKEN` is set. Before v2.1.203, this variable left the Microsoft Foundry client unable to send requests unless an API key was also set
|
docs ↗ | ||
| CLAUDE_CODE_SKIP_MANTLE_AUTH | string |
Skip AWS authentication for Amazon Bedrock Mantle (for example, when using an LLM gateway)
|
docs ↗ | ||
| CLAUDE_CODE_SKIP_PROMPT_HISTORY | string |
Set to `1` to skip writing prompt history and session transcripts to disk. Sessions started with this variable set do not appear in `--resume`, `--continue`, or up-arrow history. Useful for ephemeral scripted sessions
|
docs ↗ | ||
| CLAUDE_CODE_SKIP_VERTEX_AUTH | string |
Skip Google authentication for Google Cloud's Agent Platform (for example, when using an LLM gateway)
|
docs ↗ | ||
| CLAUDE_CODE_STOP_HOOK_BLOCK_CAP | string |
Maximum number of consecutive times a Stop or SubagentStop hook may block the turn from ending before Claude Code overrides it and ends the turn anyway (default: 8). Set to `0` to disable the cap. Raise this if your hook legitimately needs more iterations to resolve
|
docs ↗ | ||
| CLAUDE_CODE_SUBAGENT_MODEL | string |
The default model for subagents, agent team teammates, and workflow agents that aren't assigned a model another way. Accepts an alias such as `haiku` or a full model name. Two sources take precedence over it: a model Claude passes when it spawns the agent, and a `model` field in the agent's definition, including `inherit`. To change that, set `CLAUDE_CODE_SUBAGENT_MODEL_FORCE`. See Choose a model for the full order. Setting it to `inherit` is the same as leaving it unset. Before v2.1.251, this variable overrode both the per-invocation model and the definition's `model` field
|
docs ↗ | ||
| CLAUDE_CODE_SUBAGENT_MODEL_FORCE | string |
Set to `1` to force one model onto subagents, teammates, and workflow agents. Run every subagent on one model says which model that is. Requires Claude Code v2.1.257 or later
|
docs ↗ | ||
| CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL | string |
Set `5m` or `1h`, the only values Claude Code accepts, to choose the prompt cache TTL for requests outside the main conversation, such as subagents, workflows, and background work. Takes precedence over the `subagentPromptCacheTtl` setting and over `ENABLE_PROMPT_CACHING_1H`, and `FORCE_PROMPT_CACHING_5M` overrides it. The API bills 1-hour cache writes at a higher rate. Requires Claude Code v2.1.242 or later
|
docs ↗ | ||
| CLAUDE_CODE_SUBPROCESS_ENV_SCRUB | string |
Set to `1` to strip credentials from subprocess environments (Bash tool, hooks, MCP stdio servers): Anthropic and cloud provider credentials, any other variable that Claude Code recognizes as a credential, and credentials embedded in package registry URLs. The parent Claude process keeps these credentials for API calls, but child processes cannot read them, reducing exposure to prompt injection attacks that attempt to exfiltrate secrets via shell expansion. On Linux, this also runs Bash subprocesses in an isolated PID namespace so they cannot read host process environments via `/proc`; as a side effect, `ps`, `pgrep`, and `kill` cannot see or signal host processes. `claude-code-action` sets this automatically when `allowed_non_write_users` is configured
|
docs ↗ | ||
| CLAUDE_CODE_SYNC_PLUGIN_INSTALL | string |
Set to `1` in non-interactive mode (the `-p` flag) to wait for plugin installation to complete before the first query. Without this, plugins install in the background and may not be available on the first turn. Combine with `CLAUDE_CODE_SYNC_PLUGIN_INSTALL_TIMEOUT_MS` to bound the wait
|
docs ↗ | ||
| CLAUDE_CODE_SYNC_PLUGIN_INSTALL_TIMEOUT_MS | string |
Timeout in milliseconds for synchronous plugin installation. When exceeded, Claude Code proceeds without plugins and logs an error. No default: without this variable, synchronous installation waits until complete
|
docs ↗ | ||
| CLAUDE_CODE_SYNC_SKILLS | string |
Set to `1` to download your enabled claude.ai skills into `~/.claude/skills/synced/` and resync every 10 minutes. Before it runs the first query, Claude Code waits up to `CLAUDE_CODE_SYNC_SKILLS_WAIT_TIMEOUT_MS` for the list of your skills. The downloads themselves finish in the background, and Claude waits for a skill's download when it invokes that skill. The `synced` folder name is reserved for this download. Before v2.1.227, the skills downloaded into `~/.claude/skills/` directly. Applies only in non-interactive mode with the `-p` flag. Requires claude.ai authentication. Claude Code on the web sessions receive your enabled claude.ai skills automatically; you don't need to set this there. Claude Code applies extra rules to the downloaded skills, such as not running their `!` commands on your machine
|
docs ↗ | ||
| CLAUDE_CODE_SYNC_SKILLS_INSTALL_TIMEOUT_MS | string |
Timeout in milliseconds for a mid-session skills resync when `CLAUDE_CODE_SYNC_SKILLS` is set (default: 30000). Bounds the download triggered when the host requests a skill reload during the session. When exceeded, the resync stops and remaining downloads continue in the background
|
docs ↗ | ||
| CLAUDE_CODE_SYNC_SKILLS_WAIT_TIMEOUT_MS | string |
Timeout in milliseconds for the first query to wait for the initial skill list when `CLAUDE_CODE_SYNC_SKILLS` is set (default: 5000). When exceeded, the first query runs with whichever skills have arrived. The downloads finish in the background either way, and Claude waits for a skill's download when it invokes that skill
|
docs ↗ | ||
| CLAUDE_CODE_SYNTAX_HIGHLIGHT | string |
Set to `false` to disable syntax highlighting in diff output. Useful when colors interfere with your terminal setup. To also disable highlighting in code blocks and file previews, use the `syntaxHighlightingDisabled` setting
|
docs ↗ | ||
| CLAUDE_CODE_TASK_LIST_ID | string |
Share a task list across sessions. Set the same ID in multiple Claude Code instances to coordinate on a shared task list, in sessions that have the Task tools. See Task list
|
docs ↗ | ||
| CLAUDE_CODE_TEAM_TEARDOWN_PARK_TIMEOUT_MS | string |
Override, in milliseconds, how long a non-interactive session waits at exit for its agent team to finish tearing down. Accepts 1000 to 60000; an out-of-range value is ignored and the default of 10000 applies. Requires Claude Code v2.1.206 or later
|
docs ↗ | ||
| CLAUDE_CODE_TMPDIR | string |
Override the temp directory used for internal temp files. Claude Code appends `/claude-{uid}/` on Unix or `/claude/` on Windows to this path. Default: `/tmp` on macOS, `os.tmpdir()` on Linux and Windows. As of v2.1.161, on macOS and Linux, sandboxed Bash subprocesses receive a short fallback `$TMPDIR` under the system default when your override is a long path, since some tools fail when temp paths get too long. Unsandboxed Bash commands inherit your shell's `$TMPDIR` unchanged. Claude Code's own temp files always use your override. Set it in your shell, user settings, or managed settings. Ignored in project and local settings
|
docs ↗ | ||
| CLAUDE_CODE_TMUX_TRUECOLOR | string |
Set to any non-empty value, such as `1`, to allow 24-bit truecolor output inside tmux. **Setting it to `0` or `false` still allows truecolor**, unlike most on/off variables; unset the variable to restore the 256-color clamp. By default, Claude Code clamps to 256 colors when `$TMUX` is set because tmux does not pass through truecolor escape sequences unless configured to. Set this after adding `set -ga terminal-overrides ',*:Tc'` to your `~/.tmux.conf`. See Terminal configuration for other tmux settings
|
docs ↗ | ||
| CLAUDE_CODE_TOOL_MEMORY_CGROUP_EXCLUDE | string |
On Linux and WSL, set to a comma-separated list of the kinds of processes Claude Code excludes from the tool memory cap, such as `mcp` or `lsp`. Set `none` to cap every kind, or `all-new` to cap only Bash, PowerShell, and Monitor tool commands. Claude Code keeps Bash, PowerShell, and Monitor tool commands under the cap whatever you list. Requires Claude Code v2.1.246 or later
|
docs ↗ | ||
| CLAUDE_CODE_TOOL_MEMORY_LIMIT | string |
On Linux and WSL, set to a size such as `4G` to cap the memory that Bash and PowerShell tool commands can use, and Monitor tool commands on v2.1.246 or later. Write the size in plain digits, alone for a number of bytes or with a `K`, `M`, `G`, or `T` suffix. Set `0` or `off` to turn the cap off. Once the first process Claude Code starts has turned the cap on or off, a changed value takes effect the next time you launch `claude`. Requires Claude Code v2.1.233 or later
|
docs ↗ | ||
| CLAUDE_CODE_USER_DIALOG_TIMEOUT_MS | string |
Deadline in milliseconds for dialogs Claude Code forwards to a remote client, such as a Remote Control or SDK host, and for the approval dialog for a held cross-session message, before Claude Code cancels them; permission prompts and `AskUserQuestion` questions use their own flows and aren't governed by it. Also bounds the mid-session Fable usage-credits consent prompt in a session that may be running unattended. Control inbound messages and non-interactive sessions cover the full held-message expiry rules, including the cases where the deadline doesn't apply. Overrides the `dialogExpiry` setting; `0` or a negative value disables the deadline
|
docs ↗ | ||
| CLAUDE_CODE_USE_ANTHROPIC_AWS | string |
Use Claude Platform on AWS
|
docs ↗ | ||
| CLAUDE_CODE_USE_BEDROCK | string |
Use Amazon Bedrock
|
docs ↗ | ||
| CLAUDE_CODE_USE_FOUNDRY | string |
Use Microsoft Foundry
|
docs ↗ | ||
| CLAUDE_CODE_USE_MANTLE | string |
Use the Amazon Bedrock Mantle endpoint
|
docs ↗ | ||
| CLAUDE_CODE_USE_NATIVE_FILE_SEARCH | string |
Set to `1` to discover custom commands, subagents, and output styles using Node.js file APIs instead of ripgrep. Set this if the bundled ripgrep binary is unavailable or blocked in your environment. Does not affect the Grep or file search tools
|
docs ↗ | ||
| CLAUDE_CODE_USE_POWERSHELL_TOOL | string |
Controls the PowerShell tool. On Windows without Git Bash, the tool is enabled automatically; set to `0` to disable it. On Windows with Git Bash installed, the tool is on by default for claude.ai and Console accounts; set to `1` to enable it in Amazon Bedrock, Google Cloud's Agent Platform, and Microsoft Foundry sessions, or `0` to turn it off. On Linux, macOS, and WSL, set to `1` to enable it, which requires `pwsh` on your `PATH`. When enabled on Windows, Claude can run PowerShell commands natively instead of routing through Git Bash. See PowerShell tool
|
docs ↗ | ||
| CLAUDE_CODE_USE_VERTEX | string |
Use Google Cloud's Agent Platform
|
docs ↗ | ||
| CLAUDE_CODE_WEBFETCH_CACHE_TTL_MS | string |
Set to the number of milliseconds WebFetch keeps each fetched URL's response cached. The default is `900000`, which is 15 minutes. Takes plain digits only; `0`, a decimal, or any other spelling keeps the default. Claude Code reads the value once per launch, so a change in a settings `env` block applies when you next launch `claude`. Requires Claude Code v2.1.233 or later
|
docs ↗ | ||
| CLAUDE_CODE_WORKFLOW_PREFIX_STAGGER_MS | string |
Upper bound in milliseconds on how long a workflow agent waits for a same-prefix sibling's first response to begin before sending its own first request. When a fan-out starts several agents that share a prompt-cache prefix, Claude Code holds all but the first agent for up to this long so the rest read the cached prefix instead of each processing it uncached. Default `5000`. Set to `0` to disable the wait. When `DISABLE_PROMPT_CACHING` is set, agents never wait. Requires Claude Code v2.1.229 or later
|
docs ↗ | ||
| CLAUDE_CONFIG_DIR | string |
Override the configuration directory (default: `~/.claude`). All settings, session history, and plugins are stored under this path. For credentials, see where Claude Code stores credentials. Useful for running multiple accounts side by side: for example, `alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude'`. Set it in your shell, user settings, or managed settings. Ignored in project and local settings
|
docs ↗ | ||
| CLAUDE_DISABLE_ADOPT | string |
Set to `1` to stop in-flight background work instead of carrying it over when you background a session by pressing `←` or with `/background`. Claude Code asks you to confirm before backgrounding, then stops the tasks that would otherwise carry over. Requires Claude Code v2.1.195 or later
|
docs ↗ | ||
| CLAUDE_EFFORT | string |
Set automatically in Bash tool subprocesses and hook commands to the effort level in effect when the subprocess starts: `low`, `medium`, `high`, `xhigh`, or `max`. Ultracode is not a distinct level and reports as `xhigh`. Matches the `effort.level` field passed to hooks. Only set when the current model supports the effort parameter
|
docs ↗ | ||
| CLAUDE_ENABLE_BYTE_WATCHDOG | string |
Set to `1` to force-enable the byte-level streaming idle watchdog, or set to `0` to force-disable it. `0` also turns off the first-byte deadline on the connections where that deadline runs. When unset, the watchdog is enabled by default for direct Anthropic API and Claude Platform on AWS connections, and for streaming responses on gateway connections reached through `ANTHROPIC_BASE_URL` or `ANTHROPIC_AWS_BASE_URL`; before v2.1.222 it didn't run on those gateway connections, so the event-level watchdog could report a stall there even while keep-alive pings were arriving. For timeouts and how the timers interact, see Streaming idle watchdogs
|
docs ↗ | ||
| CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCK | string |
Set to `1` to enable the byte-level streaming idle watchdog on Amazon Bedrock `vnd.amazon.eventstream` responses, which also enables the first-byte deadline on Bedrock streaming requests. Off by default. Configure the timeout with `CLAUDE_STREAM_IDLE_TIMEOUT_MS`
|
docs ↗ | ||
| CLAUDE_ENABLE_STREAM_WATCHDOG | string |
Set to `0` to force-disable the event-level streaming idle watchdog, or set to `1` to force-enable it. When unset, the watchdog is on by default for all providers. Before v2.1.196, the unset default was server-controlled on the direct Anthropic API and off on other providers. Configure the timeout with `CLAUDE_STREAM_IDLE_TIMEOUT_MS`; for the other stall timers that run alongside this one, see Streaming idle watchdogs
|
docs ↗ | ||
| CLAUDE_ENV_FILE | string |
Path to a shell script whose contents Claude Code runs before each Bash command in the same shell process, so exports in the file are visible to the command. Use to persist virtualenv or conda activation across commands. Also populated dynamically by SessionStart, Setup, CwdChanged, and FileChanged hooks
|
docs ↗ | ||
| CLAUDE_PID | string |
Claude Code sets this to its own process ID in the subprocesses it spawns: Bash and PowerShell tool commands and hook commands. On Linux, the Bash tool's shell integration uses it to refuse a `pkill` pattern that would match the Claude Code process itself; see the error reference. Read it from your own scripts to identify or signal the parent Claude Code process deliberately. Requires Claude Code v2.1.214 or later
|
docs ↗ | ||
| CLAUDE_REMOTE_CONTROL_SESSION_NAME_PREFIX | string |
Prefix for auto-generated Remote Control session names when no explicit name is provided. Defaults to your machine's hostname, producing names like `myhost-graceful-unicorn`. The `--remote-control-session-name-prefix` CLI flag sets the same value for a single invocation
|
docs ↗ | ||
| CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS | string |
Deadline in milliseconds for the first response byte of a streaming request, on the connections where the first-byte deadline runs. For how Claude Code clamps it, the extra time it adds for large request bodies, and how it picks the deadline when you leave this unset, see No response from API. Requires Claude Code v2.1.242 or later
|
docs ↗ | ||
| CLAUDE_STREAM_IDLE_TIMEOUT_MS | string |
Timeout in milliseconds before the event- and byte-level streaming idle watchdogs close a stalled connection. When you set this variable explicitly, the minimum is `300000` (5 minutes); lower values are silently clamped to absorb extended thinking pauses and proxy buffering, and the byte-level watchdog caps the value at 30 minutes. `CLAUDE_BYTE_STREAM_IDLE_TIMEOUT_MS` takes precedence over this variable for the byte-level watchdog. For the per-watchdog unset defaults, see Streaming idle watchdogs
|
docs ↗ | ||
| CLAUDE_SUBAGENT_BG_SHELL_MAX_MS | string |
Maximum lifetime in milliseconds for a background shell command that a subagent started. Default `3600000` (60 minutes). When you set `0`, Claude Code applies the default instead of removing the cap. When the subagent runs in the foreground, Claude Code also ends the command when that subagent gives its final response, regardless of this cap. See the background command lifetime rules. Claude Code doesn't cap main-session background commands this way. For the memory-pressure limit that covers them, see How backgrounding works
|
docs ↗ | ||
| DEBUG | string |
Set to `1` to enable debug mode, equivalent to launching with `--debug`. Debug logs are written to `~/.claude/debug/<session-id>.txt`, or to the path set by `CLAUDE_CODE_DEBUG_LOGS_DIR`. Only the truthy values `1`, `true`, `yes`, and `on` enable debug mode, so namespace patterns like `DEBUG=express:*` set for other tools do not trigger it
|
docs ↗ | ||
| DISABLE_AUTOUPDATER | string |
Set to `1` to disable automatic background updates. Manual `claude update` still works. Use `DISABLE_UPDATES` to block both
|
docs ↗ | ||
| DISABLE_AUTO_COMPACT | string |
Set to `1` to disable automatic compaction when approaching the context limit. The manual `/compact` command remains available. Use when you want explicit control over when compaction occurs. Overrides the `autoCompactEnabled` setting
|
docs ↗ | ||
| DISABLE_COMPACT | string |
Set to `1` to disable all compaction: both automatic compaction and the manual `/compact` command
|
docs ↗ | ||
| DISABLE_COST_WARNINGS | string |
Set to `1` to disable cost warning messages
|
docs ↗ | ||
| DISABLE_DOCTOR_COMMAND | string |
Set to `1` to hide the `/doctor` setup checkup skill and its `/checkup` alias. Useful for managed deployments where users shouldn't run setup diagnostics from a session. Doesn't affect the `claude doctor` terminal command. Before v2.1.205, this variable hid the `/doctor` diagnostics screen command
|
docs ↗ | ||
| DISABLE_ERROR_REPORTING | string |
Set to any non-empty value, such as `1`, to opt out of error reporting. **Setting it to `0` or `false` still opts out**, unlike most on/off variables; unset the variable to turn error reporting back on
|
docs ↗ | ||
| DISABLE_EXTRA_USAGE_COMMAND | string |
Set to `1` to hide the `/usage-credits` command that lets users purchase additional usage beyond rate limits
|
docs ↗ | ||
| DISABLE_FEEDBACK_COMMAND | string |
Set to `1` to disable the `/feedback` command and Claude-drafted feedback. Also disables `/bug` and `/share`, which report through the same path; before v2.1.212 they were aliases of `/feedback`, so the command was disabled under every name. The older name `DISABLE_BUG_COMMAND` is also accepted
|
docs ↗ | ||
| DISABLE_GROWTHBOOK | string |
Set to `1` or `true` to disable GrowthBook feature-flag fetching and use code defaults for every flag. This makes Remote Control and the other features that need feature-flag fetching unavailable. Setting it to `0` or `false` leaves fetching on. Telemetry event logging stays on unless `DISABLE_TELEMETRY` is also set
|
docs ↗ | ||
| DISABLE_INSTALLATION_CHECKS | string |
Set to `1` to disable installation warnings. Use only when manually managing the installation location, as this can mask issues with standard installations
|
docs ↗ | ||
| DISABLE_INSTALL_GITHUB_APP_COMMAND | string |
Set to `1` to hide the `/install-github-app` command. Already hidden when using third-party providers (Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry)
|
docs ↗ | ||
| DISABLE_INTERLEAVED_THINKING | string |
Set to `1` to prevent sending the interleaved-thinking beta header. Useful when your LLM gateway or provider does not support interleaved thinking
|
docs ↗ | ||
| DISABLE_LOGIN_COMMAND | string |
Set to `1` to hide the `/login` command. Useful when authentication is handled externally via API keys or `apiKeyHelper`
|
docs ↗ | ||
| DISABLE_LOGOUT_COMMAND | string |
Set to `1` to hide the `/logout` command
|
docs ↗ | ||
| DISABLE_PROMPT_CACHING | string |
Set to `1` to disable prompt caching for all models (takes precedence over per-model settings)
|
docs ↗ | ||
| DISABLE_PROMPT_CACHING_FABLE | string |
Set to `1` to disable prompt caching for Fable models
|
docs ↗ | ||
| DISABLE_PROMPT_CACHING_HAIKU | string |
Set to `1` to disable prompt caching for Haiku models
|
docs ↗ | ||
| DISABLE_PROMPT_CACHING_OPUS | string |
Set to `1` to disable prompt caching for Opus models
|
docs ↗ | ||
| DISABLE_PROMPT_CACHING_SONNET | string |
Set to `1` to disable prompt caching for Sonnet models
|
docs ↗ | ||
| DISABLE_TELEMETRY | string |
Set to any non-empty value, such as `1`, to opt out of telemetry. **Setting it to `0` or `false` still opts out**, unlike most on/off variables; unset the variable to turn telemetry back on. Telemetry events don't include user data like code, file paths, or bash commands. Also disables feature-flag fetching with the same effect as `DISABLE_GROWTHBOOK`, which makes Remote Control and the other features that need feature-flag fetching unavailable. See Turn telemetry off for your organization
|
docs ↗ | ||
| DISABLE_UPDATES | string |
Set to `1` to block all updates including manual `claude update` and `claude install`. Stricter than `DISABLE_AUTOUPDATER`. Use when distributing Claude Code through your own channels and users should not self-update
|
docs ↗ | ||
| DISABLE_UPGRADE_COMMAND | string |
Set to `1` to hide the `/upgrade` command
|
docs ↗ | ||
| DO_NOT_TRACK | string |
Set to `1` to opt out of telemetry, with the same effect as `DISABLE_TELEMETRY`, including making Remote Control and the other features that need feature-flag fetching unavailable. Claude Code reads this variable as a standard boolean, so `0` leaves telemetry on, and honors it as the cross-tool convention recognized by many developer CLIs
|
docs ↗ | ||
| ENABLE_BETA_TRACING_DETAILED | string |
Set to `1`, together with `BETA_TRACING_ENDPOINT`, to turn on detailed beta tracing, which adds content-bearing span attributes and the `claude_code.hook` span. Interactive CLI sessions also require your organization to be allowlisted for the beta. Both variables are ignored in project and local settings
|
docs ↗ | ||
| ENABLE_CLAUDEAI_MCP_SERVERS | string |
Set to `false` to stop Claude Code from fetching claude.ai MCP servers. Enabled by default for logged-in users. To disable per-project or per-org, set `disableClaudeAiConnectors` in settings instead
|
docs ↗ | ||
| ENABLE_PROMPT_CACHING_1H | string |
Set to `1` to request a 1-hour prompt cache TTL instead of the default 5 minutes. Intended for API key, Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry, and Claude Platform on AWS users. Subscription users within included usage receive the 1-hour TTL automatically on the main conversation. Subscription users drawing on usage credits can set it to keep the 1-hour TTL. 1-hour cache writes are billed at a higher rate. To choose the TTL per request bucket instead, use `CLAUDE_CODE_PROMPT_CACHE_TTL` and `CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL`, which take precedence over this variable
|
docs ↗ | ||
| ENABLE_PROMPT_CACHING_1H_BEDROCK | string |
Deprecated. Use `ENABLE_PROMPT_CACHING_1H` instead
|
docs ↗ | ||
| ENABLE_TOOL_SEARCH | string |
Controls MCP tool search. Unset, Claude Code defers all MCP tools by default. It still loads them upfront on Google Cloud's Agent Platform models earlier than the Claude 4.5 generation, on a Microsoft Foundry deployment hosted on Azure, and when `ANTHROPIC_BASE_URL` points to a non-first-party host. `true` always defers and sends the beta header, except on those same Agent Platform models and Microsoft Foundry deployments; requests fail on proxies that don't support `tool_reference`. `auto` loads upfront when tool definitions fit within 10% of context. `auto:N` sets a custom threshold, such as `auto:5` for 5%. `false` loads all tools upfront. A value you set yourself is ignored when `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` is set. Before v2.1.221, Claude Code disabled tool search for all models on Google Cloud's Agent Platform unless you set this variable to `true`
|
docs ↗ | ||
| FALLBACK_FOR_ALL_PRIMARY_MODELS | string |
Set to any non-empty value, such as `1`, to make every model stop retrying with a repeated-overload error when no fallback model is configured. **Setting it to `0` or `false` still enables this**, unlike most on/off variables; unset the variable to restore the default retry behavior. Without it, models Claude Code recognizes as Opus, Fable, or Mythos models stop retrying this way when you authenticate with an API key or a third-party provider rather than a Claude subscription. As of v2.1.160, a configured fallback model chain triggers on repeated overload errors for any primary model, so this variable does not affect switching to a fallback model
|
docs ↗ | ||
| FORCE_AUTOUPDATE_PLUGINS | string |
Set to `1` to force plugin auto-updates even when the main auto-updater is disabled via `DISABLE_AUTOUPDATER`
|
docs ↗ | ||
| FORCE_HYPERLINK | string |
Set to `1` to enable clickable OSC 8 hyperlinks when your terminal supports them but isn't auto-detected, or `0` to disable them. When unset, Claude Code enables hyperlinks only when it detects terminal support. Claude Code parses this value as a number, not a Boolean, so a value such as `false`, `no`, or `off` enables hyperlinks rather than disabling them. Claude Code renders the footer PR or merge request badge as a hyperlink even when it can't detect terminal support, such as over SSH. Set `0` to render the badge as plain text
|
docs ↗ | ||
| FORCE_PROMPT_CACHING_5M | string |
Set to `1` to force the 5-minute prompt cache TTL even when 1-hour TTL would otherwise apply. Overrides `CLAUDE_CODE_PROMPT_CACHE_TTL`, `CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL`, `ENABLE_PROMPT_CACHING_1H`, and the `promptCacheTtl` and `subagentPromptCacheTtl` settings
|
docs ↗ | ||
| HTTPS_PROXY | string |
Specify HTTPS proxy server for network connections
|
docs ↗ | ||
| HTTP_PROXY | string |
Specify HTTP proxy server for network connections
|
docs ↗ | ||
| IS_DEMO | string |
Set to any non-empty value, such as `1`, to enable demo mode: hides your email and organization name from the header and `/status` output, and skips onboarding. **Setting it to `0` or `false` still enables demo mode**, unlike most on/off variables; unset the variable to turn it off. Useful when streaming or recording a session
|
docs ↗ | ||
| MAX_MCP_OUTPUT_TOKENS | string |
Maximum number of tokens allowed in MCP tool responses. Claude Code displays a warning when output exceeds 10,000 tokens. Tools that declare `anthropic/maxResultSizeChars` use that character limit for text content instead, but image content from those tools is still subject to this variable (default: 25000)
|
docs ↗ | ||
| MAX_STRUCTURED_OUTPUT_RETRIES | string |
Number of times Claude Code retries when the model's response fails validation against the `--json-schema` in non-interactive mode with the `-p` flag. The same retry count applies when a workflow subagent's structured output fails validation. Defaults to 5
|
docs ↗ | ||
| MAX_THINKING_TOKENS | string |
Fixed token budget for extended thinking. Claude Code caps it at one token below the request's max output tokens and never below 1,024; see `CLAUDE_CODE_MAX_OUTPUT_TOKENS` for how that limit is set. When unset and thinking is enabled, models with adaptive reasoning choose their own thinking depth, and other models use the cap. Set to `0` to disable thinking on the Anthropic API, except on Fable models, which can't have thinking turned off; on third-party providers, `0` omits the `thinking` parameter instead. With thinking turned off on the Anthropic API, Claude Code sends effort `high` instead of a higher level to models it knows don't accept that combination, such as Opus 5. Nonzero values are ignored on adaptive reasoning models unless `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` is set
|
docs ↗ | ||
| MCP_CLIENT_SECRET | string |
OAuth client secret for MCP servers that require pre-configured credentials. Avoids the interactive prompt when adding a server with `--client-secret`
|
docs ↗ | ||
| MCP_CONNECTION_NONBLOCKING | string |
Controls whether startup waits for MCP servers to connect before the first query. MCP startup is non-blocking by default: servers connect in the background and their tools become available as they finish. Set to `0` to make Claude Code wait for servers to connect before the first query. Servers configured with `alwaysLoad: true` still make startup wait regardless, except when served from the discovery cache, since their tools must be present when the first prompt is built. In non-interactive mode (`-p`), Claude Code also waits for still-pending servers before the first turn regardless of this variable, with a longer deadline when you pass `--mcp-config` explicitly; see that flag's entry for the cached-server exception
|
docs ↗ | ||
| MCP_CONNECT_TIMEOUT_MS | string |
How long blocking MCP startup waits, in milliseconds, for the connection batch before snapshotting the tool list (default: 5000). Applies when `MCP_CONNECTION_NONBLOCKING=0` or for servers marked `alwaysLoad: true`. Servers still pending at the deadline keep connecting in the background. Distinct from `MCP_TIMEOUT`, which bounds an individual server's connect attempt
|
docs ↗ | ||
| MCP_DISCOVERY_CACHE | string |
Turns the MCP discovery cache on or off. With the cache on, a remote HTTP or SSE server you've used before can show the `cached` status, and Claude Code connects it on its first tool call instead of at startup. The cache is off by default unless a gradual rollout has enabled it for your account. Set to `1` to turn it on, or `0` to keep it off even when the rollout has enabled it. Before v2.1.238, the cache was on by default. The `cached` status requires Claude Code v2.1.221 or later
|
docs ↗ | ||
| MCP_DISCOVERY_CACHE_MAX_STALE_S | string |
Maximum age, in seconds, of a discovery-cache entry (default: 14400, or 4 hours). At a start where the entry is older than that, Claude Code discards it and connects the server at startup, as it does with the cache off. Claude Code caps the value at 7 days. Before v2.1.238, the default was 86400, or 24 hours, and Claude Code didn't cap the value
|
docs ↗ | ||
| MCP_DISCOVERY_CACHE_STRIKES | string |
At a start where a discovery-cache entry is older than `MCP_DISCOVERY_CACHE_TTL_S`, Claude Code refreshes it in the background. This variable sets how many refreshes in a row can fail before Claude Code discards the entry and connects the server at the next start instead (default: 1). Raise it if your network connection drops occasionally, so that one failed refresh doesn't discard the entry. Requires Claude Code v2.1.238 or later
|
docs ↗ | ||
| MCP_DISCOVERY_CACHE_TTL_S | string |
Seconds for which Claude Code uses a discovery-cache entry without refreshing it (default: 900). At a start where the entry is older than that, Claude Code still uses it but refreshes it in the background. Once the entry is older than `MCP_DISCOVERY_CACHE_MAX_STALE_S`, Claude Code discards it instead. Claude Code caps the value at `MCP_DISCOVERY_CACHE_MAX_STALE_S`, which is 4 hours by default. Before v2.1.238, Claude Code didn't cap the value
|
docs ↗ | ||
| MCP_OAUTH_CALLBACK_PORT | string |
Fixed port for the OAuth redirect callback, as an alternative to `--callback-port` when adding an MCP server with pre-configured credentials
|
docs ↗ | ||
| MCP_PROTOCOL_NEGOTIATION | string |
On the v2 MCP client runtime only, whether Claude Code probes servers for MCP protocol revision 2026-07-28. Set `auto` to probe HTTP, claude.ai connector, and stdio servers; a server that doesn't answer the probe connects on the earlier protocol instead, as SSE and WebSocket servers always do. Set `legacy` to skip the probe for every server. Without the variable, Claude Code probes HTTP and claude.ai connector servers on Claude Code v2.1.232 or later, with the exceptions the MCP client runtimes section lists. Any other value is ignored with a warning in the debug log. Requires Claude Code v2.1.221 or later
|
docs ↗ | ||
| MCP_REMOTE_SERVER_CONNECTION_BATCH_SIZE | string |
Maximum number of remote MCP servers (HTTP/SSE) to connect in parallel during startup (default: 20)
|
docs ↗ | ||
| MCP_SDK_GENERATION | string |
Pin which MCP client runtime this process connects to MCP servers with: `v1`, built on MCP TypeScript SDK 1.x, or `v2`, built on MCP TypeScript SDK 2.0. Without the variable, Claude Code uses v2 on Claude Code v2.1.232 or later, except where that section says it uses v1. On Claude Code v2.1.221 or later, the v2 runtime checks the issuer an MCP OAuth server returns in its authorization response and fails the sign-in with an error that begins `Issuer mismatch in authorization response` when it doesn't match. The v1 runtime doesn't run this check. If you set an unrecognized value, Claude Code ignores it and writes a warning to the debug log. Claude Code reads the value once per process. Requires Claude Code v2.1.218 or later
|
docs ↗ | ||
| MCP_SERVER_CONNECTION_BATCH_SIZE | string |
Maximum number of local MCP servers (stdio) to connect in parallel during startup (default: 3)
|
docs ↗ | ||
| MCP_TIMEOUT | string |
Timeout in milliseconds for MCP server startup (default: 30000, or 30 seconds)
|
docs ↗ | ||
| MCP_TOOL_TIMEOUT | string |
Timeout in milliseconds for MCP tool execution (default: 100000000, about 28 hours). For an HTTP, SSE, or claude.ai connector server, each request also times out after 60 seconds by default; set this variable, or the per-server `timeout`, above 60000 to raise that per-request limit. A lower value still shortens the overall tool-execution timeout but leaves the per-request limit at 60 seconds. Stdio and WebSocket servers have no per-request timer. A per-server `timeout` field in `.mcp.json` overrides this for that server. A per-server `timeout` of at least 1000 also sets the minimum idle window for that server's tool calls, so `CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT` never aborts them sooner; this floor requires Claude Code v2.1.203 or later. For the env variable, values below 1000 are floored to one second; for the per-server field, values below 1000 are ignored
|
docs ↗ | ||
| NO_PROXY | string |
List of domains and IPs to which requests will be directly issued, bypassing proxy
|
docs ↗ | ||
| OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT | string |
Standard OpenTelemetry SDK limit on attribute value length. Claude Code caps content-bearing telemetry attributes at the smaller of this and `CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH`, so the truncation marker stays within the SDK limit. Claude Code reads the `OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT` and `OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT` variants the same way, and the smallest set value applies to all signals. Requires Claude Code v2.1.214 or later. See Monitoring
|
docs ↗ | ||
| OTEL_LOG_ASSISTANT_RESPONSES | string |
Set to `1` to include the model's response text on `assistant_response` OpenTelemetry log events. When unset, the value of `OTEL_LOG_USER_PROMPTS` is used instead. Set to `0` to keep responses redacted even when `OTEL_LOG_USER_PROMPTS` is set. Requires Claude Code v2.1.193 or later. See Monitoring
|
docs ↗ | ||
| OTEL_LOG_RAW_API_BODIES | string |
Emit Anthropic Messages API request and response JSON as `api_request_body` / `api_response_body` log events. Set to `1` for inline bodies truncated at the content limit, or `file:<dir>` to write untruncated bodies to disk and emit a `body_ref` path instead. `CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH` configures the content limit, 60 KB by default. Disabled by default; bodies include the entire conversation history. Set it in your shell, user settings, or managed settings. Ignored in project and local settings. See Monitoring
|
docs ↗ | ||
| OTEL_LOG_TOOL_CONTENT | string |
Set to `1` to include tool input and output content in OpenTelemetry span events. Disabled by default to protect sensitive data. See Monitoring
|
docs ↗ | ||
| OTEL_LOG_TOOL_DETAILS | string |
Set to `1` to include tool input arguments, MCP server names, user-authored workflow names, raw error strings on tool failures, the refusal `category` on `api_refusal` events, and other tool details in OpenTelemetry traces and logs. Disabled by default to protect PII. See Monitoring
|
docs ↗ | ||
| OTEL_LOG_USER_PROMPTS | string |
Set to `1` to include user prompt text in OpenTelemetry traces and logs. Disabled by default (prompts are redacted). See Monitoring
|
docs ↗ | ||
| OTEL_METRICS_INCLUDE_ACCOUNT_UUID | string |
Set to `false` to exclude account UUID from metrics attributes (default: included). See Monitoring
|
docs ↗ | ||
| OTEL_METRICS_INCLUDE_ENTRYPOINT | string |
Set to `true` to include the session entrypoint in metrics attributes (default: excluded). Added in v2.1.152. See Monitoring
|
docs ↗ | ||
| OTEL_METRICS_INCLUDE_RESOURCE_ATTRIBUTES | string |
As of v2.1.161, Claude Code attaches `OTEL_RESOURCE_ATTRIBUTES` keys to metric datapoint labels. Set to `false` to exclude them (default: included). See Monitoring
|
docs ↗ | ||
| OTEL_METRICS_INCLUDE_SESSION_ID | string |
Set to `false` to exclude session ID from metrics attributes (default: included). See Monitoring
|
docs ↗ | ||
| OTEL_METRICS_INCLUDE_VERSION | string |
Set to `true` to include Claude Code version in metrics attributes (default: excluded). See Monitoring
|
docs ↗ | ||
| SLASH_COMMAND_TOOL_CHAR_BUDGET | string |
Override the character budget for skill metadata shown to the Skill tool. The budget scales dynamically at 1% of the context window, with a fallback of 8,000 characters. Legacy name kept for backwards compatibility
|
docs ↗ | ||
| TASK_MAX_OUTPUT_LENGTH | string |
Maximum number of characters in subagent output before truncation (default: 32000, maximum: 160000). When truncated, the full output is saved to disk and the path is included in the truncated response
|
docs ↗ | ||
| USE_BUILTIN_RIPGREP | string |
Set to `0` to use system-installed `rg` instead of `rg` included with Claude Code
|
docs ↗ | ||
| VERTEX_REGION_CLAUDE_3_5_HAIKU | string |
Override region for Claude 3.5 Haiku when using Google Cloud's Agent Platform
|
docs ↗ | ||
| VERTEX_REGION_CLAUDE_3_5_SONNET | string |
Override region for Claude 3.5 Sonnet when using Google Cloud's Agent Platform
|
docs ↗ | ||
| VERTEX_REGION_CLAUDE_3_7_SONNET | string |
Override region for Claude 3.7 Sonnet when using Google Cloud's Agent Platform
|
docs ↗ | ||
| VERTEX_REGION_CLAUDE_4_0_OPUS | string |
Override region for Claude 4.0 Opus when using Google Cloud's Agent Platform
|
docs ↗ | ||
| VERTEX_REGION_CLAUDE_4_0_SONNET | string |
Override region for Claude 4.0 Sonnet when using Google Cloud's Agent Platform
|
docs ↗ | ||
| VERTEX_REGION_CLAUDE_4_1_OPUS | string |
Override region for Claude 4.1 Opus when using Google Cloud's Agent Platform
|
docs ↗ | ||
| VERTEX_REGION_CLAUDE_4_5_OPUS | string |
Override region for Claude Opus 4.5 when using Google Cloud's Agent Platform
|
docs ↗ | ||
| VERTEX_REGION_CLAUDE_4_5_SONNET | string |
Override region for Claude Sonnet 4.5 when using Google Cloud's Agent Platform
|
docs ↗ | ||
| VERTEX_REGION_CLAUDE_4_6_OPUS | string |
Override region for Claude Opus 4.6 when using Google Cloud's Agent Platform
|
docs ↗ | ||
| VERTEX_REGION_CLAUDE_4_6_SONNET | string |
Override region for Claude Sonnet 4.6 when using Google Cloud's Agent Platform
|
docs ↗ | ||
| VERTEX_REGION_CLAUDE_4_7_OPUS | string |
Override region for Claude Opus 4.7 when using Google Cloud's Agent Platform
|
docs ↗ | ||
| VERTEX_REGION_CLAUDE_4_8_OPUS | string |
Override region for Claude Opus 4.8 when using Google Cloud's Agent Platform. Added in v2.1.154
|
docs ↗ | ||
| VERTEX_REGION_CLAUDE_5_OPUS | string |
Override region for Claude Opus 5 when using Google Cloud's Agent Platform. Added in v2.1.219
|
docs ↗ | ||
| VERTEX_REGION_CLAUDE_5_SONNET | string |
Override region for Claude Sonnet 5 when using Google Cloud's Agent Platform. Added in v2.1.197
|
docs ↗ | ||
| VERTEX_REGION_CLAUDE_FABLE_5 | string |
Override region for Claude Fable 5 when using Google Cloud's Agent Platform. Added in v2.1.170
|
docs ↗ | ||
| VERTEX_REGION_CLAUDE_FABLE_5_1 | string |
Override region for Claude Fable 5.1 when using Google Cloud's Agent Platform. Added in v2.1.255
|
docs ↗ | ||
| VERTEX_REGION_CLAUDE_HAIKU_4_5 | string |
Override region for Claude Haiku 4.5 when using Google Cloud's Agent Platform
|
docs ↗ |