diff --git a/catalog/cli-reference.json b/catalog/cli-reference.json index 27cee14..44ed277 100644 --- a/catalog/cli-reference.json +++ b/catalog/cli-reference.json @@ -1,8 +1,8 @@ { "source": "https://code.claude.com/docs/en/cli-reference.md", - "fetchedAt": "2026-05-18T12:35:00.301Z", - "commandCount": 25, - "flagCount": 64, + "fetchedAt": "2026-10-26T15:56:27.661Z", + "commandCount": 36, + "flagCount": 80, "commands": [ { "name": "cat file | claude -p \"query\"", @@ -41,12 +41,12 @@ }, { "name": "claude agents", - "description": "Open [agent view](/en/agent-view) to monitor and dispatch parallel background sessions. Use `--cwd ` to show only sessions started under that directory", - "example": "`claude agents`" + "description": "Open [agent view](https://code.claude.com/docs/en/agent-view.md) to monitor and dispatch parallel background sessions. Use `--cwd ` to show only sessions started under that directory, or `--json` to print active sessions as a JSON array for scripting (`--json --all` also includes completed background sessions). Pass `--permission-mode`, `--model`, `--effort`, or `--agent` to set [defaults for dispatched sessions](https://code.claude.com/docs/en/agent-view.md#permission-mode-model-and-effort). Accepts `--settings`, `--add-dir`, `--plugin-dir`, and `--mcp-config` like the top-level `claude` command. Opening agent view requires an interactive terminal", + "example": "`claude agents --json`" }, { - "name": "claude attach ", - "description": "Attach to a [background session](/en/agent-view#manage-sessions-from-the-shell) in this terminal", + "name": "claude attach ", + "description": "Attach to a [background session](https://code.claude.com/docs/en/agent-view.md#manage-sessions-from-the-shell) in this terminal. Passing part of a running session's name in place of the ID requires Claude Code v2.1.290 or later", "example": "`claude attach 7c5dcf5d`" }, { @@ -61,67 +61,122 @@ }, { "name": "claude auth status", - "description": "Show authentication status as JSON. Use `--text` for human-readable output. Exits with code 0 if logged in, 1 if not", + "description": "Show authentication status as JSON. Use `--text` for human-readable output. Exits with code 0 if logged in, 1 if not. The JSON includes a `configDirectory` field naming the [configuration directory](https://code.claude.com/docs/en/claude-directory.md) the CLI uses. The field requires Claude Code v2.1.268 or later. The JSON's `authMethod` field is one of `none`, `claude.ai`, `oauth_token`, `api_key`, `api_key_helper`, or `third_party`", "example": "`claude auth status`" }, { "name": "claude auto-mode defaults", - "description": "Print the built-in [auto mode](/en/permission-modes#eliminate-prompts-with-auto-mode) classifier rules as JSON. Use `claude auto-mode config` to see your effective config with settings applied", - "example": "`claude auto-mode defaults > rules.json`" + "description": "Print the built-in [auto mode](https://code.claude.com/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode) classifier rules as JSON. Use `claude auto-mode config` to see your effective config with settings applied. `--label ` prints only the rules whose label starts with that prefix, matched case-insensitively. Requires Claude Code v2.1.208 or later", + "example": "`claude auto-mode defaults --label 'Git Destructive'`" + }, + { + "name": "claude auto-mode reset", + "description": "Restore the default [auto mode](https://code.claude.com/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode) configuration by removing the `autoMode` section from your user settings file. Prompts for confirmation before writing; pass `-y`/`--yes` to skip the prompt. Rules from [managed settings](https://code.claude.com/docs/en/server-managed-settings.md) or the `--settings` flag still apply. Requires Claude Code v2.1.212 or later. See [Inspect the defaults and your effective config](https://code.claude.com/docs/en/auto-mode-config.md#inspect-the-defaults-and-your-effective-config)", + "example": "`claude auto-mode reset --yes`" + }, + { + "name": "claude daemon logs", + "description": "Follow the background-session [supervisor's](https://code.claude.com/docs/en/agent-view.md#the-supervisor-process) log file, `~/.claude/daemon.log`, printing new lines as they arrive until you press `Ctrl+C`", + "example": "`claude daemon logs`" + }, + { + "name": "claude daemon run", + "description": "Run the background-session [supervisor](https://code.claude.com/docs/en/agent-view.md#the-supervisor-process) in the foreground of this terminal, printing its log", + "example": "`claude daemon run`" + }, + { + "name": "claude daemon status", + "description": "Print the background-session [supervisor's](https://code.claude.com/docs/en/agent-view.md#the-supervisor-process) state, version, socket directory, and worker count for diagnostics. Exits 1 if the supervisor isn't running", + "example": "`claude daemon status`" + }, + { + "name": "claude daemon stop --any", + "description": "Stop the background-session [supervisor](https://code.claude.com/docs/en/agent-view.md#the-supervisor-process) and the sessions it hosts. Pass `--keep-workers` to leave background sessions running for the next supervisor to reconnect to. `--any` confirms stopping an on-demand supervisor, which is the default. Use this to recover from an [unresponsive supervisor](https://code.claude.com/docs/en/agent-view.md#agent-view-says-the-background-service-did-not-respond)", + "example": "`claude daemon stop --any --keep-workers`" + }, + { + "name": "claude doctor", + "description": "Print read-only installation and settings diagnostics from the terminal without starting a session, including install health, settings-file validation errors, and Remote Control eligibility. For the in-session setup checkup that can also apply fixes, run [`/doctor`](https://code.claude.com/docs/en/commands#all-commands)", + "example": "`claude doctor`" + }, + { + "name": "claude gateway", + "description": "Start the self-hosted [Claude apps gateway](https://code.claude.com/docs/en/claude-apps-gateway) server, for administrators deploying SSO and policy in front of Claude Code on Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry. Requires `--config` pointing at a [`gateway.yaml`](https://code.claude.com/docs/en/claude-apps-gateway-config).", + "example": "`claude gateway --config gateway.yaml`" + }, + { + "name": "claude import [source]", + "description": "Start an interactive session that runs [`/import`](https://code.claude.com/docs/en/commands#all-commands) to bring configuration from other coding agents into Claude Code. Accepts the same `--dry-run` and `--yes` options as the command. Not available on Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry, or Claude Platform on AWS. Also unavailable when you turn off [feature-flag fetching](https://code.claude.com/docs/en/env-vars.md#features-that-need-feature-flag-fetching). Requires Claude Code v2.1.213 or later", + "example": "`claude import codex --dry-run`" }, { "name": "claude install [version]", - "description": "Install or reinstall the native binary. Accepts a version like `2.1.118`, or `stable` or `latest`. See [Install a specific version](/en/setup#install-a-specific-version)", + "description": "Install or reinstall the native binary. Accepts a version like `2.1.118`, or `stable` or `latest`. See [Install a specific version](https://code.claude.com/docs/en/setup.md#install-a-specific-version)", "example": "`claude install stable`" }, { - "name": "claude logs ", - "description": "Print recent output from a [background session](/en/agent-view#manage-sessions-from-the-shell)", + "name": "claude logs ", + "description": "Print recent output from a [background session](https://code.claude.com/docs/en/agent-view.md#manage-sessions-from-the-shell). Passing part of a session's name in place of the ID requires Claude Code v2.1.290 or later", "example": "`claude logs 7c5dcf5d`" }, { "name": "claude mcp", "description": "Configure Model Context Protocol (MCP) servers", - "example": "See the [Claude Code MCP documentation](/en/mcp)." + "example": "See the [Claude Code MCP documentation](https://code.claude.com/docs/en/mcp.md)." + }, + { + "name": "claude mcp login ", + "description": "Run a configured MCP server's OAuth flow without opening the interactive `/mcp` panel. Works for HTTP, SSE, and claude.ai connector servers. Add `--no-browser` over SSH to print the authorization URL instead of opening a browser. For an HTTP or SSE server, paste the redirect URL back at the prompt. For a claude.ai connector, see [Authorize a connector again from your shell](https://code.claude.com/docs/en/remote-control.md#authorize-a-connector-again-from-your-shell). See [Authenticate from the command line](https://code.claude.com/docs/en/mcp.md#authenticate-from-the-command-line)", + "example": "`claude mcp login sentry`" + }, + { + "name": "claude mcp logout ", + "description": "Clear stored OAuth credentials for an MCP server", + "example": "`claude mcp logout sentry`" }, { "name": "claude plugin", - "description": "Manage Claude Code [plugins](/en/plugins). Alias: `claude plugins`. See [plugin reference](/en/plugins-reference#cli-commands-reference) for subcommands", + "description": "Manage Claude Code [plugins](https://code.claude.com/docs/en/plugins/overview.md). Alias: `claude plugins`. See [plugin reference](https://code.claude.com/docs/en/plugins/cli-reference.md#claude-plugin-commands) for subcommands", "example": "`claude plugin install code-review@claude-plugins-official`" }, { - "name": "claude project purge [path]", - "description": "Delete all local Claude Code state for a project: transcripts, task lists, debug logs, file-edit history, prompt history lines, and the project's entry in `~/.claude.json`. Omit `[path]` to pick from an interactive list. Flags: `--dry-run` to preview, `-y`/`--yes` to skip confirmation, `-i`/`--interactive` to confirm each item, `--all` for every project. See [Clear local data](/en/claude-directory#clear-local-data)", - "example": "`claude project purge ~/work/repo --dry-run`" + "name": "claude purge [path]", + "description": "Delete all local Claude Code state for a project: transcripts, task lists, debug logs, file-edit history, prompt history lines, and the project's entry in `~/.claude.json`. Omit `[path]` to pick from an interactive list. Flags: `--dry-run` to preview, `-y`/`--yes` to skip confirmation, `-i`/`--interactive` to confirm each item, `--all` for every project. See [Clear local data](https://code.claude.com/docs/en/claude-directory.md#clear-local-data)", + "example": "`claude purge ~/work/repo --dry-run`" }, { "name": "claude remote-control", - "description": "Start a [Remote Control](/en/remote-control) server to control Claude Code from Claude.ai or the Claude app. Runs in server mode (no local interactive session). See [Server mode flags](/en/remote-control#start-a-remote-control-session)", + "description": "Start a [Remote Control](https://code.claude.com/docs/en/remote-control.md) server to control Claude Code from Claude.ai or the Claude app. Runs in server mode (no local interactive session). See [Server mode flags](https://code.claude.com/docs/en/remote-control.md#start-a-remote-control-session). After you stop the server, you can bring back the sessions it was serving. See [Resume sessions after stopping the server](https://code.claude.com/docs/en/remote-control.md#resume-sessions-after-stopping-the-server)", "example": "`claude remote-control --name \"My Project\"`" }, { "name": "claude respawn ", - "description": "Restart a stopped [background session](/en/agent-view#manage-sessions-from-the-shell) with its conversation intact. Use `--all` to restart every stopped session", + "description": "Restart a [background session](https://code.claude.com/docs/en/agent-view.md#manage-sessions-from-the-shell), running or stopped, with its conversation intact. Use `--all` to restart every running session, e.g. to pick up an updated Claude Code binary", "example": "`claude respawn 7c5dcf5d`" }, { "name": "claude rm ", - "description": "Remove a [background session](/en/agent-view#manage-sessions-from-the-shell) from the list", + "description": "Remove a [background session](https://code.claude.com/docs/en/agent-view.md#manage-sessions-from-the-shell) from the list. When the removal is [refused over the session's worktree](https://code.claude.com/docs/en/agent-view.md#what-deleting-a-session-removes) and a second `claude rm` can resolve it, the refusal prints the exact flag and value to pass: `--discard-unpushed @` discards a worktree that has unpushed commits along with those commits, and `--force-remove-worktree ` deletes a worktree directory that git or the `WorktreeRemove` hook couldn't remove. `--discard-unpushed` requires Claude Code v2.1.260 or later, and `--force-remove-worktree` requires v2.1.268 or later. The conversation transcript stays on your local machine, available through `claude --resume`", "example": "`claude rm 7c5dcf5d`" }, + { + "name": "claude self-hosted-runner", + "description": "Start a runner process that registers this machine or container with a [self-hosted environment](https://code.claude.com/docs/en/self-hosted-environments) and hosts Claude Code cloud sessions on your infrastructure. Run `claude self-hosted-runner setup` for a guided operator walkthrough, `claude self-hosted-runner doctor` to [diagnose a deployed runner](https://code.claude.com/docs/en/self-hosted-environments-deploy.md#troubleshooting), and `claude self-hosted-runner orchestrator` to spawn [on-demand runners](https://code.claude.com/docs/en/self-hosted-environments-configuration.md#on-demand-runners). Requires Claude Code v2.1.224 or later", + "example": "`claude self-hosted-runner setup`" + }, { "name": "claude setup-token", - "description": "Generate a long-lived OAuth token for CI and scripts. Prints the token to the terminal without saving it. Requires a Claude subscription. See [Generate a long-lived token](/en/authentication#generate-a-long-lived-token)", + "description": "Generate a long-lived OAuth token for CI and scripts. Prints the token to the terminal without saving it. Requires a Claude subscription. See [Generate a long-lived token](https://code.claude.com/docs/en/authentication.md#generate-a-long-lived-token)", "example": "`claude setup-token`" }, { "name": "claude stop ", - "description": "Stop a [background session](/en/agent-view#manage-sessions-from-the-shell). Also accepts `claude kill`", + "description": "Stop a [background session](https://code.claude.com/docs/en/agent-view.md#manage-sessions-from-the-shell). Also accepts `claude kill`", "example": "`claude stop 7c5dcf5d`" }, { "name": "claude ultrareview [target]", - "description": "Run [ultrareview](/en/ultrareview#run-ultrareview-non-interactively) non-interactively. Prints findings to stdout and exits 0 on success or 1 on failure. Use `--json` for the raw payload and `--timeout ` to override the 30-minute default", + "description": "Run [ultrareview](https://code.claude.com/docs/en/ultrareview.md#run-ultrareview-non-interactively) non-interactively. Prints findings to stdout and exits 0 on success or 1 on failure. Use `--json` for the raw payload and `--timeout ` to override the 45-minute default. Use `--post` on a `github.com` pull request target to post the finished findings to the PR as one plain comment from your GitHub account. `--no-post` is the default. `--post` and `--no-post` require Claude Code v2.1.227 or later. See [Post findings to the pull request](https://code.claude.com/docs/en/ultrareview.md#post-findings-to-the-pull-request)", "example": "`claude ultrareview 1234 --json`" }, { @@ -133,9 +188,14 @@ "flags": [ { "name": "--add-dir", - "description": "Add additional working directories for Claude to read and edit files. Grants file access; most `.claude/` configuration is [not discovered](/en/permissions#additional-directories-grant-file-access-not-configuration) from these directories. Validates each path exists as a directory. To persist these directories across sessions, set [`permissions.additionalDirectories`](/en/settings#permission-settings) in settings", + "description": "Add additional working directories for Claude to read and edit files. Grants file access; Claude Code [doesn't discover](https://code.claude.com/docs/en/permissions.md#additional-directories-grant-file-access-not-configuration) most `.claude/` configuration from these directories. Validates that each path exists as a directory. You can't add most [network paths](https://code.claude.com/docs/en/errors.md#working-directory-is-a-network-path), such as `\\\\server\\share`. To persist these directories across sessions, set [`permissions.additionalDirectories`](https://code.claude.com/docs/en/settings-reference#permissions-additionaldirectories) in settings", "example": "`claude --add-dir ../apps ../lib`" }, + { + "name": "--advisor ", + "description": "Enable the server-side [advisor tool](https://code.claude.com/docs/en/advisor.md) for this session with a model alias, `fable`, `opus`, or `sonnet`, or a full model ID. Takes precedence over the `advisorModel` setting for the session. `fable` requires [Fable access](https://code.claude.com/docs/en/advisor.md#choose-an-advisor-model)", + "example": "`claude --advisor opus`" + }, { "name": "--agent", "description": "Specify an agent for the current session (overrides the `agent` setting)", @@ -143,18 +203,23 @@ }, { "name": "--agents", - "description": "Define custom subagents dynamically via JSON. Uses the same field names as subagent [frontmatter](/en/sub-agents#supported-frontmatter-fields), plus a `prompt` field for the agent's instructions", + "description": "Define custom subagents dynamically via JSON. Accepts the [fields listed for CLI-defined subagents](https://code.claude.com/docs/en/sub-agents.md#choose-the-subagent-scope). With `--print`, the value can instead be the path to a JSON file holding the object; the file form requires Claude Code v2.1.281 or later. Claude Code validates the value at startup and exits on an invalid one; see [`Invalid --agents configuration`](https://code.claude.com/docs/en/errors#invalid-agents-configuration) for the message and for the flags and environment variable that skip the validation. Validation requires Claude Code v2.1.242 or later", "example": "`claude --agents '{\"reviewer\":{\"description\":\"Reviews code\",\"prompt\":\"You are a code reviewer\"}}'`" }, { "name": "--allow-dangerously-skip-permissions", - "description": "Add `bypassPermissions` to the `Shift+Tab` mode cycle without starting in it. Lets you begin in a different mode like `plan` and switch to `bypassPermissions` later. See [permission modes](/en/permission-modes#skip-all-checks-with-bypasspermissions-mode)", + "description": "Add `bypassPermissions` to the `Shift+Tab` mode cycle without starting in it. Lets you begin in a different mode like `plan` and switch to `bypassPermissions` later. See [permission modes](https://code.claude.com/docs/en/permission-modes.md#skip-all-checks-with-bypasspermissions-mode)", "example": "`claude --permission-mode plan --allow-dangerously-skip-permissions`" }, { - "name": "--allowedTools", - "description": "Tools that execute without prompting for permission. See [permission rule syntax](/en/settings#permission-rule-syntax) for pattern matching. To restrict which tools are available, use `--tools` instead", - "example": "`\"Bash(git log *)\" \"Bash(git diff *)\" \"Read\"`" + "name": "--append-subagent-system-prompt", + "description": "Append custom text to the end of every [subagent](https://code.claude.com/docs/en/sub-agents.md)'s system prompt, nested subagents included, apart from a [forked subagent](https://code.claude.com/docs/en/sub-agents.md#fork-the-current-conversation), which reuses the conversation's own prompt. Only applies in non-interactive mode with `-p`. Requires Claude Code v2.1.205 or later", + "example": "`claude -p --append-subagent-system-prompt \"Cite file paths in every answer\" \"query\"`" + }, + { + "name": "--append-subagent-system-prompt-file", + "description": "Load text from a file and append it to [subagent](https://code.claude.com/docs/en/sub-agents.md) system prompts. An alternative to `--append-subagent-system-prompt` for text too long to pass on the command line. The two flags can't be combined. Only applies in non-interactive mode with `-p`. Requires Claude Code v2.1.261 or later", + "example": "`claude -p --append-subagent-system-prompt-file ./subagent-rules.txt \"query\"`" }, { "name": "--append-system-prompt", @@ -166,9 +231,19 @@ "description": "Load additional system prompt text from a file and append to the default prompt", "example": "`claude --append-system-prompt-file ./extra-rules.txt`" }, + { + "name": "--autocompact ", + "description": "Set the [auto-compact window](https://code.claude.com/docs/en/model-config.md#set-the-auto-compact-window) for this session without changing your saved settings. Accepts the same values as `/autocompact`; that section covers the value forms and what overrides the flag. Requires Claude Code v2.1.221 or later", + "example": "`claude --autocompact 500k`" + }, + { + "name": "--ax-screen-reader", + "description": "Render screen-reader friendly output: flat text without decorative borders or animations. Forces the classic renderer, so the [`tui`](https://code.claude.com/docs/en/settings-reference#tui) setting has no effect; attached [background sessions](https://code.claude.com/docs/en/agent-view.md) still render fullscreen. Takes precedence over [`CLAUDE_AX_SCREEN_READER`](https://code.claude.com/docs/en/env-vars) and the [`axScreenReader`](https://code.claude.com/docs/en/settings-reference#axscreenreader) setting. Requires Claude Code v2.1.181 or later", + "example": "`claude --ax-screen-reader`" + }, { "name": "--bare", - "description": "Minimal mode: skip auto-discovery of hooks, skills, plugins, MCP servers, auto memory, and CLAUDE.md so scripted calls start faster. Claude has access to Bash, file read, and file edit tools. Sets [`CLAUDE_CODE_SIMPLE`](/en/env-vars). See [bare mode](/en/headless#start-faster-with-bare-mode)", + "description": "Minimal mode: skip auto-discovery of hooks, skills, custom commands, subagents, installed plugins, MCP servers, auto memory, and CLAUDE.md so scripted calls start faster. Skills in a directory you pass with `--add-dir` still load. Claude has access to Bash, file read, and file edit tools. Sets [`CLAUDE_CODE_SIMPLE`](https://code.claude.com/docs/en/env-vars). See [bare mode](https://code.claude.com/docs/en/headless.md#start-faster-with-bare-mode)", "example": "`claude --bare -p \"query\"`" }, { @@ -176,79 +251,94 @@ "description": "Beta headers to include in API requests (API key users only)", "example": "`claude --betas interleaved-thinking`" }, - { - "name": "--bg", - "description": "Start the session as a [background agent](/en/agent-view) and return immediately. Prints the session ID and management commands. Combine with `--agent` to run a specific subagent", - "example": "`claude --bg \"investigate the flaky test\"`" - }, { "name": "--channels", - "description": "(Research preview) MCP servers whose [channel](/en/channels) notifications Claude should listen for in this session. Space-separated list of `plugin:@` entries. Requires Claude.ai authentication", + "description": "(Research preview) MCP servers whose [channel](https://code.claude.com/docs/en/channels.md) notifications Claude should listen for in this session. Space-separated list of `plugin:@` entries. Requires Anthropic authentication through claude.ai or a Console API key", "example": "`claude --channels plugin:my-notifier@my-marketplace`" }, { "name": "--chrome", - "description": "Enable [Chrome browser integration](/en/chrome) for web automation and testing", + "description": "Enable [Chrome browser integration](https://code.claude.com/docs/en/chrome.md) for web automation and testing", "example": "`claude --chrome`" }, + { + "name": "--cloud", + "description": "With a task description, create a new [cloud session](https://code.claude.com/docs/en/claude-code-on-the-web.md). With a session ID (`session_...` or `cse_...`) or a claude.ai/code URL, queue a message into that existing session instead, with `-p`. See [send a follow-up message](https://code.claude.com/docs/en/claude-code-on-the-web.md#send-follow-ups-from-the-cli).", + "example": "`claude --cloud \"Fix the login bug\"`" + }, { "name": "--dangerously-load-development-channels", - "description": "Enable [channels](/en/channels-reference#test-during-the-research-preview) that are not on the approved allowlist, for local development. Accepts `plugin:@` and `server:` entries. Prompts for confirmation", + "description": "Enable [channels](https://code.claude.com/docs/en/channels-reference.md#test-during-the-research-preview) that are not on the approved allowlist, for local development. Accepts `plugin:@` and `server:` entries. Prompts for confirmation, so it takes effect in interactive sessions. With `-p`, Claude Code ignores the flag", "example": "`claude --dangerously-load-development-channels server:webhook`" }, { "name": "--dangerously-skip-permissions", - "description": "Skip permission prompts. Equivalent to `--permission-mode bypassPermissions`. See [permission modes](/en/permission-modes#skip-all-checks-with-bypasspermissions-mode) for what this does and does not skip", + "description": "Skip permission prompts. Equivalent to `--permission-mode bypassPermissions`. See [permission modes](https://code.claude.com/docs/en/permission-modes.md#skip-all-checks-with-bypasspermissions-mode) for what this does and does not skip. For sessions started with `--bg`, the mode [persists when the supervisor restarts the session](https://code.claude.com/docs/en/agent-view.md#permission-mode-model-and-effort)", "example": "`claude --dangerously-skip-permissions`" }, { "name": "--debug", - "description": "Enable debug mode with optional category filtering (for example, `\"api,hooks\"` or `\"!statsig,!file\"`)", - "example": "`claude --debug \"api,mcp\"`" + "description": "Enable debug mode with optional category filtering, such as `--debug='mcp,startup'` or `--debug='!mcp'`. The filter binds only in the `=` form; a space-separated filter enables debug mode without filtering", + "example": "`claude --debug='mcp,startup'`" }, { "name": "--debug-file ", "description": "Write debug logs to a specific file path. Implicitly enables debug mode. Takes precedence over `CLAUDE_CODE_DEBUG_LOGS_DIR`", "example": "`claude --debug-file /tmp/claude-debug.log`" }, + { + "name": "--desktop", + "description": "Open the [Claude Desktop app](https://code.claude.com/docs/en/desktop.md) on the current directory and exit without starting a session in the terminal. Add `--continue`, or `--resume` with a session ID, to [open that session in Desktop](https://code.claude.com/docs/en/desktop.md#coming-from-the-cli) instead. `--resume` here takes only a session ID, not a name or transcript path. Takes no prompt and no other flags except `--verbose` and the `--debug` flags, since the app starts the session itself. Available on macOS and x64 Windows when you're signed in with a Claude subscription. Requires Claude Code v2.1.285 or later", + "example": "`claude --desktop`" + }, { "name": "--disable-slash-commands", "description": "Disable all skills and commands for this session", "example": "`claude --disable-slash-commands`" }, - { - "name": "--disallowedTools", - "description": "Tools that are removed from the model's context and cannot be used", - "example": "`\"Bash(git log *)\" \"Bash(git diff *)\" \"Edit\"`" - }, { "name": "--effort", - "description": "Set the [effort level](/en/model-config#adjust-effort-level) for the current session. Options: `low`, `medium`, `high`, `xhigh`, `max`; available levels depend on the model. Overrides the [`effortLevel`](/en/settings#available-settings) setting for this session and does not persist", + "description": "Set the [effort level](https://code.claude.com/docs/en/model-config.md#adjust-effort-level) for the current session. Options: `low`, `medium`, `high`, `xhigh`, `max`, or `ultracode`. Available levels depend on the model. `ultracode` requests `xhigh` effort with [ultracode](https://code.claude.com/docs/en/workflows.md#let-claude-decide-with-ultracode) turned on, and requires Claude Code v2.1.203 or later. Overrides the [`modelSettings`](https://code.claude.com/docs/en/settings-reference#modelsettings) and [`effortLevel`](https://code.claude.com/docs/en/settings-reference#effortlevel) settings for this session and does not persist", "example": "`claude --effort high`" }, { "name": "--enable-auto-mode", - "description": "{/* max-version: 2.1.110 */}Removed in v2.1.111. Auto mode is now in the `Shift+Tab` cycle by default; use `--permission-mode auto` to start in it", + "description": "Removed in v2.1.111. Auto mode is now in the `Shift+Tab` cycle by default; use `--permission-mode auto` to start in it", "example": "`claude --permission-mode auto`" }, + { + "name": "--environment ", + "description": "Create a new cloud session that runs on the [self-hosted environment](https://code.claude.com/docs/en/self-hosted-environments) with the given ID. Environment IDs start with `ccpool_`. See [`--environment` dispatch behavior](https://code.claude.com/docs/en/self-hosted-environments-testing#environment-dispatch-behavior) for dispatch behavior and the flag combinations it rejects. Requires Claude Code v2.1.224 or later", + "example": "`claude -p \"Fix the login bug\" --environment ccpool_abc123`" + }, { "name": "--exclude-dynamic-system-prompt-sections", - "description": "Move per-machine sections from the system prompt (working directory, environment info, memory paths, git-repo flag) into the first user message. Improves prompt-cache reuse across different users and machines running the same task. Only applies with the default system prompt; ignored when `--system-prompt` or `--system-prompt-file` is set. Use with `-p` for scripted, multi-user workloads", + "description": "Move per-user context, such as the auto memory location, out of the system prompt and into the first user message. Improves prompt-cache reuse across different users and machines running the same task. Only applies with the default system prompt; ignored when `--system-prompt` or `--system-prompt-file` is set. Use with `-p` for scripted, multi-user workloads", "example": "`claude -p --exclude-dynamic-system-prompt-sections \"query\"`" }, + { + "name": "--exec", + "description": "Run a shell command as a PTY-backed background job instead of starting a Claude session. Use with `--bg` to launch from the shell", + "example": "`claude --bg --exec 'pytest -x'`" + }, { "name": "--fallback-model", - "description": "Enable automatic fallback to specified model when default model is overloaded (print mode only)", - "example": "`claude -p --fallback-model sonnet \"query\"`" + "description": "Enable automatic fallback to the specified model(s) when the primary model is overloaded or not available, for example a retired model. Accepts a comma-separated list tried in order. See [Fallback model chains](https://code.claude.com/docs/en/model-config.md#fallback-model-chains). To persist a chain across sessions, use the [`fallbackModel` setting](https://code.claude.com/docs/en/settings-reference#fallbackmodel), which this flag overrides", + "example": "`claude --fallback-model sonnet,haiku`" }, { "name": "--fork-session", "description": "When resuming, create a new session ID instead of reusing the original (use with `--resume` or `--continue`)", "example": "`claude --resume abc123 --fork-session`" }, + { + "name": "--forward-subagent-text", + "description": "Emit [subagent](https://code.claude.com/docs/en/sub-agents.md) text and thinking blocks in the output stream as `assistant` and `user` messages with `parent_tool_use_id` set, so you can reconstruct each subagent's transcript. Without this flag, Claude Code omits the text and thinking blocks of a subagent that runs in the [foreground](https://code.claude.com/docs/en/sub-agents.md#run-subagents-in-foreground-or-background). Requires `--print` and `--output-format stream-json`. For nested subagents, forked skills, and the version each needs, see [Follow subagent messages](https://code.claude.com/docs/en/headless.md#follow-subagent-messages). The [`CLAUDE_CODE_FORWARD_SUBAGENT_TEXT`](https://code.claude.com/docs/en/env-vars) environment variable enables the same behavior. Requires Claude Code v2.1.211 or later", + "example": "`claude -p --output-format stream-json --verbose --forward-subagent-text \"query\"`" + }, { "name": "--from-pr", - "description": "Resume sessions linked to a specific pull request. Accepts a PR number, a GitHub or GitHub Enterprise PR URL, a GitLab merge request URL, or a Bitbucket pull request URL. Sessions are linked automatically when Claude creates the pull request", + "description": "Open the session picker filtered to sessions linked to a specific pull request. Accepts a PR number, a GitHub or GitHub Enterprise PR URL, a GitLab merge request URL, or a Bitbucket pull request URL. Sessions are linked automatically when Claude creates the pull request", "example": "`claude --from-pr 123`" }, { @@ -258,22 +348,22 @@ }, { "name": "--include-hook-events", - "description": "Include all hook lifecycle events in the output stream. Requires `--output-format stream-json`", - "example": "`claude -p --output-format stream-json --include-hook-events \"query\"`" + "description": "Include hook lifecycle events in the output stream. `SessionStart` and `Setup` hook events are always included and don't need this flag. Some hook events, such as `Notification`, `SessionEnd`, `PreCompact`, and `PostCompact`, never produce a `hook_started` event, even with this flag. For those events, Claude Code still emits `hook_progress` while a command hook that runs for more than a second produces output, and emits `hook_response` only when a [hook that runs in the background](https://code.claude.com/docs/en/hooks.md#run-hooks-in-the-background) finishes. Requires `--output-format stream-json`", + "example": "`claude -p --output-format stream-json --verbose --include-hook-events \"query\"`" }, { "name": "--include-partial-messages", "description": "Include partial streaming events in output. Requires `--print` and `--output-format stream-json`", - "example": "`claude -p --output-format stream-json --include-partial-messages \"query\"`" + "example": "`claude -p --output-format stream-json --verbose --include-partial-messages \"query\"`" }, { "name": "--init", - "description": "Run [Setup hooks](/en/hooks#setup) with the `init` matcher before the session (print mode only)", + "description": "Run [Setup hooks](https://code.claude.com/docs/en/hooks.md#setup) with the `init` matcher before the session (print mode only)", "example": "`claude -p --init \"query\"`" }, { "name": "--init-only", - "description": "Run [Setup](/en/hooks#setup) and `SessionStart` hooks, then exit without starting a conversation", + "description": "Run [Setup](https://code.claude.com/docs/en/hooks.md#setup) and `SessionStart` hooks, then exit without starting a conversation", "example": "`claude --init-only`" }, { @@ -283,42 +373,42 @@ }, { "name": "--json-schema", - "description": "Get validated JSON output matching a JSON Schema after agent completes its workflow (print mode only, see [structured outputs](/en/agent-sdk/structured-outputs))", + "description": "Get validated JSON output matching a JSON Schema after the agent completes its workflow (print mode only). See [structured outputs](https://code.claude.com/docs/en/agent-sdk/structured-outputs.md). Claude Code exits with an error on an invalid schema and accepts the `format` keyword as an annotation without client-side validation", "example": "`claude -p --json-schema '{\"type\":\"object\",\"properties\":{...}}' \"query\"`" }, { "name": "--maintenance", - "description": "Run [Setup hooks](/en/hooks#setup) with the `maintenance` matcher before the session (print mode only)", + "description": "Run [Setup hooks](https://code.claude.com/docs/en/hooks.md#setup) with the `maintenance` matcher before the session (print mode only)", "example": "`claude -p --maintenance \"query\"`" }, { "name": "--max-budget-usd", - "description": "Maximum dollar amount to spend on API calls before stopping (print mode only)", + "description": "Stop the run once estimated spend on API calls reaches this amount (print mode only). Claude Code checks the cap against its [client-side cost estimate](https://code.claude.com/docs/en/agent-sdk/cost-tracking.md#estimates-not-billing), which can differ from your bill. Spend from [subagents](https://code.claude.com/docs/en/sub-agents.md) counts toward the cap. Spend can pass the cap, so [leave headroom](https://code.claude.com/docs/en/agent-sdk/agent-loop.md#budget-headroom). When you return to a conversation with `--continue` or `--resume`, totals [restored from earlier runs](https://code.claude.com/docs/en/agent-sdk/cost-tracking.md#accumulate-costs-across-multiple-calls) don't count toward it. Once spend reaches the cap, spawning another subagent fails with `Budget limit reached`, and Claude Code stops background subagents that are still running; the cap-enforcement behaviors require Claude Code v2.1.217 or later", "example": "`claude -p --max-budget-usd 5.00 \"query\"`" }, { "name": "--max-turns", - "description": "Limit the number of agentic turns (print mode only). Exits with an error when the limit is reached. No limit by default", + "description": "Limit the number of agentic turns (print mode only). Exits with an error when the limit is reached. No limit by default. With `--input-format stream-json`, a message still queued when the limit ends a turn stays queued and starts a new turn with its own limit", "example": "`claude -p --max-turns 3 \"query\"`" }, { "name": "--mcp-config", - "description": "Load MCP servers from JSON files or strings (space-separated)", + "description": "Load MCP servers from JSON files or strings (space-separated). When you pass this flag with `-p`, Claude Code waits for still-pending servers to connect before running the first turn, up to the [`MCP_TIMEOUT`](https://code.claude.com/docs/en/env-vars) startup timeout, 30 seconds by default; a server with a [cached tool list](https://code.claude.com/docs/en/mcp.md#managing-your-servers) skips the wait and connects on first use. In a [self-hosted environment](https://code.claude.com/docs/en/self-hosted-environments-configuration.md#connection-timing), a shorter wait applies instead. The wait requires Claude Code v2.1.221 or later", "example": "`claude --mcp-config ./mcp.json`" }, { "name": "--model", - "description": "Sets the model for the current session with an alias for the latest model (`sonnet` or `opus`) or a model's full name. Overrides the [`model`](/en/settings#available-settings) setting and [`ANTHROPIC_MODEL`](/en/model-config#environment-variables)", - "example": "`claude --model claude-sonnet-4-6`" + "description": "Sets the model for the current session with a [model alias](https://code.claude.com/docs/en/model-config.md#model-aliases) such as `sonnet`, `opus`, `haiku`, or `fable`, or a model's full name. Overrides the [`model`](https://code.claude.com/docs/en/settings-reference#model) setting and [`ANTHROPIC_MODEL`](https://code.claude.com/docs/en/model-config#environment-variables)", + "example": "`claude --model claude-sonnet-5`" }, { "name": "--no-chrome", - "description": "Disable [Chrome browser integration](/en/chrome) for this session", + "description": "Disable [Chrome browser integration](https://code.claude.com/docs/en/chrome.md) for this session", "example": "`claude --no-chrome`" }, { "name": "--no-session-persistence", - "description": "Disable session persistence so sessions are not saved to disk and cannot be resumed. Print mode only. The [`CLAUDE_CODE_SKIP_PROMPT_HISTORY`](/en/env-vars) environment variable does the same in any mode", + "description": "Disable session persistence so sessions are not saved to disk and cannot be resumed. Print mode only. The [`CLAUDE_CODE_SKIP_PROMPT_HISTORY`](https://code.claude.com/docs/en/env-vars) environment variable does the same in any mode", "example": "`claude -p --no-session-persistence \"query\"`" }, { @@ -328,17 +418,22 @@ }, { "name": "--permission-mode", - "description": "Begin in a specified [permission mode](/en/permission-modes). Accepts `default`, `acceptEdits`, `plan`, `auto`, `dontAsk`, or `bypassPermissions`. Overrides `defaultMode` from settings files", + "description": "Begin in a specified [permission mode](https://code.claude.com/docs/en/permission-modes.md). Accepts `default`, `acceptEdits`, `plan`, `auto`, `dontAsk`, `bypassPermissions`, or `manual` as an alias for `default`. The `manual` alias selects the permission mode the UI labels Manual and requires Claude Code v2.1.200 or later; `claude --help` lists it in place of `default`, and both values work. Overrides `defaultMode` from settings files. Without this flag or `--dangerously-skip-permissions`, a new session starts in the permission mode described in [which permission mode a session starts in](https://code.claude.com/docs/en/permission-modes.md#which-mode-a-session-starts-in), which also covers what a `-p` run starts in", "example": "`claude --permission-mode plan`" }, { "name": "--permission-prompt-tool", - "description": "Specify an MCP tool to handle permission prompts in non-interactive mode", - "example": "`claude -p --permission-prompt-tool mcp_auth_tool \"query\"`" + "description": "Specify an MCP tool to handle permission prompts in non-interactive mode. Pass the full name, such as `mcp____`, of a tool on an MCP server that the run loads. Claude Code waits for that tool's MCP server to connect before running the first turn, up to the [`MCP_TIMEOUT`](https://code.claude.com/docs/en/env-vars) startup timeout, 30 seconds by default. The prompt tool can't approve an MCP tool marked as [requiring user interaction](https://code.claude.com/docs/en/mcp.md#require-approval-for-a-specific-tool): Claude Code converts an `allow` result for one to a deny. This restriction requires Claude Code v2.1.199 or later", + "example": "`claude -p --mcp-config ./mcp.json --permission-prompt-tool mcp__permissions__approve \"query\"`" + }, + { + "name": "--permission-prompts", + "description": "Set who answers permission prompts in print mode. With the default `host`, Claude Code sends them to the Agent SDK host or the `--permission-prompt-tool` tool. Pass `none` when nobody can answer, and Claude Code denies them instead. See [Turn off permission prompts in unattended runs](https://code.claude.com/docs/en/headless.md#turn-off-permission-prompts-in-unattended-runs). Requires Claude Code v2.1.259 or later", + "example": "`claude -p --permission-prompts none \"query\"`" }, { "name": "--plugin-dir", - "description": "Load a plugin from a directory or `.zip` archive for this session only. Each flag takes one path. Repeat the flag for multiple plugins: `--plugin-dir A --plugin-dir B.zip`", + "description": "Load a plugin from a directory or `.zip` archive, or several from a [folder of plugins](https://code.claude.com/docs/en/plugins/create.md#load-a-directory-or-archive-for-one-session), for this session only. Each flag takes one path. Repeat the flag for more paths: `--plugin-dir A --plugin-dir B.zip`. Passing a folder of plugins requires Claude Code v2.1.265 or later", "example": "`claude --plugin-dir ./my-plugin`" }, { @@ -346,20 +441,40 @@ "description": "Fetch a plugin `.zip` archive from a URL for this session only. Repeat the flag for multiple plugins, or pass space-separated URLs in a single quoted value", "example": "`claude --plugin-url https://example.com/plugin.zip`" }, + { + "name": "--prompt-suggestions", + "description": "Emit a `prompt_suggestion` message with a predicted next user prompt after each turn that generates one; very short conversations can produce none. Requires `--print`, `--output-format stream-json`, and `--verbose`. See [Prompt suggestions](https://code.claude.com/docs/en/interactive-mode.md#prompt-suggestions)", + "example": "`claude -p --prompt-suggestions --output-format stream-json --verbose \"query\"`" + }, + { + "name": "--ref ", + "description": "With `--environment`, base the new session's checkout on a named ref instead of local `HEAD`", + "example": "`claude -p \"Run the smoke test\" --environment ccpool_abc123 --ref main`" + }, { "name": "--remote", - "description": "Create a new [web session](/en/claude-code-on-the-web) on claude.ai with the provided task description", + "description": "Deprecated alias for `--cloud`, including the existing-session form", "example": "`claude --remote \"Fix the login bug\"`" }, { "name": "--remote-control-session-name-prefix ", - "description": "Prefix for auto-generated [Remote Control](/en/remote-control) session names when no explicit name is set. Defaults to your machine's hostname, producing names like `myhost-graceful-unicorn`. Set `CLAUDE_REMOTE_CONTROL_SESSION_NAME_PREFIX` for the same effect", + "description": "Prefix for auto-generated [Remote Control](https://code.claude.com/docs/en/remote-control.md) session names when no explicit name is set. Defaults to your machine's hostname, producing names like `myhost-graceful-unicorn`. Set `CLAUDE_REMOTE_CONTROL_SESSION_NAME_PREFIX` for the same effect", "example": "`claude remote-control --remote-control-session-name-prefix dev-box`" }, { "name": "--replay-user-messages", "description": "Re-emit user messages from stdin back on stdout for acknowledgment. Requires `--input-format stream-json` and `--output-format stream-json`", - "example": "`claude -p --input-format stream-json --output-format stream-json --replay-user-messages`" + "example": "`claude -p --input-format stream-json --output-format stream-json --verbose --replay-user-messages`" + }, + { + "name": "--restricted", + "description": "Start in restricted mode. Use it when an evaluation harness drives `claude` on a shared machine and Claude Code must not run commands or read that machine's user and project settings. Claude Code removes the built-in tools that run commands or code, and WebFetch, unless you name them individually in `--tools`, not through the `default` preset. It also confines the built-in file tools to the [working directories](https://code.claude.com/docs/en/permissions.md#working-directories), loads only [managed settings](https://code.claude.com/docs/en/managed-settings.md) and `--settings`, refuses [`bypassPermissions`](https://code.claude.com/docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode), and [refuses to create cloud sessions](https://code.claude.com/docs/en/errors.md#cloud-sessions-cannot-be-created-from-a-restricted-session). Requires Claude Code v2.1.248 or later", + "example": "`claude --restricted -p \"query\"`" + }, + { + "name": "--safe-mode", + "description": "Start with all customizations disabled to troubleshoot a broken configuration: 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. Authentication, model selection, built-in tools, and permissions work normally, which differs from [`--bare`](https://code.claude.com/docs/en/headless#start-faster-with-bare-mode). 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. Useful for checking whether a customization is what triggers [automatic model fallback](https://code.claude.com/docs/en/model-config.md#automatic-model-fallback). Sets [`CLAUDE_CODE_SAFE_MODE`](https://code.claude.com/docs/en/env-vars)", + "example": "`claude --safe-mode`" }, { "name": "--session-id", @@ -368,17 +483,17 @@ }, { "name": "--setting-sources", - "description": "Comma-separated list of setting sources to load (`user`, `project`, `local`)", + "description": "Comma-separated list of setting sources to load (`user`, `project`, `local`). See [agent view](https://code.claude.com/docs/en/agent-view.md#what-carries-over-when-you-background) and [agent teams](https://code.claude.com/docs/en/agent-teams.md#context-and-communication) for the sessions you start from this one that inherit the list", "example": "`claude --setting-sources user,project`" }, { "name": "--settings", - "description": "Path to a settings JSON file or an inline JSON string. Values you set here override the same keys in your `settings.json` files for this session. Keys you omit keep their file-based values. See [settings precedence](/en/settings#settings-precedence)", + "description": "Path to a settings JSON file or an inline JSON string. Values you set here override the same keys in your `settings.json` files for this session. Keys you omit keep their file-based values. The file must be a regular file no larger than 2 MiB. See [settings precedence](https://code.claude.com/docs/en/settings.md#settings-precedence)", "example": "`claude --settings ./settings.json`" }, { "name": "--strict-mcp-config", - "description": "Only use MCP servers from `--mcp-config`, ignoring all other MCP configurations", + "description": "Only use MCP servers from `--mcp-config`, ignoring all other MCP configurations. See [Exclusive control with managed-mcp.json](https://code.claude.com/docs/en/managed-mcp.md#exclusive-control-with-managed-mcp-json) for what the flag does under a managed MCP file", "example": "`claude --strict-mcp-config --mcp-config ./mcp.json`" }, { @@ -391,14 +506,19 @@ "description": "Load system prompt from a file, replacing the default prompt", "example": "`claude --system-prompt-file ./custom-prompt.txt`" }, + { + "name": "--system-prompt-snapshot", + "description": "Pass `off` to rebuild the system prompt on every request instead of reusing the prompt [recorded on the conversation's first request](#system-prompt-flags-in-resumed-conversations), for example while you iterate on `--append-system-prompt` text across `--continue` runs. Requires Claude Code v2.1.257 or later", + "example": "`claude --system-prompt-snapshot off`" + }, { "name": "--teammate-mode", - "description": "Set how [agent team](/en/agent-teams) teammates display: `auto` (default), `in-process`, or `tmux`. Overrides the [`teammateMode`](/en/settings#available-settings) setting for this session. See [Choose a display mode](/en/agent-teams#choose-a-display-mode)", - "example": "`claude --teammate-mode in-process`" + "description": "Set how [agent team](https://code.claude.com/docs/en/agent-teams.md) teammates display: `in-process` (default), `auto`, `tmux`, or `iterm2`. Overrides the [`teammateMode`](https://code.claude.com/docs/en/settings-reference#teammatemode) setting for this session. See [Choose a display mode](https://code.claude.com/docs/en/agent-teams.md#choose-a-display-mode)", + "example": "`claude --teammate-mode auto`" }, { "name": "--teleport", - "description": "Resume a [web session](/en/claude-code-on-the-web) in your local terminal", + "description": "Resume a [cloud session](https://code.claude.com/docs/en/claude-code-on-the-web.md) in your local terminal", "example": "`claude --teleport`" }, { @@ -408,37 +528,52 @@ }, { "name": "--tools", - "description": "Restrict which built-in tools Claude can use. Use `\"\"` to disable all, `\"default\"` for all, or tool names like `\"Bash,Edit,Read\"`", + "description": "Restrict which built-in tools Claude can use. Use `\"\"` to disable all, `\"default\"` for the default set, or tool names like `\"Bash,Edit,Read\"`. On macOS, Linux, and WSL, the default set leaves out `Glob` and `Grep`, as described under [Glob tool behavior](https://code.claude.com/docs/en/tools-reference.md#glob-tool-behavior). If you name one of the [task-tracking tools](https://code.claude.com/docs/en/tools-reference.md#task-tool-availability) here, Claude Code also opts the session in. The flag doesn't affect MCP tools; to deny those too, use `--disallowedTools \"mcp__*\"`. A list that omits [`EndConversation`](https://code.claude.com/docs/en/tools-reference#endconversation-tool-behavior) doesn't remove it; `\"\"` removes it only when no MCP tools remain", "example": "`claude --tools \"Bash,Edit,Read\"`" }, { "name": "--verbose", - "description": "Enable verbose logging, shows full turn-by-turn output. Overrides the [`viewMode`](/en/settings#available-settings) setting for this session", + "description": "Enable verbose logging, shows full turn-by-turn output. Overrides the [`viewMode`](https://code.claude.com/docs/en/settings-reference#viewmode) setting for this session", "example": "`claude --verbose`" }, + { + "name": "`--allowedTools`, `--allowed-tools`", + "description": "Tools that execute without prompting for permission, apart from reads from [network paths](https://code.claude.com/docs/en/permissions.md#network-paths). See [permission rule syntax](https://code.claude.com/docs/en/settings-reference.md#permission-rule-syntax) for pattern matching. To restrict which tools are available, use `--tools` instead. If you name one of the [task-tracking tools](https://code.claude.com/docs/en/tools-reference.md#task-tool-availability) here, Claude Code also opts the session in", + "example": "`\"Bash(git log *)\" \"Bash(git diff *)\" \"Read\"`" + }, + { + "name": "`--bg`, `--background`", + "description": "Start the session as a [background agent](https://code.claude.com/docs/en/agent-view.md) and return immediately. Prints the session ID and management commands. Combine with `--exec` to run a shell command as a background job instead of a Claude session, or with `--agent` to run a specific subagent. Checks [workspace trust](https://code.claude.com/docs/en/permissions.md#project-allow-rules-and-workspace-trust) for the directory before it starts. Can't be combined with `-p`/`--print`; see the [error reference](https://code.claude.com/docs/en/errors.md#command-line-errors)", + "example": "`claude --bg \"investigate the flaky test\"`" + }, { "name": "`--continue`, `-c`", - "description": "Load the most recent conversation in the current directory. Includes sessions that added this directory with `/add-dir`", + "description": "Load the most recent conversation in the current directory, including a [background session that has finished](https://code.claude.com/docs/en/sessions.md#where-the-session-picker-looks); opening finished background sessions requires Claude Code v2.1.257 or later. Skips sessions created with `claude -p` or the Agent SDK, and sessions whose first prompt was `/loop`. `claude -p --continue` includes `-p`, SDK, and `/loop` sessions. Includes sessions that added this directory with `/add-dir`", "example": "`claude --continue`" }, + { + "name": "`--disallowedTools`, `--disallowed-tools`", + "description": "Deny rules. A bare tool name removes the matching tools from Claude's context: `\"Edit\"` removes Edit, `\"*\"` removes every tool, and `\"mcp__*\"` removes every MCP tool. A scoped rule such as `Bash(rm *)` leaves the tool available and denies only calls that match [as written](https://code.claude.com/docs/en/permissions.md#bash-rule-limits). A rule naming [`EndConversation`](https://code.claude.com/docs/en/tools-reference#endconversation-tool-behavior) can't remove it while any other tool remains", + "example": "`\"Bash(git log *)\" \"Bash(git diff *)\" \"Edit\"`" + }, { "name": "`--name`, `-n`", - "description": "Set a display name for the session, shown in `/resume` and the terminal title. You can resume a named session with `claude --resume `.

[`/rename`](/en/commands) changes the name mid-session and also shows it on the prompt bar", + "description": "Set a display name for the session, shown in `/resume` and the terminal title. You can resume a named session with `claude --resume `. [`/rename`](https://code.claude.com/docs/en/commands) changes the name mid-session and also shows it on the prompt bar", "example": "`claude -n \"my-feature-work\"`" }, { "name": "`--print`, `-p`", - "description": "Print response without interactive mode (see [Agent SDK documentation](/en/agent-sdk/overview) for programmatic usage details)", + "description": "Print response without interactive mode (see [Agent SDK documentation](https://code.claude.com/docs/en/agent-sdk/overview.md) for programmatic usage details). For `--resume` on a background session that is still running, see [Resume a running background session](https://code.claude.com/docs/en/sessions.md#resume-a-running-background-session)", "example": "`claude -p \"query\"`" }, { "name": "`--remote-control`, `--rc`", - "description": "Start an interactive session with [Remote Control](/en/remote-control#start-a-remote-control-session) enabled so you can also control it from claude.ai or the Claude app. Optionally pass a name for the session", + "description": "Start an interactive session with [Remote Control](https://code.claude.com/docs/en/remote-control.md#start-a-remote-control-session) enabled so you can also control it from claude.ai or the Claude app. Optionally pass a name for the session", "example": "`claude --remote-control \"My Project\"`" }, { "name": "`--resume`, `-r`", - "description": "Resume a specific session by ID or name, or show an interactive picker to choose a session. Includes sessions that added this directory with `/add-dir`", + "description": "Resume a specific session by ID or name, or show an interactive picker to choose a session. In place of an ID, you can pass the absolute path to a session's `.jsonl` [transcript file](https://code.claude.com/docs/en/sessions.md#where-transcripts-are-stored). The picker and name search include sessions that added this directory with `/add-dir`. When you pass a session ID, Claude Code searches the current project directory and its git worktrees, then every other project on this machine. Before v2.1.223, the ID search covered only the current project directory and its git worktrees. [Background sessions](https://code.claude.com/docs/en/agent-view.md) appear in the picker marked with `bg`. Resuming one that is still running [opens that session](https://code.claude.com/docs/en/sessions.md#resume-a-running-background-session) in this terminal through `claude attach`, and a prompt you pass on the command line goes to it as its next turn. Before v2.1.285, Claude Code refused and printed the `claude attach` command to run instead", "example": "`claude --resume auth-refactor`" }, { @@ -448,7 +583,7 @@ }, { "name": "`--worktree`, `-w`", - "description": "Start Claude in an isolated [git worktree](/en/worktrees) at `/.claude/worktrees/`. If no name is given, one is auto-generated. Pass `#` or a GitHub pull request URL to fetch that PR from `origin` and branch the worktree from it", + "description": "Start Claude in an isolated [git worktree](https://code.claude.com/docs/en/worktrees.md) at `/.claude/worktrees/`. If you don't give a name, Claude Code generates one. Pass `#`, a GitHub pull request URL, or a GitLab merge request URL to [fetch that PR or MR from `origin` and branch the worktree from it](https://code.claude.com/docs/en/worktrees#branch-from-a-pull-request). Branching from a GitLab merge request requires Claude Code v2.1.233 or later", "example": "`claude -w feature-auth`" } ] diff --git a/catalog/env-vars.json b/catalog/env-vars.json index b86d810..da91043 100644 --- a/catalog/env-vars.json +++ b/catalog/env-vars.json @@ -1,7 +1,7 @@ { "source": "https://code.claude.com/docs/en/env-vars.md", - "fetchedAt": "2026-05-18T12:34:58.586Z", - "count": 241, + "fetchedAt": "2026-10-26T15:56:25.504Z", + "count": 396, "envVars": [ { "name": "ANTHROPIC_API_KEY", @@ -15,52 +15,57 @@ }, { "name": "ANTHROPIC_AWS_API_KEY", - "purpose": "Workspace API key for [Claude Platform on AWS](/en/claude-platform-on-aws), generated in the AWS Console. Sent as `x-api-key` and takes precedence over AWS SigV4", + "purpose": "Workspace API key for [Claude Platform on AWS](https://code.claude.com/docs/en/claude-platform-on-aws.md), generated in the AWS Console. Sent as `x-api-key` and takes precedence over AWS SigV4", "default": null }, { "name": "ANTHROPIC_AWS_BASE_URL", - "purpose": "Override the [Claude Platform on AWS](/en/claude-platform-on-aws) endpoint URL. Use for custom regions or when routing through an [LLM gateway](/en/llm-gateway). Defaults to `https://aws-external-anthropic.{AWS_REGION}.api.aws`", + "purpose": "Override the [Claude Platform on AWS](https://code.claude.com/docs/en/claude-platform-on-aws.md) endpoint URL. Use for custom regions or when routing through an [LLM gateway](https://code.claude.com/docs/en/llm-gateway). Defaults to `https://aws-external-anthropic.{region}.api.aws`. Claude Code resolves the region with the [same precedence as on Amazon Bedrock](https://code.claude.com/docs/en/amazon-bedrock.md#3-configure-claude-code)", "default": null }, { "name": "ANTHROPIC_AWS_WORKSPACE_ID", - "purpose": "Required for [Claude Platform on AWS](/en/claude-platform-on-aws). Sent on every request as the `anthropic-workspace-id` header", + "purpose": "Required for [Claude Platform on AWS](https://code.claude.com/docs/en/claude-platform-on-aws.md). Sent on every request as the `anthropic-workspace-id` header", "default": null }, { "name": "ANTHROPIC_BASE_URL", - "purpose": "Override the API endpoint to route requests through a proxy or gateway. When set to a non-first-party host, [MCP tool search](/en/mcp#scale-with-mcp-tool-search) is disabled by default. Set `ENABLE_TOOL_SEARCH=true` if your proxy forwards `tool_reference` blocks", + "purpose": "Override the API endpoint to route requests through a proxy or gateway. For what happens when that gateway rejects MCP tool search, see [Tool search through an LLM gateway](https://code.claude.com/docs/en/mcp.md#tool-search-through-a-gateway). As of v2.1.196, [Remote Control](https://code.claude.com/docs/en/remote-control.md#requirements) 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", "default": null }, { "name": "ANTHROPIC_BEDROCK_BASE_URL", - "purpose": "Override the Bedrock endpoint URL. Use for custom Bedrock endpoints or when routing through an [LLM gateway](/en/llm-gateway). See [Amazon Bedrock](/en/amazon-bedrock)", + "purpose": "Override the Amazon Bedrock endpoint URL. Use for custom Amazon Bedrock endpoints or when routing through an [LLM gateway](https://code.claude.com/docs/en/llm-gateway). See [Amazon Bedrock](https://code.claude.com/docs/en/amazon-bedrock.md)", "default": null }, { "name": "ANTHROPIC_BEDROCK_MANTLE_BASE_URL", - "purpose": "Override the Bedrock Mantle endpoint URL. See [Mantle endpoint](/en/amazon-bedrock#use-the-mantle-endpoint)", + "purpose": "Override the Amazon Bedrock Mantle endpoint URL. See [Mantle endpoint](https://code.claude.com/docs/en/amazon-bedrock.md#use-the-mantle-endpoint)", + "default": null + }, + { + "name": "ANTHROPIC_BEDROCK_REGION_PREFIX", + "purpose": "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](https://code.claude.com/docs/en/amazon-bedrock.md#cross-region-inference-profile-prefixes)", "default": null }, { "name": "ANTHROPIC_BEDROCK_SERVICE_TIER", - "purpose": "Bedrock [service tier](https://docs.aws.amazon.com/bedrock/latest/userguide/service-tiers-inference.html) (`default`, `flex`, or `priority`). Sent as the `X-Amzn-Bedrock-Service-Tier` header. See [Amazon Bedrock](/en/amazon-bedrock#service-tiers)", + "purpose": "Amazon Bedrock [service tier](https://docs.aws.amazon.com/bedrock/latest/userguide/service-tiers-inference.html) (`default`, `flex`, or `priority`). Sent as the `X-Amzn-Bedrock-Service-Tier` header. See [Amazon Bedrock](https://code.claude.com/docs/en/amazon-bedrock.md#service-tiers)", "default": null }, { "name": "ANTHROPIC_BETAS", - "purpose": "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](https://platform.claude.com/docs/en/api/beta-headers) before Claude Code adds native support. Unlike the [`--betas` flag](/en/cli-reference#cli-flags), which requires API key authentication, this variable works with all auth methods including Claude.ai subscription", + "purpose": "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](https://platform.claude.com/docs/en/api/beta-headers) before Claude Code adds native support. Unlike the [`--betas` flag](https://code.claude.com/docs/en/cli-reference#cli-flags), which requires API key authentication, this variable works with all auth methods including Claude.ai subscription", "default": null }, { "name": "ANTHROPIC_CUSTOM_HEADERS", - "purpose": "Custom headers to add to requests (`Name: Value` format, newline-separated for multiple headers)", + "purpose": "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](https://code.claude.com/docs/en/errors.md#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](https://code.claude.com/docs/en/server-managed-settings.md#environment-variables-and-the-approval-dialog) when server-managed settings deliver it. From project or local settings, such a value follows the [rules for when `env` values apply](https://code.claude.com/docs/en/settings-reference#when-claude-code-applies-env-values)", "default": null }, { "name": "ANTHROPIC_CUSTOM_MODEL_OPTION", - "purpose": "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](/en/model-config#add-a-custom-model-option)", + "purpose": "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](https://code.claude.com/docs/en/model-config.md#add-a-custom-model-option)", "default": null }, { @@ -70,112 +75,157 @@ }, { "name": "ANTHROPIC_CUSTOM_MODEL_OPTION_NAME", - "purpose": "Display name for the custom model entry in the `/model` picker. Defaults to the model ID when not set", + "purpose": "Display name for the custom model entry in the `/model` picker. When not set, the entry shows the model's name if Claude Code [recognizes the ID](https://code.claude.com/docs/en/model-config.md#customize-pinned-model-display-and-capabilities), and the model ID otherwise", "default": null }, { "name": "ANTHROPIC_CUSTOM_MODEL_OPTION_SUPPORTED_CAPABILITIES", - "purpose": "See [Model configuration](/en/model-config#customize-pinned-model-display-and-capabilities)", + "purpose": "Comma-separated list of [capabilities](https://code.claude.com/docs/en/model-config.md#customize-pinned-model-display-and-capabilities) the custom model supports, for example `effort,thinking`. See [Model configuration](https://code.claude.com/docs/en/model-config.md#customize-pinned-model-display-and-capabilities)", + "default": null + }, + { + "name": "ANTHROPIC_DEFAULT_FABLE_MODEL", + "purpose": "Model ID that the `fable` alias resolves to, and the ID Claude Code recognizes as a Fable model for [automatic model fallback](https://code.claude.com/docs/en/model-config.md#automatic-model-fallback) on third-party providers. See [Model configuration](https://code.claude.com/docs/en/model-config.md#environment-variables)", + "default": null + }, + { + "name": "ANTHROPIC_DEFAULT_FABLE_MODEL_DESCRIPTION", + "purpose": "Display description for the pinned Fable model in the `/model` picker. When not set, the row shows a default description that begins `Custom Fable model`. See [Model configuration](https://code.claude.com/docs/en/model-config.md#customize-pinned-model-display-and-capabilities)", + "default": null + }, + { + "name": "ANTHROPIC_DEFAULT_FABLE_MODEL_NAME", + "purpose": "Display name for the pinned Fable model in the `/model` picker. When not set, the row shows the model's name if Claude Code recognizes the pinned ID, and the pinned ID otherwise. See [Model configuration](https://code.claude.com/docs/en/model-config.md#customize-pinned-model-display-and-capabilities)", + "default": null + }, + { + "name": "ANTHROPIC_DEFAULT_FABLE_MODEL_SUPPORTED_CAPABILITIES", + "purpose": "Comma-separated list of [capabilities](https://code.claude.com/docs/en/model-config.md#customize-pinned-model-display-and-capabilities) the pinned Fable model supports, for example `effort,thinking`. See [Model configuration](https://code.claude.com/docs/en/model-config.md#customize-pinned-model-display-and-capabilities)", "default": null }, { "name": "ANTHROPIC_DEFAULT_HAIKU_MODEL", - "purpose": "See [Model configuration](/en/model-config#environment-variables)", + "purpose": "Model ID that the `haiku` alias resolves to, also used for [background functionality](https://code.claude.com/docs/en/costs.md#background-token-usage). See [Model configuration](https://code.claude.com/docs/en/model-config.md#environment-variables)", "default": null }, { "name": "ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION", - "purpose": "See [Model configuration](/en/model-config#customize-pinned-model-display-and-capabilities)", + "purpose": "Display description for the pinned Haiku model in the `/model` picker. When not set, the row shows a default description that begins `Custom Haiku model`. See [Model configuration](https://code.claude.com/docs/en/model-config.md#customize-pinned-model-display-and-capabilities)", "default": null }, { "name": "ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME", - "purpose": "See [Model configuration](/en/model-config#customize-pinned-model-display-and-capabilities)", + "purpose": "Display name for the pinned Haiku model in the `/model` picker. When not set, the row shows the model's name if Claude Code recognizes the pinned ID, and the pinned ID otherwise. See [Model configuration](https://code.claude.com/docs/en/model-config.md#customize-pinned-model-display-and-capabilities)", "default": null }, { "name": "ANTHROPIC_DEFAULT_HAIKU_MODEL_SUPPORTED_CAPABILITIES", - "purpose": "See [Model configuration](/en/model-config#customize-pinned-model-display-and-capabilities)", + "purpose": "Comma-separated list of [capabilities](https://code.claude.com/docs/en/model-config.md#customize-pinned-model-display-and-capabilities) the pinned Haiku model supports, for example `effort,thinking`. See [Model configuration](https://code.claude.com/docs/en/model-config.md#customize-pinned-model-display-and-capabilities)", + "default": null + }, + { + "name": "ANTHROPIC_DEFAULT_MODEL", + "purpose": "Model that new sessions start on by default. Requires Claude Code v2.1.236 or later. See [Set a default model for new sessions](https://code.claude.com/docs/en/model-config.md#set-a-default-model-for-new-sessions)", "default": null }, { "name": "ANTHROPIC_DEFAULT_OPUS_MODEL", - "purpose": "See [Model configuration](/en/model-config#environment-variables)", + "purpose": "Model ID that the `opus` alias resolves to, and that `opusplan` uses while Plan Mode is active. See [Model configuration](https://code.claude.com/docs/en/model-config.md#environment-variables)", "default": null }, { "name": "ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION", - "purpose": "See [Model configuration](/en/model-config#customize-pinned-model-display-and-capabilities)", + "purpose": "Display description for the pinned Opus model in the `/model` picker. When not set, the row shows a default description that begins `Custom Opus model`. See [Model configuration](https://code.claude.com/docs/en/model-config.md#customize-pinned-model-display-and-capabilities)", "default": null }, { "name": "ANTHROPIC_DEFAULT_OPUS_MODEL_NAME", - "purpose": "See [Model configuration](/en/model-config#customize-pinned-model-display-and-capabilities)", + "purpose": "Display name for the pinned Opus model in the `/model` picker. When not set, the row shows the model's name if Claude Code recognizes the pinned ID, and the pinned ID otherwise. See [Model configuration](https://code.claude.com/docs/en/model-config.md#customize-pinned-model-display-and-capabilities)", "default": null }, { "name": "ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES", - "purpose": "See [Model configuration](/en/model-config#customize-pinned-model-display-and-capabilities)", + "purpose": "Comma-separated list of [capabilities](https://code.claude.com/docs/en/model-config.md#customize-pinned-model-display-and-capabilities) the pinned Opus model supports, for example `effort,thinking`. See [Model configuration](https://code.claude.com/docs/en/model-config.md#customize-pinned-model-display-and-capabilities)", "default": null }, { "name": "ANTHROPIC_DEFAULT_SONNET_MODEL", - "purpose": "See [Model configuration](/en/model-config#environment-variables)", + "purpose": "Model ID that the `sonnet` alias resolves to, and that `opusplan` uses when Plan Mode is not active. See [Model configuration](https://code.claude.com/docs/en/model-config.md#environment-variables)", "default": null }, { "name": "ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION", - "purpose": "See [Model configuration](/en/model-config#customize-pinned-model-display-and-capabilities)", + "purpose": "Display description for the pinned Sonnet model in the `/model` picker. When not set, the row shows a default description that begins `Custom Sonnet model`. See [Model configuration](https://code.claude.com/docs/en/model-config.md#customize-pinned-model-display-and-capabilities)", "default": null }, { "name": "ANTHROPIC_DEFAULT_SONNET_MODEL_NAME", - "purpose": "See [Model configuration](/en/model-config#customize-pinned-model-display-and-capabilities)", + "purpose": "Display name for the pinned Sonnet model in the `/model` picker. When not set, the row shows the model's name if Claude Code recognizes the pinned ID, and the pinned ID otherwise. See [Model configuration](https://code.claude.com/docs/en/model-config.md#customize-pinned-model-display-and-capabilities)", "default": null }, { "name": "ANTHROPIC_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIES", - "purpose": "See [Model configuration](/en/model-config#customize-pinned-model-display-and-capabilities)", + "purpose": "Comma-separated list of [capabilities](https://code.claude.com/docs/en/model-config.md#customize-pinned-model-display-and-capabilities) the pinned Sonnet model supports, for example `effort,thinking`. See [Model configuration](https://code.claude.com/docs/en/model-config.md#customize-pinned-model-display-and-capabilities)", + "default": null + }, + { + "name": "ANTHROPIC_FEDERATION_RULE_ID", + "purpose": "Federation rule ID for [Workload Identity Federation](https://platform.claude.com/docs/en/manage-claude/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](https://code.claude.com/docs/en/authentication.md#authentication-precedence)", "default": null }, { "name": "ANTHROPIC_FOUNDRY_API_KEY", - "purpose": "API key for Microsoft Foundry authentication (see [Microsoft Foundry](/en/microsoft-foundry))", + "purpose": "API key for Microsoft Foundry authentication (see [Microsoft Foundry](https://code.claude.com/docs/en/microsoft-foundry.md))", + "default": null + }, + { + "name": "ANTHROPIC_FOUNDRY_AUTH_TOKEN", + "purpose": "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](https://code.claude.com/docs/en/microsoft-foundry.md). Requires Claude Code v2.1.203 or later", "default": null }, { "name": "ANTHROPIC_FOUNDRY_BASE_URL", - "purpose": "Full base URL for the Foundry resource (for example, `https://my-resource.services.ai.azure.com/anthropic`). Alternative to `ANTHROPIC_FOUNDRY_RESOURCE` (see [Microsoft Foundry](/en/microsoft-foundry))", + "purpose": "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](https://code.claude.com/docs/en/microsoft-foundry.md))", "default": null }, { "name": "ANTHROPIC_FOUNDRY_RESOURCE", - "purpose": "Foundry resource name (for example, `my-resource`). Required if `ANTHROPIC_FOUNDRY_BASE_URL` is not set (see [Microsoft Foundry](/en/microsoft-foundry))", + "purpose": "Microsoft Foundry resource name (for example, `my-resource`). Claude Code [refuses a URL or host name](https://code.claude.com/docs/en/errors.md#anthropic-foundry-resource-must-be-a-foundry-resource-name). Required if `ANTHROPIC_FOUNDRY_BASE_URL` is not set (see [Microsoft Foundry](https://code.claude.com/docs/en/microsoft-foundry.md))", "default": null }, { "name": "ANTHROPIC_MODEL", - "purpose": "Name of the model setting to use (see [Model Configuration](/en/model-config#environment-variables))", + "purpose": "Name of the model setting to use (see [Model Configuration](https://code.claude.com/docs/en/model-config.md#environment-variables))", + "default": null + }, + { + "name": "ANTHROPIC_ORGANIZATION_ID", + "purpose": "Organization ID for [Workload Identity Federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation). Set it together with `ANTHROPIC_FEDERATION_RULE_ID`. See [authentication precedence](https://code.claude.com/docs/en/authentication.md#authentication-precedence)", + "default": null + }, + { + "name": "ANTHROPIC_PROFILE", + "purpose": "Name of the Anthropic profile to authenticate with, such as one created by [`ant auth login`](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/authentication) or by [signing in to a Console account without an API key](https://code.claude.com/docs/en/authentication.md#sign-in-without-an-api-key). See [authentication precedence](https://code.claude.com/docs/en/authentication.md#authentication-precedence)", "default": null }, { "name": "ANTHROPIC_SMALL_FAST_MODEL", - "purpose": "\\[DEPRECATED] Name of [Haiku-class model for background tasks](/en/costs)", + "purpose": "\\[DEPRECATED] Name of [Haiku-class model for background tasks](https://code.claude.com/docs/en/costs.md)", "default": null }, { "name": "ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION", - "purpose": "Override AWS region for the Haiku-class model when using Bedrock or Bedrock Mantle. On Bedrock, this only takes effect when `ANTHROPIC_DEFAULT_HAIKU_MODEL` or the deprecated `ANTHROPIC_SMALL_FAST_MODEL` is also set, since Bedrock otherwise uses the primary model for background tasks", + "purpose": "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](https://code.claude.com/docs/en/amazon-bedrock.md#4-pin-model-versions) in the session region", "default": null }, { "name": "ANTHROPIC_VERTEX_BASE_URL", - "purpose": "Override the Vertex AI endpoint URL. Use for custom Vertex endpoints or when routing through an [LLM gateway](/en/llm-gateway). See [Google Vertex AI](/en/google-vertex-ai)", + "purpose": "Override Google Cloud's Agent Platform endpoint URL. Use for custom Google Cloud's Agent Platform endpoints or when routing through an [LLM gateway](https://code.claude.com/docs/en/llm-gateway). See [Google Cloud's Agent Platform](https://code.claude.com/docs/en/google-vertex-ai.md)", "default": null }, { "name": "ANTHROPIC_VERTEX_PROJECT_ID", - "purpose": "GCP project ID for Vertex AI requests. Overridden by `GCLOUD_PROJECT`, `GOOGLE_CLOUD_PROJECT`, or the project in your `GOOGLE_APPLICATION_CREDENTIALS` credential file. See [Google Vertex AI](/en/google-vertex-ai)", + "purpose": "GCP project ID that Google Cloud's Agent Platform requests are addressed to. See [Configure GCP credentials](https://code.claude.com/docs/en/google-vertex-ai.md#3-configure-gcp-credentials)", "default": null }, { @@ -183,39 +233,49 @@ "purpose": "Workspace ID for [workload identity federation](https://platform.claude.com/docs/en/manage-claude/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", "default": null }, + { + "name": "API_FORCE_IDLE_TIMEOUT", + "purpose": "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](https://code.claude.com/docs/en/llm-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, [Claude Platform on AWS](https://code.claude.com/docs/en/claude-platform-on-aws.md), and Amazon Bedrock with `CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCK=1` set. The [stream watchdogs](https://code.claude.com/docs/en/network-config.md#streaming-idle-watchdogs) run independently of it and abort a long silent pause even when you set `0` here", + "default": null + }, { "name": "API_TIMEOUT_MS", - "purpose": "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", - "default": "600000" + "purpose": "Time in milliseconds that each API request attempt has to receive its response headers. It doesn't limit how long a streaming response runs after that. The default is 600000, or 10 minutes, and the maximum is 2147483647. When you set a positive value, each attempt at a [non-streaming request](https://code.claude.com/docs/en/errors.md#streaming-response-ended-before-any-complete-data-was-received) has to finish within it. Increase this when requests time out on slow networks or when routing through a proxy. Set to `0` to remove this limit, which requires Claude Code v2.1.305 or later. With `0`, a non-streaming attempt still times out after 300 seconds in a local session", + "default": null }, { "name": "AWS_BEARER_TOKEN_BEDROCK", - "purpose": "Bedrock API key for authentication (see [Bedrock API keys](https://aws.amazon.com/blogs/machine-learning/accelerate-ai-development-with-amazon-bedrock-api-keys/))", + "purpose": "Amazon Bedrock API key for authentication (see [Amazon Bedrock API keys](https://aws.amazon.com/blogs/machine-learning/accelerate-ai-development-with-amazon-bedrock-api-keys/))", "default": null }, { "name": "BASH_DEFAULT_TIMEOUT_MS", - "purpose": "Default timeout for long-running bash commands (default: 120000, or 2 minutes)", + "purpose": "Default timeout for a foreground Bash or PowerShell tool command, in milliseconds (default: 120000, or 2 minutes). A value above the [default time limit for background commands](https://code.claude.com/docs/en/tools-reference.md#time-limit-for-background-commands) replaces that default in unattended sessions. The background time limit requires Claude Code v2.1.285 or later", "default": "120000" }, { "name": "BASH_MAX_OUTPUT_LENGTH", - "purpose": "Maximum number of characters in bash outputs before the full output is saved to a file and Claude receives the path plus a short preview. See [Bash tool behavior](/en/tools-reference#bash-tool-behavior)", - "default": null + "purpose": "Maximum number of characters of bash output that Claude Code reads back into a command's result (default: 30000; maximum: 150000). If you set the [`bashOutputMaxChars`](https://code.claude.com/docs/en/settings-reference#bashoutputmaxchars) setting, Claude Code ignores this variable. See [Output limits](https://code.claude.com/docs/en/tools-reference.md#output-limits)", + "default": "30000" }, { "name": "BASH_MAX_TIMEOUT_MS", - "purpose": "Maximum timeout the model can set for long-running bash commands (default: 600000, or 10 minutes)", + "purpose": "Maximum timeout the model can set for a foreground Bash or PowerShell tool command, in milliseconds (default: 600000, or 10 minutes). The effective ceiling is the larger of this and `BASH_DEFAULT_TIMEOUT_MS`. An effective ceiling longer than 2 hours also becomes the maximum [time limit for background commands](https://code.claude.com/docs/en/tools-reference.md#time-limit-for-background-commands) in unattended sessions. The background time limit requires Claude Code v2.1.285 or later", "default": "600000" }, + { + "name": "BETA_TRACING_ENDPOINT", + "purpose": "OTLP/HTTP endpoint for [detailed beta tracing](https://code.claude.com/docs/en/monitoring-usage.md#traces-beta): 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](https://code.claude.com/docs/en/settings-reference.md#variables-claude-code-ignores-in-env)", + "default": null + }, { "name": "CCR_FORCE_BUNDLE", - "purpose": "Set to `1` to force [`claude --remote`](/en/claude-code-on-the-web#send-local-repositories-without-github) to bundle and upload your local repository even when GitHub access is available", + "purpose": "Set to `1` to force [`claude --cloud`](https://code.claude.com/docs/en/claude-code-on-the-web#send-local-repositories-without-github) to bundle and upload your local repository instead of cloning from its remote", "default": null }, { "name": "CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS", - "purpose": "Set to `1` to disable all built-in [subagent](/en/sub-agents) types such as Explore and Plan. Only applies in non-interactive mode (the `-p` flag). Useful for SDK users who want a blank slate", + "purpose": "Set to `1` to disable all built-in [subagent](https://code.claude.com/docs/en/sub-agents.md) 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`](https://code.claude.com/docs/en/errors#subagent-type-is-required)", "default": null }, { @@ -225,17 +285,32 @@ }, { "name": "CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS", - "purpose": "Stall timeout in milliseconds for background subagents. Default `600000` (10 minutes). The timer resets on each streaming progress event; if no progress arrives within the window, the subagent is aborted and the task is marked failed, surfacing any partial result to the parent", + "purpose": "Stall timeout in milliseconds for subagents. Also covers [workflow agents](https://code.claude.com/docs/en/workflows.md#when-an-agent-stalls-and-restarts) on Claude Code v2.1.286 or later. 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](https://code.claude.com/docs/en/agent-sdk/typescript.md#handle-slow-or-stalled-api-responses) describes", "default": null }, { "name": "CLAUDE_AUTO_BACKGROUND_TASKS", - "purpose": "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", + "purpose": "Set to `1` to force-enable automatic backgrounding of long-running agent tasks. When enabled, a [subagent](https://code.claude.com/docs/en/sub-agents.md#run-subagents-in-foreground-or-background) moves to the background after running for approximately two minutes. If Claude queued a tool call such as a file edit behind the subagent, the subagent finishes in the foreground before that call starts. Also enables [automatic backgrounding of long MCP tool calls](https://code.claude.com/docs/en/mcp.md#automatic-backgrounding-of-long-tool-calls) in non-interactive mode on Claude Code v2.1.212 or later", "default": null }, { "name": "CLAUDE_AUTOCOMPACT_PCT_OVERRIDE", - "purpose": "Set the percentage of context capacity (1-100) at which auto-compaction triggers. By default, auto-compaction triggers at approximately 95% capacity. Use lower values like `50` to compact earlier. Values above the default threshold have no effect. Applies to both main conversations and subagents. This percentage aligns with the `context_window.used_percentage` field available in [status line](/en/statusline)", + "purpose": "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](https://code.claude.com/docs/en/model-config.md#context-window-and-auto-compaction). Applies to both main conversations and subagents", + "default": null + }, + { + "name": "CLAUDE_AX_PREPARK_MS", + "purpose": "In [screen reader mode](https://code.claude.com/docs/en/accessibility.md), how many milliseconds Claude Code waits before it writes a new or changed line. Default `0`, so Claude Code doesn't wait. Before v2.1.287, the default was `50`. Claude Code caps the wait at `5000`. Ignored in [project and local settings](https://code.claude.com/docs/en/settings-reference.md#variables-claude-code-ignores-in-env). Requires Claude Code v2.1.233 or later", + "default": null + }, + { + "name": "CLAUDE_AX_SCREEN_READER", + "purpose": "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`](https://code.claude.com/docs/en/settings-reference#axscreenreader) is `true`. The [`--ax-screen-reader`](https://code.claude.com/docs/en/cli-reference#cli-flags) flag takes precedence. Ignored in [project and local settings](https://code.claude.com/docs/en/settings-reference.md#variables-claude-code-ignores-in-env). Requires Claude Code v2.1.181 or later", + "default": null + }, + { + "name": "CLAUDE_AX_STARTUP_QUIET_MS", + "purpose": "In [screen reader mode](https://code.claude.com/docs/en/accessibility.md), how many milliseconds Claude Code holds the first interface render after the startup confirmation line. Your screen reader can then 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. Ignored in [project and local settings](https://code.claude.com/docs/en/settings-reference.md#variables-claude-code-ignores-in-env). Requires Claude Code v2.1.217 or later", "default": null }, { @@ -243,6 +318,16 @@ "purpose": "Return to the original working directory after each Bash or PowerShell command in the main session", "default": null }, + { + "name": "CLAUDE_BYTE_STREAM_IDLE_TIMEOUT_MS", + "purpose": "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", + "default": null + }, + { + "name": "CLAUDE_CLIENT_PRESENCE_FILE", + "purpose": "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](https://code.claude.com/docs/en/remote-control.md#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", + "default": null + }, { "name": "CLAUDE_CODE_ACCESSIBILITY", "purpose": "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", @@ -253,29 +338,104 @@ "purpose": "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", "default": null }, + { + "name": "CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT", + "purpose": "Set to `1` to repaint the entire screen on every frame in [fullscreen rendering](https://code.claude.com/docs/en/fullscreen.md) 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](https://code.claude.com/docs/en/agent-view.md) on Windows", + "default": null + }, + { + "name": "CLAUDE_CODE_ALWAYS_ENABLE_EFFORT", + "purpose": "Set to `1` to send the [effort](https://code.claude.com/docs/en/model-config.md#adjust-effort-level) 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](https://code.claude.com/docs/en/llm-gateway) or third-party provider that serves models under custom identifiers. Models that reject the effort parameter at the API, including Claude Opus 4.1, Claude Sonnet 4.5, Claude Haiku 4.5, and earlier models, are still excluded so requests do not fail", + "default": null + }, { "name": "CLAUDE_CODE_API_KEY_HELPER_TTL_MS", - "purpose": "Interval in milliseconds at which credentials should be refreshed (when using [`apiKeyHelper`](/en/settings#available-settings))", + "purpose": "Interval in milliseconds at which credentials should be refreshed (when using [`apiKeyHelper`](https://code.claude.com/docs/en/settings-reference#apikeyhelper))", + "default": null + }, + { + "name": "CLAUDE_CODE_ARTIFACT_AUTO_OPEN", + "purpose": "Set to `0` to stop Claude Code from opening the browser automatically when a new [artifact](https://code.claude.com/docs/en/artifacts.md#create-an-artifact) is published", + "default": null + }, + { + "name": "CLAUDE_CODE_ARTIFACT_COMMENTS", + "purpose": "Set to `0` to stop Claude reading and replying to [comments on an artifact](https://code.claude.com/docs/en/artifacts.md#collect-comments-on-an-artifact). Has no effect when `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` has [turned artifacts off](https://code.claude.com/docs/en/artifacts.md#availability). Requires Claude Code v2.1.221 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_ARTIFACT_COMMENTS_AUTOREACT", + "purpose": "Set to `0` to stop Claude [replying on its own to comments sent to it](https://code.claude.com/docs/en/artifacts.md#let-claude-reply-to-comments-on-its-own). Requires Claude Code v2.1.228 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_ARTIFACT_PUBLISH_EDITS", + "purpose": "Set to `0` to stop Claude from applying small changes to an [artifact's](https://code.claude.com/docs/en/artifacts.md#update-an-artifact) file as part of publishing it. Claude then edits the file with its file-editing tools and publishes it as a separate step. Requires Claude Code v2.1.300 or later", "default": null }, { "name": "CLAUDE_CODE_ATTRIBUTION_HEADER", - "purpose": "Set to `0` to omit the attribution block (client version and prompt fingerprint) from the start of the system prompt. Disabling it improves prompt-cache hit rates when routing through an [LLM gateway](/en/llm-gateway). Anthropic API caching is unaffected", + "purpose": "Set to `0` to omit the [attribution block](https://code.claude.com/docs/en/llm-gateway-protocol.md#system-prompt-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](https://code.claude.com/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode) classifier requests even when you set `0`. In [System prompt attribution block](https://code.claude.com/docs/en/llm-gateway-protocol.md#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", + "default": null + }, + { + "name": "CLAUDE_CODE_AUTO_BACKGROUND_WORKER_CHECKIN_SECONDS", + "purpose": "Removed in v2.1.283. Use `CLAUDE_CODE_WORKER_CHECKIN_SCHEDULE` instead", "default": null }, { "name": "CLAUDE_CODE_AUTO_COMPACT_WINDOW", - "purpose": "Set the context capacity in tokens used for auto-compaction calculations. Defaults to the model's context window: 200K for standard models or 1M for [extended context](/en/model-config#extended-context) models. Use a lower value like `500000` on a 1M model to treat the window as 500K for compaction purposes. The value is capped at the model's actual context window. `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` is applied as a percentage of this value. Setting this variable decouples the compaction threshold from the status line's `used_percentage`, which always uses the model's full context window", + "purpose": "Set the auto-compact window, how full the context gets before compaction, from `100000` to `1000000` tokens. Suffixed values such as `200k` require v2.1.304 or later. For precedence over the other ways to set the window and the effect on the status line's `used_percentage`, see [Set the auto-compact window](https://code.claude.com/docs/en/model-config.md#set-the-auto-compact-window)", "default": null }, { "name": "CLAUDE_CODE_AUTO_CONNECT_IDE", - "purpose": "Override automatic [IDE connection](/en/vs-code). 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`](/en/settings#global-config-settings) global config setting", + "purpose": "Override automatic [IDE connection](https://code.claude.com/docs/en/vs-code.md). 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`](https://code.claude.com/docs/en/settings-reference#autoconnectide) global config setting", + "default": null + }, + { + "name": "CLAUDE_CODE_AUTO_MODE_MODEL", + "purpose": "Sets the model for the classifier requests Claude Code sends in [auto mode](https://code.claude.com/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode). Use a full model ID such as `claude-sonnet-4-6`. For the cases where Claude Code ignores it, see [Choose the classifier model](https://code.claude.com/docs/en/permission-modes.md#choose-the-classifier-model). Requires Claude Code v2.1.302 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_AUTO_MODE_SERVER", + "purpose": "Controls whether Claude Code asks the server to [review auto mode actions](https://code.claude.com/docs/en/permission-modes.md#server-side-classifier-review). Set to `0` to use Claude Code's own classifier requests instead. On a direct connection to the Anthropic API, requires v2.1.281 or later. The linked section lists which sessions ask the server when the variable is unset, and from which version. Requires Claude Code v2.1.271 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_AWS_CHAIN_RESOLVE_TIMEOUT_MS", + "purpose": "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`](https://code.claude.com/docs/en/errors#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 on Amazon Bedrock, [Claude Platform on AWS](https://code.claude.com/docs/en/claude-platform-on-aws.md), and the [Mantle endpoint](https://code.claude.com/docs/en/amazon-bedrock.md#use-the-mantle-endpoint). See [credential caching and resolution timeout](https://code.claude.com/docs/en/amazon-bedrock.md#credential-caching-and-resolution-timeout). Requires Claude Code v2.1.207 or later", + "default": "60000" + }, + { + "name": "CLAUDE_CODE_BASH_EDIT_DIFF", + "purpose": "Set to `0` to turn off the [diff of the files that changed while a Bash command ran](https://code.claude.com/docs/en/hooks.md#bash), or `1` to record it in every permission mode. Takes precedence over the [`bashEditDiffEnabled`](https://code.claude.com/docs/en/settings-reference#basheditdiffenabled) setting. Requires Claude Code v2.1.269 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_BG_TASKS_REPORT_RUNNING", + "purpose": "Set to `0` to make a non-interactive session report an idle status to its host at every turn end, even while background work is still running. By default, the session keeps reporting a running status past turn end while background work such as a background agent or a [workflow](https://code.claude.com/docs/en/workflows.md) run is still live. This keeps a host that watches the status, such as a remote session list, from announcing that Claude is waiting for your input mid-work. Background shell commands, such as a dev server, don't hold the running status. The running-status default and the `0` opt-out require Claude Code v2.1.269 or later; on earlier versions, set `1` to hold the running status", + "default": null + }, + { + "name": "CLAUDE_CODE_BRIDGE_SESSION_ID", + "purpose": "Set automatically in Bash tool and [hook command](https://code.claude.com/docs/en/hooks.md) subprocesses while the session has an active [Remote Control](https://code.claude.com/docs/en/remote-control.md) 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](https://code.claude.com/docs/en/claude-code-on-the-web.md), read `CLAUDE_CODE_REMOTE_SESSION_ID` instead", + "default": null + }, + { + "name": "CLAUDE_CODE_BS_AS_CTRL_BACKSPACE", + "purpose": "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](https://code.claude.com/docs/en/terminal-config.md#fix-backspace-deleting-a-whole-word-on-windows)", "default": null }, { "name": "CLAUDE_CODE_CERT_STORE", - "purpose": "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. Default is `bundled,system`", + "purpose": "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](https://code.claude.com/docs/en/network-config.md#ca-certificate-store). Default is `bundled,system`", + "default": null + }, + { + "name": "CLAUDE_CODE_CHILD_SESSION", + "purpose": "Set to `1` in subprocesses Claude Code spawns via the Bash, PowerShell, and Monitor tools, [hook](https://code.claude.com/docs/en/hooks.md) commands, and [status line](https://code.claude.com/docs/en/statusline.md) commands. Not set for stdio [MCP server](https://code.claude.com/docs/en/mcp.md) 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", "default": null }, { @@ -293,6 +453,11 @@ "purpose": "Passphrase for encrypted CLAUDE\\_CODE\\_CLIENT\\_KEY (optional)", "default": null }, + { + "name": "CLAUDE_CODE_CONNECT_TIMEOUT_MS", + "purpose": "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` instead. For the response-header phase of a streaming request, see `CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS`", + "default": null + }, { "name": "CLAUDE_CODE_DEBUG_LOG_LEVEL", "purpose": "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", @@ -300,92 +465,182 @@ }, { "name": "CLAUDE_CODE_DEBUG_LOGS_DIR", - "purpose": "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`](/en/cli-reference#cli-flags) flag does both at once. Defaults to `~/.claude/debug/.txt`", + "purpose": "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`](https://code.claude.com/docs/en/cli-reference#cli-flags) flag does both at once. Defaults to `~/.claude/debug/.txt`", "default": null }, { "name": "CLAUDE_CODE_DISABLE_1M_CONTEXT", - "purpose": "Set to `1` to disable [1M context window](/en/model-config#extended-context) support. When set, 1M model variants are unavailable in the model picker. Useful for enterprise environments with compliance requirements", + "purpose": "Set to `1` to turn off [1M context window](https://code.claude.com/docs/en/model-config.md#extended-context) support. Claude Code removes `[1m]` model variants from the model picker and holds models that run with the 1M window by default to a 200K window. See [Turn off 1M context](https://code.claude.com/docs/en/model-config.md#turn-off-1m-context). 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](https://code.claude.com/docs/en/model-config.md#correct-the-window-for-a-gateway-or-custom-model-id)", "default": null }, { "name": "CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING", - "purpose": "Set to `1` to disable [adaptive reasoning](/en/model-config#adjust-effort-level) on Opus 4.6 and Sonnet 4.6 and fall back to the fixed thinking budget controlled by `MAX_THINKING_TOKENS`. {/* min-version: 2.1.111 */}Has no effect on Opus 4.7, which always uses adaptive reasoning", + "purpose": "Set to `1` to disable [adaptive reasoning](https://code.claude.com/docs/en/model-config.md#adjust-effort-level) 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](https://code.claude.com/docs/en/model-config.md#extended-thinking), Sonnet 5 and later, Haiku 5.5, or Opus 4.7 and later, which always use adaptive reasoning", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_ADVISOR_TOOL", + "purpose": "Set to `1` to disable the [advisor tool](https://code.claude.com/docs/en/advisor.md). 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", "default": null }, { "name": "CLAUDE_CODE_DISABLE_AGENT_VIEW", - "purpose": "Set to `1` to turn off [background agents and agent view](/en/agent-view): `claude agents`, `--bg`, `/background`, and the on-demand supervisor. Equivalent to the [`disableAgentView`](/en/settings#available-settings) setting", + "purpose": "Set to `1` to turn off [background agents and agent view](https://code.claude.com/docs/en/agent-view.md): `claude agents`, `--bg`, `/background`, and the on-demand supervisor. Equivalent to the [`disableAgentView`](https://code.claude.com/docs/en/settings-reference#disableagentview) setting", "default": null }, { "name": "CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN", - "purpose": "Set to `1` to disable [fullscreen rendering](/en/fullscreen) 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`](/en/settings#available-settings) setting. You can also switch with `/tui default`", + "purpose": "Set to `1` to disable [fullscreen rendering](https://code.claude.com/docs/en/fullscreen.md) 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`](https://code.claude.com/docs/en/settings-reference#tui) setting. You can also switch with `/tui default`. Does not apply to background sessions opened from [agent view](https://code.claude.com/docs/en/agent-view.md), which always use fullscreen rendering", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_ARTIFACT", + "purpose": "Set to `1` to turn off the [Artifact](https://code.claude.com/docs/en/artifacts.md) 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`](https://code.claude.com/docs/en/settings-reference#enableartifact) to `false`; the deprecated [`disableArtifact`](https://code.claude.com/docs/en/settings-reference#disableartifact) key also turns it off", "default": null }, { "name": "CLAUDE_CODE_DISABLE_ATTACHMENTS", - "purpose": "Set to `1` to disable attachment processing. File mentions with `@` syntax are sent as plain text instead of being expanded into file content", + "purpose": "Set to `1` to disable attachment processing. File mentions with `@` syntax are sent as plain text instead of being expanded into file content. Ignored in [project and local settings](https://code.claude.com/docs/en/settings-reference.md#variables-claude-code-ignores-in-env)", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_AUTH_REFRESH_LOCK", + "purpose": "Set to `1` to make a Claude Code process run its [`gcpAuthRefresh`](https://code.claude.com/docs/en/settings-reference#gcpauthrefresh) or [`awsAuthRefresh`](https://code.claude.com/docs/en/settings-reference#awsauthrefresh) command itself instead of waiting while another process runs it. Requires Claude Code v2.1.286 or later", "default": null }, { "name": "CLAUDE_CODE_DISABLE_AUTO_MEMORY", - "purpose": "Set to `1` to disable [auto memory](/en/memory#auto-memory). Set to `0` to force auto memory on even when `--bare` mode or [`autoMemoryEnabled: false`](/en/settings#available-settings) would otherwise disable it. When disabled, Claude does not create or load auto memory files", + "purpose": "Set to `1` to disable [auto memory](https://code.claude.com/docs/en/memory.md#auto-memory). Set to `0` to force auto memory on even when `--bare` mode or [`autoMemoryEnabled: false`](https://code.claude.com/docs/en/settings-reference#automemoryenabled) would otherwise disable it. When disabled, Claude does not create or load auto memory files", "default": null }, { "name": "CLAUDE_CODE_DISABLE_BACKGROUND_TASKS", - "purpose": "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", + "purpose": "Set to `1` to remove the `run_in_background` parameter from the Bash, PowerShell, and subagent tools and to turn off the Ctrl+B shortcut and background runs of [forked skills](https://code.claude.com/docs/en/skills.md#run-skills-in-a-subagent). Claude Code then also stops moving subagents, long MCP tool calls, and timed-out shell commands to the background automatically. [MCP tasks](https://code.claude.com/docs/en/mcp.md#make-claude-wait-for-the-result-of-an-mcp-task) and the [Monitor tool](https://code.claude.com/docs/en/tools-reference.md#monitor-tool) still run in the background", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_DEFAULT", + "purpose": "Set to `1` to stop Claude Code from treating an [Amazon Bedrock](https://code.claude.com/docs/en/amazon-bedrock.md) 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", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_GUARD", + "purpose": "Set to `1` to skip the check that an [Amazon Bedrock](https://code.claude.com/docs/en/amazon-bedrock.md) 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](https://code.claude.com/docs/en/amazon-bedrock.md#streaming-errors-behind-a-gateway-or-proxy). 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", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_BG_EXIT_HANDOFF", + "purpose": "Set to `1` to stop a [background session's](https://code.claude.com/docs/en/agent-view.md) in-flight work when the [supervisor](https://code.claude.com/docs/en/agent-view.md#the-supervisor-process) stops, restarts, or updates that session's process, instead of handing it to the session's next process. That work is the session's running background shell commands and dynamic workflows, plus background subagents as of v2.1.198. Affects only that handoff: backgrounding a session with `←` or [`/background`](https://code.claude.com/docs/en/agent-view#from-inside-a-session) still carries in-flight background work over. Requires Claude Code v2.1.196 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP", + "purpose": "Set to `1` to stop Claude Code from terminating [background shell commands](https://code.claude.com/docs/en/interactive-mode.md#background-bash-commands) under memory pressure. By default, on macOS and Linux, Claude Code terminates background shells when the operating system reports critical memory pressure and the session has been idle for 30 minutes with no turn or subagent running. Windows has no memory-pressure signal, so this variable has no effect there. Requires Claude Code v2.1.193 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_BUNDLED_SKILLS", + "purpose": "Set to `1` to disable the [skills](https://code.claude.com/docs/en/skills.md) 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`](https://code.claude.com/docs/en/settings-reference#disablebundledskills) setting", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_CFC_PROMPT", + "purpose": "Set to `1` to keep the [Claude in Chrome](https://code.claude.com/docs/en/chrome.md) browser tools available while omitting the Chrome section of the system prompt and the `/claude-in-chrome` [bundled skill](https://code.claude.com/docs/en/skills.md#bundled-skills). For hosts that embed Claude Code and supply their own browser guidance. Requires Claude Code v2.1.257 or later", "default": null }, { "name": "CLAUDE_CODE_DISABLE_CLAUDE_MDS", - "purpose": "Set to `1` to prevent loading any CLAUDE.md memory files into context, including user, project, and auto-memory files", + "purpose": "Set to `1` to prevent loading any CLAUDE.md memory files into context, including user, project, and auto memory files", "default": null }, { "name": "CLAUDE_CODE_DISABLE_CRON", - "purpose": "Set to `1` to disable [scheduled tasks](/en/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", + "purpose": "Set to `1` to disable [session-scoped scheduled tasks](https://code.claude.com/docs/en/scheduled-tasks.md). The `/loop` skill and cron tools become unavailable and any already-scheduled tasks stop firing, including tasks that are already running mid-session", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT", + "purpose": "Set to `1` to turn off the time limit on [critical-path removal](https://code.claude.com/docs/en/permission-modes.md#critical-paths) prompts. In `auto` mode Claude Code then sends these removals to the classifier instead, and in `bypassPermissions` mode the prompt waits for your answer. 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.281 or later", "default": null }, { "name": "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS", - "purpose": "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.", + "purpose": "Set to `1` to strip pre-release `anthropic-beta` request headers, the body fields that pair with them, 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 an `Unexpected value(s)` error for the `anthropic-beta` header or an `Extra inputs are not permitted` error. [Disable pre-release capabilities](https://code.claude.com/docs/en/llm-gateway-protocol.md#disable-pre-release-capabilities) lists what the variable removes, including [MCP tool search](https://code.claude.com/docs/en/mcp.md#scale-with-mcp-tool-search), and what Claude Code keeps sending", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS", + "purpose": "Set to `1` to disable the built-in [Explore and Plan subagents](https://code.claude.com/docs/en/sub-agents.md#built-in-subagents). Claude explores with its search tools or the general-purpose subagent instead, and [plan mode](https://code.claude.com/docs/en/permission-modes.md#analyze-before-you-edit-with-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", "default": null }, { "name": "CLAUDE_CODE_DISABLE_FAST_MODE", - "purpose": "Set to `1` to disable [fast mode](/en/fast-mode)", + "purpose": "Set to `1` to disable [fast mode](https://code.claude.com/docs/en/fast-mode.md)", "default": null }, { "name": "CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY", - "purpose": "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`](/en/settings#available-settings) setting. See [Session quality surveys](/en/data-usage#session-quality-surveys)", + "purpose": "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`](https://code.claude.com/docs/en/settings-reference#feedbacksurveyrate) setting. See [Session quality surveys](https://code.claude.com/docs/en/data-usage.md#session-quality-surveys)", "default": null }, { "name": "CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING", - "purpose": "Set to `1` to disable file [checkpointing](/en/checkpointing). The `/rewind` command will not be able to restore code changes", + "purpose": "Set to `1` to disable file [checkpointing](https://code.claude.com/docs/en/checkpointing.md). The `/rewind` command will not be able to restore code changes. Overrides the [`fileCheckpointingEnabled`](https://code.claude.com/docs/en/settings-reference#filecheckpointingenabled) setting", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_FILE_MENTIONS", + "purpose": "Set to `1` to stop Claude Code from expanding [`@` mentions](https://code.claude.com/docs/en/common-workflows#reference-files-and-directories) of files and directories. Claude instead gets the mentioned paths with a note to read them using its file tools. Ignored in [project and local settings](https://code.claude.com/docs/en/settings-reference.md#variables-claude-code-ignores-in-env). Requires Claude Code v2.1.299 or later", "default": null }, { "name": "CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS", - "purpose": "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`](/en/settings#available-settings) setting when set", + "purpose": "Set to `1` to remove built-in commit and PR workflow instructions and the git status snapshot from Claude's context. Useful when using your own git workflow skills. Takes precedence over the [`includeGitInstructions`](https://code.claude.com/docs/en/settings-reference#includegitinstructions) setting when set", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_INLINE_SHELL_RM_PROMPT", + "purpose": "Set to `1` to stop Claude Code from reading scripts passed to a shell with `-c`, such as `bash -c 'rm -rf ~'`, for [critical-path](https://code.claude.com/docs/en/permission-modes.md#removals-inside-nested-commands-and-inline-scripts) removals. Claude Code still checks the shell variable and positional parameter targets in those scripts, and the other critical-path checks keep running. 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.288 or later", "default": null }, { "name": "CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP", - "purpose": "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 Bedrock, Vertex, or Foundry", + "purpose": "Set to `1` to prevent automatic remapping of Opus 4 and Opus 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", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND", + "purpose": "Set to `1` so that Claude waits for the result of an [MCP task](https://code.claude.com/docs/en/mcp.md#make-claude-wait-for-the-result-of-an-mcp-task) in an interactive session. While [automatic backgrounding](https://code.claude.com/docs/en/mcp.md#automatic-backgrounding-of-long-tool-calls) is on, it still moves the call to the background after two minutes by default. Requires Claude Code v2.1.304 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_MODEL_ACCESS_FALLBACK", + "purpose": "Set to `1` to stop Claude Code on [Amazon Bedrock](https://code.claude.com/docs/en/amazon-bedrock.md#when-a-model-is-disabled-mid-session) and [Google Cloud's Agent Platform](https://code.claude.com/docs/en/google-vertex-ai.md#when-a-model-is-disabled-mid-session) from switching to an older model when your account loses access to a session's model mid-session; the refused request fails at once instead. A [fallback model chain](https://code.claude.com/docs/en/model-config.md#fallback-model-chains) you configure still switches on that refusal, and the [startup model checks](https://code.claude.com/docs/en/amazon-bedrock.md#startup-model-checks) still fall back at launch. Requires Claude Code v2.1.285 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_MOUNTED_DRIVE_RM_PROMPT", + "purpose": "Set to `1` to turn off the [mounted drive prompt](https://code.claude.com/docs/en/permission-modes.md#the-mounted-drive-prompt) for paths such as `/Volumes/USB`. [Set it in the environment that launches Claude Code](#set-variables-in-your-shell), because Claude Code [ignores it in a settings `env` block](https://code.claude.com/docs/en/settings-reference#variables-claude-code-ignores-in-env). Requires Claude Code v2.1.304 or later", "default": null }, { "name": "CLAUDE_CODE_DISABLE_MOUSE", - "purpose": "Set to `1` to disable mouse tracking in [fullscreen rendering](/en/fullscreen). Keyboard scrolling with `PgUp` and `PgDn` still works. Use this to keep your terminal's native copy-on-select behavior", + "purpose": "Set to `1` to disable mouse tracking in [fullscreen rendering](https://code.claude.com/docs/en/fullscreen.md). Keyboard scrolling with `PgUp` and `PgDn` still works. Use this to keep your terminal's native copy-on-select behavior", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_MOUSE_CLICKS", + "purpose": "Set to `1` to disable click, drag, and hover handling in [fullscreen rendering](https://code.claude.com/docs/en/fullscreen.md) 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", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_MTLS_RELOAD_ON_STALE_CONNECTION", + "purpose": "Set to `1` to stop Claude Code from re-reading the [mTLS client certificate and key](https://code.claude.com/docs/en/network-config.md#mtls-authentication) 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", "default": null }, { "name": "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC", - "purpose": "Equivalent of setting `DISABLE_AUTOUPDATER`, `DISABLE_FEEDBACK_COMMAND`, `DISABLE_ERROR_REPORTING`, and `DISABLE_TELEMETRY`", + "purpose": "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](https://code.claude.com/docs/en/tools-reference.md#sendfeedback-tool-behavior), release notes, the [PR and MR status badge](https://code.claude.com/docs/en/interactive-mode.md#pr-review-status) checks, and availability checks such as the [fast mode](https://code.claude.com/docs/en/fast-mode.md#use-fast-mode-behind-proxies-and-llm-gateways) check. It also stops the [background runs of plugin `command` sources](https://code.claude.com/docs/en/plugins/loading#when-a-command-source-re-runs), 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](https://code.claude.com/docs/en/remote-control.md#requirements) and the other [features that need feature-flag fetching](#features-that-need-feature-flag-fetching) unavailable. Official plugin marketplace auto-install isn't covered; disable it with `CLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALL`. Doesn't affect [gateway model discovery](https://code.claude.com/docs/en/llm-gateway-connect.md#add-gateway-models-to-the-model-picker), which has its own opt-in", "default": null }, { @@ -393,9 +648,19 @@ "purpose": "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", "default": null }, + { + "name": "CLAUDE_CODE_DISABLE_NOTIFICATION_PRESENCE_CHECK", + "purpose": "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](https://code.claude.com/docs/en/remote-control.md#mobile-push-notifications) 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", + "default": null + }, { "name": "CLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALL", - "purpose": "Set to `1` to skip automatic addition of the official plugin marketplace on first run", + "purpose": "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", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_PERMISSION_PROMPT_NOTIFY_HOOKS", + "purpose": "Set to `1` to stop Claude Code from running your [`Notification` hooks for unanswered permission requests](https://code.claude.com/docs/en/hooks#notification) 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", "default": null }, { @@ -403,69 +668,139 @@ "purpose": "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", "default": null }, + { + "name": "CLAUDE_CODE_DISABLE_POWERSHELL_CMD_RM_DENY", + "purpose": "Set to `1` to turn off the [PowerShell tool](https://code.claude.com/docs/en/tools-reference.md#powershell-tool) check that denies the `cmd` built-ins `rd`, `rmdir`, `del`, and `erase` on a [system path](https://code.claude.com/docs/en/permission-modes.md#remove-item-in-powershell), such as a drive root or your home directory. Claude Code ignores this variable in a settings file's `env` block. Requires Claude Code v2.1.283 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK", + "purpose": "Set to `1` to turn off the [automatic model switch when a safety classifier flags a request](https://code.claude.com/docs/en/model-config.md#automatic-model-fallback), the behavior the [`switchModelsOnFlag`](https://code.claude.com/docs/en/settings-reference#switchmodelsonflag) setting controls", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_STRUCTURED_OUTPUTS", + "purpose": "Set to `1` to stop Claude Code from sending the structured-output `output_config.format` field and the `anthropic-beta` value that pairs with it, for an [LLM gateway](https://code.claude.com/docs/en/llm-gateway-protocol.md#feature-pass-through) whose upstream rejects them. This leaves on the other pre-release capabilities that [`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS`](https://code.claude.com/docs/en/llm-gateway-protocol#disable-pre-release-capabilities) turns off. Requires Claude Code v2.1.288 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPT", + "purpose": "Set to `1` to turn off the [critical-path](https://code.claude.com/docs/en/permission-modes.md#critical-paths) check for a recursive `rm` whose target is entirely the output of a command substitution, such as `rm -rf \"$(pwd)\"`. The other critical-path checks keep running. 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.281 or later", + "default": null + }, { "name": "CLAUDE_CODE_DISABLE_TERMINAL_TITLE", - "purpose": "Set to `1` to disable automatic terminal title updates based on conversation context", + "purpose": "Set to `1` to disable automatic terminal title updates based on conversation context. This also skips the background small/fast-model request that [generates a session title](https://code.claude.com/docs/en/sessions.md#name-your-sessions), and turns off [status reports to your terminal](https://code.claude.com/docs/en/terminal-config.md#see-session-status-in-your-terminal)", "default": null }, { "name": "CLAUDE_CODE_DISABLE_THINKING", - "purpose": "Set to `1` to force-disable [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) regardless of model support or other settings. More direct than `MAX_THINKING_TOKENS=0`", + "purpose": "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. On models that think by default, omitting the parameter means the model may still think. To explicitly disable [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) on the Anthropic API, use `MAX_THINKING_TOKENS=0` instead. Neither variable turns thinking off on Opus 5.5, Sonnet 5.5, Haiku 5.5, or the Fable models, which can't have thinking turned off. On [third-party providers](https://code.claude.com/docs/en/third-party-integrations.md), `MAX_THINKING_TOKENS=0` likewise omits the parameter, so the two variables behave the same there", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_ULTRAREVIEW_TRUST_CHECK", + "purpose": "Set to `1` so that [`claude ultrareview`](https://code.claude.com/docs/en/ultrareview#trust-the-folder-before-the-review-runs) doesn't exit with `Error: Workspace not trusted` in a folder you haven't trusted when it can't ask you to trust it, such as in CI. Set it in the environment that launches Claude Code, not a settings `env` block, and only where every such run starts in a folder you trust. Runs that can ask still ask. Requires Claude Code v2.1.309 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENT", + "purpose": "Set to `1` to skip proactive [auto-compaction](https://code.claude.com/docs/en/costs.md#reduce-token-usage) when Claude Code doesn't recognize the model ID, such as an [LLM gateway](https://code.claude.com/docs/en/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](https://code.claude.com/docs/en/model-config.md#correct-the-window-for-a-gateway-or-custom-model-id) for when each variable applies. Requires Claude Code v2.1.223 or later", "default": null }, { "name": "CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL", - "purpose": "Set to `1` to disable virtual scrolling in [fullscreen rendering](/en/fullscreen) and render every message in the transcript. Use this if scrolling in fullscreen mode shows blank regions where messages should appear", + "purpose": "Set to `1` to disable virtual scrolling in [fullscreen rendering](https://code.claude.com/docs/en/fullscreen.md) and render every message in the transcript. Use this if scrolling in fullscreen mode shows blank regions where messages should appear", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_WEB_FETCH", + "purpose": "Set to `1` to turn off the [WebFetch](https://code.claude.com/docs/en/tools-reference.md#webfetch-tool-behavior) tool. The [WebSearch](https://code.claude.com/docs/en/tools-reference.md#websearch-tool-behavior) tool stays available. Requires Claude Code v2.1.285 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_WINDOWS_SHELL_LAUNCHER", + "purpose": "Set to `1` to start [PowerShell tool](https://code.claude.com/docs/en/tools-reference.md#powershell-tool) commands on Windows directly instead of through the `cmd.exe` launcher. By default, the launcher lets a PowerShell command [running in the background](https://code.claude.com/docs/en/tools-reference.md#background-commands) [carry over to the session's next process](https://code.claude.com/docs/en/agent-view.md#the-supervisor-process), such as when you [background the session](https://code.claude.com/docs/en/agent-view.md#from-inside-a-session). If you set the variable, a backgrounded PowerShell command stops when the session's process exits. Bash commands aren't affected. Requires Claude Code v2.1.269 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_WORKFLOWS", + "purpose": "Set to `1` to disable [workflows](https://code.claude.com/docs/en/workflows.md#turn-workflows-off). Equivalent to the [`disableWorkflows`](https://code.claude.com/docs/en/settings-reference#disableworkflows) setting", "default": null }, { "name": "CLAUDE_CODE_EFFORT_LEVEL", - "purpose": "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` and the `effortLevel` setting. See [Adjust effort level](/en/model-config#adjust-effort-level)", + "purpose": "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. A [`maxEffortLevel`](https://code.claude.com/docs/en/settings-reference#maxeffortlevel) cap still applies. See [Adjust effort level](https://code.claude.com/docs/en/model-config.md#adjust-effort-level)", + "default": null + }, + { + "name": "CLAUDE_CODE_EMIT_SESSION_STATE_EVENTS", + "purpose": "Set to `1` to add [`session_state_changed`](https://code.claude.com/docs/en/agent-sdk/typescript#sdksessionstatechangedmessage) messages, which carry the session's state, to the message stream. Requires either the [Agent SDK](https://code.claude.com/docs/en/agent-sdk/overview.md) or `--print`, `--output-format stream-json`, and `--verbose`", + "default": null + }, + { + "name": "CLAUDE_CODE_ENABLE_AUTO_MODE", + "purpose": "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](https://code.claude.com/docs/en/claude-apps-gateway) sessions. In v2.1.158 through v2.1.206, setting this to `1` was required to make [auto mode](https://code.claude.com/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode) available on those providers", "default": null }, { "name": "CLAUDE_CODE_ENABLE_AWAY_SUMMARY", - "purpose": "Override [session recap](/en/interactive-mode#session-recap) availability. Set to `0` to force recaps off regardless of the `/config` toggle. Set to `1` to force recaps on when [`awaySummaryEnabled`](/en/settings#available-settings) is `false`. Takes precedence over the setting and `/config` toggle", + "purpose": "Override [session recap](https://code.claude.com/docs/en/interactive-mode.md#session-recap) availability. Set to `0` to force recaps off regardless of the `/config` toggle. Set to `1` to force recaps on when [`awaySummaryEnabled`](https://code.claude.com/docs/en/settings-reference#awaysummaryenabled) is `false`. Takes precedence over the setting and `/config` toggle", "default": null }, { "name": "CLAUDE_CODE_ENABLE_BACKGROUND_PLUGIN_REFRESH", - "purpose": "Set to `1` to refresh plugin state at turn boundaries in [non-interactive mode](/en/headless) after a background install completes. Off by default because the refresh changes the system prompt mid-session, which invalidates [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for that turn", + "purpose": "Set to `1` to refresh plugin state at turn boundaries in [non-interactive mode](https://code.claude.com/docs/en/headless.md) after a background install completes. Off by default because the refresh changes the system prompt mid-session, which invalidates [prompt caching](https://code.claude.com/docs/en/prompt-caching.md) for that turn", + "default": null + }, + { + "name": "CLAUDE_CODE_ENABLE_CFC", + "purpose": "Set to `1` to start a CLI session with [Chrome integration](https://code.claude.com/docs/en/chrome.md) on, or `0` to start with it off. Takes precedence over the [`claudeInChromeDefaultEnabled`](https://code.claude.com/docs/en/settings-reference#claudeinchromedefaultenabled) setting. The `--chrome` and `--no-chrome` flags take precedence over both. Claude Code [ignores `1` in project and local settings](https://code.claude.com/docs/en/chrome#project-settings-can’t-turn-on-chrome)", "default": null }, { "name": "CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL", - "purpose": "Set to `1` to route the \"How is Claude doing?\" session quality survey to your own [OpenTelemetry collector](/en/monitoring-usage) 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", + "purpose": "Set to `1` to route the \"How is Claude doing?\" session quality survey to your own [OpenTelemetry collector](https://code.claude.com/docs/en/monitoring-usage.md) 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", "default": null }, { "name": "CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING", - "purpose": "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 Bedrock and Vertex, 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 Foundry and [gateway](/en/llm-gateway) connections", + "purpose": "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](https://code.claude.com/docs/en/llm-gateway) connections", "default": null }, { "name": "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY", - "purpose": "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 the [`availableModels`](/en/settings#available-settings) allowlist", + "purpose": "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`](https://code.claude.com/docs/en/settings-reference#availablemodels) allowlist the session receives; deliver the list through [MDM or a managed settings file](https://code.claude.com/docs/en/managed-settings.md#delivery-mechanisms), since [server-managed delivery is not available on gateway configurations](https://code.claude.com/docs/en/server-managed-settings.md#platform-availability)", "default": null }, { "name": "CLAUDE_CODE_ENABLE_OPUS_4_7_FAST_MODE", - "purpose": "Set to `1` to run [fast mode](/en/fast-mode) on Claude Opus 4.7 instead of Opus 4.6. With the variable set, `/fast` switches to Opus 4.7; without it, `/fast` continues to use Opus 4.6", + "purpose": "Removed in v2.1.142, when the [fast mode](https://code.claude.com/docs/en/fast-mode.md) default moved from Opus 4.6 to Opus 4.7", "default": null }, { "name": "CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION", - "purpose": "Set to `false` to disable prompt suggestions (the \"Prompt suggestions\" toggle in `/config`). These are the grayed-out predictions that appear in your prompt input after Claude responds. See [Prompt suggestions](/en/interactive-mode#prompt-suggestions)", + "purpose": "Set to `false` to turn off prompt suggestions, the grayed-out predictions that appear in your prompt input. Takes precedence over the [`promptSuggestionEnabled`](https://code.claude.com/docs/en/settings-reference#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](https://code.claude.com/docs/en/interactive-mode.md#when-claude-code-skips-suggestions). Set to `true` to keep that pause from applying until you reach the limit. Requires Claude Code v2.1.238 or later. See [Prompt suggestions](https://code.claude.com/docs/en/interactive-mode.md#prompt-suggestions)", + "default": null + }, + { + "name": "CLAUDE_CODE_ENABLE_SHARE_BUNDLE", + "purpose": "Set to `1` to make [`/share`](https://code.claude.com/docs/en/commands#all-commands) save its report and the whole session transcript to a [local archive under `~/.claude/feedback-bundles/`](https://code.claude.com/docs/en/data-usage#telemetry-services) instead of sending the report to Anthropic. If your organization's policy turns off `/share`, you can't turn it back on with this variable. Requires Claude Code v2.1.299 or later", "default": null }, { "name": "CLAUDE_CODE_ENABLE_TASKS", - "purpose": "Set to `1` to enable the task tracking system in non-interactive mode (the `-p` flag). Tasks are on by default in interactive mode. See [Task list](/en/interactive-mode#task-list)", + "purpose": "Selects which task-tracking tools Claude Code provides in [sessions that have them](https://code.claude.com/docs/en/tools-reference.md#task-tool-availability). 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](https://code.claude.com/docs/en/interactive-mode.md#task-list)", "default": null }, { "name": "CLAUDE_CODE_ENABLE_TELEMETRY", - "purpose": "Set to `1` to enable OpenTelemetry data collection for metrics and logging. Required before configuring OTel exporters. See [Monitoring](/en/monitoring-usage)", + "purpose": "Set to `1` to enable OpenTelemetry data collection for metrics and logging. Required before configuring OTel exporters. Set it in your shell, user settings, or managed settings. Ignored in [project and local settings](https://code.claude.com/docs/en/settings-reference.md#variables-claude-code-ignores-in-env). See [Monitoring](https://code.claude.com/docs/en/monitoring-usage.md)", + "default": null + }, + { + "name": "CLAUDE_CODE_ENABLE_TODO_TOOLS", + "purpose": "Set to `1` to get the task-tracking tools on every model. Without it, Claude Code provides them by default only on the models listed under [Task tool availability](https://code.claude.com/docs/en/tools-reference.md#task-tool-availability). `CLAUDE_CODE_ENABLE_TASKS` still selects the Task tools or `TodoWrite`. Requires Claude Code v2.1.233 or later", "default": null }, { @@ -475,42 +810,72 @@ }, { "name": "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS", - "purpose": "Set to `1` to enable [agent teams](/en/agent-teams). Agent teams are experimental and disabled by default", + "purpose": "Set to `1` to enable [agent teams](https://code.claude.com/docs/en/agent-teams.md). Agent teams are experimental and disabled by default", "default": null }, { "name": "CLAUDE_CODE_EXTRA_BODY", - "purpose": "JSON object to merge into the top level of every API request body. Useful for passing provider-specific parameters that Claude Code does not expose directly", + "purpose": "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](https://code.claude.com/docs/en/agent-view.md) 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", "default": null }, { "name": "CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS", - "purpose": "Override the default token limit for file reads. Useful when you need to read larger files in full", + "purpose": "Override the default token limit for [file reads](https://code.claude.com/docs/en/tools-reference.md#large-files), which is 25,000 tokens. Useful when you need to read larger files in full. A read that Claude makes with the `allow_large` parameter can go past this limit when the context window has room", + "default": null + }, + { + "name": "CLAUDE_CODE_FORCE_SESSION_PERSISTENCE", + "purpose": "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", + "default": null + }, + { + "name": "CLAUDE_CODE_FORCE_STRIKETHROUGH", + "purpose": "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", "default": null }, { "name": "CLAUDE_CODE_FORCE_SYNC_OUTPUT", - "purpose": "Set to `1` to force-enable DEC private mode 2026 [synchronized output](https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036) 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", + "purpose": "Set to `1` to force-enable DEC private mode 2026 [synchronized output](https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036) 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](https://code.claude.com/docs/en/fullscreen.md), this doesn't change the renderer", + "default": null + }, + { + "name": "CLAUDE_CODE_FORCE_TERMINAL_IMAGES", + "purpose": "Set to `1` to draw [mod `Image` elements](https://code.claude.com/docs/en/plugins/mods/reference#elements) as pictures when your terminal draws kitty graphics protocol images with Unicode placeholders and you still see an `Image`'s dimmed `alt` text. See [which terminals draw an `Image` and where not to set this variable](https://code.claude.com/docs/en/plugins/mods/gallery#image-and-client)", "default": null }, { "name": "CLAUDE_CODE_FORK_SUBAGENT", - "purpose": "Set to `1` to enable [forked subagents](/en/sub-agents#fork-the-current-conversation). A forked subagent inherits the full conversation context from the main session instead of starting fresh. When enabled, `/fork` spawns a forked subagent rather than acting as an alias for [`/branch`](/en/commands), and all subagent spawns run in the background. Works in interactive mode and via the SDK or `claude -p`", + "purpose": "Controls fork mode, which is on by default and lets Claude start [forks](https://code.claude.com/docs/en/sub-agents.md#fork-the-current-conversation) on its own. While fork mode is on, Claude also can't [wait for a subagent](https://code.claude.com/docs/en/sub-agents.md#run-subagents-in-foreground-or-background) in interactive terminal, VS Code, or desktop sessions on your machine. Set to `0` to turn fork mode off. For versions, see [Turn fork mode off](https://code.claude.com/docs/en/sub-agents.md#turn-fork-mode-on-or-off)", + "default": null + }, + { + "name": "CLAUDE_CODE_FORWARD_SUBAGENT_TEXT", + "purpose": "Set to `1` to emit [subagent](https://code.claude.com/docs/en/sub-agents.md) text and thinking blocks in `claude -p --output-format stream-json` output, the same behavior as the [`--forward-subagent-text`](https://code.claude.com/docs/en/cli-reference#cli-flags) 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", "default": null }, + { + "name": "CLAUDE_CODE_GATEWAY_HINT_HEADERS", + "purpose": "Set to `1` to send the [gateway hint headers](https://code.claude.com/docs/en/llm-gateway-protocol.md#gateway-hint-headers), such as `x-claude-code-request-class` and `x-claude-code-compaction`, on a custom proxy or a third-party provider such as Amazon Bedrock or Claude Platform on AWS. Set to `0` to stop sending them on every connection, including a direct connection to the Anthropic API, where Claude Code sends them by default. Requires Claude Code v2.1.273 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS", + "purpose": "Timeout in milliseconds for the [gateway model discovery](https://code.claude.com/docs/en/llm-gateway-protocol.md#model-discovery) request that `CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY` turns on (default: `3000`). Raise it when your gateway needs longer than three seconds to answer `/v1/models` at startup. Takes plain digits only; `0`, negative values, and other spellings keep the default. Requires Claude Code v2.1.269 or later", + "default": "3000" + }, { "name": "CLAUDE_CODE_GIT_BASH_PATH", - "purpose": "Windows only: path to the Git Bash executable (`bash.exe`). Use when Git Bash is installed but not in your PATH. See [Windows setup](/en/setup#set-up-on-windows)", + "purpose": "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](https://code.claude.com/docs/en/setup.md#set-up-on-windows)", "default": null }, { "name": "CLAUDE_CODE_GLOB_HIDDEN", - "purpose": "Set to `false` to exclude dotfiles from results when Claude invokes the [Glob tool](/en/tools-reference#glob-tool-behavior). Included by default. Does not affect `@` file autocomplete, `ls`, Grep, or Read", + "purpose": "Set to `false` to exclude dotfiles from results when Claude invokes the [Glob tool](https://code.claude.com/docs/en/tools-reference.md#glob-tool-behavior). Included by default. Does not affect `@` file autocomplete, `ls`, Grep, or Read", "default": null }, { "name": "CLAUDE_CODE_GLOB_NO_IGNORE", - "purpose": "Set to `false` to make the [Glob tool](/en/tools-reference#glob-tool-behavior) respect `.gitignore` patterns. By default, Glob returns all matching files including gitignored ones. Does not affect `@` file autocomplete, which has its own [`respectGitignore` setting](/en/settings#available-settings)", + "purpose": "Set to `false` to make the [Glob tool](https://code.claude.com/docs/en/tools-reference.md#glob-tool-behavior) respect `.gitignore` patterns. By default, Glob returns all matching files including gitignored ones. Does not affect `@` file autocomplete, which has its own [`respectGitignore` setting](https://code.claude.com/docs/en/settings-reference#respectgitignore)", "default": null }, { @@ -518,6 +883,16 @@ "purpose": "Timeout in seconds for Glob tool file discovery. Defaults to 20 seconds on most platforms and 60 seconds on WSL", "default": null }, + { + "name": "CLAUDE_CODE_GOAL_CHECKIN_MINUTES", + "purpose": "How many minutes background work can keep an active goal waiting before Claude Code [asks Claude to check on it](https://code.claude.com/docs/en/goal.md#background-work-defers-evaluation). 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", + "default": null + }, + { + "name": "CLAUDE_CODE_GZIP_REQUEST_BODIES", + "purpose": "Set to `0` to turn off gzip compression of Claude API, telemetry, and [artifact](https://code.claude.com/docs/en/artifacts.md) publish request bodies sent to `api.anthropic.com`. By default, Claude Code compresses large request bodies on direct connections and skips compression when you send requests through a proxy, configure a client certificate, or set `NODE_EXTRA_CA_CERTS`. Use `0` if a [TLS-inspecting proxy](https://code.claude.com/docs/en/network-config.md#ca-certificate-store) that Claude Code can't detect mishandles compressed requests", + "default": null + }, { "name": "CLAUDE_CODE_HIDE_CWD", "purpose": "Set to `1` to hide the working directory in the startup logo. Useful for screenshares or recordings where the path exposes your OS username", @@ -530,7 +905,7 @@ }, { "name": "CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL", - "purpose": "Skip auto-installation of IDE extensions. Equivalent to setting [`autoInstallIdeExtension`](/en/settings#global-config-settings) to `false`", + "purpose": "Set to `1` to skip auto-installation of IDE extensions. Equivalent to setting [`autoInstallIdeExtension`](https://code.claude.com/docs/en/settings-reference#autoinstallideextension) to `false`", "default": null }, { @@ -538,49 +913,109 @@ "purpose": "Set to `1` to skip validation of IDE lockfile entries during connection. Use when auto-connect fails to find your IDE despite it running", "default": null }, + { + "name": "CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS", + "purpose": "Context size, in tokens, at which [idle compaction](https://code.claude.com/docs/en/settings-reference.md#idlecompaction) applies to a conversation (default: `200000`). Accepts a positive whole number, and anything else is ignored. Values below `100000` are raised to `100000`, the lowest threshold. Idle compaction is on by default for conversations that meet its conditions. To turn it off, set `idleCompaction` to `false`. Requires Claude Code v2.1.290 or later", + "default": "200000" + }, + { + "name": "CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS", + "purpose": "How many [subagents](https://code.claude.com/docs/en/sub-agents.md#concurrent-subagent-limit) 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", + "default": "20" + }, { "name": "CLAUDE_CODE_MAX_CONTEXT_TOKENS", - "purpose": "Override the context window size Claude Code assumes for the active model. Only takes effect when `DISABLE_COMPACT` is also set. Use this when routing to a model through `ANTHROPIC_BASE_URL` whose context window does not match the built-in size for its name", + "purpose": "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](https://code.claude.com/docs/en/model-config.md#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", + "default": null + }, + { + "name": "CLAUDE_CODE_MAX_MCP_DESCRIPTION_LENGTH", + "purpose": "Maximum length in characters of MCP tool descriptions and MCP server instructions that Claude Code sends to the model. The value you set replaces both [default limits](https://code.claude.com/docs/en/mcp.md#for-mcp-server-authors): 4096, and 16384 for the description of a tool that Claude loads through tool search. Accepts a positive whole number in plain digits. Anything else is ignored and the defaults apply. Requires Claude Code v2.1.280 or later", "default": null }, { "name": "CLAUDE_CODE_MAX_OUTPUT_TOKENS", - "purpose": "Set the maximum number of output tokens for most requests. Defaults and caps vary by model; see [max output tokens](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison). Increasing this value reduces the effective context window available before [auto-compaction](/en/costs#reduce-token-usage) triggers.", + "purpose": "Set the maximum number of output tokens for most requests. Defaults and caps vary by model; see [max output tokens](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison). Claude Code lowers a value above a model's cap to the cap. For a model ID Claude Code can't resolve to a model it knows, the default is 32000 and the cap is 128000. Increasing this value reduces the effective context window available before [auto-compaction](https://code.claude.com/docs/en/costs.md#reduce-token-usage) triggers", "default": null }, { "name": "CLAUDE_CODE_MAX_RETRIES", - "purpose": "Override the number of times to retry failed API requests (default: 10)", + "purpose": "Override the number of times to retry failed API requests (default: 10). Retrying can stop earlier on `529` overloaded errors. For example, with an API key on an Opus model, it stops at the third `529` and shows [Repeated 529 Overloaded errors](https://code.claude.com/docs/en/errors.md#api-error-repeated-529-overloaded-errors). If you set a [fallback model](https://code.claude.com/docs/en/settings-reference.md#fallbackmodel), Claude Code switches to that model rather than showing the error. 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", "default": "10" }, { - "name": "CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY", - "purpose": "Maximum number of read-only tools and subagents that can execute in parallel (default: 10). Higher values increase parallelism but consume more resources", - "default": "10" + "name": "CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH", + "purpose": "Number of [subagent layers](https://code.claude.com/docs/en/sub-agents.md#let-subagents-spawn-their-own-subagents) 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", + "default": "3" + }, + { + "name": "CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION", + "purpose": "Removed in v2.1.224 and now a no-op. Previously capped the total number of [subagents](https://code.claude.com/docs/en/sub-agents.md) 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](https://code.claude.com/docs/en/sub-agents.md#concurrent-subagent-limit) and the [depth limit](https://code.claude.com/docs/en/sub-agents.md#let-subagents-spawn-their-own-subagents) still apply", + "default": "200" }, { "name": "CLAUDE_CODE_MAX_TURNS", - "purpose": "Cap the number of agentic turns when no explicit limit is passed. Equivalent to passing [`--max-turns`](/en/cli-reference#cli-flags), 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", + "purpose": "Cap the number of agentic turns when no explicit limit is passed. Equivalent to passing [`--max-turns`](https://code.claude.com/docs/en/cli-reference#cli-flags), 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", "default": null }, + { + "name": "CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION", + "purpose": "Cap on [WebSearch](https://code.claude.com/docs/en/tools-reference.md#session-search-limit) calls (default: 200). When Claude reaches the cap, further WebSearch calls return a notice telling it to continue with the information it already gathered and say so in its answer. 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", + "default": "200" + }, { "name": "CLAUDE_CODE_MCP_ALLOWLIST_ENV", "purpose": "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", "default": null }, + { + "name": "CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS", + "purpose": "Elapsed time in milliseconds before a still-running MCP tool call [moves to a background task](https://code.claude.com/docs/en/mcp.md#automatic-backgrounding-of-long-tool-calls) (default: 120000, or 2 minutes). Set to `0` to turn automatic backgrounding off and, in an interactive session, to make Claude wait for [MCP tasks](https://code.claude.com/docs/en/mcp.md#make-claude-wait-for-the-result-of-an-mcp-task). Requires Claude Code v2.1.212 or later", + "default": "120000" + }, + { + "name": "CLAUDE_CODE_MCP_STARTUP_WAIT_MS", + "purpose": "How long in milliseconds the first turn of a [non-interactive](https://code.claude.com/docs/en/headless.md) session waits for MCP servers that are still connecting, in place of the default [first-turn wait](https://code.claude.com/docs/en/agent-sdk/mcp.md#connection-timing). In a [self-hosted environment](https://code.claude.com/docs/en/self-hosted-environments-configuration.md#connection-timing), it changes only how long the wait lasts. Some servers keep a wait of their own regardless of the value; [Connection timing](https://code.claude.com/docs/en/agent-sdk/mcp.md#connection-timing) lists them. Set to `0` to skip the wait for every other server. Requires Claude Code v2.1.274 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT", + "purpose": "Idle timeout in milliseconds for MCP tool calls. When a stdio, HTTP, SSE, WebSocket, or [claude.ai connector](https://code.claude.com/docs/en/mcp.md#use-mcp-servers-from-claude-ai) 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", + "default": null + }, + { + "name": "CLAUDE_CODE_MESSAGING_SOCKET", + "purpose": "Set by Claude Code, not by you: in sessions that bind an [inbox socket](https://code.claude.com/docs/en/cross-session-messaging.md#the-sessions-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](https://code.claude.com/docs/en/cross-session-messaging.md#control-inbound-messages). Settings `env` blocks can't set it. Requires Claude Code v2.1.224 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_MESSAGING_TOKEN", + "purpose": "Set by Claude Code, not by you: in sessions that bind an [inbox socket](https://code.claude.com/docs/en/cross-session-messaging.md#the-sessions-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\":\"\"}` 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](https://code.claude.com/docs/en/cross-session-messaging.md#the-sessions-inbox-socket) 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", + "default": null + }, { "name": "CLAUDE_CODE_NATIVE_CURSOR", - "purpose": "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", + "purpose": "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. Setting `0` reads the same as leaving the variable unset, so it doesn't bring the drawn block back in a session where the terminal's own cursor is already on", "default": null }, { "name": "CLAUDE_CODE_NEW_INIT", - "purpose": "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.", + "purpose": "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", "default": null }, { "name": "CLAUDE_CODE_NO_FLICKER", - "purpose": "Set to `1` to enable [fullscreen rendering](/en/fullscreen), a research preview that reduces flicker and keeps memory flat in long conversations. Equivalent to the [`tui`](/en/settings#available-settings) setting; you can also switch with `/tui fullscreen`", + "purpose": "Set to `1` to enable [fullscreen rendering](https://code.claude.com/docs/en/fullscreen.md), a research preview that reduces flicker and keeps memory flat in long conversations. Overrides the [`tui`](https://code.claude.com/docs/en/settings-reference#tui) setting; you can also switch with `/tui fullscreen`", + "default": null + }, + { + "name": "CLAUDE_CODE_NONBLOCKING_STDOUT", + "purpose": "Set to `1` to write terminal output through a second non-blocking file descriptor, so a terminal that stops reading, such as a paused tmux control-mode pane or a stalled SSH connection, can't freeze Claude Code mid-session. Applies on macOS, Linux, and WSL when stdout is a terminal. Requires Claude Code v2.1.261 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_NONSTREAMING_TIMEOUT_RETRIES", + "purpose": "Limit how many times Claude Code re-sends a [non-streaming request](https://code.claude.com/docs/en/errors.md#streaming-response-ended-before-any-complete-data-was-received) that times out. With `0`, the request fails on the first timeout. See [Tune retry behavior](https://code.claude.com/docs/en/errors.md#tune-retry-behavior) for the timeout. Requires Claude Code v2.1.285 or later", "default": null }, { @@ -595,32 +1030,52 @@ }, { "name": "CLAUDE_CODE_OAUTH_TOKEN", - "purpose": "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`](/en/authentication#generate-a-long-lived-token)", + "purpose": "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`](https://code.claude.com/docs/en/authentication#generate-a-long-lived-token). Unless you run [`/login`](https://code.claude.com/docs/en/authentication#authentication-precedence), Claude Code uses the token you set for the whole session. To replace an expired token, generate a new one and restart", "default": null }, { "name": "CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE", - "purpose": "Set to `1` to keep [fast mode](/en/fast-mode) on Claude Opus 4.6. Takes precedence over `CLAUDE_CODE_ENABLE_OPUS_4_7_FAST_MODE`, so set this if you need to pin Opus 4.6 regardless of how the default changes", + "purpose": "Removed in v2.1.160 and now a no-op. Previously pinned [fast mode](https://code.claude.com/docs/en/fast-mode.md) to Claude Opus 4.6 instead of the current default. Opus 4.6 no longer supports fast mode", + "default": null + }, + { + "name": "CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH", + "purpose": "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](https://code.claude.com/docs/en/monitoring-usage.md)", + "default": "61440" + }, + { + "name": "CLAUDE_CODE_OTEL_DIAG_STDERR", + "purpose": "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](https://code.claude.com/docs/en/monitoring-usage.md)", "default": null }, { "name": "CLAUDE_CODE_OTEL_FLUSH_TIMEOUT_MS", - "purpose": "Timeout in milliseconds for flushing pending OpenTelemetry spans (default: 5000). See [Monitoring](/en/monitoring-usage)", + "purpose": "Timeout in milliseconds for flushing pending OpenTelemetry spans (default: 5000). See [Monitoring](https://code.claude.com/docs/en/monitoring-usage.md)", "default": "5000" }, { "name": "CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS", - "purpose": "Interval for refreshing dynamic OpenTelemetry headers in milliseconds (default: 1740000 / 29 minutes). See [Dynamic headers](/en/monitoring-usage#dynamic-headers)", + "purpose": "Interval for refreshing dynamic OpenTelemetry headers in milliseconds (default: 1740000 / 29 minutes). See [Dynamic headers](https://code.claude.com/docs/en/monitoring-usage.md#dynamic-headers)", "default": "1740000" }, { "name": "CLAUDE_CODE_OTEL_SHUTDOWN_TIMEOUT_MS", - "purpose": "Timeout in milliseconds for the OpenTelemetry exporter to finish on shutdown (default: 2000). Increase if metrics are dropped at exit. See [Monitoring](/en/monitoring-usage)", + "purpose": "Timeout in milliseconds for the OpenTelemetry exporter to finish on shutdown (default: 2000). Increase if metrics are dropped at exit. See [Monitoring](https://code.claude.com/docs/en/monitoring-usage.md)", "default": "2000" }, + { + "name": "CLAUDE_CODE_OVERLOADED_RETRY_BASE_DELAY_MS", + "purpose": "Starting delay in milliseconds, in place of the default 500, of the exponential backoff between [automatic retries](https://code.claude.com/docs/en/errors.md#tune-retry-behavior) of a request that the API rejects with a `529` overloaded error. Raise it to spread the retries over a longer window when the API is at capacity. Give whole milliseconds from 500 to 32000 in plain digits; Claude Code treats any other value as unset. Has no effect when `CLAUDE_CODE_RETRY_WATCHDOG` is set to `1`, or when the rejected request was sent in [fast mode](https://code.claude.com/docs/en/fast-mode.md#handle-rate-limits). Requires Claude Code v2.1.292 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS", + "purpose": "Ceiling in milliseconds, in place of the default 32000, on the exponential backoff between [automatic retries](https://code.claude.com/docs/en/errors.md#tune-retry-behavior) of a request that the API rejects with a `529` overloaded error. Raise it so that later retries keep spreading apart when the API is at capacity. Give whole milliseconds from 32000 to 64000 in plain digits; Claude Code treats any other value as unset. Has no effect when `CLAUDE_CODE_RETRY_WATCHDOG` is set to `1`, or when the rejected request was sent in [fast mode](https://code.claude.com/docs/en/fast-mode.md#handle-rate-limits). Requires Claude Code v2.1.296 or later", + "default": null + }, { "name": "CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE", - "purpose": "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](/en/setup#auto-updates)", + "purpose": "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](https://code.claude.com/docs/en/setup.md#auto-updates)", "default": null }, { @@ -633,29 +1088,69 @@ "purpose": "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`", "default": null }, + { + "name": "CLAUDE_CODE_PLUGIN_DIR_WATCH", + "purpose": "Controls whether Claude Code reloads a [mod](https://code.claude.com/docs/en/plugins/mods/overview.md) when the mod's files change. Reloading applies to a mod you load from a directory with `--plugin-dir`, and it's on by default in interactive sessions. Set to `1` to turn it on in non-interactive sessions as well, or `0` to turn it off in every session. Requires Claude Code v2.1.287 or later. See [mod settings and environment variables](https://code.claude.com/docs/en/plugins/mods/reference.md#settings-and-environment-variables)", + "default": null + }, + { + "name": "CLAUDE_CODE_PLUGIN_DIRS", + "purpose": "Plugin directories to load for the session, each loaded the way a [`--plugin-dir`](https://code.claude.com/docs/en/plugins/cli-reference#flags-that-load-a-plugin-for-one-session) flag loads it. Separate multiple paths with `:` on Unix or `;` on Windows. Give each path as an absolute path or start it with `~`, because Claude Code skips relative paths. Requires Claude Code v2.1.280 or later. See [Load a plugin for one session](https://code.claude.com/docs/en/plugins/create.md#load-a-directory-or-archive-for-one-session)", + "default": null + }, { "name": "CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS", - "purpose": "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](/en/plugin-marketplaces#git-operations-time-out)", + "purpose": "Timeout in milliseconds for cloning or refreshing a plugin marketplace (default: 120000). Increase this value for large repositories or slow network connections. See [Git clone timed out](https://code.claude.com/docs/en/plugins/troubleshooting.md#git-clone-timed-out-after-120s)", "default": "120000" }, { "name": "CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE", - "purpose": "Set to `1` to keep the existing marketplace cache when a `git pull` fails instead of wiping and re-cloning. Useful in offline or airgapped environments where re-cloning would fail the same way. See [Marketplace updates fail in offline environments](/en/plugin-marketplaces#marketplace-updates-fail-in-offline-environments)", + "purpose": "Set to `1` to skip the re-clone attempt and keep using the existing marketplace checkout when a marketplace refresh can't reach or authenticate to the remote. Useful in offline or airgapped environments where re-cloning would fail the same way. See [Marketplace updates fail in offline environments](https://code.claude.com/docs/en/plugins/troubleshooting.md#marketplace-updates-keep-failing-offline)", "default": null }, { "name": "CLAUDE_CODE_PLUGIN_PREFER_HTTPS", - "purpose": "Set to `1` to clone GitHub `owner/repo` plugin sources over HTTPS instead of SSH. Useful in CI runners, containers, or any environment without a configured SSH key for `github.com`", + "purpose": "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`", "default": null }, { "name": "CLAUDE_CODE_PLUGIN_SEED_DIR", - "purpose": "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](/en/plugin-marketplaces#pre-populate-plugins-for-containers)", + "purpose": "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](https://code.claude.com/docs/en/plugins/org.md#seed-containers-and-ci)", + "default": null + }, + { + "name": "CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY", + "purpose": "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", + "default": null + }, + { + "name": "CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS", + "purpose": "Ceiling in milliseconds on idle waiting for background work, such as subagents and workflows, after the final turn in [non-interactive mode](https://code.claude.com/docs/en/headless.md#background-tasks-at-exit) with the `-p` flag. Idle waiting starts over each time Claude takes a turn to handle a background result. Default: `600000`, or 10 minutes. When idle waiting reaches the ceiling, Claude Code stops waiting for the remaining background tasks. A running background command that the main conversation started holds the run open past it. Set to `0` to wait indefinitely. Requires Claude Code v2.1.182 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_PROCESS_WRAPPER", + "purpose": "Launch the processes Claude Code starts from its own binary, such as the background service that hosts [agent view](https://code.claude.com/docs/en/agent-view.md) 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](https://code.claude.com/docs/en/managed-settings.md), 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](https://code.claude.com/docs/en/settings-reference#processwrapper), 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](https://code.claude.com/docs/en/corporate-launcher.md) for the value format, what the launcher covers, and the contract the launcher must satisfy. Requires Claude Code v2.1.208 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_PROJECT_DIR_NAME", + "purpose": "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](#in-settings-files). See [Name the project directory yourself](https://code.claude.com/docs/en/sessions.md#name-the-project-directory-yourself). Requires Claude Code v2.1.234 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_PROMPT_CACHE_TTL", + "purpose": "Set `5m` or `1h`, the only values Claude Code accepts, to choose the [prompt cache TTL](https://code.claude.com/docs/en/prompt-caching.md#cache-lifetime) 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", + "default": null + }, + { + "name": "CLAUDE_CODE_PROPAGATE_TRACEPARENT", + "purpose": "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)](https://code.claude.com/docs/en/monitoring-usage.md#traces-beta)", "default": null }, { "name": "CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST", - "purpose": "Set by host platforms that embed Claude Code and manage model provider routing on its behalf. When set, provider-selection, endpoint, and authentication variables such as `CLAUDE_CODE_USE_BEDROCK`, `ANTHROPIC_BASE_URL`, and `ANTHROPIC_API_KEY` in settings files are ignored so user settings cannot override the host's routing. The automatic telemetry opt-out for Bedrock, Vertex, and Foundry is also skipped, so telemetry follows the standard `DISABLE_TELEMETRY` opt-out. See [Default behaviors by API provider](/en/data-usage#default-behaviors-by-api-provider)", + "purpose": "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](https://code.claude.com/docs/en/managed-settings.md), 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`](https://code.claude.com/docs/en/model-config#restrict-model-selection) 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](https://code.claude.com/docs/en/data-usage.md#default-behaviors-by-api-provider)", "default": null }, { @@ -665,22 +1160,52 @@ }, { "name": "CLAUDE_CODE_REMOTE", - "purpose": "Set automatically to `true` when Claude Code is running as a [cloud session](/en/claude-code-on-the-web). Read this from a hook or setup script to detect whether you are in a cloud environment", + "purpose": "Set automatically to `true` when Claude Code is running as a [cloud session](https://code.claude.com/docs/en/claude-code-on-the-web.md). Read this from a hook or setup script to detect whether you are in a cloud session", "default": null }, { "name": "CLAUDE_CODE_REMOTE_SESSION_ID", - "purpose": "Set automatically in [cloud sessions](/en/claude-code-on-the-web) to the current session's ID. Read this to construct a link back to the session transcript. See [Link artifacts back to the session](/en/claude-code-on-the-web#link-artifacts-back-to-the-session)", + "purpose": "Set automatically in [cloud sessions](https://code.claude.com/docs/en/claude-code-on-the-web.md) to the current session's ID. Read this to construct a link back to the session transcript. See [Link output back to the session](https://code.claude.com/docs/en/cloud-environments.md#link-output-back-to-the-session)", + "default": null + }, + { + "name": "CLAUDE_CODE_RESTRICTED", + "purpose": "Set to `1` to start the session in restricted mode, the same as passing [`--restricted`](https://code.claude.com/docs/en/cli-reference#cli-flags). Claude Code ignores this variable in a settings file's `env` block. Requires Claude Code v2.1.248 or later", "default": null }, { "name": "CLAUDE_CODE_RESUME_INTERRUPTED_TURN", - "purpose": "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", + "purpose": "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`. For the VS Code chat panel, see [Continue conversations after a reload](https://code.claude.com/docs/en/vs-code.md#continue-conversations-after-a-reload)", + "default": null + }, + { + "name": "CLAUDE_CODE_RESUME_INTERRUPTED_TURN_MAX_AGE_MS", + "purpose": "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 the `CLAUDE_CODE_RESUME_INTERRUPTED_TURN` automatic resume and its `CLAUDE_CODE_RESUME_PROMPT` continuation message, and the session starts idle so you continue explicitly. Unset or `0` sets no bound, except that some turns resume only within six hours of their last message, such as one that ended with an API error. A positive value bounds every turn, including those; 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](https://code.claude.com/docs/en/agent-view.md) session that inherited its conversation from an interactive session. Requires Claude Code v2.1.211 or later", "default": null }, { "name": "CLAUDE_CODE_RESUME_PROMPT", - "purpose": "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", + "purpose": "Override the continuation message Claude Code sends to Claude when `CLAUDE_CODE_RESUME_INTERRUPTED_TURN` continues an interrupted turn instead of resending its prompt, or when you resume a [deferred tool call](https://code.claude.com/docs/en/hooks.md#defer-a-tool-call-for-later) with `-p`. Defaults to `Continue from where you left off.`. An empty string uses the default", + "default": null + }, + { + "name": "CLAUDE_CODE_RETRY_WATCHDOG", + "purpose": "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 when a standard-speed request gets a `429` that reports a spend limit or exhausted usage credits, even one from a [gateway spend cap](https://code.claude.com/docs/en/errors.md#spend-limit-reached) that resets on a schedule. Before v2.1.239, the watchdog retried these indefinitely. For fast mode requests, see [Handle rate limits](https://code.claude.com/docs/en/fast-mode.md#handle-rate-limits). 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", + "default": null + }, + { + "name": "CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MS", + "purpose": "Maximum time in milliseconds that each API request spends waiting out `429` and `529` errors when `CLAUDE_CODE_RETRY_WATCHDOG` is set. Once that time is spent, the next such error ends the request. Give a positive whole number in plain digits, such as `1800000` for 30 minutes. When unset, the wait has no limit. Requires Claude Code v2.1.295 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_RETRY_WATCHDOG_USAGE_LIMIT_RECHECK_MS", + "purpose": "Minimum interval in milliseconds between checks of whether a [usage limit](https://code.claude.com/docs/en/errors.md#youve-hit-your-session-limit) was already lifted, while a request waits for that limit to reset with `CLAUDE_CODE_RETRY_WATCHDOG` set. When a check finds the limit lifted, the request goes out at once. Give a whole number in plain digits from `60000`, one minute, to `10800000`, three hours. Checks are made only for a claude.ai subscription's session or weekly limit while usage credits aren't in use, and not while `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set. When this variable is unset or its value is outside that range, no checks are made. Requires Claude Code v2.1.305 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_SAFE_MODE", + "purpose": "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`](https://code.claude.com/docs/en/cli-reference#cli-flags). Directly spawned child processes inherit the variable", "default": null }, { @@ -690,57 +1215,82 @@ }, { "name": "CLAUDE_CODE_SCROLL_SPEED", - "purpose": "Set the mouse wheel scroll multiplier in [fullscreen rendering](/en/fullscreen#mouse-wheel-scrolling). Accepts values from 1 to 20. 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", + "purpose": "Set the mouse wheel scroll multiplier in [fullscreen rendering](https://code.claude.com/docs/en/fullscreen.md#mouse-wheel-scrolling). 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", + "default": null + }, + { + "name": "CLAUDE_CODE_SEND_FEEDBACK", + "purpose": "Set to `0` to turn off [Claude-drafted feedback](https://code.claude.com/docs/en/tools-reference.md#sendfeedback-tool-behavior) 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`](https://code.claude.com/docs/en/settings-reference#feedbackdrafts) setting's `off` value, still apply", "default": null }, { "name": "CLAUDE_CODE_SESSION_ID", - "purpose": "Set automatically in Bash and PowerShell tool subprocesses to the current session ID. Matches the `session_id` field passed to [hooks](/en/hooks). Updated on `/clear`. Use to correlate scripts and external tools with the Claude Code session that launched them", + "purpose": "Set automatically to the current session ID in Bash and PowerShell tool subprocesses, [hook command](https://code.claude.com/docs/en/hooks.md) subprocesses, and stdio [MCP server](https://code.claude.com/docs/en/mcp.md) 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 ` 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", "default": null }, { "name": "CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS", - "purpose": "Override the time budget in milliseconds for [SessionEnd](/en/hooks#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", + "purpose": "Override the time budget in milliseconds for [SessionEnd](https://code.claude.com/docs/en/hooks.md#sessionend) hooks. The value is also the timeout for each hook that sets no `timeout` of its own. 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", "default": null }, { "name": "CLAUDE_CODE_SHELL", - "purpose": "Override automatic shell detection. Useful when your login shell differs from your preferred working shell (for example, `bash` vs `zsh`)", + "purpose": "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", "default": null }, { "name": "CLAUDE_CODE_SHELL_PREFIX", - "purpose": "Command prefix that wraps shell commands Claude Code spawns: Bash tool calls, [hook](/en/hooks) commands, and stdio [MCP server](/en/mcp) startup commands. Useful for logging or auditing. Example: setting `/path/to/logger.sh` runs each command as `/path/to/logger.sh `", + "purpose": "Command prefix that wraps shell commands Claude Code spawns: Bash tool calls, [hook](https://code.claude.com/docs/en/hooks.md) commands, [status line](https://code.claude.com/docs/en/statusline.md) commands, and stdio [MCP server](https://code.claude.com/docs/en/mcp.md) 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 ''`. 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 `. For Bash tool calls, `$1` contains the full shell invocation Claude Code assembles, including environment setup, not only the command Claude ran", "default": null }, { "name": "CLAUDE_CODE_SIMPLE", - "purpose": "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, plugins, MCP servers, auto memory, and CLAUDE.md. The [`--bare`](/en/headless#start-faster-with-bare-mode) CLI flag sets this", + "purpose": "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, installed 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`](https://code.claude.com/docs/en/headless#start-faster-with-bare-mode)", "default": null }, { "name": "CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT", - "purpose": "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", + "purpose": "Choose between Claude Code's full system prompt and a shorter one with abbreviated tool descriptions. When unset, Haiku 4.5, Sonnet 5, Opus 4.7, and earlier models in those families use the full prompt by default, and newer models use the shorter one. Set to `1` to use the shorter prompt on any model. Set to `0`, `false`, `no`, or `off` to use the full prompt on any model, even where an experiment or server configuration would otherwise select the shorter one. Either prompt keeps the full tool set, hooks, MCP servers, and CLAUDE.md discovery", "default": null }, { "name": "CLAUDE_CODE_SKIP_ANTHROPIC_AWS_AUTH", - "purpose": "Skip client-side authentication for [Claude Platform on AWS](/en/claude-platform-on-aws), for gateways that sign requests themselves", + "purpose": "Skip client-side authentication for [Claude Platform on AWS](https://code.claude.com/docs/en/claude-platform-on-aws.md), for gateways that sign requests themselves", + "default": null + }, + { + "name": "CLAUDE_CODE_SKIP_AWS_CRED_CACHE", + "purpose": "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](https://code.claude.com/docs/en/amazon-bedrock.md#credential-caching-and-resolution-timeout). Requires Claude Code v2.1.207 or later", "default": null }, { "name": "CLAUDE_CODE_SKIP_BEDROCK_AUTH", - "purpose": "Skip AWS authentication for Bedrock (for example, when using an LLM gateway)", + "purpose": "Skip AWS authentication for Amazon Bedrock (for example, when using an LLM gateway)", + "default": null + }, + { + "name": "CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS", + "purpose": "Set to `1` to treat a failed [fast mode](https://code.claude.com/docs/en/fast-mode.md#use-fast-mode-behind-proxies-and-llm-gateways) 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", + "default": null + }, + { + "name": "CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK", + "purpose": "Set to `1` to skip the client-side [fast mode](https://code.claude.com/docs/en/fast-mode.md#use-fast-mode-behind-proxies-and-llm-gateways) 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", "default": null }, { "name": "CLAUDE_CODE_SKIP_FOUNDRY_AUTH", - "purpose": "Skip Azure authentication for Microsoft Foundry (for example, when using an LLM gateway)", + "purpose": "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", "default": null }, { "name": "CLAUDE_CODE_SKIP_MANTLE_AUTH", - "purpose": "Skip AWS authentication for Bedrock Mantle (for example, when using an LLM gateway)", + "purpose": "Skip AWS authentication for Amazon Bedrock Mantle (for example, when using an LLM gateway)", + "default": null + }, + { + "name": "CLAUDE_CODE_SKIP_MODEL_ACCESS_MEMORY", + "purpose": "The [startup model checks](https://code.claude.com/docs/en/amazon-bedrock.md#startup-model-checks) on [Amazon Bedrock](https://code.claude.com/docs/en/amazon-bedrock.md) and [Google Cloud's Agent Platform](https://code.claude.com/docs/en/google-vertex-ai.md) remember on this machine which models they found your account can't invoke, for up to a day. Set to `1` to turn that memory off. Requires Claude Code v2.1.285 or later", "default": null }, { @@ -750,17 +1300,37 @@ }, { "name": "CLAUDE_CODE_SKIP_VERTEX_AUTH", - "purpose": "Skip Google authentication for Vertex (for example, when using an LLM gateway)", + "purpose": "Skip Google authentication for Google Cloud's Agent Platform (for example, when using an LLM gateway)", "default": null }, + { + "name": "CLAUDE_CODE_STARTUP_FAILURE_RESULTS", + "purpose": "Set to `1` to have a session started with `--output-format stream-json` write a [result message naming why Claude Code refused to start](https://code.claude.com/docs/en/agent-sdk/typescript.md#startup_failure_reason) for startup failures that otherwise end with stderr alone. Requires Claude Code v2.1.274 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_STOP_HOOK_BLOCK_CAP", + "purpose": "Maximum number of consecutive times a [Stop](https://code.claude.com/docs/en/hooks.md#stop) or [SubagentStop](https://code.claude.com/docs/en/hooks.md#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", + "default": "8" + }, { "name": "CLAUDE_CODE_SUBAGENT_MODEL", - "purpose": "See [Model configuration](/en/model-config)", + "purpose": "The default model for [subagents](https://code.claude.com/docs/en/sub-agents.md#choose-a-model), [agent team](https://code.claude.com/docs/en/agent-teams.md#specify-teammates-and-models) teammates, and [workflow](https://code.claude.com/docs/en/workflows.md) 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`](https://code.claude.com/docs/en/sub-agents#run-every-subagent-on-one-model). See [Choose a model](https://code.claude.com/docs/en/sub-agents.md#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", + "default": null + }, + { + "name": "CLAUDE_CODE_SUBAGENT_MODEL_FORCE", + "purpose": "Set to `1` to force one model onto subagents, teammates, and workflow agents. [Run every subagent on one model](https://code.claude.com/docs/en/sub-agents.md#run-every-subagent-on-one-model) says which model that is. Requires Claude Code v2.1.257 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL", + "purpose": "Set `5m` or `1h`, the only values Claude Code accepts, to choose the [prompt cache TTL](https://code.claude.com/docs/en/prompt-caching.md#cache-lifetime) for requests outside the main conversation, such as [subagents](https://code.claude.com/docs/en/sub-agents.md), 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", "default": null }, { "name": "CLAUDE_CODE_SUBPROCESS_ENV_SCRUB", - "purpose": "Set to `1` to strip Anthropic and cloud provider credentials from subprocess environments (Bash tool, hooks, MCP stdio servers). 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", + "purpose": "Set to `1` to strip credentials from the environments of the subprocesses Claude Code starts, such as Bash commands, hooks, and stdio MCP servers. The scrub recognizes a credential by its variable name or its value, and it leaves GitHub tokens and proxy settings in place. See [What the subprocess environment scrub removes](#what-the-subprocess-environment-scrub-removes). `claude-code-action` sets this automatically when `allowed_non_write_users` is configured", "default": null }, { @@ -774,113 +1344,208 @@ "default": "without" }, { - "name": "CLAUDE_CODE_SYNTAX_HIGHLIGHT", - "purpose": "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`](/en/settings) setting", + "name": "CLAUDE_CODE_SYNC_SKILLS", + "purpose": "Set to `1` in non-interactive mode with the `-p` flag to make Claude Code download the skills enabled for your claude.ai account in that run and wait for the list of them, up to `CLAUDE_CODE_SYNC_SKILLS_WAIT_TIMEOUT_MS`, before it runs the first query. Requires claude.ai authentication. Terminal sessions where you sign in with your claude.ai account [sync these skills](https://code.claude.com/docs/en/skills.md#where-synced-skills-load) without this variable, so set it only when a `-p` run needs your current skills on its first query", "default": null }, { - "name": "CLAUDE_CODE_TASK_LIST_ID", - "purpose": "Share a task list across sessions. Set the same ID in multiple Claude Code instances to coordinate on a shared task list. See [Task list](/en/interactive-mode#task-list)", + "name": "CLAUDE_CODE_SYNC_SKILLS_INSTALL_TIMEOUT_MS", + "purpose": "Timeout in milliseconds for the skills resync that runs mid-session when an app built on the [Agent SDK](https://code.claude.com/docs/en/agent-sdk/typescript.md#query-object) reloads skills (default: 30000). When exceeded, the reload continues with whichever skills have arrived, and the remaining downloads finish in the background", + "default": "30000" + }, + { + "name": "CLAUDE_CODE_SYNC_SKILLS_WAIT_TIMEOUT_MS", + "purpose": "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", + "default": "5000" + }, + { + "name": "CLAUDE_CODE_SYNTAX_HIGHLIGHT", + "purpose": "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`](https://code.claude.com/docs/en/settings-reference#syntaxhighlightingdisabled) setting", "default": null }, { - "name": "CLAUDE_CODE_TEAM_NAME", - "purpose": "Name of the agent team this teammate belongs to. Set automatically on [agent team](/en/agent-teams) members", + "name": "CLAUDE_CODE_TASK_LIST_ID", + "purpose": "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](https://code.claude.com/docs/en/tools-reference.md#task-tool-availability). See [Task list](https://code.claude.com/docs/en/interactive-mode.md#task-list)", "default": null }, { "name": "CLAUDE_CODE_TMPDIR", - "purpose": "Override the temp directory used for internal temp files. Claude Code appends `/claude-{uid}/` (Unix) or `/claude/` (Windows) to this path. Default: `/tmp` on macOS, `os.tmpdir()` on Linux/Windows", + "purpose": "Override the temp directory used for internal temp files. Claude Code appends `/claude-{uid}/` to this path on Unix, or `/claude/` on Windows. Default: `/tmp` on macOS, `os.tmpdir()` on Linux and Windows. On macOS and Linux, [sandboxed](https://code.claude.com/docs/en/sandboxing.md) 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` when it is set. On native Windows, when your shell doesn't set `$TMPDIR`, a Bash command that references `$TMPDIR` receives your override, or `%TEMP%` when you haven't set one. 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](https://code.claude.com/docs/en/settings-reference.md#variables-claude-code-ignores-in-env)", "default": null }, { "name": "CLAUDE_CODE_TMUX_TRUECOLOR", - "purpose": "Set to `1` to allow 24-bit truecolor output inside tmux. 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](/en/terminal-config) for other tmux settings", + "purpose": "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](https://code.claude.com/docs/en/terminal-config.md) for other tmux settings", + "default": null + }, + { + "name": "CLAUDE_CODE_TOOL_MEMORY_CGROUP_EXCLUDE", + "purpose": "On Linux and WSL, set to a comma-separated list of the kinds of processes Claude Code [excludes from the tool memory cap](https://code.claude.com/docs/en/tools-reference.md#memory-limit-on-linux-and-wsl), 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", + "default": null + }, + { + "name": "CLAUDE_CODE_TOOL_MEMORY_LIMIT", + "purpose": "On Linux and WSL, set to a size such as `4G` to [cap the memory that Bash and PowerShell tool commands can use](https://code.claude.com/docs/en/tools-reference.md#memory-limit-on-linux-and-wsl), 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", + "default": null + }, + { + "name": "CLAUDE_CODE_TRANSCRIPT_LOCAL_GC", + "purpose": "Set to `1` to limit how large the [transcript file](https://code.claude.com/docs/en/sessions.md#where-transcripts-are-stored) of a long `-p` or Agent SDK session grows. After each compaction, once the file is larger than 5 MB, Claude Code removes the history from before that compaction. On v2.1.296 or later, the file stays as it is when removing that history would shrink it by less than 10%. Resuming the session restores the same conversation whether or not the file was trimmed. Set it in the environment you start Claude Code from, since a settings `env` block can't turn it on. Requires Claude Code v2.1.287 or later", "default": null }, { "name": "CLAUDE_CODE_USE_ANTHROPIC_AWS", - "purpose": "Use [Claude Platform on AWS](/en/claude-platform-on-aws)", + "purpose": "Use [Claude Platform on AWS](https://code.claude.com/docs/en/claude-platform-on-aws.md)", "default": null }, { "name": "CLAUDE_CODE_USE_BEDROCK", - "purpose": "Use [Bedrock](/en/amazon-bedrock)", + "purpose": "Use [Amazon Bedrock](https://code.claude.com/docs/en/amazon-bedrock.md)", "default": null }, { "name": "CLAUDE_CODE_USE_FOUNDRY", - "purpose": "Use [Microsoft Foundry](/en/microsoft-foundry)", + "purpose": "Use [Microsoft Foundry](https://code.claude.com/docs/en/microsoft-foundry.md)", "default": null }, { "name": "CLAUDE_CODE_USE_MANTLE", - "purpose": "Use the Bedrock [Mantle endpoint](/en/amazon-bedrock#use-the-mantle-endpoint)", + "purpose": "Use the Amazon Bedrock [Mantle endpoint](https://code.claude.com/docs/en/amazon-bedrock.md#use-the-mantle-endpoint)", "default": null }, { - "name": "CLAUDE_CODE_USE_NATIVE_FILE_SEARCH", - "purpose": "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", + "name": "CLAUDE_CODE_USE_POWERSHELL_TOOL", + "purpose": "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](https://code.claude.com/docs/en/tools-reference.md#powershell-tool)", "default": null }, { - "name": "CLAUDE_CODE_USE_POWERSHELL_TOOL", - "purpose": "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 rolling out progressively: set to `1` to opt in or `0` to opt out. 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](/en/tools-reference#powershell-tool)", + "name": "CLAUDE_CODE_USE_VERTEX", + "purpose": "Use [Google Cloud's Agent Platform](https://code.claude.com/docs/en/google-vertex-ai.md)", "default": null }, { - "name": "CLAUDE_CODE_USE_VERTEX", - "purpose": "Use [Vertex](/en/google-vertex-ai)", + "name": "CLAUDE_CODE_USER_DIALOG_TIMEOUT_MS", + "purpose": "Deadline in milliseconds before Claude Code cancels a dialog it forwards to a remote client such as a [Remote Control](https://code.claude.com/docs/en/remote-control.md) or SDK host, or the approval dialog for a [held cross-session message](https://code.claude.com/docs/en/cross-session-messaging.md#control-inbound-messages); permission prompts and `AskUserQuestion` questions use their own flows and aren't governed by it. On Claude Code v2.1.236 or later, it also bounds the mid-session [Fable usage-credits consent prompt](https://code.claude.com/docs/en/model-config.md#fable-and-usage-credits) in a session that may be running unattended. [Control inbound messages](https://code.claude.com/docs/en/cross-session-messaging.md#control-inbound-messages) and [non-interactive sessions](https://code.claude.com/docs/en/cross-session-messaging.md#non-interactive-sessions) cover the full held-message expiry rules, including the cases where the deadline doesn't apply. Overrides the [`dialogExpiry`](https://code.claude.com/docs/en/settings-reference#dialogexpiry) setting. `0` or a negative value disables the deadline. Ignored in [project and local settings](https://code.claude.com/docs/en/settings-reference.md#variables-claude-code-ignores-in-env)", + "default": null + }, + { + "name": "CLAUDE_CODE_WARN_DISK_FREE_GIB", + "purpose": "Set to a whole number of GiB, such as `10`, to have Claude Code warn Claude when free space on the working directory's filesystem falls below that amount. The warning is a system reminder saying how much is free. The reminder is off when the variable is unset, `0`, or not plain digits. 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.304 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_WARN_MEMORY_FREE_GIB", + "purpose": "On Linux and WSL, set to a whole number of GiB such as `4` to have Claude Code warn Claude when available memory falls below that amount. The warning is a system reminder saying how much is available. The reminder is off when the variable is unset, `0`, or not plain digits. 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.304 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_WEB_SEARCH_REFILLS_PER_HOUR", + "purpose": "Rate at which a session's [WebSearch limit](https://code.claude.com/docs/en/tools-reference.md#session-search-limit) refills, in calls per hour. The default is `100` in an interactive terminal session. In a [non-interactive](https://code.claude.com/docs/en/headless.md) session the default is `0`, which turns refill off. Takes plain digits only; any other spelling reads as unset. Requires Claude Code v2.1.290 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_WEBFETCH_CACHE_TTL_MS", + "purpose": "Set to the number of milliseconds [WebFetch](https://code.claude.com/docs/en/tools-reference.md#webfetch-tool-behavior) 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", + "default": null + }, + { + "name": "CLAUDE_CODE_WEBFETCH_DEADLINE_MS", + "purpose": "Upper bound in milliseconds on how long [WebFetch](https://code.claude.com/docs/en/tools-reference.md#webfetch-tool-behavior) waits for a page to download, including any redirects it follows. A download that hasn't completed by then fails with a deadline error. The default is `300000`, which is five minutes. Set to `0` to remove the limit. Takes plain digits only; a decimal or any other spelling keeps the default. Requires Claude Code v2.1.268 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_WORKER_CHECKIN_SCHEDULE", + "purpose": "When `CLAUDE_AUTO_BACKGROUND_TASKS` is set to `1`, how long Claude Code waits before each reminder to Claude to check on [background subagents](https://code.claude.com/docs/en/sub-agents.md#run-subagents-in-foreground-or-background) that are still running. Takes one or more comma-separated waits in whole seconds from `1` to `86400`, such as `600` or `600,1800,3600`. Each value is the wait before the next reminder, and the last value repeats. Takes plain digits only; any other value or spelling reads as unset. When unset, there are no reminders. Requires Claude Code v2.1.283 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_WORKFLOW_MAX_CONCURRENT_AGENTS", + "purpose": "How many agents a single [workflow](https://code.claude.com/docs/en/workflows.md) run executes at once, from `1` to `256`. By default, a run executes up to 16 agents at once, fewer when Claude Code has fewer CPUs available; queued `agent()` calls wait for a free slot. Each running agent's transcript stays in Claude Code's memory, so higher values raise memory use. Takes plain digits only; out-of-range values and other spellings keep the default. Requires Claude Code v2.1.269 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_WORKFLOW_PREFIX_STAGGER_MS", + "purpose": "Upper bound in milliseconds on how long a [workflow](https://code.claude.com/docs/en/workflows.md) 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](https://code.claude.com/docs/en/workflows.md#prompt-caching-in-a-fan-out), 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", + "default": null + }, + { + "name": "CLAUDE_CODE_YOU_SHOULD_KNOW_DEBUG", + "purpose": "Set to `1` to show, above the prompt, a line for each of the last three checks the [You should know mod](https://code.claude.com/docs/en/interactive-mode.md#you-should-know-suggestions) made in this session. Use it to confirm the mod is checking when no notes appear. Requires Claude Code v2.1.287 or later", "default": null }, { "name": "CLAUDE_CONFIG_DIR", - "purpose": "Override the configuration directory (default: `~/.claude`). All settings, credentials, session history, and plugins are stored under this path. Useful for running multiple accounts side by side: for example, `alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude'`", + "purpose": "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](https://code.claude.com/docs/en/authentication.md#credential-management). 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. In a settings file, write the [absolute path](#in-settings-files). Ignored in [project and local settings](https://code.claude.com/docs/en/settings-reference.md#variables-claude-code-ignores-in-env)", "default": "~/.claude" }, { "name": "CLAUDE_EFFORT", - "purpose": "Set automatically in Bash tool subprocesses and hook commands to the active [effort level](/en/model-config#adjust-effort-level) for the turn: `low`, `medium`, `high`, `xhigh`, or `max`. Matches the `effort.level` field passed to [hooks](/en/hooks). Only set when the current model supports the effort parameter", + "purpose": "Set automatically in Bash tool subprocesses and hook commands to the [effort level](https://code.claude.com/docs/en/model-config.md#adjust-effort-level) in effect when the subprocess starts: `low`, `medium`, `high`, `xhigh`, or `max`. Matches the `effort.level` field passed to [hooks](https://code.claude.com/docs/en/hooks.md). Only set when the current model supports the effort parameter", "default": null }, { "name": "CLAUDE_ENABLE_BYTE_WATCHDOG", - "purpose": "Set to `1` to force-enable the byte-level streaming idle watchdog, or set to `0` to force-disable it. When unset, the watchdog is enabled by default for Anthropic API connections. The byte watchdog aborts a connection when no bytes arrive on the wire for the duration set by `CLAUDE_STREAM_IDLE_TIMEOUT_MS`, with a minimum of 5 minutes, independent of the event-level watchdog", + "purpose": "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](https://code.claude.com/docs/en/network-config.md#streaming-idle-watchdogs) on the connections where that deadline runs. When unset, the watchdog is enabled by default for direct Anthropic API and [Claude Platform on AWS](https://code.claude.com/docs/en/claude-platform-on-aws.md) connections, and for streaming responses on [gateway](https://code.claude.com/docs/en/gateways.md) 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](https://code.claude.com/docs/en/network-config.md#streaming-idle-watchdogs)", + "default": null + }, + { + "name": "CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCK", + "purpose": "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](https://code.claude.com/docs/en/network-config.md#streaming-idle-watchdogs) on Bedrock streaming requests. Off by default. Configure the timeout with `CLAUDE_STREAM_IDLE_TIMEOUT_MS`", "default": null }, { "name": "CLAUDE_ENABLE_STREAM_WATCHDOG", - "purpose": "Set to `1` to enable the event-level streaming idle watchdog. Off by default. For Bedrock, Vertex, and Foundry, this is the only idle watchdog available. Configure the timeout with `CLAUDE_STREAM_IDLE_TIMEOUT_MS`", + "purpose": "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](https://code.claude.com/docs/en/network-config.md#streaming-idle-watchdogs)", "default": null }, { "name": "CLAUDE_ENV_FILE", - "purpose": "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](/en/hooks#persist-environment-variables), [Setup](/en/hooks#setup), [CwdChanged](/en/hooks#cwdchanged), and [FileChanged](/en/hooks#filechanged) hooks", + "purpose": "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. PowerShell commands receive its variables too, in v2.1.296 or later, under the conditions in [Persisted variables in PowerShell commands](https://code.claude.com/docs/en/hooks.md#persisted-variables-in-powershell-commands). Also populated dynamically by [SessionStart](https://code.claude.com/docs/en/hooks.md#persist-environment-variables), [Setup](https://code.claude.com/docs/en/hooks.md#setup), [CwdChanged](https://code.claude.com/docs/en/hooks.md#cwdchanged), and [FileChanged](https://code.claude.com/docs/en/hooks.md#filechanged) hooks", + "default": null + }, + { + "name": "CLAUDE_JOB_DIR", + "purpose": "Set by Claude Code in each [background session](https://code.claude.com/docs/en/agent-view.md) to that session's `~/.claude/jobs/` directory. Shell commands that the session runs inherit it. Write scratch files to [`$CLAUDE_JOB_DIR/tmp`](https://code.claude.com/docs/en/agent-view#where-state-is-stored). Claude's `Write` and `Edit` calls there don't prompt for permission, and the directory is removed when the session is deleted", + "default": null + }, + { + "name": "CLAUDE_PID", + "purpose": "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](https://code.claude.com/docs/en/errors.md#pkill-pattern-matches-the-claude-code-process). Read it from your own scripts to identify or signal the parent Claude Code process deliberately. Requires Claude Code v2.1.214 or later", "default": null }, { "name": "CLAUDE_REMOTE_CONTROL_SESSION_NAME_PREFIX", - "purpose": "Prefix for auto-generated [Remote Control](/en/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", + "purpose": "Prefix for auto-generated [Remote Control](https://code.claude.com/docs/en/remote-control.md) 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", + "default": null + }, + { + "name": "CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS", + "purpose": "Deadline in milliseconds for the first response byte of a streaming request, on the connections where the [first-byte deadline](https://code.claude.com/docs/en/network-config.md#streaming-idle-watchdogs) 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](https://code.claude.com/docs/en/errors.md#no-response-from-api). Requires Claude Code v2.1.242 or later", "default": null }, { "name": "CLAUDE_STREAM_IDLE_TIMEOUT_MS", - "purpose": "Timeout in milliseconds before the streaming idle watchdog closes a stalled connection. Default and minimum `300000` (5 minutes) for both the byte-level and event-level watchdogs; lower values are silently clamped to absorb extended thinking pauses and proxy buffering. For third-party providers, requires `CLAUDE_ENABLE_STREAM_WATCHDOG=1`", + "purpose": "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](https://code.claude.com/docs/en/network-config.md#streaming-idle-watchdogs)", + "default": null + }, + { + "name": "CLAUDE_SUBAGENT_BG_SHELL_MAX_MS", + "purpose": "Removed in v2.1.260 and now a no-op. Previously capped how long a [background shell command](https://code.claude.com/docs/en/interactive-mode.md#background-bash-commands) that a [subagent](https://code.claude.com/docs/en/sub-agents.md) started could run, in milliseconds, with a 60-minute default. See [the background command lifetime rules](https://code.claude.com/docs/en/tools-reference.md#background-commands)", "default": null }, { "name": "CLAUDECODE", - "purpose": "Set to `1` in shell environments Claude Code spawns (Bash tool, tmux sessions). Not set in [hooks](/en/hooks) or [status line](/en/statusline) commands. Use to detect when a script is running inside a shell spawned by Claude Code", + "purpose": "Set to `1` in subprocesses Claude Code spawns (Bash and PowerShell tools, tmux sessions, [hook](https://code.claude.com/docs/en/hooks.md) commands, [status line](https://code.claude.com/docs/en/statusline.md) commands, stdio [MCP server](https://code.claude.com/docs/en/mcp.md) 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", "default": null }, { "name": "DEBUG", - "purpose": "Set to `1` to enable debug mode, equivalent to launching with [`--debug`](/en/cli-reference#cli-flags). Debug logs are written to `~/.claude/debug/.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", + "purpose": "Set to `1` to enable debug mode, equivalent to launching with [`--debug`](https://code.claude.com/docs/en/cli-reference#cli-flags). Debug logs are written to `~/.claude/debug/.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", "default": null }, { "name": "DISABLE_AUTO_COMPACT", - "purpose": "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", + "purpose": "Set to `1` to disable automatic compaction when approaching the context limit, along with [idle compaction](https://code.claude.com/docs/en/settings-reference.md#idlecompaction). The manual `/compact` command remains available. Use when you want explicit control over when compaction occurs. Overrides the [`autoCompactEnabled`](https://code.claude.com/docs/en/settings-reference#autocompactenabled) setting", "default": null }, { @@ -900,32 +1565,32 @@ }, { "name": "DISABLE_DOCTOR_COMMAND", - "purpose": "Set to `1` to hide the `/doctor` command. Useful for managed deployments where users should not run installation diagnostics", + "purpose": "Set to `1` to hide the [`/doctor`](https://code.claude.com/docs/en/commands#all-commands) 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", "default": null }, { "name": "DISABLE_ERROR_REPORTING", - "purpose": "Set to `1` to opt out of Sentry error reporting", + "purpose": "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", "default": null }, { "name": "DISABLE_EXTRA_USAGE_COMMAND", - "purpose": "Set to `1` to hide the `/extra-usage` command that lets users purchase additional usage beyond rate limits", + "purpose": "Set to `1` to hide the `/usage-credits` command that lets users purchase additional usage beyond rate limits", "default": null }, { "name": "DISABLE_FEEDBACK_COMMAND", - "purpose": "Set to `1` to disable the `/feedback` command. The older name `DISABLE_BUG_COMMAND` is also accepted", + "purpose": "Set to `1` to disable the `/feedback` command and [Claude-drafted feedback](https://code.claude.com/docs/en/tools-reference.md#sendfeedback-tool-behavior). 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", "default": null }, { "name": "DISABLE_GROWTHBOOK", - "purpose": "Set to `1` to disable GrowthBook feature-flag fetching and use code defaults for every flag. Telemetry event logging stays on unless `DISABLE_TELEMETRY` is also set", + "purpose": "Set to `1` or `true` to disable feature-flag fetching and use code defaults for every flag. This makes [Remote Control](https://code.claude.com/docs/en/remote-control.md#requirements) and the other [features that need feature-flag fetching](#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", "default": null }, { "name": "DISABLE_INSTALL_GITHUB_APP_COMMAND", - "purpose": "Set to `1` to hide the `/install-github-app` command. Already hidden when using third-party providers (Bedrock, Vertex, or Foundry)", + "purpose": "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)", "default": null }, { @@ -950,27 +1615,32 @@ }, { "name": "DISABLE_PROMPT_CACHING", - "purpose": "Set to `1` to disable prompt caching for all models (takes precedence over per-model settings)", + "purpose": "Set to `1` to disable [prompt caching](https://code.claude.com/docs/en/prompt-caching.md#disable-prompt-caching) for all models (takes precedence over per-model settings)", + "default": null + }, + { + "name": "DISABLE_PROMPT_CACHING_FABLE", + "purpose": "Set to `1` to disable prompt caching for Fable models", "default": null }, { "name": "DISABLE_PROMPT_CACHING_HAIKU", - "purpose": "Set to `1` to disable prompt caching for Haiku models", + "purpose": "Set to `1` to disable prompt caching for the [default Haiku model](https://code.claude.com/docs/en/prompt-caching.md#disable-prompt-caching), wherever it runs", "default": null }, { "name": "DISABLE_PROMPT_CACHING_OPUS", - "purpose": "Set to `1` to disable prompt caching for Opus models", + "purpose": "Set to `1` to disable prompt caching for the [default Opus model](https://code.claude.com/docs/en/prompt-caching.md#disable-prompt-caching)", "default": null }, { "name": "DISABLE_PROMPT_CACHING_SONNET", - "purpose": "Set to `1` to disable prompt caching for Sonnet models", + "purpose": "Set to `1` to disable prompt caching for the [default Sonnet model](https://code.claude.com/docs/en/prompt-caching.md#disable-prompt-caching)", "default": null }, { "name": "DISABLE_TELEMETRY", - "purpose": "Set to `1` to opt out of telemetry. Telemetry events do not include user data like code, file paths, or bash commands. Also disables feature flags, so some features that are still rolling out may not be available", + "purpose": "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](#features-that-need-feature-flag-fetching). See [Turn telemetry off for your organization](https://code.claude.com/docs/en/managed-settings.md#turn-telemetry-off-for-your-organization)", "default": null }, { @@ -985,42 +1655,47 @@ }, { "name": "DO_NOT_TRACK", - "purpose": "Set to `1` to opt out of telemetry. Equivalent to setting `DISABLE_TELEMETRY`. Honored as the [standard cross-tool convention](https://consoledonottrack.com/)", + "purpose": "Set to `1` to opt out of telemetry, with the same effect as `DISABLE_TELEMETRY`, including on [feature-flag fetching](#features-that-need-feature-flag-fetching). 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", + "default": null + }, + { + "name": "ENABLE_BETA_TRACING_DETAILED", + "purpose": "Set to `1`, and set `BETA_TRACING_ENDPOINT` to your OTLP/HTTP collector endpoint, to turn on [detailed beta tracing](https://code.claude.com/docs/en/monitoring-usage.md#traces-beta), 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](https://code.claude.com/docs/en/settings-reference.md#variables-claude-code-ignores-in-env)", "default": null }, { "name": "ENABLE_CLAUDEAI_MCP_SERVERS", - "purpose": "Set to `false` to disable [claude.ai MCP servers](/en/mcp#use-mcp-servers-from-claude-ai) in Claude Code. Enabled by default for logged-in users", + "purpose": "Set to `false` to stop Claude Code from fetching [claude.ai MCP servers](https://code.claude.com/docs/en/mcp.md#use-mcp-servers-from-claude-ai). Enabled by default for logged-in users. To disable per-project or per-org, set [`disableClaudeAiConnectors`](https://code.claude.com/docs/en/settings-reference#disableclaudeaiconnectors) in settings instead", "default": null }, { "name": "ENABLE_PROMPT_CACHING_1H", - "purpose": "Set to `1` to request a 1-hour prompt cache TTL instead of the default 5 minutes. Intended for API key, [Bedrock](/en/amazon-bedrock), [Vertex](/en/google-vertex-ai), [Foundry](/en/microsoft-foundry), and [Claude Platform on AWS](/en/claude-platform-on-aws) users. Subscription users receive 1-hour TTL automatically. 1-hour cache writes are billed at a higher rate", + "purpose": "Set to `1` to request a 1-hour [prompt cache TTL](https://code.claude.com/docs/en/prompt-caching.md#cache-lifetime) instead of the default 5 minutes. Intended for API key, [Amazon Bedrock](https://code.claude.com/docs/en/amazon-bedrock.md), [Google Cloud's Agent Platform](https://code.claude.com/docs/en/google-vertex-ai.md), [Microsoft Foundry](https://code.claude.com/docs/en/microsoft-foundry.md), and [Claude Platform on AWS](https://code.claude.com/docs/en/claude-platform-on-aws.md) users. For subscription users within included usage, Claude Code requests the 1-hour TTL automatically on the [main conversation](https://code.claude.com/docs/en/prompt-caching.md#which-ttl-each-request-gets). Subscription users drawing on [usage credits](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans) can set it to keep the 1-hour TTL. 1-hour cache writes are billed at a higher rate. To choose the TTL separately for the main conversation and for requests outside it, use `CLAUDE_CODE_PROMPT_CACHE_TTL` and `CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL`, which take precedence over this variable", "default": null }, { "name": "ENABLE_PROMPT_CACHING_1H_BEDROCK", - "purpose": "Deprecated. Use `ENABLE_PROMPT_CACHING_1H` instead", + "purpose": "Deprecated. Use `ENABLE_PROMPT_CACHING_1H` instead. Has no effect on [Claude apps gateway](https://code.claude.com/docs/en/claude-apps-gateway) sessions, even when the gateway routes to Amazon Bedrock", "default": null }, { "name": "ENABLE_TOOL_SEARCH", - "purpose": "Controls [MCP tool search](/en/mcp#scale-with-mcp-tool-search). Unset: all MCP tools deferred by default, but loaded upfront on Vertex AI or when `ANTHROPIC_BASE_URL` points to a non-first-party host. Values: `true` (always defer and send the beta header; supported on Vertex AI with Sonnet 4.5 and later or Opus 4.5 and later; requests fail on earlier Vertex AI models or on proxies that do not support `tool_reference`), `auto` (threshold mode: load upfront if tools fit within 10% of context), `auto:N` (custom threshold, e.g., `auto:5` for 5%), `false` (load all upfront)", + "purpose": "Controls [MCP tool search](https://code.claude.com/docs/en/mcp.md#scale-with-mcp-tool-search). Unset or `true` defers MCP tools, except in the [cases that keep tool search off](https://code.claude.com/docs/en/mcp.md#configure-tool-search). `auto` turns tool search on once definitions reach 10% of the context window. `auto:N` sets a custom threshold, such as `auto:5` for 5%. `false` loads all tools upfront. If a gateway rejects tool search, see [Tool search through an LLM gateway](https://code.claude.com/docs/en/mcp.md#tool-search-through-a-gateway)", "default": null }, { - "name": "FALLBACK_FOR_ALL_PRIMARY_MODELS", - "purpose": "Set to any non-empty value to trigger fallback to [`--fallback-model`](/en/cli-reference#cli-flags) after repeated overload errors on any primary model. By default, only Opus models trigger the fallback", + "name": "FORCE_AUTOUPDATE_PLUGINS", + "purpose": "Set to `1` to force plugin auto-updates even when the main auto-updater is disabled via `DISABLE_AUTOUPDATER`", "default": null }, { - "name": "FORCE_AUTOUPDATE_PLUGINS", - "purpose": "Set to `1` to force plugin auto-updates even when the main auto-updater is disabled via `DISABLE_AUTOUPDATER`", + "name": "FORCE_HYPERLINK", + "purpose": "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. The footer [PR or merge request badge](https://code.claude.com/docs/en/interactive-mode.md#pr-review-status) renders as a hyperlink even when Claude Code can't detect terminal support, such as over SSH. Set `0` to render the badge as plain text", "default": null }, { "name": "FORCE_PROMPT_CACHING_5M", - "purpose": "Set to `1` to force the 5-minute prompt cache TTL even when 1-hour TTL would otherwise apply. Overrides `ENABLE_PROMPT_CACHING_1H`", + "purpose": "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", "default": null }, { @@ -1035,42 +1710,67 @@ }, { "name": "IS_DEMO", - "purpose": "Set to `1` to enable demo mode: hides your email and organization name from the header and `/status` output, and skips onboarding. Useful when streaming or recording a session", + "purpose": "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", "default": null }, { "name": "MAX_MCP_OUTPUT_TOKENS", - "purpose": "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`](/en/mcp#raise-the-limit-for-a-specific-tool) use that character limit for text content instead, but image content from those tools is still subject to this variable (default: 25000)", + "purpose": "Maximum number of tokens allowed in MCP tool responses (default: 25000). Claude Code displays a warning when output exceeds 10,000 tokens. Tools that declare [`anthropic/maxResultSizeChars`](https://code.claude.com/docs/en/mcp#raise-the-limit-for-a-specific-tool) use that character limit for text content instead, but image content from those tools is still subject to this variable. A successful text result longer than 50,000 characters from a tool without that annotation is [saved to a file](https://code.claude.com/docs/en/mcp.md#mcp-output-limits-and-warnings) regardless of this variable", "default": "25000" }, { "name": "MAX_STRUCTURED_OUTPUT_RETRIES", - "purpose": "Number of times to retry when the model's response fails validation against the [`--json-schema`](/en/cli-reference#cli-flags) in non-interactive mode (the `-p` flag). Defaults to 5", + "purpose": "Number of attempts Claude Code allows when the model's response fails validation against the [`--json-schema`](https://code.claude.com/docs/en/cli-reference#cli-flags) in non-interactive mode with the `-p` flag; after that many failed attempts with no valid output, the run fails. The same cap applies when a [workflow](https://code.claude.com/docs/en/workflows.md) subagent's structured output fails validation. Defaults to 5, a first attempt plus four retries", "default": null }, { "name": "MAX_THINKING_TOKENS", - "purpose": "Override the [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) token budget. The ceiling is the model's [max output tokens](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison) minus one. Set to `0` to disable thinking entirely. On models with [adaptive reasoning](/en/model-config#adjust-effort-level), the budget is ignored unless adaptive reasoning is disabled via `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING`", + "purpose": "Fixed token budget for [extended thinking](https://platform.claude.com/docs/en/build-with-claude/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](https://code.claude.com/docs/en/model-config.md#adjust-effort-level) choose their own thinking depth, and other models use the cap. Set to `0` to disable thinking on the Anthropic API, except on Opus 5.5, Sonnet 5.5, Haiku 5.5, and the Fable models, which can't have thinking turned off. On [third-party providers](https://code.claude.com/docs/en/third-party-integrations.md), `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](https://code.claude.com/docs/en/errors.md#effort-isnt-available-with-thinking-turned-off), such as Opus 5. For a positive value, Claude Code ignores the number itself on adaptive reasoning models, except when `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` turns adaptive reasoning off", "default": null }, { "name": "MCP_CLIENT_SECRET", - "purpose": "OAuth client secret for MCP servers that require [pre-configured credentials](/en/mcp#use-pre-configured-oauth-credentials). Avoids the interactive prompt when adding a server with `--client-secret`", + "purpose": "OAuth client secret for MCP servers that require [pre-configured credentials](https://code.claude.com/docs/en/mcp.md#use-pre-configured-oauth-credentials). Avoids the interactive prompt when adding a server with `--client-secret`", "default": null }, { "name": "MCP_CONNECT_TIMEOUT_MS", - "purpose": "How long the first query waits, in milliseconds, for the MCP connection batch before snapshotting the tool list (default: 5000). Servers still pending at the deadline keep connecting in the background but won't appear until the next query. Distinct from `MCP_TIMEOUT`, which bounds an individual server's connect attempt. Most relevant to non-interactive sessions that issue a single query and need slow-connecting servers to be visible", + "purpose": "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`](https://code.claude.com/docs/en/mcp#exempt-a-server-from-deferral). Servers still pending at the deadline keep connecting in the background. Distinct from `MCP_TIMEOUT`, which bounds an individual server's connect attempt", "default": "5000" }, { "name": "MCP_CONNECTION_NONBLOCKING", - "purpose": "Set to `true` in non-interactive mode (`-p`) to skip the MCP connection wait entirely. Useful for scripted pipelines where MCP tools are not needed. Without this variable, the first query waits up to 5 seconds for `--mcp-config` server connections. Servers configured with [`alwaysLoad: true`](/en/mcp#exempt-a-server-from-deferral) always block startup regardless of this variable, since their tools must be present when the first prompt is built", + "purpose": "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`](https://code.claude.com/docs/en/mcp#exempt-a-server-from-deferral) still make startup wait regardless, except when served from the [discovery cache](https://code.claude.com/docs/en/mcp.md#server-status-detail), since their tools must be present when the first prompt is built. In non-interactive mode (`-p`) without `--input-format stream-json`, Claude Code also waits for still-pending servers before the first turn regardless of this variable. When you pass [`--mcp-config`](https://code.claude.com/docs/en/cli-reference#cli-flags) explicitly, the wait has a longer deadline; see that flag's entry for the cached-server exception", + "default": "servers" + }, + { + "name": "MCP_DISCOVERY_CACHE", + "purpose": "Turns the [MCP discovery cache](https://code.claude.com/docs/en/mcp.md#server-status-detail) on or off. With the cache on, a remote HTTP or SSE server you've used before can show the [`cached` status](https://code.claude.com/docs/en/mcp#server-status-detail), 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", "default": null }, + { + "name": "MCP_DISCOVERY_CACHE_MAX_STALE_S", + "purpose": "Maximum age, in seconds, of a [discovery-cache](https://code.claude.com/docs/en/mcp.md#server-status-detail) 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", + "default": "14400" + }, + { + "name": "MCP_DISCOVERY_CACHE_STRIKES", + "purpose": "At a start where a [discovery-cache](https://code.claude.com/docs/en/mcp.md#server-status-detail) 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", + "default": "1" + }, + { + "name": "MCP_DISCOVERY_CACHE_TTL_S", + "purpose": "Seconds for which Claude Code uses a [discovery-cache](https://code.claude.com/docs/en/mcp.md#server-status-detail) 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", + "default": "900" + }, { "name": "MCP_OAUTH_CALLBACK_PORT", - "purpose": "Fixed port for the OAuth redirect callback, as an alternative to `--callback-port` when adding an MCP server with [pre-configured credentials](/en/mcp#use-pre-configured-oauth-credentials)", + "purpose": "Fixed port for the OAuth redirect callback, as an alternative to `--callback-port` when adding an MCP server with [pre-configured credentials](https://code.claude.com/docs/en/mcp.md#use-pre-configured-oauth-credentials)", + "default": null + }, + { + "name": "MCP_PROTOCOL_NEGOTIATION", + "purpose": "On the [v2 MCP client runtime](https://code.claude.com/docs/en/mcp.md#mcp-client-runtimes) only, controls whether Claude Code probes servers for MCP protocol revision 2026-07-28. Set `legacy` to skip the probe, so that every server connects with the handshake from before that revision. Set `auto` to probe the server kinds that support the probe: HTTP and stdio servers, claude.ai connectors, and the connectors of cloud and Remote Control sessions. With the variable unset, Claude Code probes those same kinds by default; see [MCP client runtimes](https://code.claude.com/docs/en/mcp.md#mcp-client-runtimes). Any other value is ignored with a warning in the debug log. Requires Claude Code v2.1.221 or later", "default": null }, { @@ -1078,6 +1778,11 @@ "purpose": "Maximum number of remote MCP servers (HTTP/SSE) to connect in parallel during startup (default: 20)", "default": "20" }, + { + "name": "MCP_SDK_GENERATION", + "purpose": "Pin which [MCP client runtime](https://code.claude.com/docs/en/mcp.md#mcp-client-runtimes) this process connects to MCP servers with: `v1`, built on MCP TypeScript SDK 1.x, or `v2`, built on [MCP TypeScript SDK 2.0](https://ts.sdk.modelcontextprotocol.io/v2/). Without the variable, Claude Code uses v2, starting with the versions listed in that section. 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", + "default": null + }, { "name": "MCP_SERVER_CONNECTION_BATCH_SIZE", "purpose": "Maximum number of local MCP servers (stdio) to connect in parallel during startup (default: 3)", @@ -1090,7 +1795,7 @@ }, { "name": "MCP_TOOL_TIMEOUT", - "purpose": "Timeout in milliseconds for MCP tool execution (default: 100000000, about 28 hours)", + "purpose": "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", "default": "100000000" }, { @@ -1098,50 +1803,80 @@ "purpose": "List of domains and IPs to which requests will be directly issued, bypassing proxy", "default": null }, + { + "name": "OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT", + "purpose": "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](https://code.claude.com/docs/en/monitoring-usage.md#common-configuration-variables)", + "default": null + }, + { + "name": "OTEL_LOG_ASSISTANT_RESPONSES", + "purpose": "Set to `1` to include the model's response text on `assistant_response` OpenTelemetry log events. When unset, Claude Code uses the value of `OTEL_LOG_USER_PROMPTS` instead. Set to `0` to keep responses redacted even when `OTEL_LOG_USER_PROMPTS` is set. Set it in your shell, user settings, or managed settings. Ignored in [project and local settings](https://code.claude.com/docs/en/settings-reference.md#variables-claude-code-ignores-in-env). Requires Claude Code v2.1.193 or later. See [Monitoring](https://code.claude.com/docs/en/monitoring-usage.md#assistant-response-event)", + "default": null + }, + { + "name": "OTEL_LOG_MANAGED_SETTINGS", + "purpose": "Set to `1` to add the redacted managed settings, and a SHA-256 digest of the settings before redaction, to `managed_settings_resolved` OpenTelemetry log events. Disabled by default. Set it in your shell, user settings, or managed settings; a value in project or local settings doesn't turn it on. Requires Claude Code v2.1.274 or later. See [Monitoring](https://code.claude.com/docs/en/monitoring-usage.md#managed-settings-resolved-event)", + "default": null + }, { "name": "OTEL_LOG_RAW_API_BODIES", - "purpose": "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 60 KB, or `file:` to write untruncated bodies to disk and emit a `body_ref` path instead. Disabled by default; bodies include the entire conversation history. See [Monitoring](/en/monitoring-usage#api-request-body-event)", + "purpose": "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:` 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](https://code.claude.com/docs/en/settings-reference.md#variables-claude-code-ignores-in-env). See [Monitoring](https://code.claude.com/docs/en/monitoring-usage.md#api-request-body-event)", "default": null }, { "name": "OTEL_LOG_TOOL_CONTENT", - "purpose": "Set to `1` to include tool input and output content in OpenTelemetry span events. Disabled by default to protect sensitive data. See [Monitoring](/en/monitoring-usage)", + "purpose": "Set to `1` to include tool content in the `tool.output` OpenTelemetry span event. Span attributes carry tool content under [their own gates](https://code.claude.com/docs/en/monitoring-usage.md#new-context-gates). Requires [tracing](https://code.claude.com/docs/en/monitoring-usage.md#traces-beta). Disabled by default to protect sensitive data. Set it in your shell, user settings, or managed settings. Ignored in [project and local settings](https://code.claude.com/docs/en/settings-reference.md#variables-claude-code-ignores-in-env), apart from the off values that section describes. See [Monitoring](https://code.claude.com/docs/en/monitoring-usage.md#tool-output-span-event)", "default": null }, { "name": "OTEL_LOG_TOOL_DETAILS", - "purpose": "Set to `1` to include tool input arguments, MCP server names, raw error strings on tool failures, and other tool details in OpenTelemetry traces and logs. Disabled by default to protect PII. See [Monitoring](/en/monitoring-usage)", + "purpose": "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; real agent, skill, plugin, and MCP server names on [cost and token metrics](https://code.claude.com/docs/en/monitoring-usage.md#cost-counter); and other tool details in OpenTelemetry metrics, traces, and logs. Disabled by default to protect PII. Set it in your shell, user settings, or managed settings. Ignored in [project and local settings](https://code.claude.com/docs/en/settings-reference.md#variables-claude-code-ignores-in-env), apart from the off values that section describes. See [Monitoring](https://code.claude.com/docs/en/monitoring-usage.md)", "default": null }, { "name": "OTEL_LOG_USER_PROMPTS", - "purpose": "Set to `1` to include user prompt text in OpenTelemetry traces and logs. Disabled by default (prompts are redacted). See [Monitoring](/en/monitoring-usage)", + "purpose": "Set to `1` to include user prompt text in OpenTelemetry traces and logs. Disabled by default (prompts are redacted). Set it in your shell, user settings, or managed settings. Ignored in [project and local settings](https://code.claude.com/docs/en/settings-reference.md#variables-claude-code-ignores-in-env), apart from the off values that section describes. See [Monitoring](https://code.claude.com/docs/en/monitoring-usage.md)", "default": null }, { "name": "OTEL_METRICS_INCLUDE_ACCOUNT_UUID", - "purpose": "Set to `false` to exclude account UUID from metrics attributes (default: included). See [Monitoring](/en/monitoring-usage)", + "purpose": "Set to `false` to exclude account UUID from metrics attributes (default: included). See [Monitoring](https://code.claude.com/docs/en/monitoring-usage.md)", + "default": "included" + }, + { + "name": "OTEL_METRICS_INCLUDE_ENTRYPOINT", + "purpose": "Set to `true` to include the session entrypoint in metrics attributes (default: excluded). Added in v2.1.152. See [Monitoring](https://code.claude.com/docs/en/monitoring-usage.md)", + "default": "excluded" + }, + { + "name": "OTEL_METRICS_INCLUDE_REPOSITORY", + "purpose": "Set to `true` to tag OpenTelemetry metrics and events with `vcs.*` attributes identifying the session's repository (default: excluded). Requires Claude Code v2.1.269 or later. See [Repository attributes](https://code.claude.com/docs/en/monitoring-usage.md#repository-attributes)", + "default": "excluded" + }, + { + "name": "OTEL_METRICS_INCLUDE_RESOURCE_ATTRIBUTES", + "purpose": "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](https://code.claude.com/docs/en/monitoring-usage.md#multi-team-organization-support)", "default": "included" }, { "name": "OTEL_METRICS_INCLUDE_SESSION_ID", - "purpose": "Set to `false` to exclude session ID from metrics attributes (default: included). See [Monitoring](/en/monitoring-usage)", + "purpose": "Set to `false` to exclude session ID from metrics attributes (default: included). See [Monitoring](https://code.claude.com/docs/en/monitoring-usage.md)", "default": "included" }, { "name": "OTEL_METRICS_INCLUDE_VERSION", - "purpose": "Set to `true` to include Claude Code version in metrics attributes (default: excluded). See [Monitoring](/en/monitoring-usage)", + "purpose": "Set to `true` to include Claude Code version in metrics attributes (default: excluded). See [Monitoring](https://code.claude.com/docs/en/monitoring-usage.md)", "default": "excluded" }, { "name": "SLASH_COMMAND_TOOL_CHAR_BUDGET", - "purpose": "Override the character budget for skill metadata shown to the [Skill tool](/en/skills#control-who-invokes-a-skill). The budget scales dynamically at 1% of the context window, with a fallback of 8,000 characters. Legacy name kept for backwards compatibility", + "purpose": "Override the character budget for skill metadata shown to the [Skill tool](https://code.claude.com/docs/en/skills.md#control-who-invokes-a-skill). The budget scales dynamically at 1% of the context window, with a fallback of 8,000 characters. Legacy name kept for backwards compatibility", "default": null }, { "name": "TASK_MAX_OUTPUT_LENGTH", - "purpose": "Maximum number of characters in [subagent](/en/sub-agents) 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", - "default": "32000" + "purpose": "Removed in v2.1.277 and now a no-op, together with the `TaskOutput` tool it sized. Previously set the maximum number of characters of a [background task's](https://code.claude.com/docs/en/tools-reference.md#background-commands) output that the `TaskOutput` tool kept. Claude reads a background task's output file with `Read` instead", + "default": null }, { "name": "USE_BUILTIN_RIPGREP", @@ -1150,62 +1885,102 @@ }, { "name": "VERTEX_REGION_CLAUDE_3_5_HAIKU", - "purpose": "Override region for Claude 3.5 Haiku when using Vertex AI", + "purpose": "Override region for Claude 3.5 Haiku when using Google Cloud's Agent Platform", "default": null }, { "name": "VERTEX_REGION_CLAUDE_3_5_SONNET", - "purpose": "Override region for Claude 3.5 Sonnet when using Vertex AI", + "purpose": "Override region for Claude 3.5 Sonnet when using Google Cloud's Agent Platform", "default": null }, { "name": "VERTEX_REGION_CLAUDE_3_7_SONNET", - "purpose": "Override region for Claude 3.7 Sonnet when using Vertex AI", + "purpose": "Override region for Claude 3.7 Sonnet when using Google Cloud's Agent Platform", "default": null }, { "name": "VERTEX_REGION_CLAUDE_4_0_OPUS", - "purpose": "Override region for Claude 4.0 Opus when using Vertex AI", + "purpose": "Override region for Claude Opus 4 when using Google Cloud's Agent Platform", "default": null }, { "name": "VERTEX_REGION_CLAUDE_4_0_SONNET", - "purpose": "Override region for Claude 4.0 Sonnet when using Vertex AI", + "purpose": "Override region for Claude Sonnet 4 when using Google Cloud's Agent Platform", "default": null }, { "name": "VERTEX_REGION_CLAUDE_4_1_OPUS", - "purpose": "Override region for Claude 4.1 Opus when using Vertex AI", + "purpose": "Override region for Claude Opus 4.1 when using Google Cloud's Agent Platform", "default": null }, { "name": "VERTEX_REGION_CLAUDE_4_5_OPUS", - "purpose": "Override region for Claude Opus 4.5 when using Vertex AI", + "purpose": "Override region for Claude Opus 4.5 when using Google Cloud's Agent Platform", "default": null }, { "name": "VERTEX_REGION_CLAUDE_4_5_SONNET", - "purpose": "Override region for Claude Sonnet 4.5 when using Vertex AI", + "purpose": "Override region for Claude Sonnet 4.5 when using Google Cloud's Agent Platform", "default": null }, { "name": "VERTEX_REGION_CLAUDE_4_6_OPUS", - "purpose": "Override region for Claude Opus 4.6 when using Vertex AI", + "purpose": "Override region for Claude Opus 4.6 when using Google Cloud's Agent Platform", "default": null }, { "name": "VERTEX_REGION_CLAUDE_4_6_SONNET", - "purpose": "Override region for Claude Sonnet 4.6 when using Vertex AI", + "purpose": "Override region for Claude Sonnet 4.6 when using Google Cloud's Agent Platform", "default": null }, { "name": "VERTEX_REGION_CLAUDE_4_7_OPUS", - "purpose": "{/* min-version: 2.1.111 */}Override region for Claude Opus 4.7 when using Vertex AI", + "purpose": "Override region for Claude Opus 4.7 when using Google Cloud's Agent Platform", + "default": null + }, + { + "name": "VERTEX_REGION_CLAUDE_4_8_OPUS", + "purpose": "Override region for Claude Opus 4.8 when using Google Cloud's Agent Platform", + "default": null + }, + { + "name": "VERTEX_REGION_CLAUDE_5_5_OPUS", + "purpose": "Override region for Claude Opus 5.5 when using Google Cloud's Agent Platform. Added in v2.1.280", + "default": null + }, + { + "name": "VERTEX_REGION_CLAUDE_5_5_SONNET", + "purpose": "Override region for Claude Sonnet 5.5 when using Google Cloud's Agent Platform. Added in v2.1.284", + "default": null + }, + { + "name": "VERTEX_REGION_CLAUDE_5_OPUS", + "purpose": "Override region for Claude Opus 5 when using Google Cloud's Agent Platform. Added in v2.1.219", + "default": null + }, + { + "name": "VERTEX_REGION_CLAUDE_5_SONNET", + "purpose": "Override region for Claude Sonnet 5 when using Google Cloud's Agent Platform. Added in v2.1.197", + "default": null + }, + { + "name": "VERTEX_REGION_CLAUDE_FABLE_5", + "purpose": "Override region for Claude Fable 5 when using Google Cloud's Agent Platform. Added in v2.1.170", + "default": null + }, + { + "name": "VERTEX_REGION_CLAUDE_FABLE_5_1", + "purpose": "Override region for Claude Fable 5.1 when using Google Cloud's Agent Platform. Added in v2.1.257", "default": null }, { "name": "VERTEX_REGION_CLAUDE_HAIKU_4_5", - "purpose": "Override region for Claude Haiku 4.5 when using Vertex AI", + "purpose": "Override region for Claude Haiku 4.5 when using Google Cloud's Agent Platform", + "default": null + }, + { + "name": "VERTEX_REGION_CLAUDE_HAIKU_5_5", + "purpose": "Override region for Claude Haiku 5.5 when using Google Cloud's Agent Platform. Added in v2.1.293", "default": null } ] diff --git a/catalog/hooks.json b/catalog/hooks.json index ff4dd27..2bc4b45 100644 --- a/catalog/hooks.json +++ b/catalog/hooks.json @@ -1,7 +1,7 @@ { "source": "https://code.claude.com/docs/en/hooks.md", - "fetchedAt": "2026-05-18T12:34:58.886Z", - "count": 29, + "fetchedAt": "2026-10-26T15:56:25.852Z", + "count": 33, "events": [ { "name": "ConfigChange", @@ -15,7 +15,7 @@ }, { "field": "reason", - "description": "Explanation shown to the user when `decision` is `\"block\"`" + "description": "Accepted but never shown" } ] }, @@ -27,22 +27,38 @@ "outputFields": [ { "field": "watchPaths", - "description": "Array of absolute paths. Replaces the current dynamic watch list (paths from your `matcher` configuration are always watched). Returning an empty array clears the dynamic list, which is typical when entering a new directory" + "description": "Array of absolute paths. Replaces the current dynamic watch list. Paths from your `matcher` configuration are always watched. Returning an empty array clears the dynamic list, which is typical when entering a new directory" } ] }, + { + "name": "DirectoryAdded", + "when": "When a working directory is added mid-session via `/add-dir` or the SDK `register_repo_root` control request", + "inputFields": [ + { + "field": "directory", + "description": "Absolute path of the directory that was added" + }, + { + "field": "source", + "description": "How the directory was added, `\"slash_command\"` for `/add-dir` or `\"register_repo_root\"` for the SDK control request" + } + ], + "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../transcript.jsonl\",\n \"cwd\": \"/Users/my-project\",\n \"hook_event_name\": \"DirectoryAdded\",\n \"directory\": \"/Users/my-other-repo\",\n \"source\": \"slash_command\"\n}", + "outputFields": [] + }, { "name": "Elicitation", "when": "When an MCP server requests user input during a tool call", "inputFields": [], - "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"permission_mode\": \"default\",\n \"hook_event_name\": \"Elicitation\",\n \"mcp_server_name\": \"my-mcp-server\",\n \"message\": \"Please provide your credentials\",\n \"mode\": \"form\",\n \"requested_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"username\": { \"type\": \"string\", \"title\": \"Username\" }\n }\n }\n}", + "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"hook_event_name\": \"Elicitation\",\n \"mcp_server_name\": \"my-mcp-server\",\n \"message\": \"Please provide your credentials\",\n \"mode\": \"form\",\n \"requested_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"username\": { \"type\": \"string\", \"title\": \"Username\" }\n }\n }\n}", "outputFields": [] }, { "name": "ElicitationResult", "when": "After a user responds to an MCP elicitation, before the response is sent back to the server", "inputFields": [], - "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"permission_mode\": \"default\",\n \"hook_event_name\": \"ElicitationResult\",\n \"mcp_server_name\": \"my-mcp-server\",\n \"action\": \"accept\",\n \"content\": { \"username\": \"alice\" },\n \"mode\": \"form\",\n \"elicitation_id\": \"elicit-123\"\n}", + "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"hook_event_name\": \"ElicitationResult\",\n \"mcp_server_name\": \"my-mcp-server\",\n \"action\": \"accept\",\n \"content\": { \"username\": \"alice\" },\n \"mode\": \"form\"\n}", "outputFields": [] }, { @@ -55,14 +71,14 @@ }, { "field": "event", - "description": "What happened: `\"change\"` (file modified), `\"add\"` (file created), or `\"unlink\"` (file deleted)" + "description": "What happened: `\"change\"` for a modified file, `\"add\"` for a created file, or `\"unlink\"` for a deleted file" } ], "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../transcript.jsonl\",\n \"cwd\": \"/Users/my-project\",\n \"hook_event_name\": \"FileChanged\",\n \"file_path\": \"/Users/my-project/.envrc\",\n \"event\": \"change\"\n}", "outputFields": [ { "field": "watchPaths", - "description": "Array of absolute paths. Replaces the current dynamic watch list (paths from your `matcher` configuration are always watched). Use this when your hook script discovers additional files to watch based on the changed file" + "description": "Array of absolute paths. Replaces the current dynamic watch list. Paths from your `matcher` configuration are always watched. Use this when your hook script discovers additional files to watch based on the changed file" } ] }, @@ -98,34 +114,67 @@ "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../transcript.jsonl\",\n \"cwd\": \"/Users/my-project\",\n \"hook_event_name\": \"InstructionsLoaded\",\n \"file_path\": \"/Users/my-project/CLAUDE.md\",\n \"memory_type\": \"Project\",\n \"load_reason\": \"session_start\"\n}", "outputFields": [] }, + { + "name": "MessageDisplay", + "when": "While assistant message text is displayed", + "inputFields": [ + { + "field": "turn_id", + "description": "UUID of the current turn" + }, + { + "field": "message_id", + "description": "UUID of the assistant message being displayed. Stable across every batch of the same message. This is not the API `msg_…` id, so it can't be correlated with transcript message ids" + }, + { + "field": "index", + "description": "Zero-based index of this batch within the message" + }, + { + "field": "final", + "description": "`true` on the message's last batch. Each message has exactly one final batch" + }, + { + "field": "delta", + "description": "The newly completed lines since the prior batch, terminating newlines included. Always whole lines, except the final batch which may end mid-line. In interactive runs, the final batch's delta is empty when the message ends on a newline, so treat `final`, not a non-empty delta, as the end-of-message signal. In Agent SDK and `claude -p` runs, the single call carries the entire message" + } + ], + "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../transcript.jsonl\",\n \"cwd\": \"/Users/my-project\",\n \"hook_event_name\": \"MessageDisplay\",\n \"turn_id\": \"0c9e6a2f-7d41-4f4e-9a15-3f4f7c2b8d10\",\n \"message_id\": \"5b2a9c8e-1f63-4d8a-b7c4-9e0d2a6f1c3b\",\n \"index\": 0,\n \"final\": false,\n \"delta\": \"Here is the plan:\\n\"\n}", + "outputFields": [ + { + "field": "displayContent", + "description": "Text displayed in place of the delta. Omit it to display the original" + } + ] + }, { "name": "Notification", "when": "When Claude Code sends a notification", "inputFields": [], - "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"hook_event_name\": \"Notification\",\n \"message\": \"Claude needs your permission to use Bash\",\n \"title\": \"Permission needed\",\n \"notification_type\": \"permission_prompt\"\n}", + "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"hook_event_name\": \"Notification\",\n \"message\": \"Claude needs your permission\",\n \"title\": \"Permission needed\",\n \"notification_type\": \"permission_prompt\"\n}", "outputFields": [] }, { "name": "PermissionDenied", - "when": "When a tool call is denied by the auto mode classifier. Return `{retry: true}` to tell the model it may retry the denied tool call", + "when": "When auto mode denies a tool call, including denials without a classifier verdict. Use JSON `hookSpecificOutput.retry: true` to tell the model it may retry the denied tool call. Claude Code ignores `retry` when the classifier produced no verdict", "inputFields": [ { "field": "reason", - "description": "The classifier's explanation for why the tool call was denied" + "description": "The denial reason. For a classifier verdict, in most sessions it names the matched rule in square brackets, such as `[Data Exfiltration]`; see [Review denials](https://code.claude.com/docs/en/auto-mode-config.md#review-denials) for the other forms. For a [no-verdict denial](#permissiondenied-decision-control), it starts with `Auto mode could not evaluate this action and is blocking it for safety`. For a denial because the classifier model was unavailable, it is the fixed text `Classifier unavailable`" } ], - "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"permission_mode\": \"auto\",\n \"hook_event_name\": \"PermissionDenied\",\n \"tool_name\": \"Bash\",\n \"tool_input\": {\n \"command\": \"rm -rf /tmp/build\",\n \"description\": \"Clean build directory\"\n },\n \"tool_use_id\": \"toolu_01ABC123...\",\n \"reason\": \"Auto mode denied: command targets a path outside the project\"\n}", + "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"permission_mode\": \"auto\",\n \"hook_event_name\": \"PermissionDenied\",\n \"tool_name\": \"Bash\",\n \"tool_input\": {\n \"command\": \"rm -rf /tmp/build\",\n \"description\": \"Clean build directory\"\n },\n \"tool_use_id\": \"toolu_01ABC123...\",\n \"reason\": \"[Irreversible Local Destruction]\"\n}", "outputFields": [] }, { "name": "PermissionRequest", - "when": "When a permission dialog appears", + "when": "When a tool call needs a permission decision", "inputFields": [], "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"permission_mode\": \"default\",\n \"hook_event_name\": \"PermissionRequest\",\n \"tool_name\": \"Bash\",\n \"tool_input\": {\n \"command\": \"rm -rf node_modules\",\n \"description\": \"Remove node_modules directory\"\n },\n \"permission_suggestions\": [\n {\n \"type\": \"addRules\",\n \"rules\": [{ \"toolName\": \"Bash\", \"ruleContent\": \"rm -rf node_modules\" }],\n \"behavior\": \"allow\",\n \"destination\": \"localSettings\"\n }\n ]\n}", "outputFields": [ { "field": "behavior", - "description": "`\"allow\"` grants the permission, `\"deny\"` denies it. [Deny and ask rules](/en/permissions#manage-permissions) are still evaluated, so a hook returning `\"allow\"` does not override a matching deny rule" + "description": "`\"allow\"` grants the permission, `\"deny\"` denies it. [Deny and ask rules](https://code.claude.com/docs/en/permissions.md#manage-permissions) are still evaluated, so a hook returning `\"allow\"` doesn't override a matching deny rule" }, { "field": "updatedInput", @@ -152,11 +201,23 @@ "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"hook_event_name\": \"PostCompact\",\n \"trigger\": \"manual\",\n \"compact_summary\": \"Summary of the compacted conversation...\"\n}", "outputFields": [] }, + { + "name": "PostModelSwitch", + "when": "After the session's model changes, including changes Claude Code makes on its own, such as restoring the model when you resume a session", + "inputFields": [], + "inputExample": null, + "outputFields": [ + { + "field": "additionalContext", + "description": "String added to Claude's context with the next request. See [Add context for Claude](#add-context-for-claude)" + } + ] + }, { "name": "PostToolBatch", "when": "After a full batch of parallel tool calls resolves, before the next model call", "inputFields": [], - "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"permission_mode\": \"default\",\n \"hook_event_name\": \"PostToolBatch\",\n \"tool_calls\": [\n {\n \"tool_name\": \"Read\",\n \"tool_input\": {\"file_path\": \"/.../ledger/accounts.py\"},\n \"tool_use_id\": \"toolu_01...\",\n \"tool_response\": \" 1\\tfrom __future__ import annotations\\n 2\\t...\"\n },\n {\n \"tool_name\": \"Read\",\n \"tool_input\": {\"file_path\": \"/.../ledger/transactions.py\"},\n \"tool_use_id\": \"toolu_02...\",\n \"tool_response\": \" 1\\tfrom __future__ import annotations\\n 2\\t...\"\n }\n ]\n}", + "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"permission_mode\": \"default\",\n \"hook_event_name\": \"PostToolBatch\",\n \"tool_calls\": [\n {\n \"tool_name\": \"Read\",\n \"tool_input\": {\"file_path\": \"/.../ledger/accounts.py\"},\n \"tool_use_id\": \"toolu_01...\",\n \"tool_response\": \"1\\tfrom __future__ import annotations\\n2\\t...\"\n },\n {\n \"tool_name\": \"Read\",\n \"tool_input\": {\"file_path\": \"/.../ledger/transactions.py\"},\n \"tool_use_id\": \"toolu_02...\",\n \"tool_response\": \"1\\tfrom __future__ import annotations\\n2\\t...\"\n }\n ]\n}", "outputFields": [ { "field": "additionalContext", @@ -173,7 +234,7 @@ "description": "Optional. Tool execution time in milliseconds. Excludes time spent in permission prompts and PreToolUse hooks" } ], - "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"permission_mode\": \"default\",\n \"hook_event_name\": \"PostToolUse\",\n \"tool_name\": \"Write\",\n \"tool_input\": {\n \"file_path\": \"/path/to/file.txt\",\n \"content\": \"file content\"\n },\n \"tool_response\": {\n \"filePath\": \"/path/to/file.txt\",\n \"success\": true\n },\n \"tool_use_id\": \"toolu_01ABC123...\",\n \"duration_ms\": 12\n}", + "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"permission_mode\": \"default\",\n \"hook_event_name\": \"PostToolUse\",\n \"tool_name\": \"Write\",\n \"tool_input\": {\n \"file_path\": \"/path/to/file.txt\",\n \"content\": \"file content\"\n },\n \"tool_response\": {\n \"filePath\": \"/path/to/file.txt\",\n \"type\": \"create\"\n },\n \"tool_use_id\": \"toolu_01ABC123...\",\n \"duration_ms\": 12\n}", "outputFields": [ { "field": "decision", @@ -187,6 +248,10 @@ "field": "additionalContext", "description": "String added to Claude's context alongside the tool result. See [Add context for Claude](#add-context-for-claude)" }, + { + "field": "classifierContext", + "description": "Short note about this call's result for the [auto mode](https://code.claude.com/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode) classifier rather than for Claude. See [Annotate a result for the auto mode classifier](#annotate-a-result-for-the-auto-mode-classifier). Requires Claude Code v2.1.236 or later" + }, { "field": "updatedToolOutput", "description": "Replaces the tool's output with the provided value before it is sent to Claude. The value must match the tool's output shape" @@ -203,18 +268,18 @@ "inputFields": [ { "field": "error", - "description": "String describing what went wrong" + "description": "String describing what went wrong. The format depends on the tool that failed" }, { "field": "is_interrupt", - "description": "Optional boolean indicating whether the failure was caused by user interruption" + "description": "Optional boolean. True when the failure reached Claude Code as an abort rather than as an error the tool reported. Cancelling a running tool does not fire this hook; the tool result carries the interruption message instead" }, { "field": "duration_ms", "description": "Optional. Tool execution time in milliseconds. Excludes time spent in permission prompts and PreToolUse hooks" } ], - "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"permission_mode\": \"default\",\n \"hook_event_name\": \"PostToolUseFailure\",\n \"tool_name\": \"Bash\",\n \"tool_input\": {\n \"command\": \"npm test\",\n \"description\": \"Run test suite\"\n },\n \"tool_use_id\": \"toolu_01ABC123...\",\n \"error\": \"Command exited with non-zero status code 1\",\n \"is_interrupt\": false,\n \"duration_ms\": 4187\n}", + "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"permission_mode\": \"default\",\n \"hook_event_name\": \"PostToolUseFailure\",\n \"tool_name\": \"Bash\",\n \"tool_input\": {\n \"command\": \"npm test\",\n \"description\": \"Run test suite\"\n },\n \"tool_use_id\": \"toolu_01ABC123...\",\n \"error\": \"Exit code 1\\nError: Cannot find module 'express'\",\n \"is_interrupt\": false,\n \"duration_ms\": 4187\n}", "outputFields": [ { "field": "additionalContext", @@ -226,26 +291,42 @@ "name": "PreCompact", "when": "Before context compaction", "inputFields": [], - "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"hook_event_name\": \"PreCompact\",\n \"trigger\": \"manual\",\n \"custom_instructions\": \"\"\n}", + "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"hook_event_name\": \"PreCompact\",\n \"trigger\": \"manual\",\n \"custom_instructions\": null\n}", "outputFields": [] }, + { + "name": "PreModelSwitch", + "when": "Before Claude Code applies a model switch that you or a client requested. Can block the switch", + "inputFields": [], + "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"hook_event_name\": \"PreModelSwitch\",\n \"from_model\": \"claude-sonnet-5\",\n \"to_model\": \"claude-opus-5\",\n \"requested_model\": \"opus\",\n \"source\": \"command\",\n \"context_tokens\": 182340,\n \"prompt_cache_warm\": true,\n \"cache_ttl\": \"5m\",\n \"estimated_cache_write_usd\": 1.1396,\n \"pricing\": \"catalog\"\n}", + "outputFields": [ + { + "field": "permissionDecision", + "description": "`\"allow\"` proceeds and skips the [confirmation Claude Code shows while the prompt cache is warm](https://code.claude.com/docs/en/prompt-caching.md#switching-models). `\"deny\"` cancels the switch. `\"ask\"` prompts the user to confirm it" + }, + { + "field": "permissionDecisionReason", + "description": "For `\"deny\"`, shown to the user as the reason the switch was blocked, or returned as the error for a `set_model` request. For `\"ask\"`, shown in the confirmation prompt. Ignored for `\"allow\"`" + } + ] + }, { "name": "PreToolUse", "when": "Before a tool call executes. Can block it", "inputFields": [], - "inputExample": null, + "inputExample": "{\n \"hook_event_name\": \"PreToolUse\",\n \"tool_name\": \"Write\",\n \"tool_input\": {\n \"file_path\": \"C:\\\\project\\\\src\\\\index.ts\",\n \"content\": \"...\"\n },\n ...\n}", "outputFields": [ { "field": "permissionDecision", - "description": "`\"allow\"` skips the permission prompt. `\"deny\"` prevents the tool call. `\"ask\"` prompts the user to confirm. `\"defer\"` exits gracefully so the tool can be resumed later. [Deny and ask rules](/en/permissions#manage-permissions) are still evaluated regardless of what the hook returns" + "description": "`\"allow\"` skips the permission prompt, except for [actions no mode auto-approves](https://code.claude.com/docs/en/permission-modes.md#actions-no-mode-auto-approves) and [reads from network paths](https://code.claude.com/docs/en/permissions.md#network-paths). `AskUserQuestion` and `ExitPlanMode` need [`updatedInput` paired with `\"allow\"`](#allow-with-updatedinput). For plan mode, see [Hook approvals in plan mode](https://code.claude.com/docs/en/permissions.md#hook-approvals-in-plan-mode). `\"deny\"` prevents the tool call. `\"ask\"` prompts the user to confirm. `\"defer\"` ends the turn so the tool can be resumed later, and requires [non-interactive mode](#defer-a-tool-call-for-later) with the `-p` flag. [Deny and ask rules](https://code.claude.com/docs/en/permissions.md#manage-permissions) are still evaluated regardless of what the hook returns" }, { "field": "permissionDecisionReason", - "description": "For `\"allow\"` and `\"ask\"`, shown to the user but not Claude. For `\"deny\"`, shown to Claude. For `\"defer\"`, ignored" + "description": "For `\"ask\"`, shown to the user in the permission prompt. When Claude Code [denies the call](https://code.claude.com/docs/en/headless.md#turn-off-permission-prompts-in-unattended-runs) in a `-p` run where no one can answer that prompt, Claude reads the reason in the tool result instead. For `\"deny\"`, shown to Claude. For `\"allow\"` and `\"defer\"`, written to the [debug log](#debug-hooks) only" }, { "field": "updatedInput", - "description": "Modifies the tool's input parameters before execution. Replaces the entire input object, so include unchanged fields alongside modified ones. Combine with `\"allow\"` to auto-approve, or `\"ask\"` to show the modified input to the user. For `\"defer\"`, ignored" + "description": "Modifies the tool's input parameters before execution. Replaces the entire input object, so include unchanged fields alongside modified ones. Claude Code evaluates permission rules and a Bash command's [auto-background eligibility](https://code.claude.com/docs/en/tools-reference.md#foreground-commands-that-move-to-the-background) against the input your hook returns, not the input Claude sent. Combine with `\"allow\"` to auto-approve, or `\"ask\"` to show the modified input to the user. For `\"defer\"`, ignored" }, { "field": "additionalContext", @@ -263,12 +344,45 @@ { "name": "SessionStart", "when": "When a session begins or resumes", - "inputFields": [], - "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"hook_event_name\": \"SessionStart\",\n \"source\": \"startup\",\n \"model\": \"claude-sonnet-4-6\"\n}", + "inputFields": [ + { + "field": "source", + "description": "How the session started: `\"startup\"` for new sessions, `\"resume\"` for resumed sessions, `\"clear\"` after `/clear`, `\"compact\"` after compaction, or `\"fork\"` for a new session forked from an existing one" + }, + { + "field": "model", + "description": "The active model identifier. It can be omitted, for example after `/clear` or when a session is restored through conversation recovery, so check for the field before reading it" + }, + { + "field": "agent_type", + "description": "The agent name, present when you start Claude Code with `claude --agent `" + }, + { + "field": "session_title", + "description": "The session's custom title, present when one is set, for example with `--name`, `/rename`, a hook's `sessionTitle` output, or the Agent SDK's `renameSession()`. A hook that emits `sessionTitle` can check this field first to avoid overwriting an existing custom title" + } + ], + "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"hook_event_name\": \"SessionStart\",\n \"source\": \"resume\",\n \"model\": \"claude-opus-5\",\n \"seconds_since_last_response\": 5400,\n \"context_tokens\": 182340,\n \"prompt_cache_likely_expired\": true,\n \"estimated_cache_write_usd\": 1.1396\n}", "outputFields": [ { "field": "additionalContext", "description": "String added to Claude's context at the start of the conversation, before the first prompt. See [Add context for Claude](#add-context-for-claude) for how the text is delivered and what to put in it" + }, + { + "field": "initialUserMessage", + "description": "String used as the first user message of the session, in [non-interactive mode](https://code.claude.com/docs/en/headless.md) with the `-p` flag. It becomes the first turn even if you pass no prompt. A prompt you do pass follows as the next turn" + }, + { + "field": "sessionTitle", + "description": "Sets the session title, with the same effect as `/rename`. Applies when `source` is `\"startup\"`, `\"resume\"`, or `\"fork\"`" + }, + { + "field": "watchPaths", + "description": "Array of absolute paths to watch for [FileChanged](#filechanged) events during this session" + }, + { + "field": "reloadSkills", + "description": "Boolean. When `true`, Claude Code re-scans the [skill](https://code.claude.com/docs/en/skills.md) and command directories after the SessionStart hooks complete. See [Reload skills that a hook installs](#reload-skills-that-a-hook-installs)" } ] }, @@ -277,18 +391,50 @@ "when": "When you start Claude Code with `--init-only`, or with `--init` or `--maintenance` in `-p` mode. For one-time preparation in CI or scripts", "inputFields": [], "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"hook_event_name\": \"Setup\",\n \"trigger\": \"init\"\n}", - "outputFields": [ - { - "field": "additionalContext", - "description": "String added to Claude's context. Multiple hooks' values are concatenated" - } - ] + "outputFields": [] }, { "name": "Stop", "when": "When Claude finishes responding", - "inputFields": [], - "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"~/.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"permission_mode\": \"default\",\n \"hook_event_name\": \"Stop\",\n \"stop_hook_active\": true,\n \"last_assistant_message\": \"I've completed the refactoring. Here's a summary...\"\n}", + "inputFields": [ + { + "field": "id", + "description": "Task identifier" + }, + { + "field": "type", + "description": "Friendly task-type label such as `shell`, `subagent`, `monitor`, `workflow`, `teammate`, `cloud session`, or `MCP task`. Each label identifies which Claude Code feature created the task. Falls back to the raw discriminant for unrecognized types" + }, + { + "field": "status", + "description": "Current task status" + }, + { + "field": "description", + "description": "Free-text description, capped at 1000 characters with an in-string `… [+N chars]` marker when clipped" + }, + { + "field": "command", + "description": "Shell command line, capped at 1000 characters. Present only for `shell` tasks" + }, + { + "field": "agent_type", + "description": "Subagent type name. Present only for `subagent` tasks" + }, + { + "field": "server", + "description": "MCP server name. Present only for `monitor` and `MCP task` tasks" + }, + { + "field": "tool", + "description": "MCP tool name. Present only for `monitor` and `MCP task` tasks" + }, + { + "field": "name", + "description": "Workflow name. Present only for `workflow` tasks" + } + ], + "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"~/.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"permission_mode\": \"default\",\n \"hook_event_name\": \"Stop\",\n \"stop_hook_active\": true,\n \"last_assistant_message\": \"I've completed the refactoring. Here's a summary...\",\n \"background_tasks\": [\n {\n \"id\": \"task-001\",\n \"type\": \"shell\",\n \"status\": \"running\",\n \"description\": \"tail logs\",\n \"command\": \"tail -f /var/log/syslog\"\n }\n ],\n \"session_crons\": [\n {\n \"id\": \"cron-001\",\n \"schedule\": \"0 9 * * 1-5\",\n \"recurring\": true,\n \"prompt\": \"check the build\"\n }\n ]\n}", "outputFields": [ { "field": "decision", @@ -297,16 +443,20 @@ { "field": "reason", "description": "Required when `decision` is `\"block\"`. Tells Claude why it should continue" + }, + { + "field": "hookSpecificOutput.additionalContext", + "description": "Non-error feedback for Claude. The conversation continues so Claude can act on it, but unlike `decision: \"block\"` it is shown in the transcript as hook feedback rather than a hook error" } ] }, { "name": "StopFailure", - "when": "When the turn ends due to an API error. Output and exit code are ignored", + "when": "When the turn ends due to an API error", "inputFields": [ { "field": "error", - "description": "Error type: `rate_limit`, `authentication_failed`, `oauth_org_not_allowed`, `billing_error`, `invalid_request`, `server_error`, `max_output_tokens`, or `unknown`" + "description": "Error type: `rate_limit`, `overloaded`, `authentication_failed`, `oauth_org_not_allowed`, `account_on_hold`, `billing_error`, `invalid_request`, `model_not_found`, `server_error`, `max_output_tokens`, `cloud_credential_error`, or `unknown`" }, { "field": "error_details", @@ -336,7 +486,7 @@ "name": "SubagentStop", "when": "When a subagent finishes", "inputFields": [], - "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"~/.claude/projects/.../abc123.jsonl\",\n \"cwd\": \"/Users/...\",\n \"permission_mode\": \"default\",\n \"hook_event_name\": \"SubagentStop\",\n \"stop_hook_active\": false,\n \"agent_id\": \"def456\",\n \"agent_type\": \"Explore\",\n \"agent_transcript_path\": \"~/.claude/projects/.../abc123/subagents/agent-def456.jsonl\",\n \"last_assistant_message\": \"Analysis complete. Found 3 potential issues...\"\n}", + "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"~/.claude/projects/.../abc123.jsonl\",\n \"cwd\": \"/Users/...\",\n \"permission_mode\": \"default\",\n \"hook_event_name\": \"SubagentStop\",\n \"stop_hook_active\": false,\n \"agent_id\": \"def456\",\n \"agent_type\": \"Explore\",\n \"agent_transcript_path\": \"~/.claude/projects/.../abc123/subagents/agent-def456.jsonl\",\n \"last_assistant_message\": \"Analysis complete. Found 3 potential issues...\",\n \"background_tasks\": [],\n \"session_crons\": []\n}", "outputFields": [] }, { @@ -361,10 +511,14 @@ }, { "field": "team_name", - "description": "Name of the team. May be absent" + "description": "Deprecated. Session-derived team name; will be removed in a future release" + }, + { + "field": "agent_id", + "description": "On this event, the [common input field](#common-input-fields) identifies the subagent or [in-process teammate](https://code.claude.com/docs/en/agent-teams.md#choose-a-display-mode) completing the task. May be absent. Requires Claude Code v2.1.290 or later" } ], - "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"permission_mode\": \"default\",\n \"hook_event_name\": \"TaskCompleted\",\n \"task_id\": \"task-001\",\n \"task_subject\": \"Implement user authentication\",\n \"task_description\": \"Add login and signup endpoints\",\n \"teammate_name\": \"implementer\",\n \"team_name\": \"my-project\"\n}", + "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"permission_mode\": \"default\",\n \"hook_event_name\": \"TaskCompleted\",\n \"task_id\": \"task-001\",\n \"task_subject\": \"Implement user authentication\",\n \"task_description\": \"Add login and signup endpoints\",\n \"teammate_name\": \"implementer\",\n \"team_name\": \"session-a1b2c3d4\"\n}", "outputFields": [] }, { @@ -389,15 +543,19 @@ }, { "field": "team_name", - "description": "Name of the team. May be absent" + "description": "Deprecated. Session-derived team name; will be removed in a future release" + }, + { + "field": "agent_id", + "description": "On this event, the [common input field](#common-input-fields) identifies the subagent or [in-process teammate](https://code.claude.com/docs/en/agent-teams.md#choose-a-display-mode) creating the task. May be absent. Requires Claude Code v2.1.290 or later" } ], - "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"permission_mode\": \"default\",\n \"hook_event_name\": \"TaskCreated\",\n \"task_id\": \"task-001\",\n \"task_subject\": \"Implement user authentication\",\n \"task_description\": \"Add login and signup endpoints\",\n \"teammate_name\": \"implementer\",\n \"team_name\": \"my-project\"\n}", + "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"hook_event_name\": \"TaskCreated\",\n \"task_id\": \"task-001\",\n \"task_subject\": \"Implement user authentication\",\n \"task_description\": \"Add login and signup endpoints\",\n \"teammate_name\": \"implementer\",\n \"team_name\": \"session-a1b2c3d4\"\n}", "outputFields": [] }, { "name": "TeammateIdle", - "when": "When an [agent team](/en/agent-teams) teammate is about to go idle", + "when": "When an [agent team](https://code.claude.com/docs/en/agent-teams.md) teammate is about to go idle", "inputFields": [ { "field": "teammate_name", @@ -405,10 +563,14 @@ }, { "field": "team_name", - "description": "Name of the team" + "description": "Deprecated. Session-derived team name; will be removed in a future release" + }, + { + "field": "agent_id", + "description": "On this event, the [common input field](#common-input-fields) identifies the [in-process teammate](https://code.claude.com/docs/en/agent-teams.md#choose-a-display-mode) that is about to go idle. May be absent. Requires Claude Code v2.1.290 or later" } ], - "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"permission_mode\": \"default\",\n \"hook_event_name\": \"TeammateIdle\",\n \"teammate_name\": \"researcher\",\n \"team_name\": \"my-project\"\n}", + "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"permission_mode\": \"default\",\n \"hook_event_name\": \"TeammateIdle\",\n \"teammate_name\": \"researcher\",\n \"team_name\": \"session-a1b2c3d4\"\n}", "outputFields": [] }, { @@ -419,7 +581,7 @@ "outputFields": [ { "field": "decision", - "description": "`\"block\"` prevents the slash command from expanding. Omit to allow it to proceed" + "description": "`\"block\"` prevents the command from expanding. Omit to allow it to proceed" }, { "field": "reason", @@ -433,13 +595,13 @@ }, { "name": "UserPromptSubmit", - "when": "When you submit a prompt, before Claude processes it", + "when": "When a prompt is submitted, before Claude processes it. Also fires on [turns Claude Code starts on its own](https://code.claude.com/docs/en/hooks.md#userpromptsubmit)", "inputFields": [], "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"permission_mode\": \"default\",\n \"hook_event_name\": \"UserPromptSubmit\",\n \"prompt\": \"Write a function to calculate the factorial of a number\"\n}", "outputFields": [ { "field": "decision", - "description": "`\"block\"` prevents the prompt from being processed and erases it from context. Omit to allow the prompt to proceed" + "description": "`\"block\"` stops the prompt before it reaches Claude. Omit to allow the prompt to proceed" }, { "field": "reason", @@ -452,19 +614,23 @@ { "field": "sessionTitle", "description": "Sets the session title. Use to name sessions automatically based on the prompt content" + }, + { + "field": "suppressOriginalPrompt", + "description": "If `true` when the hook blocks the prompt, leaves the prompt text out of the block message. See [What a blocked prompt leaves behind](#what-a-blocked-prompt-leaves-behind)" } ] }, { "name": "WorktreeCreate", - "when": "When a worktree is being created via `--worktree` or `isolation: \"worktree\"`. Replaces default git behavior", + "when": "When a worktree is being created via `--worktree`, `isolation: \"worktree\"`, or for a background session. Replaces default git behavior", "inputFields": [], "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"hook_event_name\": \"WorktreeCreate\",\n \"name\": \"feature-auth\"\n}", "outputFields": [] }, { "name": "WorktreeRemove", - "when": "When a worktree is being removed, either at session exit or when a subagent finishes", + "when": "When a worktree that a `WorktreeCreate` hook created is being removed", "inputFields": [], "inputExample": "{\n \"session_id\": \"abc123\",\n \"transcript_path\": \"/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl\",\n \"cwd\": \"/Users/...\",\n \"hook_event_name\": \"WorktreeRemove\",\n \"worktree_path\": \"/Users/.../my-project/.claude/worktrees/feature-auth\"\n}", "outputFields": [] @@ -482,12 +648,12 @@ { "field": "if", "required": "no", - "description": "Permission rule syntax to filter when this hook runs, such as `\"Bash(git *)\"` or `\"Edit(*.ts)\"`. The hook only spawns if the tool call matches the pattern, or if a Bash command is too complex to parse. Only evaluated on tool events: `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest`, and `PermissionDenied`. On other events, a hook with `if` set never runs. Uses the same syntax as [permission rules](/en/permissions)" + "description": "[Permission rule syntax](https://code.claude.com/docs/en/permissions.md#permission-rule-syntax) to filter when this hook runs, such as `\"Bash(git *)\"` or `\"Edit(*.ts)\"`. The hook command only runs if the tool call matches the pattern. See the [Bash matching table](#bash-if-matching) for how Bash patterns evaluate against subcommands, `$()`, and backticks. Only evaluated on tool events: `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest`, and `PermissionDenied`. On other events, a hook with `if` set never runs" }, { "field": "timeout", "required": "no", - "description": "Seconds before canceling. Defaults: 600 for `command`, `http`, and `mcp_tool`; 30 for `prompt`; 60 for `agent`. [`UserPromptSubmit`](#userpromptsubmit) lowers the `command`, `http`, and `mcp_tool` default to 30" + "description": "Seconds before canceling. Claude Code doesn't enforce it on a command hook you run with [`async: true`](#run-hooks-in-the-background). Defaults: 600 for `command`, `http`, and `mcp_tool`; 30 for `prompt`; 60 for `agent`. Claude Code lowers the `command`, `http`, and `mcp_tool` default to 30 on [`UserPromptSubmit`](#userpromptsubmit), [`PreModelSwitch`](#premodelswitch), and [`PostModelSwitch`](#postmodelswitch), and to 10 on [`MessageDisplay`](#messagedisplay). [`SessionEnd`](#sessionend) hooks share a 1.5-second budget; if your settings set a longer per-hook `timeout`, Claude Code raises the budget to match, up to 60 seconds" }, { "field": "statusMessage", @@ -497,7 +663,7 @@ { "field": "once", "required": "no", - "description": "If `true`, runs once per session then is removed. Only honored for hooks declared in [skill frontmatter](#hooks-in-skills-and-agents); ignored in settings files and agent frontmatter" + "description": "If `true`, Claude Code removes the hook after its first successful run. A run that fails, blocks with exit code 2, or times out leaves the hook in place, so it runs again on the next matching event. Only honored for hooks declared in [skill frontmatter](#hooks-in-skills-and-agents); ignored in settings files and agent frontmatter" } ] }, @@ -522,12 +688,17 @@ { "field": "asyncRewake", "required": "no", - "description": "If `true`, runs in the background and wakes Claude on exit code 2. Implies `async`. The hook's stderr, or stdout if stderr is empty, is shown to Claude as a system reminder so it can react to a long-running background failure" + "description": "If `true`, runs in the background and wakes Claude on exit code 2. The hook's stderr, or stdout if stderr is empty, is shown to Claude as a [system reminder](https://code.claude.com/docs/en/glossary.md#system-reminder) so it can react to a long-running background failure" }, { "field": "shell", "required": "no", - "description": "Shell to use for this hook. Accepts `\"bash\"` (default) or `\"powershell\"`. Setting `\"powershell\"` runs the command via PowerShell on Windows. Does not require `CLAUDE_CODE_USE_POWERSHELL_TOOL` since hooks spawn PowerShell directly. Ignored when `args` is set" + "description": "Shell to use for this hook. Accepts `\"bash\"` or `\"powershell\"`. Defaults to `\"bash\"`, or to `\"powershell\"` on Windows when Git Bash isn't installed. Setting `\"powershell\"` runs the command via PowerShell on Windows. Does not require `CLAUDE_CODE_USE_POWERSHELL_TOOL` since hooks spawn PowerShell directly. Ignored when `args` is set" + }, + { + "field": "onFailure", + "required": "no", + "description": "Whether the action that triggered the hook goes ahead when the hook fails: `\"continue\"` or `\"block\"`. See [Block the action when a hook fails](#block-the-action-when-a-hook-fails) for `\"block\"` and for leaving the field unset. Requires Claude Code v2.1.295 or later" } ] }, @@ -548,6 +719,11 @@ "field": "allowedEnvVars", "required": "no", "description": "List of environment variable names that may be interpolated into header values. References to unlisted variables are replaced with empty strings. Required for any env var interpolation to work" + }, + { + "field": "onFailure", + "required": "no", + "description": "What happens to the action when the hook fails: `\"continue\"`, the default, or `\"block\"`. See [Block the action when a hook fails](#block-the-action-when-a-hook-fails). Requires Claude Code v2.1.295 or later" } ] }, @@ -557,7 +733,7 @@ { "field": "server", "required": "yes", - "description": "Name of a configured MCP server. The server must already be connected; the hook never triggers an OAuth or connection flow" + "description": "Name of a configured MCP server. For a [plugin-bundled server](https://code.claude.com/docs/en/mcp.md#plugin-provided-mcp-servers), this is the scoped name `plugin::`, such as `plugin:my-plugin:db`, not the bare server key" }, { "field": "tool", @@ -577,12 +753,12 @@ { "field": "prompt", "required": "yes", - "description": "Prompt text to send to the model. Use `$ARGUMENTS` as a placeholder for the hook input JSON" + "description": "Prompt text to send to the model. Use `$ARGUMENTS` as a placeholder for the hook input JSON. Escape with a backslash to include literal text: `\\$1.00` renders as `$1.00`" }, { "field": "model", "required": "no", - "description": "Model to use for evaluation. Defaults to a fast model" + "description": "Model to use for evaluation. Defaults to the model Claude Code uses for [background functionality](https://code.claude.com/docs/en/costs.md#background-token-usage)" } ] } @@ -592,21 +768,29 @@ "field": "session_id", "description": "Current session identifier" }, + { + "field": "prompt_id", + "description": "UUID identifying the user prompt currently being processed. Matches the [`prompt.id` attribute on OpenTelemetry events](https://code.claude.com/docs/en/monitoring-usage#event-correlation-attributes), so you can correlate hook output with telemetry for a single prompt. Absent until the first user input" + }, { "field": "transcript_path", - "description": "Path to conversation JSON" + "description": "Path to conversation JSON. The transcript file is written asynchronously and may lag the in-memory conversation, so it may not yet include the current turn's most recent messages when a hook fires. Hooks that need the final assistant text of the current turn should use `last_assistant_message` on [Stop](#stop) and [SubagentStop](#subagentstop) instead of reading the transcript" }, { "field": "cwd", "description": "Current working directory when the hook is invoked" }, + { + "field": "scratchpad_dir", + "description": "Path to the session's [scratchpad directory](https://code.claude.com/docs/en/claude-directory.md#session-scratchpad-directory), where Claude keeps temporary working files. Absent when the session has no scratchpad or the temp directory is unavailable. Requires Claude Code v2.1.257 or later" + }, { "field": "permission_mode", - "description": "Current [permission mode](/en/permissions#permission-modes): `\"default\"`, `\"plan\"`, `\"acceptEdits\"`, `\"auto\"`, `\"dontAsk\"`, or `\"bypassPermissions\"`. Not all events receive this field: see each event's JSON example below to check" + "description": "Current [permission mode](https://code.claude.com/docs/en/permissions.md#permission-modes): `\"default\"`, `\"plan\"`, `\"acceptEdits\"`, `\"auto\"`, `\"dontAsk\"`, or `\"bypassPermissions\"`. The mode labeled **Manual** arrives as `\"default\"`, never as `\"manual\"`, so scripts that match `\"default\"` keep working. Not all events receive this field. Check the JSON example in each [hook event](#hook-events) section" }, { "field": "effort", - "description": "Object with a `level` field holding the active [effort level](/en/model-config#adjust-effort-level) for the turn: `\"low\"`, `\"medium\"`, `\"high\"`, `\"xhigh\"`, or `\"max\"`. If the requested effort exceeds what the current model supports, this is the downgraded level the model actually used, not the level you requested. The object matches the [status line](/en/statusline#available-data) `effort` field. Present for events that fire within a tool-use context, such as `PreToolUse`, `PostToolUse`, `Stop`, and `SubagentStop`, when the current model supports the effort parameter. The level is also available to hook commands and the Bash tool as the `$CLAUDE_EFFORT` environment variable." + "description": "Object with a `level` field holding the [effort level](https://code.claude.com/docs/en/model-config.md#adjust-effort-level) in effect when the hook runs: `\"low\"`, `\"medium\"`, `\"high\"`, `\"xhigh\"`, or `\"max\"`. If you set a level the active model doesn't support, `level` reports the level Claude Code ran instead; [Adjust effort level](https://code.claude.com/docs/en/model-config.md#adjust-effort-level) says how it picks that level. The object matches the [status line](https://code.claude.com/docs/en/statusline.md#available-data) `effort` field. Present for events that fire within a tool-use context, such as `PreToolUse`, `PostToolUse`, `Stop`, and `SubagentStop`, when the current model supports the effort parameter. The level is also available to hook commands and the Bash tool as the `$CLAUDE_EFFORT` environment variable." }, { "field": "hook_event_name", @@ -614,11 +798,11 @@ }, { "field": "agent_id", - "description": "Unique identifier for the subagent. Present only when the hook fires inside a subagent call. Use this to distinguish subagent hook calls from main-thread calls." + "description": "Unique identifier for the subagent or in-process teammate the hook fires in." }, { "field": "agent_type", - "description": "Agent name (for example, `\"Explore\"` or `\"security-reviewer\"`). Present when the session uses `--agent` or the hook fires inside a subagent. For subagents, the subagent's type takes precedence over the session's `--agent` value. For [custom subagents](/en/sub-agents), this is the `name` field from the agent's frontmatter, not the filename." + "description": "Agent name (for example, `\"Explore\"` or `\"security-reviewer\"`). Present when the session uses `--agent` or the hook fires inside a subagent. For subagents, the subagent's type takes precedence over the session's `--agent` value. See [SubagentStart](#subagentstart) for the values custom and plugin subagents report and how to write a matcher against a plugin-scoped name." } ] } diff --git a/catalog/keybindings.json b/catalog/keybindings.json index 830fbb3..2ca7978 100644 --- a/catalog/keybindings.json +++ b/catalog/keybindings.json @@ -1,8 +1,24 @@ { "source": "https://code.claude.com/docs/en/keybindings.md", - "fetchedAt": "2026-05-18T12:35:00.020Z", - "count": 20, + "fetchedAt": "2026-10-26T15:56:27.328Z", + "count": 27, "contexts": [ + { + "name": "AbovePrompt", + "description": "The [band above the prompt](#above-prompt-actions), or a button in it, has keyboard focus" + }, + { + "name": "AbovePromptInput", + "description": "An input field in the band above the prompt or in a mod's pane has keyboard focus" + }, + { + "name": "AbovePromptSelect", + "description": "A select in the band above the prompt or in a mod's pane has keyboard focus" + }, + { + "name": "Agents", + "description": "[Agent view](https://code.claude.com/docs/en/agent-view.md) (`claude agents`)" + }, { "name": "Attachments", "description": "Image attachment navigation in select dialogs" @@ -21,15 +37,19 @@ }, { "name": "DiffDialog", - "description": "Diff viewer navigation" + "description": "[Diff viewer](#diff-actions) navigation" + }, + { + "name": "DiffPanel", + "description": "The [diff panel](https://code.claude.com/docs/en/interactive-mode.md#diff-panel) is open" }, { - "name": "Doctor", - "description": "`/doctor` diagnostics screen" + "name": "EffortSlider", + "description": "Effort slider opened by `/effort`" }, { "name": "Footer", - "description": "Footer indicator navigation (tasks, teams, diff)" + "description": "Footer indicator navigation (tasks, teams, diff, artifacts)" }, { "name": "Global", @@ -51,6 +71,14 @@ "name": "ModelPicker", "description": "Model picker effort level" }, + { + "name": "Pane", + "description": "A pane drawn by a [mod](https://code.claude.com/docs/en/plugins/mods/interface.md#know-which-keys-your-mod-can-receive) has keyboard focus" + }, + { + "name": "PaneField", + "description": "An input field or select in a mod's pane has keyboard focus" + }, { "name": "Plugin", "description": "Plugin dialog (browse, discover, manage)" @@ -73,7 +101,7 @@ }, { "name": "Task", - "description": "Background task is running" + "description": "A task is running in the foreground" }, { "name": "ThemePicker", diff --git a/catalog/mcp.json b/catalog/mcp.json index 2a643a7..9210cfc 100644 --- a/catalog/mcp.json +++ b/catalog/mcp.json @@ -1,6 +1,6 @@ { "source": "https://code.claude.com/docs/en/mcp.md", - "fetchedAt": "2026-05-18T12:34:59.431Z", + "fetchedAt": "2026-10-26T15:56:26.500Z", "count": 3, "scopes": [ { diff --git a/catalog/model-config.json b/catalog/model-config.json index 40a8657..b3ea9c5 100644 --- a/catalog/model-config.json +++ b/catalog/model-config.json @@ -1,27 +1,31 @@ { "source": "https://code.claude.com/docs/en/model-config.md", - "fetchedAt": "2026-05-22T14:01:08.197Z", - "count": 5, + "fetchedAt": "2026-10-26T15:56:27.991Z", + "count": 6, "effortLevels": [ { "name": "high", - "description": "Balances token usage and intelligence. Use as a minimum for intelligence-sensitive work, or to reduce token spend relative to `xhigh`" + "description": "Work where verification matters or edge cases are likely, such as fixing a bug in an existing codebase. The default on every model except Opus 5.5, Sonnet 5.5, Haiku 5.5, and Opus 4.7" }, { "name": "low", - "description": "Reserve for short, scoped, latency-sensitive tasks that are not intelligence-sensitive" + "description": "Quick exchanges where you review each result, such as brainstorming, a first sketch, or a small change like a rename" }, { "name": "max", - "description": "Can improve performance on demanding tasks but may show diminishing returns and is prone to overthinking. Test before adopting broadly" + "description": "Hard problems you want Claude to work through without you, such as finding security vulnerabilities. `max` may show diminishing returns and is prone to overthinking, so test before adopting it broadly" }, { "name": "medium", - "description": "Reduces token usage for cost-sensitive work that can trade off some intelligence" + "description": "The default on Opus 5.5, Sonnet 5.5, and Haiku 5.5. On Opus 5.5 and Sonnet 5.5, it fits day-to-day engineering work with a clear scope, such as implementing a new feature. On models with a higher default, reduces token usage for cost-sensitive work that can trade off some intelligence" + }, + { + "name": "ultracode", + "description": "A Claude Code setting rather than a level: plans a [dynamic workflow](https://code.claude.com/docs/en/workflows.md) for each substantive task at any effort level" }, { "name": "xhigh", - "description": "Best results for most coding and agentic tasks. Recommended default on Opus 4.7" + "description": "Deeper reasoning at higher token spend. The default on Opus 4.7" } ] } diff --git a/catalog/permissions.json b/catalog/permissions.json index 35f6a5c..efbfbed 100644 --- a/catalog/permissions.json +++ b/catalog/permissions.json @@ -1,31 +1,31 @@ { "source": "https://code.claude.com/docs/en/permissions.md", - "fetchedAt": "2026-05-18T12:34:59.743Z", + "fetchedAt": "2026-10-26T15:56:26.981Z", "count": 6, "modes": [ { "name": "acceptEdits", - "description": "Automatically accepts file edits and common filesystem commands (`mkdir`, `touch`, `mv`, `cp`, etc.) for paths in the working directory or `additionalDirectories`" + "description": "Automatically accepts file edits and common filesystem commands such as `mkdir`, `touch`, `mv`, and `cp` for paths in the working directory or `additionalDirectories`" }, { "name": "auto", - "description": "Auto-approves tool calls with background safety checks that verify actions align with your request. Currently a research preview" + "description": "Runs without routine prompts; before actions such as shell commands and network requests run, a background [classifier](https://code.claude.com/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode) checks that they align with your request" }, { "name": "bypassPermissions", - "description": "Skips all permission prompts. Root and home directory removals such as `rm -rf /` still prompt as a circuit breaker" + "description": "Skips permission prompts, except for the [actions no mode auto-approves](https://code.claude.com/docs/en/permission-modes.md#actions-no-mode-auto-approves)" }, { "name": "default", - "description": "Standard behavior: prompts for permission on first use of each tool" + "description": "Prompts for permission on first use of each tool. Labeled Manual in the CLI, the VS Code and JetBrains extensions, and the desktop app, and Claude Code accepts `manual` as an alias" }, { "name": "dontAsk", - "description": "Auto-denies tools unless pre-approved via `/permissions` or `permissions.allow` rules" + "description": "Auto-denies every call that would otherwise prompt, though a [mod](https://code.claude.com/docs/en/plugins/mods/overview.md) you installed can still approve some of those calls. File reads in your working directories and other actions that need no approval still run, as do tools pre-approved via `/permissions` or `permissions.allow` rules. `AskUserQuestion`, MCP tools marked [`requiresUserInteraction`](https://code.claude.com/docs/en/mcp#require-approval-for-a-specific-tool), [reads from network paths](#network-paths), and connector tools [your organization set to `ask`](https://code.claude.com/docs/en/mcp#organization-controls-on-connector-tools) in sessions where that setting reaches Claude Code are denied even if you've allowed them" }, { "name": "plan", - "description": "Plan Mode: Claude reads files and runs read-only shell commands to explore but does not edit your source files" + "description": "Claude reads files and runs read-only shell commands to explore but doesn't edit your source files; with [auto mode](https://code.claude.com/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode) available, classifier-approved commands also run. Labeled Plan in the CLI and the VS Code extension" } ] } diff --git a/catalog/settings.json b/catalog/settings.json index 89f9704..e35747b 100644 --- a/catalog/settings.json +++ b/catalog/settings.json @@ -1,27 +1,42 @@ { "source": "https://json.schemastore.org/claude-code-settings.json", "schemaId": "https://json.schemastore.org/claude-code-settings.json", - "fetchedAt": "2026-05-18T12:34:58.226Z", - "count": 304, + "fetchedAt": "2026-10-26T15:56:25.167Z", + "count": 591, "settings": [ { "key": "$schema", "type": "string", "description": "JSON Schema reference for Claude Code settings" }, + { + "key": "advisorModel", + "type": "string", + "description": "Model for the server-side advisor tool. Accepts a model alias (\"opus\", \"sonnet\", or \"fable\" on v2.1.170+) or a full model ID. Overridden by the --advisor CLI flag for the session, and blocked when the model is outside the availableModels allowlist. See https://code.claude.com/docs/en/advisor" + }, { "key": "agent", "type": "string", "minLength": 1, "description": "Name of an agent (built-in or custom) to use for the main thread. Applies the agent's system prompt, tool restrictions, and model. See https://code.claude.com/docs/en/sub-agents" }, + { + "key": "agentPushNotifEnabled", + "type": "boolean", + "default": false, + "description": "When Remote Control is connected, allow Claude to send proactive push notifications to your phone, for example when a long task finishes. Requires Claude Code v2.1.119 or later. See https://code.claude.com/docs/en/remote-control#mobile-push-notifications" + }, + { + "key": "allowAllClaudeAiMcps", + "type": "boolean", + "description": "(Managed settings only) Load claude.ai connectors alongside a deployed managed-mcp.json, which otherwise takes exclusive control and suppresses them. See https://code.claude.com/docs/en/managed-mcp" + }, { "key": "allowedChannelPlugins", "type": "array", - "description": "(Managed settings only) Allowlist of plugin IDs whose MCP servers may advertise channel notifications when channelsEnabled is true. When set, only the listed plugins can push inbound messages. See https://code.claude.com/docs/en/mcp", + "description": "(Managed settings only) Allowlist of channel plugins that may run, each identified by its marketplace and plugin name. When set, only the listed plugins can push inbound channel messages while channelsEnabled is true. Replaces the default Anthropic allowlist when set; undefined falls back to the default and an empty array blocks all channel plugins. Requires channelsEnabled: true. See https://code.claude.com/docs/en/channels#restrict-which-channel-plugins-can-run", "items": { - "type": "string", - "minLength": 1 + "type": "object" } }, { @@ -99,7 +114,7 @@ { "key": "allowManagedMcpServersOnly", "type": "boolean", - "description": "(Managed settings only) Only allowedMcpServers from managed settings are respected. deniedMcpServers still merges from all sources. Users can still add their own MCP servers, but only the admin-defined allowlist applies." + "description": "(Managed settings only) When true, only allowedMcpServers from managed settings are respected; MCP servers defined in user, project, or local settings are ignored. deniedMcpServers still merges from all sources. See https://code.claude.com/docs/en/managed-mcp" }, { "key": "allowManagedPermissionRulesOnly", @@ -120,6 +135,18 @@ ], "description": "Path to a script that outputs authentication values. See https://code.claude.com/docs/en/settings#available-settings" }, + { + "key": "askUserQuestionTimeout", + "type": "string", + "enum": [ + "60s", + "5m", + "10m", + "never" + ], + "default": "never", + "description": "Idle time before an unanswered AskUserQuestion dialog auto-continues with whatever options you had already selected. Accepts \"60s\", \"5m\", \"10m\", or \"never\" (default: \"never\", which waits until you answer). Appears in /config as Question auto-continue timeout, which writes this key to user settings. Not read from project or local settings. Requires Claude Code v2.1.200 or later. See https://code.claude.com/docs/en/settings#available-settings" + }, { "key": "attribution", "type": "object", @@ -135,6 +162,30 @@ "type": "string", "description": "Attribution for pull request descriptions. Empty string hides pull request attribution" }, + { + "key": "attribution.sessionUrl", + "type": "boolean", + "default": true, + "description": "Whether to append the claude.ai session link as a Claude-Session trailer on commits and a link in pull request descriptions when running from a web or Remote Control session. Defaults to true; set to false to omit the link. See https://code.claude.com/docs/en/settings#attribution-settings" + }, + { + "key": "autoCompactEnabled", + "type": "boolean", + "default": true, + "description": "Automatically compact the conversation when context approaches the limit. Also configurable via the DISABLE_AUTO_COMPACT environment variable. See https://code.claude.com/docs/en/settings#available-settings" + }, + { + "key": "autoConnectIde", + "type": "boolean", + "default": false, + "description": "Automatically connect to a running IDE when Claude Code starts from an external terminal (default: false). Appears in /config as Auto-connect to IDE (external terminal) when running outside a VS Code or JetBrains terminal. Also configurable via the CLAUDE_CODE_AUTO_CONNECT_IDE environment variable, which overrides this when set. See https://code.claude.com/docs/en/settings#global-config-settings" + }, + { + "key": "autoInstallIdeExtension", + "type": "boolean", + "default": true, + "description": "Automatically install the Claude Code IDE extension when running from a VS Code terminal (default: true). Appears in /config as Auto-install IDE extension when running inside a VS Code or JetBrains terminal. You can also set the CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL environment variable to 1. See https://code.claude.com/docs/en/settings#global-config-settings" + }, { "key": "autoMemoryDirectory", "type": "string", @@ -145,7 +196,7 @@ "key": "autoMemoryEnabled", "type": "boolean", "default": true, - "description": "Enable automatic memory saves that capture useful context to .claude/memory/. Also configurable via CLAUDE_CODE_DISABLE_AUTO_MEMORY environment variable (set to 1 to disable, 0 to enable). See https://code.claude.com/docs/en/memory#auto-memory" + "description": "Enable automatic memory saves that capture useful context to ~/.claude/projects//memory/ (derived from the git repository, shared across worktrees). Also configurable via CLAUDE_CODE_DISABLE_AUTO_MEMORY environment variable (set to 1 to disable, 0 to enable). See https://code.claude.com/docs/en/memory#storage-location" }, { "key": "autoMode", @@ -160,6 +211,12 @@ "type": "string" } }, + { + "key": "autoMode.classifyAllShell", + "type": "boolean", + "default": false, + "description": "UNDOCUMENTED. Route all Bash/PowerShell commands through the auto mode classifier instead of only arbitrary-code-execution patterns (added in v2.1.193)." + }, { "key": "autoMode.environment", "type": "array", @@ -168,6 +225,14 @@ "type": "string" } }, + { + "key": "autoMode.hard_deny", + "type": "array", + "description": "Rules for the auto mode classifier hard-deny section. Hard-deny rules block unconditionally regardless of user intent. Replaces the built-in hard-deny rules entirely unless the literal string \"$defaults\" is included as an entry, which splices the built-in defaults in at that position. See https://code.claude.com/docs/en/permissions", + "items": { + "type": "string" + } + }, { "key": "autoMode.soft_deny", "type": "array", @@ -176,6 +241,12 @@ "type": "string" } }, + { + "key": "autoScrollEnabled", + "type": "boolean", + "default": true, + "description": "In fullscreen rendering, follow new output to the bottom of the conversation. Appears in /config as Auto-scroll. Permission prompts still scroll into view when this is off. See https://code.claude.com/docs/en/fullscreen" + }, { "key": "autoUpdatesChannel", "type": "string", @@ -200,6 +271,12 @@ "type": "string" } }, + { + "key": "awaySummaryEnabled", + "type": "boolean", + "default": true, + "description": "Show a one-line session recap when you return to the terminal after a few minutes away. Set to false (or turn off Session recap in /config) to disable. See https://code.claude.com/docs/en/settings#available-settings" + }, { "key": "awsAuthRefresh", "type": "string", @@ -207,7 +284,7 @@ "examples": [ "aws sso login --profile myprofile" ], - "description": "Path to a script that refreshes AWS authentication. See https://code.claude.com/docs/en/settings#available-settings" + "description": "Command to run when AWS credentials are expired or unavailable; its output is shown to the user but interactive input is not supported. Also drives the \"Claude Platform on AWS · refresh credentials\" option in /login when configured. See https://code.claude.com/docs/en/amazon-bedrock#advanced-credential-configuration" }, { "key": "awsCredentialExport", @@ -216,7 +293,12 @@ "examples": [ "/bin/generate_aws_grant.sh" ], - "description": "Path to a script that exports AWS credentials. See https://code.claude.com/docs/en/settings#available-settings" + "description": "Command that outputs AWS credentials as JSON (in the form {\"Credentials\": {\"AccessKeyId\": ..., \"SecretAccessKey\": ..., \"SessionToken\": ...}}). The output is captured silently. Use when you cannot modify the .aws directory and must return credentials directly. See https://code.claude.com/docs/en/amazon-bedrock#advanced-credential-configuration" + }, + { + "key": "axScreenReader", + "type": "boolean", + "description": "Render screen-reader-friendly output: flat text without decorative borders or animations screen-reader mode always uses the classic renderer, so the tui setting has no effect while it is active. The CLAUDE_AX_SCREEN_READER environment variable and --ax-screen-reader flag take precedence. Requires Claude Code v2.1.181 or later. See https://code.claude.com/docs/en/settings#available-settings" }, { "key": "blockedMarketplaces", @@ -400,15 +482,42 @@ "source", "pathPattern" ] + }, + { + "type": "object", + "additionalProperties": false, + "description": "Stops skills-directory plugins (folders under ~/.claude/skills/ or a project's .claude/skills/ that carry a .claude-plugin/plugin.json) from loading. Matches no marketplace. See https://code.claude.com/docs/en/plugins/org#blocklist-with-blockedmarketplaces", + "properties": { + "source": { + "type": "string", + "const": "skills-dir", + "description": "Block skills-directory plugins" + } + }, + "required": [ + "source" + ] } ] } }, + { + "key": "browserExternalPageTools", + "type": "string", + "enum": [ + "disabled" + ], + "description": "(Managed settings only) Set to \"disabled\" to prevent Claude from using tools to read or act on external pages in the desktop app's Browser pane. Users can still navigate to external sites themselves, and local dev server previews are unaffected. See https://code.claude.com/docs/en/desktop#browse-external-sites" + }, { "key": "channelsEnabled", "type": "boolean", - "default": false, - "description": "(Teams/Enterprise) Opt-in for channel notifications — MCP servers with the claude/channel capability pushing inbound messages. Default off. When true, users can select servers via --channels. See https://code.claude.com/docs/en/mcp" + "description": "(Managed settings only) Allow channels for the organization. On claude.ai Team and Enterprise plans, channels are blocked when this is unset or false. For Anthropic Console accounts using API key authentication, channels are allowed by default unless the organization deploys managed settings, in which case this key must be set to true. See https://code.claude.com/docs/en/channels#enterprise-controls" + }, + { + "key": "claudeMd", + "type": "string", + "description": "(Managed settings only) CLAUDE.md-style instructions injected as organization-managed memory. Honored only from managed/policy settings. See https://code.claude.com/docs/en/settings#available-settings" }, { "key": "claudeMdExcludes", @@ -507,18 +616,61 @@ ] } }, + { + "key": "diffTool", + "type": "string", + "enum": [ + "auto", + "terminal" + ], + "default": "auto", + "description": "Where to display file diffs when an IDE is connected: \"auto\" (default) opens diffs in the IDE's diff viewer, \"terminal\" keeps them in the terminal. Appears in /config as Diff tool only when Claude Code is connected to a VS Code or JetBrains IDE. See https://code.claude.com/docs/en/settings#global-config-settings" + }, + { + "key": "disableAgentView", + "type": "boolean", + "description": "(Managed settings) Turn off background agents and the agent view: claude agents, --bg, /background, and the on-demand supervisor. Also configurable via the CLAUDE_CODE_DISABLE_AGENT_VIEW environment variable (set to 1 to disable). See https://code.claude.com/docs/en/agent-view" + }, { "key": "disableAllHooks", "type": "boolean", "description": "Disable all hooks and statusLine execution. When true in managed settings, user and project-level disableAllHooks cannot override it. See https://code.claude.com/docs/en/hooks#disable-or-remove-hooks" }, + { + "key": "disableArtifact", + "type": "boolean", + "description": "Disable the Artifact tool, which publishes session output as a private web page on claude.ai. Also configurable via the CLAUDE_CODE_DISABLE_ARTIFACT environment variable. See https://code.claude.com/docs/en/settings#available-settings" + }, + { + "key": "disableAutoMode", + "type": "string", + "enum": [ + "disable" + ], + "description": "Set to \"disable\" to prevent auto mode from being activated: removes auto from the Shift+Tab cycle and rejects --permission-mode auto at startup. See https://code.claude.com/docs/en/settings#available-settings" + }, + { + "key": "disableBrowserExternalNavigation", + "type": "boolean", + "description": "(Managed settings only) Set to true to turn off external browsing in the desktop app's Browser pane. Neither users nor Claude can navigate to external sites, and localhost dev server previews are unaffected. The value must be the JSON boolean true; the string \"true\" is ignored. See https://code.claude.com/docs/en/desktop#browse-external-sites" + }, + { + "key": "disableBundledSkills", + "type": "boolean", + "description": "Disable the skills and workflows that ship with Claude Code: bundled skills and workflows are removed entirely, while built-in slash commands like /init stay typable but are hidden from the model. Skills from plugins, .claude/skills/, and .claude/commands/ are unaffected. Also configurable via the CLAUDE_CODE_DISABLE_BUNDLED_SKILLS environment variable. See https://code.claude.com/docs/en/settings#available-settings" + }, + { + "key": "disableClaudeAiConnectors", + "type": "boolean", + "description": "Disable claude.ai MCP connectors so they are not auto-fetched or connected. A value of true in any settings source takes precedence. Requires Claude Code v2.1.182 or later. See https://code.claude.com/docs/en/settings#available-settings" + }, { "key": "disableDeepLinkRegistration", "type": "string", "enum": [ "disable" ], - "description": "Set to \"disable\" to prevent Claude Code from registering the `claude://` deep-link protocol handler on startup. Most useful in managed settings where users cannot override it. See https://code.claude.com/docs/en/settings#available-settings" + "description": "Set to \"disable\" to prevent Claude Code from registering the `claude-cli://` deep-link protocol handler on startup. Most useful in managed settings where users cannot override it. See https://code.claude.com/docs/en/settings#available-settings" }, { "key": "disabledMcpjsonServers", @@ -534,11 +686,42 @@ "minLength": 1 } }, + { + "key": "disableMobileSimulatorTools", + "type": "boolean", + "description": "(Managed settings only) Set to true to block Claude's tools for the desktop app's iOS Simulator pane. Users keep manual use of the pane; only Claude's access is removed. The value must be the JSON boolean true; any other value is ignored, and a malformed value such as \"true\" or 1 logs a warning. See https://code.claude.com/docs/en/desktop-ios-simulator#turn-off-simulator-access" + }, + { + "key": "disableRemoteControl", + "type": "boolean", + "description": "Disable Remote Control: blocks claude remote-control, the --remote-control flag, auto-start, and the in-session toggle. Requires Claude Code v2.1.128 or later. See https://code.claude.com/docs/en/remote-control" + }, + { + "key": "disableSideloadFlags", + "type": "boolean", + "description": "(Managed settings only) Reject the --plugin-dir, --plugin-url, --agents, and --mcp-config CLI flags at startup, which users could otherwise pass to bypass strictKnownMarketplaces for a single run. Also rejects these flags from any surface that spawns the CLI with them internally, currently Cowork local sessions in the desktop app. A --mcp-config whose servers are all in-process type: \"sdk\" entries is still accepted, so the Agent SDK and VS Code extension keep working. Does not block claude mcp add, .mcp.json, or SDK setMcpServers(); pair with allowedMcpServers for per-server MCP control. Requires Claude Code v2.1.193 or later. See https://code.claude.com/docs/en/settings#available-settings" + }, { "key": "disableSkillShellExecution", "type": "boolean", "description": "Disable inline shell execution for `` !`...` `` and ` ```! ` blocks in skills and custom slash commands from user, project, plugin, or additional-directory sources. Commands are replaced with [shell command execution disabled by policy] instead of being run. Bundled and managed skills are not affected. Most useful in managed settings where users cannot override it. See https://code.claude.com/docs/en/settings#available-settings" }, + { + "key": "disableWorkflows", + "type": "boolean", + "default": false, + "description": "Disable dynamic workflows and bundled workflow commands. Also configurable via the CLAUDE_CODE_DISABLE_WORKFLOWS environment variable. See https://code.claude.com/docs/en/settings#available-settings" + }, + { + "key": "editorMode", + "type": "string", + "enum": [ + "normal", + "vim" + ], + "default": "normal", + "description": "Key binding mode for the input prompt: \"normal\" or \"vim\". Appears in /config as Editor mode. See https://code.claude.com/docs/en/terminal-config#edit-prompts-with-vim-keybindings" + }, { "key": "effortLevel", "type": "string", @@ -546,10 +729,15 @@ "low", "medium", "high", - "xhigh", - "max" + "xhigh" ], - "description": "Persist adaptive reasoning effort across sessions. Effort is supported on Opus 4.7, Opus 4.6, and Sonnet 4.6. Opus 4.7 supports low/medium/high/xhigh/max (xhigh sits between high and max, added in v2.1.111); Opus 4.6 and Sonnet 4.6 support low/medium/high/max (xhigh falls back to high). Defaults: Opus 4.6 and Sonnet 4.6 default to high on all plans (Pro/Max raised from medium to high in v2.1.117); Opus 4.7 defaults to xhigh on Max plan. The max value is session-only unless set via CLAUDE_CODE_EFFORT_LEVEL. Use /effort auto to reset to model default. Also configurable via CLAUDE_CODE_EFFORT_LEVEL environment variable. See https://code.claude.com/docs/en/model-config#adjust-effort-level" + "description": "Persist adaptive reasoning effort across sessions. Set to low, medium, high, or xhigh; max and ultracode are session-only and are not accepted in the settings file (use the CLAUDE_CODE_EFFORT_LEVEL environment variable or /effort for a session-only max). Effort is supported on Fable 5, Opus 4.8, Opus 4.7, Opus 4.6, and Sonnet 4.6, with xhigh sitting between high and max (added in v2.1.111). Defaults: Fable 5 and Opus 4.8 default to high; Opus 4.6 and Sonnet 4.6 default to high on all plans (Pro/Max raised from medium to high in v2.1.117); Opus 4.7 defaults to xhigh. Use /effort auto to reset to model default. Also configurable via CLAUDE_CODE_EFFORT_LEVEL environment variable. See https://code.claude.com/docs/en/model-config#adjust-effort-level" + }, + { + "key": "emojiCompletionEnabled", + "type": "boolean", + "default": true, + "description": "Show emoji suggestions when you type : plus a shortcode in the prompt input, and replace a completed shortcode such as :heart: with its emoji (default: true). Set to false to disable both. Requires Claude Code v2.1.217 or later. See https://code.claude.com/docs/en/interactive-mode#emoji-shortcodes" }, { "key": "enableAllProjectMcpServers", @@ -559,6 +747,11 @@ ], "description": "Whether to automatically approve all MCP servers in the project. See https://code.claude.com/docs/en/mcp" }, + { + "key": "enableArtifact", + "type": "boolean", + "description": "Enable or disable the Artifact tool for this user. When unset, the default follows the feature's availability for your account. The Artifacts row in /config writes this key. A managed disableArtifact and your organization's admin setting take precedence, and the key is ignored in project and local settings (.claude/settings.json, .claude/settings.local.json), which a repository could otherwise commit. Requires Claude Code v2.1.196 or later. See https://code.claude.com/docs/en/artifacts" + }, { "key": "enabledMcpjsonServers", "type": "array", @@ -579,6 +772,11 @@ "type": "object", "description": "Enabled plugins using plugin-id@marketplace-id format. Example: { \"formatter@anthropic-tools\": true }. See https://code.claude.com/docs/en/plugins" }, + { + "key": "enforceAvailableModels", + "type": "boolean", + "description": "(Managed settings) Extend the availableModels allowlist to the Default model option (requires v2.1.175+). Requires a non-empty availableModels list; when the account-type default is not in the allowlist, Default resolves to the first allowed entry instead. Has no effect when availableModels is unset or empty. See https://code.claude.com/docs/en/model-config#enforce-the-allowlist-for-the-default-model" + }, { "key": "env", "type": "object", @@ -601,6 +799,21 @@ "type": "string", "description": "Custom Authorization header bearer token for API requests" }, + { + "key": "env.ANTHROPIC_AWS_API_KEY", + "type": "string", + "description": "Workspace API key for Claude Platform on AWS; takes precedence over SigV4 authentication. See https://code.claude.com/docs/en/claude-platform-on-aws#1-configure-aws-credentials" + }, + { + "key": "env.ANTHROPIC_AWS_BASE_URL", + "type": "string", + "description": "Override the Claude Platform on AWS endpoint URL. Default is https://aws-external-anthropic.{region}.api.aws. See https://code.claude.com/docs/en/claude-platform-on-aws#route-through-a-corporate-proxy" + }, + { + "key": "env.ANTHROPIC_AWS_WORKSPACE_ID", + "type": "string", + "description": "Required workspace ID for Claude Platform on AWS; sent as the anthropic-workspace-id header on every request. See https://code.claude.com/docs/en/claude-platform-on-aws#2-configure-claude-code" + }, { "key": "env.ANTHROPIC_BASE_URL", "type": "string", @@ -624,7 +837,7 @@ "flex", "priority" ], - "description": "Select Bedrock service tier; sent as X-Amzn-Bedrock-Service-Tier header. See https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#21122" + "description": "Select Bedrock service tier; sent as X-Amzn-Bedrock-Service-Tier header. See https://code.claude.com/docs/en/amazon-bedrock#service-tiers" }, { "key": "env.ANTHROPIC_BETAS", @@ -656,26 +869,96 @@ "type": "string", "description": "JSON object specifying capability flags for the custom model" }, + { + "key": "env.ANTHROPIC_DEFAULT_FABLE_MODEL", + "type": "string", + "description": "Override the default Fable-class model ID. See https://code.claude.com/docs/en/model-config#environment-variables" + }, + { + "key": "env.ANTHROPIC_DEFAULT_FABLE_MODEL_DESCRIPTION", + "type": "string", + "description": "Display description shown for the Fable model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities" + }, + { + "key": "env.ANTHROPIC_DEFAULT_FABLE_MODEL_NAME", + "type": "string", + "description": "Display name shown for the Fable model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities" + }, + { + "key": "env.ANTHROPIC_DEFAULT_FABLE_MODEL_SUPPORTED_CAPABILITIES", + "type": "string", + "description": "Comma-separated list of capabilities the pinned Fable model supports. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities" + }, { "key": "env.ANTHROPIC_DEFAULT_HAIKU_MODEL", "type": "string", "description": "Override default Haiku model ID" }, + { + "key": "env.ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION", + "type": "string", + "description": "Display description shown for the Haiku model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities" + }, + { + "key": "env.ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME", + "type": "string", + "description": "Display name shown for the Haiku model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities" + }, + { + "key": "env.ANTHROPIC_DEFAULT_HAIKU_MODEL_SUPPORTED_CAPABILITIES", + "type": "string", + "description": "Comma-separated list of capabilities the pinned Haiku model supports. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities" + }, { "key": "env.ANTHROPIC_DEFAULT_OPUS_MODEL", "type": "string", "description": "Override default Opus model ID" }, + { + "key": "env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION", + "type": "string", + "description": "Display description shown for the Opus model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities" + }, + { + "key": "env.ANTHROPIC_DEFAULT_OPUS_MODEL_NAME", + "type": "string", + "description": "Display name shown for the Opus model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities" + }, + { + "key": "env.ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES", + "type": "string", + "description": "Comma-separated list of capabilities the pinned Opus model supports. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities" + }, { "key": "env.ANTHROPIC_DEFAULT_SONNET_MODEL", "type": "string", "description": "Override default Sonnet model ID" }, + { + "key": "env.ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION", + "type": "string", + "description": "Display description shown for the Sonnet model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities" + }, + { + "key": "env.ANTHROPIC_DEFAULT_SONNET_MODEL_NAME", + "type": "string", + "description": "Display name shown for the Sonnet model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities" + }, + { + "key": "env.ANTHROPIC_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIES", + "type": "string", + "description": "Comma-separated list of capabilities the pinned Sonnet model supports. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities" + }, { "key": "env.ANTHROPIC_FOUNDRY_API_KEY", "type": "string", "description": "Microsoft Foundry authentication key" }, + { + "key": "env.ANTHROPIC_FOUNDRY_AUTH_TOKEN", + "type": "string", + "description": "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. Requires Claude Code v2.1.203 or later. See https://code.claude.com/docs/en/microsoft-foundry" + }, { "key": "env.ANTHROPIC_FOUNDRY_BASE_URL", "type": "string", @@ -694,28 +977,48 @@ { "key": "env.ANTHROPIC_SMALL_FAST_MODEL", "type": "string", - "description": "Model to use for background and low-complexity tasks (e.g., 'claude-3-5-haiku-latest')" + "description": "DEPRECATED (prefer ANTHROPIC_DEFAULT_HAIKU_MODEL). Haiku-class model to use for background and low-complexity tasks (e.g., 'claude-3-5-haiku-latest')" + }, + { + "key": "env.ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION", + "type": "string", + "description": "Override the AWS region for the Haiku-class model on Bedrock and Bedrock Mantle. Has no effect without ANTHROPIC_DEFAULT_HAIKU_MODEL (or the deprecated ANTHROPIC_SMALL_FAST_MODEL) set on Bedrock. See https://code.claude.com/docs/en/amazon-bedrock#3-configure-claude-code" }, { "key": "env.ANTHROPIC_VERTEX_BASE_URL", "type": "string", - "description": "Override Google Vertex AI endpoint URL" + "description": "Override Google Cloud's Agent Platform (formerly Vertex AI) endpoint URL. Use for custom endpoints or when routing through an LLM gateway" }, { "key": "env.ANTHROPIC_VERTEX_PROJECT_ID", "type": "string", - "description": "Google Vertex AI project ID" + "description": "GCP project ID for Google Cloud's Agent Platform (formerly Vertex AI) requests. Overridden by GCLOUD_PROJECT, GOOGLE_CLOUD_PROJECT, or the project in your GOOGLE_APPLICATION_CREDENTIALS credential file" + }, + { + "key": "env.ANTHROPIC_WORKSPACE_ID", + "type": "string", + "description": "Workspace ID for workload identity federation. Scopes the minted token to a specific workspace when the federation rule covers more than one. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.API_FORCE_IDLE_TIMEOUT", + "type": "string", + "description": "Override the 5-minute idle timeout for streaming responses (0 disables it). See https://code.claude.com/docs/en/env-vars" }, { "key": "env.API_TIMEOUT_MS", "type": "string", - "description": "API request timeout in milliseconds (default: 600000)" + "description": "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." }, { "key": "env.AWS_BEARER_TOKEN_BEDROCK", "type": "string", "description": "Bearer token for Bedrock API authentication" }, + { + "key": "env.AWS_REGION", + "type": "string", + "description": "AWS region for Amazon Bedrock and Claude Platform on AWS requests (e.g. us-east-1). See https://code.claude.com/docs/en/amazon-bedrock#3-configure-claude-code" + }, { "key": "env.BASH_DEFAULT_TIMEOUT_MS", "type": "string", @@ -731,6 +1034,11 @@ "type": "string", "description": "Maximum bash command timeout in milliseconds (default: 600000)" }, + { + "key": "env.BETA_TRACING_ENDPOINT", + "type": "string", + "description": "Endpoint that, together with ENABLE_BETA_TRACING_DETAILED=1, activates detailed beta tracing spans (e.g. claude_code.hook). See https://code.claude.com/docs/en/monitoring-usage#traces-beta" + }, { "key": "env.CCR_FORCE_BUNDLE", "type": "string", @@ -740,6 +1048,16 @@ ], "description": "Force local repo bundling for --remote invocations" }, + { + "key": "env.CLAUDE_AFK_COUNTDOWN_MS", + "type": "string", + "description": "How many milliseconds before auto-continue the on-screen countdown appears on an unanswered AskUserQuestion dialog. Default 20000 (20 seconds). See CLAUDE_AFK_TIMEOUT_MS. Requires Claude Code v2.1.198 or later. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_AFK_TIMEOUT_MS", + "type": "string", + "description": "How many milliseconds of idle time before an unanswered AskUserQuestion dialog auto-continues without you. Default 60000 (60 seconds). Requires Claude Code v2.1.198 or later. See https://code.claude.com/docs/en/env-vars" + }, { "key": "env.CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS", "type": "string", @@ -758,6 +1076,11 @@ ], "description": "Skip 'mcp____' prefix on MCP tool names in Agent SDK" }, + { + "key": "env.CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS", + "type": "string", + "description": "Stall timeout for background subagents in milliseconds (default 600000). The timer resets on each streaming progress event; if no progress arrives within the window the subagent is aborted and the task is marked failed, surfacing any partial result to the parent. See https://code.claude.com/docs/en/env-vars" + }, { "key": "env.CLAUDE_AUTO_BACKGROUND_TASKS", "type": "string", @@ -772,6 +1095,15 @@ "type": "string", "description": "Context capacity percentage threshold for auto-compaction (1-100)" }, + { + "key": "env.CLAUDE_AX_SCREEN_READER", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "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. See https://code.claude.com/docs/en/env-vars" + }, { "key": "env.CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR", "type": "string", @@ -781,6 +1113,11 @@ ], "description": "Return to original project directory after each bash command" }, + { + "key": "env.CLAUDE_CLIENT_PRESENCE_FILE", + "type": "string", + "description": "Path to a file whose existence marks the user as present; while it exists, mobile push notifications are skipped (v2.1.181+). See https://code.claude.com/docs/en/env-vars" + }, { "key": "env.CLAUDE_CODE_ACCESSIBILITY", "type": "string", @@ -799,11 +1136,38 @@ ], "description": "Load CLAUDE.md memory files from additional directories" }, + { + "key": "env.CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Force a full-screen repaint on every frame in fullscreen mode. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_CODE_ALWAYS_ENABLE_EFFORT", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Send the effort parameter for all models, not just those with effort enabled by default. See https://code.claude.com/docs/en/env-vars" + }, { "key": "env.CLAUDE_CODE_API_KEY_HELPER_TTL_MS", "type": "string", "description": "Credential helper refresh interval in milliseconds" }, + { + "key": "env.CLAUDE_CODE_ARTIFACT_AUTO_OPEN", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 0 to stop auto-opening the browser when a new artifact is created. See https://code.claude.com/docs/en/artifacts#create-an-artifact" + }, { "key": "env.CLAUDE_CODE_ATTRIBUTION_HEADER", "type": "string", @@ -827,11 +1191,30 @@ ], "description": "Override automatic IDE connection behavior" }, + { + "key": "env.CLAUDE_CODE_AWS_CHAIN_RESOLVE_TIMEOUT_MS", + "type": "string", + "description": "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. Requires Claude Code v2.1.207 or later. See https://code.claude.com/docs/en/amazon-bedrock#credential-caching-and-resolution-timeout" + }, + { + "key": "env.CLAUDE_CODE_BRIDGE_SESSION_ID", + "type": "string", + "description": "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. See https://code.claude.com/docs/en/remote-control" + }, { "key": "env.CLAUDE_CODE_CERT_STORE", "type": "string", "description": "CA certificate sources (comma-separated: 'bundled', 'system')" }, + { + "key": "env.CLAUDE_CODE_CHILD_SESSION", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set by Claude Code to 1 in nested subprocesses (Bash, PowerShell, Monitor, hook commands, status-line commands) to distinguish nested sessions from a top-level claude launched in IDE terminals (v2.1.172+). A nested interactive claude TUI started this way is excluded from --resume, --continue, up-arrow history, and the claude agents list; non-interactive claude -p sessions still persist (override with CLAUDE_CODE_FORCE_SESSION_PERSISTENCE=1). See https://code.claude.com/docs/en/env-vars" + }, { "key": "env.CLAUDE_CODE_CLIENT_CERT", "type": "string", @@ -862,7 +1245,7 @@ { "key": "env.CLAUDE_CODE_DEBUG_LOGS_DIR", "type": "string", - "description": "Directory path for debug log files" + "description": "Override the debug log file path. Despite the name, this is a file path, not a directory." }, { "key": "env.CLAUDE_CODE_DISABLE_1M_CONTEXT", @@ -883,25 +1266,61 @@ "description": "Disable adaptive reasoning" }, { - "key": "env.CLAUDE_CODE_DISABLE_ATTACHMENTS", + "key": "env.CLAUDE_CODE_DISABLE_ADVISOR_TOOL", "type": "string", "enum": [ "0", "1" ], - "description": "Disable attachment processing" + "description": "Disable the server-side advisor tool. See https://code.claude.com/docs/en/env-vars" }, { - "key": "env.CLAUDE_CODE_DISABLE_AUTO_MEMORY", + "key": "env.CLAUDE_CODE_DISABLE_AGENT_VIEW", "type": "string", "enum": [ "0", "1" ], - "description": "Disable automatic memory feature" + "description": "Turn off background agents and agent view (claude agents, --bg, /background, and the on-demand supervisor). Equivalent to the disableAgentView setting. See https://code.claude.com/docs/en/env-vars" }, { - "key": "env.CLAUDE_CODE_DISABLE_BACKGROUND_TASKS", + "key": "env.CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Disable alternate screen buffer rendering. When set to 1, keeps conversation in native scrollback instead of fullscreen renderer" + }, + { + "key": "env.CLAUDE_CODE_DISABLE_ARTIFACT", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Disable the Artifact tool. Equivalent to setting disableArtifact. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_CODE_DISABLE_ATTACHMENTS", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Disable attachment processing" + }, + { + "key": "env.CLAUDE_CODE_DISABLE_AUTO_MEMORY", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Disable automatic memory feature" + }, + { + "key": "env.CLAUDE_CODE_DISABLE_BACKGROUND_TASKS", "type": "string", "enum": [ "0", @@ -909,6 +1328,42 @@ ], "description": "Disable all background task functionality" }, + { + "key": "env.CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_GUARD", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to skip the check that an Amazon Bedrock streaming response carries the application/vnd.amazon.eventstream content-type. Without this variable, a response with a different content-type fails with an error naming that content-type, which means a gateway or proxy is transforming the response. Set it only when the gateway rewrites the Content-Type header but passes the binary event-stream body through unmodified; if the body itself was transformed, requests fail with \"Truncated event message received\" instead. Requires Claude Code v2.1.208 or later. See https://code.claude.com/docs/en/amazon-bedrock#streaming-errors-behind-a-gateway-or-proxy" + }, + { + "key": "env.CLAUDE_CODE_DISABLE_BG_EXIT_HANDOFF", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "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 off to the session's next process. Affects only that handoff; CLAUDE_DISABLE_ADOPT turns off both. Requires Claude Code v2.1.196 or later. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "UNDOCUMENTED. Disable automatic memory-pressure reaping of idle background shell commands (added v2.1.193)." + }, + { + "key": "env.CLAUDE_CODE_DISABLE_BUNDLED_SKILLS", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Disable the skills and workflows bundled with Claude Code (plugins and project .claude/skills are unaffected). See https://code.claude.com/docs/en/env-vars" + }, { "key": "env.CLAUDE_CODE_DISABLE_CLAUDE_MDS", "type": "string", @@ -936,6 +1391,15 @@ ], "description": "Strip anthropic-beta headers from API requests. See https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#21123" }, + { + "key": "env.CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to disable the built-in Explore and Plan subagents. Requires Claude Code v2.1.198 or later. See https://code.claude.com/docs/en/env-vars" + }, { "key": "env.CLAUDE_CODE_DISABLE_FAST_MODE", "type": "string", @@ -961,7 +1425,7 @@ "0", "1" ], - "description": "Disable file checkpointing for undo/restore" + "description": "Disable file checkpointing for /rewind" }, { "key": "env.CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS", @@ -988,7 +1452,16 @@ "0", "1" ], - "description": "Disable mouse tracking in fullscreen mode" + "description": "Disable mouse tracking in fullscreen mode. See https://code.claude.com/docs/en/fullscreen#keep-native-text-selection" + }, + { + "key": "env.CLAUDE_CODE_DISABLE_MOUSE_CLICKS", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Disable mouse click/drag/hover in fullscreen mode while keeping wheel scroll (requires v2.1.195+). CLAUDE_CODE_DISABLE_MOUSE takes precedence when both variables are set. See https://code.claude.com/docs/en/fullscreen#keep-native-text-selection" }, { "key": "env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC", @@ -1008,6 +1481,15 @@ ], "description": "Disable fallback to non-streaming API mode" }, + { + "key": "env.CLAUDE_CODE_DISABLE_NOTIFICATION_PRESENCE_CHECK", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to send desktop notifications from the PushNotification tool even while focused on the terminal. Requires Claude Code v2.1.193 or later. See https://code.claude.com/docs/en/env-vars" + }, { "key": "env.CLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALL", "type": "string", @@ -1015,7 +1497,7 @@ "0", "1" ], - "description": "Skip automatic installation of official marketplace plugins" + "description": "Skip automatic installation of official marketplace plugins. See https://code.claude.com/docs/en/env-vars" }, { "key": "env.CLAUDE_CODE_DISABLE_POLICY_SKILLS", @@ -1024,7 +1506,7 @@ "0", "1" ], - "description": "Skip loading system-wide policy skills" + "description": "Skip loading system-wide policy skills. See https://code.claude.com/docs/en/env-vars" }, { "key": "env.CLAUDE_CODE_DISABLE_TERMINAL_TITLE", @@ -1053,6 +1535,15 @@ ], "description": "Disable virtual scrolling in fullscreen mode" }, + { + "key": "env.CLAUDE_CODE_DISABLE_WORKFLOWS", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to disable workflows. Equivalent to the disableWorkflows setting. See https://code.claude.com/docs/en/env-vars" + }, { "key": "env.CLAUDE_CODE_EFFORT_LEVEL", "type": "string", @@ -1066,6 +1557,24 @@ ], "description": "Reasoning effort level" }, + { + "key": "env.CLAUDE_CODE_ENABLE_APPEND_SUBAGENT_PROMPT", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to enable appending extra text to the end of every subagent's system prompt. The --append-subagent-system-prompt flag supplies the appended text and sets this variable automatically, so you do not need to set it yourself. Requires Claude Code v2.1.205 or later. See https://code.claude.com/docs/en/sub-agents" + }, + { + "key": "env.CLAUDE_CODE_ENABLE_AUTO_MODE", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to make auto mode available on Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Foundry (requires v2.1.158+; no effect on the Anthropic API where auto mode is available by default). See https://code.claude.com/docs/en/env-vars" + }, { "key": "env.CLAUDE_CODE_ENABLE_AWAY_SUMMARY", "type": "string", @@ -1082,7 +1591,16 @@ "0", "1" ], - "description": "Refresh plugins at turn boundaries" + "description": "Refresh plugins at turn boundaries. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Enable feedback survey collection via OpenTelemetry for enterprises" }, { "key": "env.CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING", @@ -1093,6 +1611,15 @@ ], "description": "Force fine-grained tool output streaming" }, + { + "key": "env.CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Enable model discovery from LLM gateway /v1/models endpoint when ANTHROPIC_BASE_URL points at an Anthropic-compatible gateway" + }, { "key": "env.CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION", "type": "string", @@ -1102,6 +1629,11 @@ ], "description": "Enable prompt suggestions" }, + { + "key": "env.CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING", + "type": "string", + "description": "Enable file checkpointing for a non-interactive CLI run, so `claude -p --resume --rewind-files ` can rewind files. The Agent SDK sets this internally when enable_file_checkpointing (Python) or enableFileCheckpointing (TypeScript) is enabled; the bare CLI never sets it. Without it, a non-interactive rewind fails with \"File rewinding is not enabled\". See https://code.claude.com/docs/en/agent-sdk/file-checkpointing" + }, { "key": "env.CLAUDE_CODE_ENABLE_TASKS", "type": "string", @@ -1118,7 +1650,16 @@ "0", "1" ], - "description": "Enable OpenTelemetry collection" + "description": "Set to 1 to enable telemetry collection. Required for all OpenTelemetry integration. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables" + }, + { + "key": "env.CLAUDE_CODE_ENHANCED_TELEMETRY_BETA", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Enable the enhanced telemetry (tracing) beta. ENABLE_ENHANCED_TELEMETRY_BETA is also accepted. See https://code.claude.com/docs/en/monitoring-usage#traces-beta" }, { "key": "env.CLAUDE_CODE_EXIT_AFTER_STOP_DELAY", @@ -1144,6 +1685,33 @@ "type": "string", "description": "Token limit for file read operations" }, + { + "key": "env.CLAUDE_CODE_FORCE_SESSION_PERSISTENCE", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to override the automatic exclusion of nested interactive claude TUI sessions from --resume, --continue, up-arrow history, and the claude agents list (requires v2.1.172+). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_CODE_FORCE_STRIKETHROUGH", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to force strikethrough rendering for ~~text~~ in Claude's responses when the terminal supports it but is not auto-detected, such as over SSH without TERM_PROGRAM forwarded. Without this, undetected terminals show the literal ~~ markers. Requires Claude Code v2.1.186 or later. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_CODE_FORCE_SYNC_OUTPUT", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Force synchronous output flushing. When set to 1, forces synchronized output on terminals that auto-detection misses (e.g., Emacs eat)" + }, { "key": "env.CLAUDE_CODE_FORK_SUBAGENT", "type": "string", @@ -1153,6 +1721,15 @@ ], "description": "Fork subagent processes in non-interactive sessions. See https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#21120" }, + { + "key": "env.CLAUDE_CODE_FORWARD_SUBAGENT_TEXT", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "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 cannot 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 is set process-wide. Requires Claude Code v2.1.211 or later. See https://code.claude.com/docs/en/sub-agents" + }, { "key": "env.CLAUDE_CODE_GIT_BASH_PATH", "type": "string", @@ -1213,6 +1790,11 @@ ], "description": "Skip IDE lockfile validation" }, + { + "key": "env.CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS", + "type": "string", + "description": "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 cannot disable it. Requires Claude Code v2.1.217 or later. See https://code.claude.com/docs/en/sub-agents#concurrent-subagent-limit" + }, { "key": "env.CLAUDE_CODE_MAX_CONTEXT_TOKENS", "type": "string", @@ -1228,11 +1810,31 @@ "type": "string", "description": "Maximum API request retry attempts (default: 10)" }, + { + "key": "env.CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH", + "type": "string", + "description": "Number of subagent layers allowed below the main conversation (default: 1). At the default, subagents cannot spawn their own subagents; set 2 or higher to allow it. Accepts a positive whole number in plain digits; anything else is ignored, so the limit can be raised but not turned off. Requires Claude Code v2.1.217 or later. See https://code.claude.com/docs/en/sub-agents#let-subagents-spawn-their-own-subagents" + }, + { + "key": "env.CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION", + "type": "string", + "description": "Cap on the number of subagents one session can spawn with the Agent tool (default: 200). When Claude reaches the cap, spawning another subagent fails with an error telling Claude to finish the remaining work directly. Accepts a positive whole number in plain digits with no upper bound; this variable does not take the scientific notation or digit-separator spellings. 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. See https://code.claude.com/docs/en/sub-agents#session-subagent-limit" + }, { "key": "env.CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY", "type": "string", "description": "Maximum parallel tool executions (default: 10)" }, + { + "key": "env.CLAUDE_CODE_MAX_TURNS", + "type": "string", + "description": "Cap the number of agentic turns when no explicit limit is passed. Equivalent to --max-turns, which takes precedence. A non-positive integer is rejected at startup. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION", + "type": "string", + "description": "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. See https://code.claude.com/docs/en/tools-reference#websearch-tool-behavior" + }, { "key": "env.CLAUDE_CODE_MCP_ALLOWLIST_ENV", "type": "string", @@ -1242,6 +1844,25 @@ ], "description": "Isolate MCP server environments to allowlisted variables" }, + { + "key": "env.CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS", + "type": "string", + "description": "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. See https://code.claude.com/docs/en/mcp#automatic-backgrounding-of-long-tool-calls" + }, + { + "key": "env.CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT", + "type": "string", + "description": "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. Does not 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. See https://code.claude.com/docs/en/mcp" + }, + { + "key": "env.CLAUDE_CODE_NATIVE_CURSOR", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "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. See https://code.claude.com/docs/en/env-vars" + }, { "key": "env.CLAUDE_CODE_NEW_INIT", "type": "string", @@ -1275,6 +1896,20 @@ "type": "string", "description": "OAuth access token" }, + { + "key": "env.CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH", + "type": "string", + "description": "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 https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables" + }, + { + "key": "env.CLAUDE_CODE_OTEL_DIAG_STDERR", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to write OpenTelemetry exporter diagnostic errors to stderr (otherwise shown only with --debug). Requires v2.1.179+. See https://code.claude.com/docs/en/env-vars" + }, { "key": "env.CLAUDE_CODE_OTEL_FLUSH_TIMEOUT_MS", "type": "string", @@ -1290,6 +1925,15 @@ "type": "string", "description": "OpenTelemetry shutdown timeout in milliseconds (default: 2000)" }, + { + "key": "env.CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Enable automatic package manager updates. When set, Claude Code runs the upgrade command in background on Homebrew/WinGet and prompts to restart" + }, { "key": "env.CLAUDE_CODE_PERFORCE_MODE", "type": "string", @@ -1302,7 +1946,7 @@ { "key": "env.CLAUDE_CODE_PLUGIN_CACHE_DIR", "type": "string", - "description": "Root directory for plugin cache" + "description": "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. See https://code.claude.com/docs/en/env-vars" }, { "key": "env.CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS", @@ -1318,10 +1962,47 @@ ], "description": "Keep plugin cache on update failure" }, + { + "key": "env.CLAUDE_CODE_PLUGIN_PREFER_HTTPS", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to clone GitHub owner/repo plugin sources over HTTPS instead of SSH. Useful in CI runners, containers, or environments without a configured SSH key for github.com. See https://code.claude.com/docs/en/env-vars" + }, { "key": "env.CLAUDE_CODE_PLUGIN_SEED_DIR", "type": "string", - "description": "Path(s) to pre-populated plugin directories" + "description": "Path(s) to pre-populated plugin directories. See https://code.claude.com/docs/en/plugin-marketplaces#pre-populate-plugins-for-containers" + }, + { + "key": "env.CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to stop Claude Code from passing -ExecutionPolicy Bypass when spawning PowerShell for tool calls, hooks, and status line commands. By default Claude Code bypasses execution policy so .ps1 scripts work on default-Restricted Windows installs. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS", + "type": "string", + "description": "Cap, in milliseconds, on how long `claude -p` waits for background subagents at exit (default 10 minutes; set to 0 to wait without limit, added v2.1.182). See https://code.claude.com/docs/en/headless#background-tasks-at-exit" + }, + { + "key": "env.CLAUDE_CODE_PROCESS_WRAPPER", + "type": "string", + "description": "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 cannot 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. Requires Claude Code v2.1.208 or later. See https://code.claude.com/docs/en/corporate-launcher" + }, + { + "key": "env.CLAUDE_CODE_PROPAGATE_TRACEPARENT", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Propagate the W3C traceparent header on API requests when using a custom ANTHROPIC_BASE_URL. See https://code.claude.com/docs/en/monitoring-usage#traces-beta" }, { "key": "env.CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST", @@ -1364,6 +2045,34 @@ ], "description": "Automatically resume from a mid-turn interruption" }, + { + "key": "env.CLAUDE_CODE_RESUME_INTERRUPTED_TURN_MAX_AGE_MS", + "type": "string", + "description": "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 does not 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. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_CODE_RESUME_PROMPT", + "type": "string", + "description": "Override the continuation message injected when resuming a session that ended mid-turn (default \"Continue from where you left off.\"). An empty string uses the default. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_CODE_RETRY_WATCHDOG", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 for unattended sessions (eval harnesses, CI, remote workers) to retry 429/529 capacity errors indefinitely, backing off up to 5 minutes, instead of failing after CLAUDE_CODE_MAX_RETRIES. Requires v2.1.186+. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_CODE_SAFE_MODE", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "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. Equivalent to passing --safe-mode; directly spawned child processes inherit the variable. See https://code.claude.com/docs/en/env-vars" + }, { "key": "env.CLAUDE_CODE_SCRIPT_CAPS", "type": "string", @@ -1372,12 +2081,17 @@ { "key": "env.CLAUDE_CODE_SCROLL_SPEED", "type": "string", - "description": "Mouse wheel scroll speed multiplier (1-20)" + "description": "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. See https://code.claude.com/docs/en/fullscreen#mouse-wheel-scrolling" + }, + { + "key": "env.CLAUDE_CODE_SESSION_ID", + "type": "string", + "description": "Set automatically to the current session ID in Bash/PowerShell tool subprocesses, hook command subprocesses, and stdio MCP server subprocesses. Read-only. See https://code.claude.com/docs/en/env-vars" }, { - "key": "env.CLAUDE_CODE_SESSION_END_HOOKS_TIMEOUT_MS", + "key": "env.CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS", "type": "string", - "description": "Time budget in milliseconds for SessionEnd hooks" + "description": "Override the time budget in milliseconds for SessionEnd hooks (default 1500, raised up to 60000 by the highest configured per-hook timeout). See https://code.claude.com/docs/en/env-vars" }, { "key": "env.CLAUDE_CODE_SHELL", @@ -1408,208 +2122,954 @@ "description": "Use a shortened system prompt" }, { - "key": "env.CLAUDE_CODE_SKIP_BEDROCK_AUTH", + "key": "env.CLAUDE_CODE_SKIP_ANTHROPIC_AWS_AUTH", "type": "string", "enum": [ "0", "1" ], - "description": "Skip AWS authentication for Bedrock" + "description": "Skip client-side SigV4 authentication for Claude Platform on AWS; use when a proxy or gateway adds authentication before forwarding. See https://code.claude.com/docs/en/claude-platform-on-aws#route-through-a-corporate-proxy" }, { - "key": "env.CLAUDE_CODE_SKIP_FOUNDRY_AUTH", + "key": "env.CLAUDE_CODE_SKIP_AWS_CRED_CACHE", "type": "string", "enum": [ "0", "1" ], - "description": "Skip Azure authentication for Foundry" + "description": "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. Requires Claude Code v2.1.207 or later. See https://code.claude.com/docs/en/amazon-bedrock#credential-caching-and-resolution-timeout" }, { - "key": "env.CLAUDE_CODE_SKIP_MANTLE_AUTH", + "key": "env.CLAUDE_CODE_SKIP_BEDROCK_AUTH", "type": "string", "enum": [ "0", "1" ], - "description": "Skip AWS authentication for Mantle" + "description": "Skip AWS authentication for Bedrock" + }, + { + "key": "env.CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "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. See https://code.claude.com/docs/en/fast-mode#use-fast-mode-behind-proxies-and-llm-gateways" + }, + { + "key": "env.CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "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. See https://code.claude.com/docs/en/fast-mode#use-fast-mode-behind-proxies-and-llm-gateways" + }, + { + "key": "env.CLAUDE_CODE_SKIP_FOUNDRY_AUTH", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Skip Azure authentication for Foundry" + }, + { + "key": "env.CLAUDE_CODE_SKIP_MANTLE_AUTH", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Skip AWS authentication for Bedrock Mantle (for example, when using an LLM gateway). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_CODE_SKIP_PROMPT_HISTORY", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Disable transcript writes entirely. See https://code.claude.com/docs/en/settings#environment-variables" + }, + { + "key": "env.CLAUDE_CODE_SKIP_VERTEX_AUTH", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Skip Google authentication for Google Cloud's Agent Platform" + }, + { + "key": "env.CLAUDE_CODE_STOP_HOOK_BLOCK_CAP", + "type": "string", + "description": "Override the default maximum consecutive Stop hook blocks (default: 8) before the turn ends with a warning. Raise this when a stop hook legitimately needs more than 8 iterations to converge. See https://code.claude.com/docs/en/hooks-guide" + }, + { + "key": "env.CLAUDE_CODE_SUBAGENT_MODEL", + "type": "string", + "description": "Override model used by subagents" + }, + { + "key": "env.CLAUDE_CODE_SUBPROCESS_ENV_SCRUB", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Strip credentials from subprocess environments" + }, + { + "key": "env.CLAUDE_CODE_SYNC_PLUGIN_INSTALL", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Wait synchronously for plugin installation" + }, + { + "key": "env.CLAUDE_CODE_SYNC_PLUGIN_INSTALL_TIMEOUT_MS", + "type": "string", + "description": "Timeout in milliseconds for synchronous plugin installation" + }, + { + "key": "env.CLAUDE_CODE_SYNC_SKILLS", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to download enabled claude.ai skills into ~/.claude/skills/ before the first query and resync every 10 minutes (non-interactive -p mode only; requires claude.ai auth). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_CODE_SYNC_SKILLS_INSTALL_TIMEOUT_MS", + "type": "string", + "description": "Timeout in milliseconds for a mid-session skills resync when CLAUDE_CODE_SYNC_SKILLS is set (default 30000). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_CODE_SYNC_SKILLS_WAIT_TIMEOUT_MS", + "type": "string", + "description": "Timeout in milliseconds for the first query to wait on the initial skills sync when CLAUDE_CODE_SYNC_SKILLS is set (default 5000). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_CODE_SYNTAX_HIGHLIGHT", + "type": "string", + "enum": [ + "true", + "false" + ], + "description": "UNDOCUMENTED. Enable syntax highlighting in diffs" + }, + { + "key": "env.CLAUDE_CODE_TASK_LIST_ID", + "type": "string", + "description": "Shared task list identifier for team collaboration" + }, + { + "key": "env.CLAUDE_CODE_TEAM_NAME", + "type": "string", + "description": "Agent team membership name" + }, + { + "key": "env.CLAUDE_CODE_TEAM_TEARDOWN_PARK_TIMEOUT_MS", + "type": "string", + "description": "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. See https://code.claude.com/docs/en/agent-teams" + }, + { + "key": "env.CLAUDE_CODE_TMPDIR", + "type": "string", + "description": "Override temp directory path" + }, + { + "key": "env.CLAUDE_CODE_TMUX_TRUECOLOR", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Allow 24-bit truecolor rendering in tmux" + }, + { + "key": "env.CLAUDE_CODE_USE_ANTHROPIC_AWS", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Enable Claude Platform on AWS as the API provider. Bedrock and Foundry take precedence if also set. See https://code.claude.com/docs/en/claude-platform-on-aws#2-configure-claude-code" + }, + { + "key": "env.CLAUDE_CODE_USE_BEDROCK", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Enable Amazon Bedrock as the API provider. See https://code.claude.com/docs/en/amazon-bedrock#3-configure-claude-code" + }, + { + "key": "env.CLAUDE_CODE_USE_FOUNDRY", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Enable Microsoft Foundry as the API provider. See https://code.claude.com/docs/en/microsoft-foundry#3-configure-claude-code" + }, + { + "key": "env.CLAUDE_CODE_USE_MANTLE", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Enable the Mantle endpoint (native Anthropic API shape on Bedrock). See https://code.claude.com/docs/en/amazon-bedrock#enable-mantle" + }, + { + "key": "env.CLAUDE_CODE_USE_NATIVE_FILE_SEARCH", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to discover custom commands, subagents, and output styles using Node.js file APIs instead of ripgrep (for environments where the bundled ripgrep is unavailable). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_CODE_USE_POWERSHELL_TOOL", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Enable PowerShell as default shell for interactive commands (Windows)" + }, + { + "key": "env.CLAUDE_CODE_USE_VERTEX", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Enable Google Cloud's Agent Platform as the API provider. See https://code.claude.com/docs/en/google-vertex-ai#4-configure-claude-code" + }, + { + "key": "env.CLAUDE_CONFIG_DIR", + "type": "string", + "description": "Override the configuration directory (default ~/.claude) where settings, credentials, session history, and plugins are stored. Useful for running multiple accounts side by side. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_DISABLE_ADOPT", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "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. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_EFFORT", + "type": "string", + "enum": [ + "low", + "medium", + "high", + "xhigh", + "max" + ], + "description": "Set automatically in Bash tool subprocesses and hook commands to the active effort level for the turn (low, medium, high, xhigh, or max; ultracode reports as xhigh). Read-only. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_ENABLE_BYTE_WATCHDOG", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to force-enable, or 0 to force-disable, the byte-level streaming idle watchdog that aborts a connection when no bytes arrive within the configured timeout. Enabled by default on direct Anthropic API and Claude Platform on AWS connections. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCK", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to enable the byte-level streaming idle watchdog on Amazon Bedrock eventstream responses (off by default). Configure the timeout with CLAUDE_STREAM_IDLE_TIMEOUT_MS. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_ENABLE_STREAM_WATCHDOG", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to force-enable, or 0 to force-disable, the event-level streaming idle watchdog. When unset, the watchdog is on by default for all providers (as of v2.1.196; before that the unset default was server-controlled on the direct Anthropic API and off on other providers). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDE_ENV_FILE", + "type": "string", + "description": "File path for persisting environment variables across Bash commands" + }, + { + "key": "env.CLAUDE_PID", + "type": "string", + "description": "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. Read it from your own scripts to identify or signal the parent Claude Code process deliberately. Requires Claude Code v2.1.214 or later. See https://code.claude.com/docs/en/errors#pkill-pattern-matches-the-claude-code-process" + }, + { + "key": "env.CLAUDE_PROJECT_DIR", + "type": "string", + "description": "Project root directory path (also provided to hooks)" + }, + { + "key": "env.CLAUDE_REMOTE_CONTROL_SESSION_NAME_PREFIX", + "type": "string", + "description": "Prefix for auto-generated Remote Control session names when no explicit name is set. Defaults to the machine hostname, producing names like myhost-graceful-unicorn. See https://code.claude.com/docs/en/remote-control#start-a-remote-control-session" + }, + { + "key": "env.CLAUDE_STREAM_IDLE_TIMEOUT_MS", + "type": "string", + "description": "Timeout in milliseconds before the streaming idle watchdog closes a stalled connection. When set explicitly the minimum is 300000 (5 minutes); lower values are clamped. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLAUDECODE", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "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. To distinguish a direct tool/hook subprocess from a stdio MCP server subprocess, use CLAUDE_CODE_CHILD_SESSION instead. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.CLOUD_ML_REGION", + "type": "string", + "description": "Google Cloud's Agent Platform region: global, a multi-region location (eu, us), or a specific region (e.g. us-east5). See https://code.claude.com/docs/en/google-vertex-ai#region-configuration" + }, + { + "key": "env.DEBUG", + "type": "string", + "description": "Set to a truthy value (1, true, yes, or on) to enable debug mode, equivalent to --debug. Logs are written to ~/.claude/debug/.txt. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.DISABLE_AUTO_COMPACT", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to disable automatic compaction when approaching the context limit. The manual /compact command remains available. Equivalent to autoCompactEnabled: false. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.DISABLE_AUTOUPDATER", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to disable automatic background updates. Manual claude update still works; use DISABLE_UPDATES to block both. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.DISABLE_COMPACT", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to disable all compaction: both automatic compaction and the manual /compact command. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.DISABLE_COST_WARNINGS", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to disable cost warning messages. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.DISABLE_DOCTOR_COMMAND", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to hide the /doctor command (useful for managed deployments). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.DISABLE_ERROR_REPORTING", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Disable Sentry error reporting" + }, + { + "key": "env.DISABLE_EXTRA_USAGE_COMMAND", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to hide the /usage-credits command for purchasing additional usage beyond rate limits. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.DISABLE_FEEDBACK_COMMAND", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to disable the /feedback command. The older name DISABLE_BUG_COMMAND is also accepted. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.DISABLE_GROWTHBOOK", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to disable GrowthBook feature-flag fetching and use code defaults for every flag. Telemetry stays on unless DISABLE_TELEMETRY is also set. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.DISABLE_INSTALL_GITHUB_APP_COMMAND", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to hide the /install-github-app command (already hidden on Bedrock, Vertex, or Foundry). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.DISABLE_INSTALLATION_CHECKS", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to disable installation warnings (use only when manually managing the installation location). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.DISABLE_INTERLEAVED_THINKING", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to prevent sending the interleaved-thinking beta header (useful when a gateway or provider does not support interleaved thinking). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.DISABLE_LOGIN_COMMAND", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to hide the /login command (useful when authentication is handled externally via API keys or apiKeyHelper). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.DISABLE_LOGOUT_COMMAND", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to hide the /logout command. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.DISABLE_PROMPT_CACHING", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Disable prompt caching for all models. See https://code.claude.com/docs/en/prompt-caching#disable-prompt-caching" + }, + { + "key": "env.DISABLE_PROMPT_CACHING_FABLE", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Disable prompt caching for Fable models only. See https://code.claude.com/docs/en/prompt-caching#disable-prompt-caching" + }, + { + "key": "env.DISABLE_PROMPT_CACHING_HAIKU", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Disable prompt caching for Haiku models only. See https://code.claude.com/docs/en/prompt-caching#disable-prompt-caching" + }, + { + "key": "env.DISABLE_PROMPT_CACHING_OPUS", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Disable prompt caching for Opus models only. See https://code.claude.com/docs/en/prompt-caching#disable-prompt-caching" + }, + { + "key": "env.DISABLE_PROMPT_CACHING_SONNET", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Disable prompt caching for Sonnet models only. See https://code.claude.com/docs/en/prompt-caching#disable-prompt-caching" + }, + { + "key": "env.DISABLE_TELEMETRY", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to opt out of telemetry. Also disables feature-flag fetching (same effect as DISABLE_GROWTHBOOK). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.DISABLE_UPDATES", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Block all update paths including manual updates" + }, + { + "key": "env.DISABLE_UPGRADE_COMMAND", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to hide the /upgrade command. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.DO_NOT_TRACK", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to opt out of telemetry (cross-tool convention; equivalent to DISABLE_TELEMETRY). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.ENABLE_BETA_TRACING_DETAILED", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Emit detailed spans including hook execution when the tracing beta is enabled. See https://code.claude.com/docs/en/monitoring-usage#traces-beta" + }, + { + "key": "env.ENABLE_CLAUDEAI_MCP_SERVERS", + "type": "string", + "enum": [ + "true", + "false" + ], + "description": "Opt in/out of claude.ai MCP servers. See https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#2163" + }, + { + "key": "env.ENABLE_PROMPT_CACHING_1H", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Request a 1-hour prompt cache TTL instead of the 5-minute default (billed at a higher rate). See https://code.claude.com/docs/en/prompt-caching#cache-lifetime" + }, + { + "key": "env.ENABLE_TOOL_SEARCH", + "type": "string", + "description": "Control MCP tool search: \"true\" always defers and sends the beta header (requests fail on Google Cloud's Agent Platform models earlier than Sonnet 4.5/Opus 4.5 or on proxies that do not support tool_reference); \"auto\" loads tools upfront if they fit within 10% of context; \"auto:N\" sets a custom threshold percentage (e.g. auto:5); \"false\" loads all tools upfront. Also applies when ANTHROPIC_BASE_URL points to a non-first-party host. See https://code.claude.com/docs/en/google-vertex-ai#4-configure-claude-code" + }, + { + "key": "env.FALLBACK_FOR_ALL_PRIMARY_MODELS", + "type": "string", + "description": "Set to any non-empty value to make all models (not only Opus) stop retrying with a repeated-overload error when no fallback model is configured. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.FORCE_AUTOUPDATE_PLUGINS", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Keep plugin auto-updates enabled even when DISABLE_AUTOUPDATER=1 is set. See https://code.claude.com/docs/en/discover-plugins#configure-auto-updates" + }, + { + "key": "env.FORCE_HYPERLINK", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to enable clickable OSC 8 hyperlinks when your terminal supports them but is not auto-detected, or 0 to disable them" + }, + { + "key": "env.FORCE_PROMPT_CACHING_5M", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Force a 5-minute cache TTL regardless of authentication method; overrides ENABLE_PROMPT_CACHING_1H or a managed-settings TTL. See https://code.claude.com/docs/en/prompt-caching#override-the-ttl" + }, + { + "key": "env.GOOGLE_APPLICATION_CREDENTIALS", + "type": "string", + "description": "Path to a GCP credential configuration file (service account key or workload identity federation config) used for Google Cloud's Agent Platform authentication. See https://code.claude.com/docs/en/google-vertex-ai#3-configure-gcp-credentials" + }, + { + "key": "env.HTTP_PROXY", + "type": "string", + "description": "HTTP proxy URL" + }, + { + "key": "env.HTTPS_PROXY", + "type": "string", + "description": "HTTPS proxy URL (recommended over HTTP_PROXY)" + }, + { + "key": "env.IS_DEMO", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Set to 1 to enable demo mode: hides email and organization name from the header and /status output and skips onboarding. See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.MAX_MCP_OUTPUT_TOKENS", + "type": "string", + "description": "Maximum number of tokens allowed in MCP tool output before truncation (default: 25000). Claude Code displays a warning above 10000 tokens. For tools that declare anthropic/maxResultSizeChars, that character limit replaces this token limit for text content, but image content from those tools is still subject to this limit. See https://code.claude.com/docs/en/mcp" + }, + { + "key": "env.MAX_STRUCTURED_OUTPUT_RETRIES", + "type": "string", + "description": "Number of times to retry when the model's response fails validation against --json-schema in non-interactive (-p) mode (default 5). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.MAX_THINKING_TOKENS", + "type": "string", + "description": "Override the extended thinking token budget; set to 0 to disable thinking on the Anthropic API. On adaptive reasoning models (Opus 4.7+, Opus 4.8, Fable 5) a nonzero budget is ignored unless CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING is set. See https://code.claude.com/docs/en/model-config#extended-thinking" + }, + { + "key": "env.MCP_CLIENT_SECRET", + "type": "string", + "description": "OAuth client secret for MCP servers that require pre-configured credentials (avoids the interactive prompt when adding a server with --client-secret). See https://code.claude.com/docs/en/env-vars" }, { - "key": "env.CLAUDE_CODE_SKIP_PROMPT_HISTORY", + "key": "env.MCP_CONNECT_TIMEOUT_MS", "type": "string", - "enum": [ - "0", - "1" - ], - "description": "Disable transcript writes entirely. See https://code.claude.com/docs/en/settings#environment-variables" + "description": "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 alwaysLoad servers. See https://code.claude.com/docs/en/env-vars" }, { - "key": "env.CLAUDE_CODE_SKIP_VERTEX_AUTH", + "key": "env.MCP_CONNECTION_NONBLOCKING", "type": "string", "enum": [ "0", "1" ], - "description": "Skip Google authentication for Vertex AI" + "description": "Controls whether startup waits for MCP servers to connect before the first query. Non-blocking by default since v2.1.142; set to 0 to restore the blocking 5-second connection wait. See https://code.claude.com/docs/en/env-vars" }, { - "key": "env.CLAUDE_CODE_SUBAGENT_MODEL", + "key": "env.MCP_OAUTH_CALLBACK_PORT", "type": "string", - "description": "Override model used by subagents" + "description": "Fixed port for the OAuth redirect callback, as an alternative to --callback-port when adding an MCP server with pre-configured credentials. See https://code.claude.com/docs/en/env-vars" }, { - "key": "env.CLAUDE_CODE_SUBPROCESS_ENV_SCRUB", + "key": "env.MCP_REMOTE_SERVER_CONNECTION_BATCH_SIZE", + "type": "string", + "description": "Maximum number of remote MCP servers (HTTP/SSE) to connect in parallel during startup (default 20). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.MCP_SERVER_CONNECTION_BATCH_SIZE", + "type": "string", + "description": "Maximum number of local MCP servers (stdio) to connect in parallel during startup (default 3). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.MCP_TIMEOUT", + "type": "string", + "description": "Timeout in milliseconds for MCP server startup (default 30000). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.MCP_TOOL_TIMEOUT", + "type": "string", + "description": "Timeout in milliseconds for MCP tool execution (default: 100000000, about 28 hours). A per-server timeout field in .mcp.json overrides this for that server. Values below 1000 are floored to one second. See https://code.claude.com/docs/en/mcp" + }, + { + "key": "env.NO_PROXY", + "type": "string", + "description": "Domains to bypass proxy (space or comma-separated, or '*' for all)" + }, + { + "key": "env.NODE_EXTRA_CA_CERTS", + "type": "string", + "description": "Path to custom CA certificate file" + }, + { + "key": "env.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT", + "type": "string", + "description": "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 https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables" + }, + { + "key": "env.OTEL_EXPORTER_OTLP_CERTIFICATE", + "type": "string", + "description": "Path to the CA certificate for gRPC OTLP mTLS. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication" + }, + { + "key": "env.OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE", + "type": "string", + "description": "Path to the client certificate for gRPC OTLP mTLS. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication" + }, + { + "key": "env.OTEL_EXPORTER_OTLP_CLIENT_KEY", + "type": "string", + "description": "Path to the client private key for gRPC OTLP mTLS. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication" + }, + { + "key": "env.OTEL_EXPORTER_OTLP_ENDPOINT", + "type": "string", + "description": "OTLP exporter endpoint for all signals (e.g. http://localhost:4317). See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables" + }, + { + "key": "env.OTEL_EXPORTER_OTLP_HEADERS", + "type": "string", + "description": "Headers sent with OTLP exporter requests (e.g. Authorization=Bearer token). See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables" + }, + { + "key": "env.OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE", + "type": "string", + "description": "Path to the client certificate for gRPC OTLP mTLS, overriding OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE for logs only. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication" + }, + { + "key": "env.OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY", + "type": "string", + "description": "Path to the client private key for gRPC OTLP mTLS, overriding OTEL_EXPORTER_OTLP_CLIENT_KEY for logs only. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication" + }, + { + "key": "env.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT", + "type": "string", + "description": "OTLP exporter endpoint override for logs. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables" + }, + { + "key": "env.OTEL_EXPORTER_OTLP_LOGS_PROTOCOL", "type": "string", "enum": [ - "0", - "1" + "grpc", + "http/json", + "http/protobuf" ], - "description": "Strip credentials from subprocess environments" + "description": "OTLP protocol override for logs: grpc, http/json, or http/protobuf. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables" }, { - "key": "env.CLAUDE_CODE_SYNC_PLUGIN_INSTALL", + "key": "env.OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE", + "type": "string", + "description": "Path to the client certificate for gRPC OTLP mTLS, overriding OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE for metrics only. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication" + }, + { + "key": "env.OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY", + "type": "string", + "description": "Path to the client private key for gRPC OTLP mTLS, overriding OTEL_EXPORTER_OTLP_CLIENT_KEY for metrics only. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication" + }, + { + "key": "env.OTEL_EXPORTER_OTLP_METRICS_ENDPOINT", + "type": "string", + "description": "OTLP exporter endpoint override for metrics. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables" + }, + { + "key": "env.OTEL_EXPORTER_OTLP_METRICS_PROTOCOL", "type": "string", "enum": [ - "0", - "1" + "grpc", + "http/json", + "http/protobuf" ], - "description": "Wait synchronously for plugin installation" + "description": "OTLP protocol override for metrics: grpc, http/json, or http/protobuf. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables" }, { - "key": "env.CLAUDE_CODE_SYNC_PLUGIN_INSTALL_TIMEOUT_MS", + "key": "env.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE", "type": "string", - "description": "Timeout in milliseconds for synchronous plugin installation" + "enum": [ + "delta", + "cumulative" + ], + "description": "Metrics temporality preference: delta (default) or cumulative. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables" }, { - "key": "env.CLAUDE_CODE_SYNTAX_HIGHLIGHT", + "key": "env.OTEL_EXPORTER_OTLP_PROTOCOL", "type": "string", "enum": [ - "true", - "false" + "grpc", + "http/json", + "http/protobuf" ], - "description": "Enable syntax highlighting in diffs" + "description": "OTLP exporter protocol for all signals: grpc, http/json, or http/protobuf. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables" }, { - "key": "env.CLAUDE_CODE_TASK_LIST_ID", + "key": "env.OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE", "type": "string", - "description": "Shared task list identifier for team collaboration" + "description": "Path to the client certificate for gRPC OTLP mTLS, overriding OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE for traces only. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication" }, { - "key": "env.CLAUDE_CODE_TEAM_NAME", + "key": "env.OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY", "type": "string", - "description": "Agent team membership name" + "description": "Path to the client private key for gRPC OTLP mTLS, overriding OTEL_EXPORTER_OTLP_CLIENT_KEY for traces only. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication" }, { - "key": "env.CLAUDE_CODE_TMPDIR", + "key": "env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", "type": "string", - "description": "Override temp directory path" + "description": "OTLP exporter endpoint override for traces. See https://code.claude.com/docs/en/monitoring-usage#traces-beta" }, { - "key": "env.CLAUDE_CODE_TMUX_TRUECOLOR", + "key": "env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", "type": "string", "enum": [ - "0", - "1" + "grpc", + "http/json", + "http/protobuf" ], - "description": "Allow 24-bit truecolor rendering in tmux" + "description": "OTLP protocol override for traces: grpc, http/json, or http/protobuf. See https://code.claude.com/docs/en/monitoring-usage#traces-beta" }, { - "key": "env.CLAUDE_CODE_USE_POWERSHELL_TOOL", + "key": "env.OTEL_LOG_ASSISTANT_RESPONSES", "type": "string", "enum": [ "0", "1" ], - "description": "Enable PowerShell as default shell for interactive commands (Windows)" + "description": "UNDOCUMENTED. Include assistant response text in the claude_code.assistant_response OpenTelemetry log event (added v2.1.193). When unset, follows OTEL_LOG_USER_PROMPTS; set to 0 to keep prompts-only." }, { - "key": "env.CLAUDE_ENV_FILE", + "key": "env.OTEL_LOG_RAW_API_BODIES", "type": "string", - "description": "File path for persisting environment variables across Bash commands" + "description": "Log raw API request/response bodies. Set to 1, or to file: to write them to a directory. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables" }, { - "key": "env.CLAUDE_PROJECT_DIR", + "key": "env.OTEL_LOG_TOOL_CONTENT", "type": "string", - "description": "Project root directory path (also provided to hooks)" + "enum": [ + "0", + "1" + ], + "description": "Include full tool input/output content in OpenTelemetry log events (requires tracing; disabled by default). See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables" }, { - "key": "env.DISABLE_AUTOUPDATER", + "key": "env.OTEL_LOG_TOOL_DETAILS", "type": "string", "enum": [ "0", "1" ], - "description": "Stop background auto-update checks" + "description": "Include tool name and parameters in OpenTelemetry log events (disabled by default). See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables" }, { - "key": "env.DISABLE_ERROR_REPORTING", + "key": "env.OTEL_LOG_USER_PROMPTS", "type": "string", "enum": [ "0", "1" ], - "description": "Disable Sentry error reporting" + "description": "Include user prompt text in OpenTelemetry log events (disabled by default). See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables" }, { - "key": "env.DISABLE_FEEDBACK_COMMAND", + "key": "env.OTEL_LOGS_EXPORT_INTERVAL", + "type": "string", + "description": "Logs export interval in milliseconds (default 5000). See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables" + }, + { + "key": "env.OTEL_LOGS_EXPORTER", + "type": "string", + "description": "OpenTelemetry logs exporter(s) as a comma-separated list. Valid values: otlp, console, none. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables" + }, + { + "key": "env.OTEL_METRIC_EXPORT_INTERVAL", + "type": "string", + "description": "Metrics export interval in milliseconds (default 60000). See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables" + }, + { + "key": "env.OTEL_METRICS_EXPORTER", + "type": "string", + "description": "OpenTelemetry metrics exporter(s) as a comma-separated list. Valid values: otlp, prometheus, console, none. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables" + }, + { + "key": "env.OTEL_METRICS_INCLUDE_ACCOUNT_UUID", "type": "string", "enum": [ - "0", - "1" + "true", + "false" ], - "description": "Disable the /feedback command" + "description": "Include the user.account_uuid and user.account_id attributes on metrics (default true). See https://code.claude.com/docs/en/monitoring-usage#metrics-cardinality-control" }, { - "key": "env.DISABLE_TELEMETRY", + "key": "env.OTEL_METRICS_INCLUDE_ENTRYPOINT", "type": "string", "enum": [ - "0", - "1" + "true", + "false" ], - "description": "Disable Statsig telemetry collection" + "description": "Include the app.entrypoint attribute on metrics (default false). See https://code.claude.com/docs/en/monitoring-usage#metrics-cardinality-control" }, { - "key": "env.DISABLE_UPDATES", + "key": "env.OTEL_METRICS_INCLUDE_RESOURCE_ATTRIBUTES", "type": "string", "enum": [ - "0", - "1" + "true", + "false" ], - "description": "Block all update paths including manual updates" + "description": "Include configured OTEL_RESOURCE_ATTRIBUTES on metric data points (default true). See https://code.claude.com/docs/en/monitoring-usage#metrics-cardinality-control" }, { - "key": "env.ENABLE_CLAUDEAI_MCP_SERVERS", + "key": "env.OTEL_METRICS_INCLUDE_SESSION_ID", "type": "string", "enum": [ "true", "false" ], - "description": "Opt in/out of claude.ai MCP servers. See https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#2163" + "description": "Include the session.id attribute on metrics (default true). See https://code.claude.com/docs/en/monitoring-usage#metrics-cardinality-control" }, { - "key": "env.HTTP_PROXY", + "key": "env.OTEL_METRICS_INCLUDE_VERSION", "type": "string", - "description": "HTTP proxy URL" + "enum": [ + "true", + "false" + ], + "description": "Include the app.version attribute on metrics (default false). See https://code.claude.com/docs/en/monitoring-usage#metrics-cardinality-control" }, { - "key": "env.HTTPS_PROXY", + "key": "env.OTEL_RESOURCE_ATTRIBUTES", "type": "string", - "description": "HTTPS proxy URL (recommended over HTTP_PROXY)" + "description": "Comma-separated key=value resource attributes attached to all telemetry. See https://code.claude.com/docs/en/monitoring-usage#multi-team-organization-support" }, { - "key": "env.NO_PROXY", + "key": "env.OTEL_TRACES_EXPORT_INTERVAL", "type": "string", - "description": "Domains to bypass proxy (space or comma-separated, or '*' for all)" + "description": "Traces export interval in milliseconds (default 5000). See https://code.claude.com/docs/en/monitoring-usage#traces-beta" }, { - "key": "env.NODE_EXTRA_CA_CERTS", + "key": "env.OTEL_TRACES_EXPORTER", "type": "string", - "description": "Path to custom CA certificate file" + "description": "OpenTelemetry traces exporter(s) as a comma-separated list. Valid values: otlp, console, none. See https://code.claude.com/docs/en/monitoring-usage#traces-beta" }, { - "key": "env.OTEL_METRICS_EXPORTER", + "key": "env.SLASH_COMMAND_TOOL_CHAR_BUDGET", + "type": "string", + "description": "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 8000 characters. Legacy name kept for backwards compatibility. See https://code.claude.com/docs/en/skills#control-who-invokes-a-skill" + }, + { + "key": "env.TASK_MAX_OUTPUT_LENGTH", "type": "string", - "description": "OpenTelemetry metrics exporter configuration" + "description": "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 response. See https://code.claude.com/docs/en/env-vars" }, { "key": "env.USE_BUILTIN_RIPGREP", @@ -1620,16 +3080,110 @@ ], "description": "Use the bundled ripgrep binary instead of system ripgrep" }, + { + "key": "env.VERTEX_REGION_CLAUDE_3_5_HAIKU", + "type": "string", + "description": "Override the Vertex AI region for Claude 3.5 Haiku (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.VERTEX_REGION_CLAUDE_3_5_SONNET", + "type": "string", + "description": "Override the Vertex AI region for Claude 3.5 Sonnet (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.VERTEX_REGION_CLAUDE_3_7_SONNET", + "type": "string", + "description": "Override the Vertex AI region for Claude 3.7 Sonnet (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.VERTEX_REGION_CLAUDE_4_0_OPUS", + "type": "string", + "description": "Override the Vertex AI region for Claude 4.0 Opus (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.VERTEX_REGION_CLAUDE_4_0_SONNET", + "type": "string", + "description": "Override the Vertex AI region for Claude 4.0 Sonnet (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.VERTEX_REGION_CLAUDE_4_1_OPUS", + "type": "string", + "description": "Override the Vertex AI region for Claude 4.1 Opus (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.VERTEX_REGION_CLAUDE_4_5_OPUS", + "type": "string", + "description": "Override the Vertex AI region for Claude Opus 4.5 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.VERTEX_REGION_CLAUDE_4_5_SONNET", + "type": "string", + "description": "Override the Vertex AI region for Claude Sonnet 4.5 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.VERTEX_REGION_CLAUDE_4_6_OPUS", + "type": "string", + "description": "Override the Vertex AI region for Claude Opus 4.6 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.VERTEX_REGION_CLAUDE_4_6_SONNET", + "type": "string", + "description": "Override the Vertex AI region for Claude Sonnet 4.6 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.VERTEX_REGION_CLAUDE_4_7_OPUS", + "type": "string", + "description": "Override the Vertex AI region for Claude Opus 4.7 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.VERTEX_REGION_CLAUDE_4_8_OPUS", + "type": "string", + "description": "Override the Vertex AI region for Claude Opus 4.8 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.VERTEX_REGION_CLAUDE_5_OPUS", + "type": "string", + "description": "Override region for Claude Opus 5 when using Google Cloud's Agent Platform (formerly Vertex AI). Added in v2.1.219. See https://code.claude.com/docs/en/google-vertex-ai" + }, + { + "key": "env.VERTEX_REGION_CLAUDE_5_SONNET", + "type": "string", + "description": "Override region for Claude Sonnet 5 when using Google Cloud's Agent Platform (formerly Vertex AI). Added in v2.1.197. See https://code.claude.com/docs/en/google-vertex-ai" + }, + { + "key": "env.VERTEX_REGION_CLAUDE_FABLE_5", + "type": "string", + "description": "Override the Vertex AI region for Claude Fable 5 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "env.VERTEX_REGION_CLAUDE_HAIKU_4_5", + "type": "string", + "description": "Override the Vertex AI region for Claude Haiku 4.5 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars" + }, + { + "key": "externalEditorContext", + "type": "boolean", + "default": false, + "description": "Prepend Claude's previous response as #-commented context when you open the external editor with Ctrl+G (default: false). Appears in /config as Show last response in external editor. See https://code.claude.com/docs/en/settings#global-config-settings" + }, { "key": "extraKnownMarketplaces", "type": "object", "description": "Additional marketplaces to make available for this repository. Typically used in repository .claude/settings.json to ensure team members have required plugin sources. See https://code.claude.com/docs/en/plugin-marketplaces" }, + { + "key": "fallbackModel", + "type": "array", + "description": "Fallback model chain tried in order when the primary model is overloaded, unavailable, or returns a non-retryable server error. Capped at three entries after deduplication; accepts model names or aliases, and \"default\" expands to the account-type default. Overridden by the --fallback-model CLI flag for the session. See https://code.claude.com/docs/en/model-config#fallback-model-chains", + "items": { + "type": "string" + } + }, { "key": "fastMode", "type": "boolean", "default": false, - "description": "Enable fast mode for Opus 4.6 (research preview). Fast mode uses the same model with 2.5x faster output at higher per-token cost. Requires extra usage enabled. Alternatively, toggle with /fast command. See https://code.claude.com/docs/en/fast-mode" + "description": "Enable fast mode, which uses Claude Opus 5 by default (since v2.1.219) for faster output at higher per-token cost without downgrading to a smaller model. Requires extra usage enabled. Toggle with the /fast command. Supported on Opus 5 and Opus 4.8; fast mode for Opus 4.7 was deprecated on June 25, 2026 and removed on July 24, 2026. Before v2.1.219 fast mode defaulted to Opus 4.8 (v2.1.154 through v2.1.218) and to Opus 4.7 (v2.1.142 through v2.1.153). See https://code.claude.com/docs/en/fast-mode" }, { "key": "fastModePerSessionOptIn", @@ -1647,6 +3201,12 @@ ], "description": "Probability (0–1) that the session quality survey appears when eligible. A value of 0.05 means 5% of eligible sessions. See https://code.claude.com/docs/en/settings#available-settings" }, + { + "key": "fileCheckpointingEnabled", + "type": "boolean", + "default": true, + "description": "Snapshot edited files so /rewind can restore them. Also configurable via the CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING environment variable (set to 1 to disable). See https://code.claude.com/docs/en/checkpointing" + }, { "key": "fileSuggestion", "type": "object", @@ -1669,32 +3229,69 @@ "const": "command", "description": "The type of file suggestion handler; must be set to \"command\" to execute a custom shell script that generates file suggestions for the @ file picker." }, + { + "key": "footerLinksRegexes", + "type": "array", + "description": "Render extra clickable badges in the footer when a regex matches turn output (tool results and assistant responses). Read from user, --settings flag, and managed settings only; ignored in project and local settings. Requires Claude Code v2.1.176 or later. See https://code.claude.com/docs/en/settings#available-settings", + "items": { + "type": "object" + } + }, + { + "key": "forceLoginGatewayUrl", + "type": "string", + "examples": [ + "https://claude-gateway.example.com" + ], + "description": "Pre-fills and locks the gateway URL on the /login Cloud gateway screen. Either this key or forceLoginMethod: \"gateway\" surfaces that screen; set both so the URL is filled in. Honored only at the managed policy tier; ignored in user and project settings. See https://code.claude.com/docs/en/claude-apps-gateway#set-the-gateway-url" + }, { "key": "forceLoginMethod", "type": "string", "enum": [ "claudeai", - "console" + "console", + "gateway" ], "examples": [ "claudeai" ], - "description": "Force a specific login method: \"claudeai\" for Claude Pro/Max, \"console\" for Console billing" + "description": "Use \"claudeai\" to restrict login to Claude.ai accounts, \"console\" to restrict login to Claude Console accounts, or \"gateway\" to restrict login to a cloud gateway. On Claude Code v2.1.212 or later, every first-party login path enforces the restriction, including the VS Code extension, the Agent SDK, `claude setup-token`, and /install-github-app; before v2.1.212, only terminal logins enforced it. See https://code.claude.com/docs/en/authentication#restrict-login-to-your-organization" }, { "key": "forceLoginOrgUUID", - "type": "string", - "minLength": 1, "examples": [ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ], - "description": "Organization UUID to use for OAuth login" + "description": "Organization UUID to use for OAuth login, or an array of UUIDs to allow several organizations. An empty array fails closed and blocks every login. See https://code.claude.com/docs/en/authentication#restrict-login-to-your-organization", + "oneOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + ] }, { "key": "forceRemoteSettingsRefresh", "type": "boolean", "description": "(Managed settings only) Block CLI startup until remote managed settings are freshly fetched from the server. If the fetch fails, the CLI exits (fail-closed) rather than continuing with cached settings. When not set, startup continues without waiting for remote settings. See https://code.claude.com/docs/en/server-managed-settings" }, + { + "key": "gcpAuthRefresh", + "type": "string", + "minLength": 1, + "examples": [ + "gcloud auth application-default login" + ], + "description": "Command to run when GCP credentials are expired or cannot be loaded. The command's output is displayed to the user but interactive input is not supported; it times out after three minutes. See https://code.claude.com/docs/en/google-vertex-ai#advanced-credential-configuration" + }, { "key": "hooks", "type": "object", @@ -1714,7 +3311,7 @@ ] } ], - "description": "Custom commands to run before/after tool executions. See https://code.claude.com/docs/en/hooks" + "description": "Lifecycle event hooks that run at configurable points during Claude Code operation (tool use, session start/end, notifications, prompt submit, message display, and more), not just before/after tool executions. See https://code.claude.com/docs/en/hooks" }, { "key": "hooks.ConfigChange", @@ -1732,6 +3329,14 @@ "$ref": "#/$defs/hookMatcher" } }, + { + "key": "hooks.DirectoryAdded", + "type": "array", + "description": "UNDOCUMENTED. Hooks that run after /add-dir or the SDK register_repo_root control request registers a new working directory mid-session (added v2.1.219)", + "items": { + "$ref": "#/$defs/hookMatcher" + } + }, { "key": "hooks.Elicitation", "type": "array", @@ -1751,15 +3356,23 @@ { "key": "hooks.FileChanged", "type": "array", - "description": "Hooks that run when a watched file is created, modified, or deleted. Supports filename matchers. Provides file_path and file_event_type (created, modified, deleted). See https://code.claude.com/docs/en/hooks#filechanged", + "description": "Hooks that run when a watched file is created, modified, or deleted. Supports filename matchers. Provides file_path and file_event_type (created, modified, deleted). See https://code.claude.com/docs/en/hooks#filechanged", + "items": { + "$ref": "#/$defs/hookMatcher" + } + }, + { + "key": "hooks.InstructionsLoaded", + "type": "array", + "description": "Hooks that run when a CLAUDE.md or .claude/rules/*.md file is loaded into context. Fires at session start and when files are lazily loaded (e.g., nested traversal, path glob match). No decision control; used for audit logging and observability. Does not support matchers. See https://code.claude.com/docs/en/hooks#instructionsloaded", "items": { "$ref": "#/$defs/hookMatcher" } }, { - "key": "hooks.InstructionsLoaded", + "key": "hooks.MessageDisplay", "type": "array", - "description": "Hooks that run when a CLAUDE.md or .claude/rules/*.md file is loaded into context. Fires at session start and when files are lazily loaded (e.g., nested traversal, path glob match). No decision control; used for audit logging and observability. Does not support matchers. See https://code.claude.com/docs/en/hooks#instructionsloaded", + "description": "Hooks that run while assistant message text is displayed", "items": { "$ref": "#/$defs/hookMatcher" } @@ -1975,6 +3588,12 @@ "default": true, "description": "Include built-in git commit and PR workflow instructions in Claude's system prompt. Also configurable via CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS environment variable (set to 1 to disable). See https://code.claude.com/docs/en/settings#available-settings" }, + { + "key": "inputNeededNotifEnabled", + "type": "boolean", + "default": false, + "description": "When Remote Control is connected, send a push notification to your phone when a permission prompt or question is waiting for input. Requires Claude Code v2.1.119 or later. See https://code.claude.com/docs/en/settings#available-settings" + }, { "key": "language", "type": "string", @@ -1985,6 +3604,14 @@ ], "description": "Configure Claude's preferred response language (e.g., \"japanese\", \"spanish\", \"french\"). Claude will respond in this language by default. Also sets the voice dictation language and terminal tab session title generation. See https://code.claude.com/docs/en/settings#available-settings" }, + { + "key": "managedMcpServers", + "type": "array", + "description": "(Managed settings, third-party Desktop deployments only) MCP server configurations pushed to all users. Each entry specifies the transport and connection details, plus an optional toolPolicy map. Delivered through the managed settings file or MDM. See https://code.claude.com/docs/en/desktop#enterprise-configuration", + "items": { + "type": "object" + } + }, { "key": "minimumVersion", "type": "string", @@ -2013,7 +3640,7 @@ "key": "otelHeadersHelper", "type": "string", "minLength": 1, - "description": "Path to a script that outputs OpenTelemetry headers" + "description": "Path to an executable, or a shell command line with arguments, that outputs OpenTelemetry headers as a JSON object. Runs at startup and re-runs on the interval set by CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS. Requires CLAUDE_CODE_ENABLE_TELEMETRY=1. See https://code.claude.com/docs/en/monitoring-usage#dynamic-headers" }, { "key": "outputStyle", @@ -2021,10 +3648,27 @@ "minLength": 1, "examples": [ "default", + "Proactive", "Explanatory", "Learning" ], - "description": "Controls the output style for assistant responses. Built-in styles: default, Explanatory, Learning. Custom styles can be added in ~/.claude/output-styles/ or .claude/output-styles/. See https://code.claude.com/docs/en/output-styles" + "description": "Controls the output style for assistant responses. Built-in styles: default, Proactive, Explanatory, Learning. Custom styles can be added in ~/.claude/output-styles/ or .claude/output-styles/. See https://code.claude.com/docs/en/output-styles" + }, + { + "key": "parentSettingsBehavior", + "type": "string", + "enum": [ + "first-wins", + "merge" + ], + "default": "first-wins", + "description": "(Admin/managed settings only) Controls how SDK managedSettings (parent tier) merge with inherited settings. 'first-wins': first non-empty value applies (default). 'merge': merge arrays and objects. See https://code.claude.com/docs/en/server-managed-settings" + }, + { + "key": "permissionExplainerEnabled", + "type": "boolean", + "default": true, + "description": "Show a model-generated explanation of the command when you press Ctrl+E on a Bash or PowerShell permission prompt (default: true). Set to false to turn the shortcut off. See https://code.claude.com/docs/en/permissions#permission-system" }, { "key": "permissions", @@ -2089,9 +3733,10 @@ "delegate", "dontAsk", "plan", - "auto" + "auto", + "manual" ], - "description": "Default permission mode.\n\"default\": prompts on first use.\n\"acceptEdits\": auto-accepts file edits.\n\"plan\": read-only, no modifications.\nUNDOCUMENTED. \"delegate\": coordination-only for agent team leads (agent teams are experimental; enable via CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS).\n\"dontAsk\": auto-denies unless pre-approved via permissions.\n\"bypassPermissions\": skips all prompts (use only in isolated environments).\n\"auto\": auto-approves tool calls with background safety checks that verify actions align with your request.\nSee https://code.claude.com/docs/en/permissions" + "description": "Default permission mode.\n\"default\": prompts on first use.\nUNDOCUMENTED. \"manual\": accepted alias for \"default\" (the CLI/VS Code/JetBrains UI now labels this mode \"Manual\" as of v2.1.200; permission-modes.md has not yet been updated to mention it).\n\"acceptEdits\": auto-accepts file edits.\n\"plan\": read-only, no modifications.\nUNDOCUMENTED. \"delegate\": coordination-only for agent team leads (agent teams are experimental; enable via CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS).\n\"dontAsk\": auto-denies unless pre-approved via permissions.\n\"bypassPermissions\": skips all prompts (use only in isolated environments).\n\"auto\": auto-approves tool calls with background safety checks that verify actions align with your request.\nSee https://code.claude.com/docs/en/permissions" }, { "key": "permissions.deny", @@ -2131,18 +3776,78 @@ "type": "object", "description": "Per-plugin configuration including MCP server user configs and plugin options, keyed by plugin ID (plugin@marketplace format). See https://code.claude.com/docs/en/plugins" }, + { + "key": "pluginSuggestionMarketplaces", + "type": "array", + "description": "(Managed settings only) Allowlist of marketplace names whose plugins may surface as contextual \"suggested for this directory\" tips in the /plugin Discover tab. No marketplace-declared suggestions surface without this allowlist. The built-in first-party frontend-design tip is unaffected. See https://code.claude.com/docs/en/settings#available-settings", + "items": { + "type": "string" + } + }, { "key": "pluginTrustMessage", "type": "string", "minLength": 1, "description": "(Managed settings only) Custom message appended to the plugin trust warning shown before installation. Use to provide organization-specific context about approved plugins. See https://code.claude.com/docs/en/settings#plugin-settings" }, + { + "key": "policyHelper", + "type": "object", + "description": "Admin-deployed executable that computes managed settings dynamically at startup. Honored only from MDM or the system managed-settings.json. Requires Claude Code v2.1.136 or later. See https://code.claude.com/docs/en/settings#available-settings" + }, + { + "key": "policyHelper.path", + "type": "string", + "description": "Absolute path to the policy helper executable" + }, + { + "key": "policyHelper.refreshIntervalMs", + "description": "How often in milliseconds to re-run the helper in the background; set to 0 to disable refresh, or to at least 60000", + "anyOf": [ + { + "type": "integer", + "const": 0 + }, + { + "type": "integer", + "minimum": 60000 + } + ] + }, + { + "key": "policyHelper.timeoutMs", + "type": "integer", + "description": "How long in milliseconds to wait for the helper before treating the run as failed" + }, + { + "key": "preferredNotifChannel", + "type": "string", + "enum": [ + "auto", + "terminal_bell", + "iterm2", + "iterm2_with_bell", + "kitty", + "ghostty", + "notifications_disabled" + ], + "default": "auto", + "description": "Method for task-complete and permission-prompt notifications. \"auto\" (default) sends a desktop notification in iTerm2, Ghostty, and Kitty and does nothing in other terminals; \"terminal_bell\" rings the bell in any terminal; \"notifications_disabled\" turns them off. See https://code.claude.com/docs/en/terminal-config#get-a-terminal-bell-or-notification" + }, { "key": "prefersReducedMotion", "type": "boolean", "default": false, "description": "Reduce or disable UI animations (spinners, shimmer, flash effects) for accessibility" }, + { + "key": "processWrapper", + "type": "string", + "examples": [ + "/opt/corp/launcher --profile claude" + ], + "description": "Corporate launcher command placed in front of the background processes Claude Code starts. Honored from managed settings, a --settings file, and user settings only; the CLAUDE_CODE_PROCESS_WRAPPER environment variable takes precedence when both are set. Requires Claude Code v2.1.210 or later. See https://code.claude.com/docs/en/corporate-launcher" + }, { "key": "prUrlTemplate", "type": "string", @@ -2151,17 +3856,48 @@ ], "description": "URL template for the PR badge shown in the footer and in tool-result summaries. Substitutes placeholders {host}, {owner}, {repo}, {number}, {url} from the gh-reported PR URL. Use this to point PR links at an internal code-review tool instead of github.com. Does not affect #123 autolinks in Claude's prose. See https://code.claude.com/docs/en/settings#available-settings" }, + { + "key": "remoteControlAtStartup", + "type": "boolean", + "description": "Connect Remote Control automatically when each interactive session starts. true = always, false = never, unset = organization default. Requires Claude Code v2.1.119 or later. See https://code.claude.com/docs/en/remote-control#enable-remote-control-for-all-sessions" + }, + { + "key": "requireCoworkFullVmSandbox", + "type": "boolean", + "description": "(Managed settings only) Run Claude's tools inside an isolated virtual machine instead of on your Mac. Disables the desktop app's iOS Simulator pane and Claude's simulator tools entirely, so the pane cannot attach a device while it is set. See https://code.claude.com/docs/en/desktop-ios-simulator#turn-off-simulator-access" + }, + { + "key": "requiredMaximumVersion", + "type": "string", + "description": "(Managed settings only) Maximum Claude Code version allowed to start. If the running version is newer, Claude Code exits at startup with instructions to install an approved version. See https://code.claude.com/docs/en/admin-setup#decide-what-to-enforce" + }, + { + "key": "requiredMinimumVersion", + "type": "string", + "description": "(Managed settings only) Minimum Claude Code version required to start. If the running version is older, Claude Code exits at startup rather than only warning. See https://code.claude.com/docs/en/admin-setup#decide-what-to-enforce" + }, { "key": "respectGitignore", "type": "boolean", "default": true, "description": "Control whether the @ file picker respects .gitignore patterns. When true (default), files matching .gitignore patterns are excluded from suggestions" }, + { + "key": "respondToBashCommands", + "type": "boolean", + "default": true, + "description": "Whether Claude responds after an input-box ! shell command runs (v2.1.186+). Set to false to add the command output to context without a response. See https://code.claude.com/docs/en/interactive-mode#shell-mode-with--prefix" + }, { "key": "sandbox", "type": "object", "description": "Sandbox execution configuration. See https://code.claude.com/docs/en/sandboxing" }, + { + "key": "sandbox.allowAppleEvents", + "type": "boolean", + "description": "Allow sandboxed commands to send Apple Events on macOS (v2.1.181+). Honored only from user, managed, or CLI settings; project settings cannot enable it. See https://code.claude.com/docs/en/sandboxing#limitations" + }, { "key": "sandbox.allowUnsandboxedCommands", "type": "boolean", @@ -2173,11 +3909,58 @@ "default": true, "description": "Automatically allow bash commands without prompting when they run in the sandbox. Only applies to commands that will run sandboxed. See https://code.claude.com/docs/en/sandboxing#sandbox-modes" }, + { + "key": "sandbox.bwrapPath", + "type": "string", + "minLength": 1, + "description": "(Managed setting only) Path to custom bubblewrap (bwrap) binary for Linux/WSL sandbox. Overrides default. See https://code.claude.com/docs/en/server-managed-settings" + }, + { + "key": "sandbox.credentials", + "type": "object", + "description": "Block sandboxed commands from reading credential files and secret environment variables (v2.1.187+). Entries merge across settings scopes. See https://code.claude.com/docs/en/sandboxing#protect-credentials" + }, + { + "key": "sandbox.credentials.allowPlaintextInject", + "type": "boolean", + "default": false, + "description": "Allow mask substitution on plain HTTP requests as well as TLS-terminated HTTPS. On plain HTTP the upstream identity is unverified and the credential travels in cleartext, so leave this off outside trusted test networks. Only honored from user, managed, or CLI --settings settings, not from .claude/settings.json or .claude/settings.local.json (default: false). Requires Claude Code v2.1.199 or later. See https://code.claude.com/docs/en/sandboxing#protect-credentials" + }, + { + "key": "sandbox.credentials.envVars", + "type": "array", + "description": "Secret environment variable names to unset for sandboxed commands", + "items": { + "type": "object" + } + }, + { + "key": "sandbox.credentials.files", + "type": "array", + "description": "Credential file paths to hide from sandboxed commands", + "items": { + "type": "object" + } + }, { "key": "sandbox.enabled", "type": "boolean", "description": "Enable sandboxed bash. See https://code.claude.com/docs/en/sandboxing#enable-sandboxing" }, + { + "key": "sandbox.enabledPlatforms", + "type": "array", + "description": "Limit the entire sandbox configuration to the listed platforms. On platforms not in the list the sandbox config is inert: no sandbox, no auto-allow, no startup warning, and no failIfUnavailable exit. When omitted, all supported platforms are included. Only honored from managed (policy) settings.", + "items": { + "type": "string", + "enum": [ + "macos", + "linux", + "wsl", + "windows" + ] + } + }, { "key": "sandbox.enableWeakerNestedSandbox", "type": "boolean", @@ -2187,7 +3970,7 @@ "key": "sandbox.enableWeakerNetworkIsolation", "type": "boolean", "default": false, - "description": "macOS only. Allow access to the system TLS trust service (com.apple.trustd.agent) in the sandbox. Required for Go-based tools like gh, gcloud, and terraform to verify TLS certificates when using httpProxyPort with a MITM proxy and custom CA. Reduces security by opening a potential data exfiltration path. Default: false. See https://code.claude.com/docs/en/settings#sandbox-settings" + "description": "macOS only. Allow access to the system TLS trust service (com.apple.trustd.agent) in the sandbox. Required for Go-based tools like gh, gcloud, and terraform to verify TLS certificates when using httpProxyPort with a MITM proxy and custom CA. Reduces security by opening a potential data exfiltration path. Default: false. See https://code.claude.com/docs/en/sandboxing" }, { "key": "sandbox.excludedCommands", @@ -2197,6 +3980,11 @@ "type": "string" } }, + { + "key": "sandbox.failIfUnavailable", + "type": "boolean", + "description": "When true, make sandbox startup a hard failure if required sandbox dependencies are missing. Default: false (sandbox is skipped with a warning). See https://code.claude.com/docs/en/sandboxing#enable-sandboxing" + }, { "key": "sandbox.filesystem", "type": "object", @@ -2243,6 +4031,12 @@ "minLength": 1 } }, + { + "key": "sandbox.filesystem.disabled", + "type": "boolean", + "default": false, + "description": "Skip filesystem isolation while keeping network isolation: sandboxed commands get unrestricted read and write access to the host filesystem, and network egress stays confined to network.allowedDomains. Only honored from user, managed, or CLI --settings settings (default: false). Requires Claude Code v2.1.216 or later. See https://code.claude.com/docs/en/sandboxing#disable-filesystem-isolation" + }, { "key": "sandbox.ignoreViolations", "type": "object", @@ -2322,6 +4116,26 @@ "maximum": 65535, "description": "SOCKS proxy port to use for network filtering. If not specified, a proxy server will be started automatically. See https://code.claude.com/docs/en/sandboxing#custom-proxy-configuration" }, + { + "key": "sandbox.network.strictAllowlist", + "type": "boolean", + "description": "UNDOCUMENTED. Deny non-allowlisted hosts for sandboxed commands without prompting (added v2.1.219). See https://code.claude.com/docs/en/sandboxing#network-isolation" + }, + { + "key": "sandbox.network.tlsTerminate", + "type": "object", + "description": "Experimental. Terminate TLS inside the sandbox proxy so it can read the contents of HTTPS requests. Required for mask credential substitution. Set {} to generate an ephemeral certificate authority for the session, or set caCertPath and caKeyPath to use your own. Only honored from user, managed, or CLI --settings settings, not from .claude/settings.json or .claude/settings.local.json. Requires Claude Code v2.1.199 or later. See https://code.claude.com/docs/en/sandboxing#protect-credentials" + }, + { + "key": "sandbox.network.tlsTerminate.caCertPath", + "type": "string", + "description": "Path to your own certificate authority certificate" + }, + { + "key": "sandbox.network.tlsTerminate.caKeyPath", + "type": "string", + "description": "Path to your own certificate authority private key" + }, { "key": "sandbox.ripgrep", "type": "object", @@ -2341,6 +4155,12 @@ "minLength": 1, "description": "Path to the ripgrep binary to use" }, + { + "key": "sandbox.socatPath", + "type": "string", + "minLength": 1, + "description": "(Managed setting only) Path to custom socat binary for Linux/WSL network proxying. Overrides default. See https://code.claude.com/docs/en/server-managed-settings" + }, { "key": "showClearContextOnPlanAccept", "type": "boolean", @@ -2359,6 +4179,30 @@ "default": true, "description": "Show turn duration messages after responses (e.g., \"Cooked for 1m 6s\"). Set to false to hide these messages (default: true)" }, + { + "key": "skillListingBudgetFraction", + "type": "number", + "default": 0.01, + "maximum": 1, + "description": "Fraction of the model context window reserved for the skill listing sent to Claude (default 0.01 = 1%). When the listing exceeds this, descriptions are shortened to fit. Also configurable via the SLASH_COMMAND_TOOL_CHAR_BUDGET environment variable (fixed character count). See https://code.claude.com/docs/en/skills#skill-descriptions-are-cut-short" + }, + { + "key": "skillListingMaxDescChars", + "type": "integer", + "default": 1536, + "description": "Per-skill character cap on the combined description and when_to_use text in the skill listing Claude sees each turn. Text longer than this is truncated. See https://code.claude.com/docs/en/skills#skill-descriptions-are-cut-short" + }, + { + "key": "skillOverrides", + "type": "object", + "examples": [ + { + "legacy-context": "name-only", + "deploy": "off" + } + ], + "description": "Per-skill visibility overrides. Controls whether skills appear to Claude and in the / picker. Values: 'on' (name and description shown, default), 'name-only' (name only), 'user-invocable-only' (hidden from Claude, visible in /), 'off' (hidden everywhere). Plugin skills are not affected by this setting. See https://code.claude.com/docs/en/skills#override-skill-visibility-from-settings" + }, { "key": "skipDangerousModePermissionPrompt", "type": "boolean", @@ -2367,7 +4211,7 @@ { "key": "skippedMarketplaces", "type": "array", - "description": "List of marketplace names the user has chosen not to install when prompted", + "description": "List of marketplace names the user has chosen not to install when prompted. See https://code.claude.com/docs/en/discover-plugins", "items": { "type": "string", "minLength": 1 @@ -2376,7 +4220,7 @@ { "key": "skippedPlugins", "type": "array", - "description": "List of plugin IDs (plugin@marketplace format) the user has chosen not to install when prompted", + "description": "List of plugin IDs (plugin@marketplace format) the user has chosen not to install when prompted. See https://code.claude.com/docs/en/discover-plugins", "items": { "type": "string", "minLength": 1 @@ -2436,6 +4280,22 @@ "minLength": 1 } }, + { + "key": "sshConfigs", + "type": "array", + "description": "(Managed settings) Pre-configured SSH connections distributed to Desktop users. See https://code.claude.com/docs/en/desktop#ssh-sessions", + "items": { + "type": "object" + } + }, + { + "key": "sshHostAllowlist", + "type": "array", + "description": "(Managed settings only) Allowlist restricting Desktop SSH sessions to approved hosts. Patterns are case-insensitive; * matches any host and *.example.com matches example.com and any subdomain. See https://code.claude.com/docs/en/desktop#ssh-sessions", + "items": { + "type": "string" + } + }, { "key": "statusLine", "type": "object", @@ -2452,6 +4312,11 @@ "type": "string", "description": "A shell command or path to a script that displays session information (context usage, costs, git status, etc.) by reading JSON data from stdin and writing output to stdout. See https://code.claude.com/docs/en/statusline" }, + { + "key": "statusLine.hideVimModeIndicator", + "type": "boolean", + "description": "Set to true when your status line script renders the vim mode indicator itself, to suppress the built-in vim mode display. See https://code.claude.com/docs/en/statusline#manually-configure-a-status-line" + }, { "key": "statusLine.padding", "type": "number", @@ -2484,7 +4349,7 @@ } ] ], - "description": "(Managed settings only) Allowlist of plugin marketplaces users can add. Undefined = no restrictions, empty array = lockdown. Uses exact matching for source specifications. See https://code.claude.com/docs/en/settings#strictknownmarketplaces", + "description": "(Managed settings only) Allowlist of plugin marketplaces users can add. Undefined = no restrictions, empty array = lockdown. Uses exact matching for source specifications. See https://code.claude.com/docs/en/plugin-marketplaces#managed-marketplace-restrictions", "items": { "anyOf": [ { @@ -2662,6 +4527,21 @@ "pathPattern" ], "additionalProperties": false + }, + { + "type": "object", + "properties": { + "source": { + "type": "string", + "description": "Identifies the marketplace source type", + "const": "skills-dir" + } + }, + "required": [ + "source" + ], + "additionalProperties": false, + "description": "Keeps skills-directory plugins (folders under ~/.claude/skills/ or a project's .claude/skills/ that carry a .claude-plugin/plugin.json) loading while an allowlist is set. Matches no marketplace. See https://code.claude.com/docs/en/plugins/org#keep-skills-directory-plugins-loading" } ] } @@ -2688,16 +4568,50 @@ } ] }, + { + "key": "subagentStatusLine", + "type": "object", + "description": "Status line configuration for subagent sessions. See https://code.claude.com/docs/en/statusline#subagent-status-lines" + }, + { + "key": "subagentStatusLine.command", + "type": "string", + "minLength": 1, + "description": "Shell command to run for the subagent status line" + }, + { + "key": "subagentStatusLine.type", + "type": "string", + "const": "command", + "description": "Must be \"command\"" + }, + { + "key": "syntaxHighlightingDisabled", + "type": "boolean", + "description": "Disable syntax highlighting in diffs, code blocks, and file previews. See https://code.claude.com/docs/en/settings#available-settings" + }, + { + "key": "teammateDefaultModel", + "type": [ + "string", + "null" + ], + "examples": [ + "sonnet" + ], + "description": "Default model for agent team teammates when the spawn prompt does not specify one. Set to a model alias such as \"sonnet\", or null to inherit the lead's current /model selection. Appears in /config as Default teammate model. See https://code.claude.com/docs/en/agent-teams" + }, { "key": "teammateMode", "type": "string", "enum": [ "auto", "in-process", - "tmux" + "tmux", + "iterm2" ], - "default": "auto", - "description": "How agent team teammates display: \"auto\" picks split panes in tmux or iTerm2, in-process otherwise. Agent teams are experimental and disabled by default. Enable them by adding CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS to your settings.json or environment. See https://code.claude.com/docs/en/agent-teams" + "default": "in-process", + "description": "How agent team teammates display: \"auto\" picks split panes in tmux or iTerm2, in-process otherwise; \"iterm2\" (added in v2.1.186) forces iTerm2 native split panes and requires the it2 CLI (it shows an error with the install command if it2 is missing). The default is \"in-process\" (it was \"auto\" before v2.1.179). Agent teams are experimental and disabled by default. Enable them by adding CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS to your settings.json or environment. See https://code.claude.com/docs/en/agent-teams#choose-a-display-mode" }, { "key": "terminalProgressBarEnabled", @@ -2705,6 +4619,30 @@ "default": true, "description": "Enable the terminal progress bar that shows progress in supported terminals like Windows Terminal and iTerm2 (default: true)" }, + { + "key": "theme", + "default": "dark", + "description": "Color theme for the interface: auto, dark, light, the daltonized variants (deuteranopia-friendly), the ansi variants (16-color terminals), or a custom theme reference such as custom: or custom::. See https://code.claude.com/docs/en/terminal-config#match-the-color-theme", + "anyOf": [ + { + "type": "string", + "enum": [ + "auto", + "dark", + "light", + "dark-daltonized", + "light-daltonized", + "dark-ansi", + "light-ansi" + ] + }, + { + "type": "string", + "pattern": "^custom:.+", + "description": "Reference to a custom theme defined in ~/.claude/themes/, in the form \"custom:\"" + } + ] + }, { "key": "tui", "type": "string", @@ -2719,6 +4657,12 @@ "type": "boolean", "description": "When true, apply the auto mode classifier during plan mode to auto-approve safe read-only tool calls while planning. Has no effect unless permissions.defaultMode allows auto. See https://code.claude.com/docs/en/permissions" }, + { + "key": "verbose", + "type": "boolean", + "default": false, + "description": "Show full tool output instead of truncated summaries. The --verbose flag overrides this for a single session. Requires Claude Code v2.1.119 or later. See https://code.claude.com/docs/en/settings#available-settings" + }, { "key": "viewMode", "type": "string", @@ -2729,16 +4673,93 @@ ], "description": "Transcript view mode. \"default\" shows standard interactive view; \"verbose\" shows expanded tool details; \"focus\" shows prompt, one-line tool summaries, and final response only (Ctrl+O toggle). See https://code.claude.com/docs/en/settings#available-settings" }, + { + "key": "vimInsertModeRemaps", + "type": "object", + "examples": [ + { + "jj": "" + } + ], + "description": "Map two-key INSERT-mode sequences to Escape in vim editor mode. Each key is exactly two printable characters typed in sequence, and \"\" is the only supported target; other entries are ignored. Read from user, --settings flag, and managed settings only, so a repository's checked-in settings cannot remap your keystrokes. Has no effect unless editorMode is \"vim\". Requires Claude Code v2.1.208 or later. See https://code.claude.com/docs/en/interactive-mode#remap-insert-mode-key-sequences" + }, + { + "key": "voice", + "type": "object", + "description": "Voice dictation settings: enabled turns dictation on, mode selects \"hold\" or \"tap\", and autoSubmit sends the prompt on key release in hold mode. Written automatically when you run /voice. Requires a Claude.ai account. See https://code.claude.com/docs/en/voice-dictation" + }, + { + "key": "voice.autoSubmit", + "type": "boolean", + "description": "In hold mode, auto-submit the prompt on key release when the transcript is at least three words long" + }, + { + "key": "voice.enabled", + "type": "boolean", + "description": "Enable push-to-talk voice dictation input" + }, + { + "key": "voice.mode", + "type": "string", + "enum": [ + "hold", + "tap" + ], + "description": "Recording mode: \"hold\" (default) is push-to-talk; \"tap\" taps once to start and again to stop and submit" + }, { "key": "voiceEnabled", "type": "boolean", - "description": "Enable push-to-talk voice dictation. Typically written automatically when /voice is used. Requires a Claude.ai account. See https://code.claude.com/docs/en/settings#available-settings" + "description": "Legacy alias for voice.enabled; prefer the voice object. Requires a Claude.ai account. See https://code.claude.com/docs/en/settings#available-settings" + }, + { + "key": "wheelScrollAccelerationEnabled", + "type": "boolean", + "description": "In fullscreen rendering, accelerate mouse-wheel scroll speed during fast scrolls (v2.1.174+). Set to false for a constant scroll rate per wheel notch. See https://code.claude.com/docs/en/fullscreen#mouse-wheel-scrolling" + }, + { + "key": "workflowKeywordTriggerEnabled", + "type": "boolean", + "default": true, + "description": "Whether including the keyword \"ultracode\" in a prompt triggers a dynamic workflow. Requires Claude Code v2.1.157 or later. See https://code.claude.com/docs/en/settings#available-settings" + }, + { + "key": "workflowSizeGuideline", + "type": "string", + "enum": [ + "unrestricted", + "small", + "medium", + "large" + ], + "default": "unrestricted", + "description": "Sets the agent count Claude aims for in the dynamic workflows it writes. Claude Code sends the value to Claude as advice, not an enforced cap. Accepts \"unrestricted\" (default, which sends no guideline), \"small\", \"medium\", or \"large\". Appears in /config as Dynamic workflow size, and can be set with /config workflowSizeGuideline=small. Requires Claude Code v2.1.202 or later. On v2.1.203 or later the guideline's agent count also replaces the default threshold for the Large workflow warning. See https://code.claude.com/docs/en/workflows#set-a-size-guideline" }, { "key": "worktree", "type": "object", "description": "Configuration for --worktree sessions. See https://code.claude.com/docs/en/settings#worktree-settings" }, + { + "key": "worktree.baseRef", + "type": "string", + "enum": [ + "fresh", + "head" + ], + "default": "fresh", + "description": "Whether to branch worktrees from origin/ (fresh) or local HEAD (head). Default: fresh. Set to 'head' to preserve unpushed commits in new worktrees. See https://code.claude.com/docs/en/settings#worktree-settings" + }, + { + "key": "worktree.bgIsolation", + "type": "string", + "enum": [ + "worktree", + "none" + ], + "default": "worktree", + "description": "Isolation mode for background sessions. \"worktree\" blocks Edit/Write in main checkout until EnterWorktree is called; \"none\" lets background jobs edit the working copy directly without EnterWorktree, for repos where worktrees are impractical. See https://code.claude.com/docs/en/settings#worktree-settings" + }, { "key": "worktree.sparsePaths", "type": "array", @@ -2754,6 +4775,20 @@ "minLength": 1 } }, + { + "key": "worktree.symlinkDirectories", + "type": "array", + "examples": [ + [ + "node_modules", + ".cache" + ] + ], + "description": "Directories to symlink from the main repository into each worktree to avoid duplicating large directories on disk. No directories are symlinked by default. See https://code.claude.com/docs/en/settings#worktree-settings", + "items": { + "type": "string" + } + }, { "key": "wslInheritsWindowsSettings", "type": "boolean", diff --git a/catalog/sub-agents.json b/catalog/sub-agents.json index bf28469..1d45c08 100644 --- a/catalog/sub-agents.json +++ b/catalog/sub-agents.json @@ -1,12 +1,17 @@ { "source": "https://code.claude.com/docs/en/sub-agents.md", - "fetchedAt": "2026-05-18T12:34:59.151Z", - "count": 16, + "fetchedAt": "2026-10-26T15:56:26.165Z", + "count": 19, "fields": [ + { + "name": "autoCompactWindow", + "required": false, + "description": "Lower the [auto-compact window](#subagent-auto-compact-window) for this subagent to a token count from `100000` to `1000000`. Requires Claude Code v2.1.296 or later" + }, { "name": "background", "required": false, - "description": "Set to `true` to always run this subagent as a [background task](#run-subagents-in-foreground-or-background). Default: `false`" + "description": "Set to `true` to keep this subagent in the background even when Claude asks to wait for it. By default, subagents Claude spawns from the main conversation already [start in the background](#run-subagents-in-foreground-or-background)" }, { "name": "color", @@ -21,12 +26,17 @@ { "name": "disallowedTools", "required": false, - "description": "Tools to deny, removed from inherited or specified list" + "description": "Tools to deny, removed from inherited or specified list. Same format as `tools`. An entry with a specifier, such as `Bash(git push *)`, still [removes the whole tool](#restrict-which-tools-a-subagent-can-use)" }, { "name": "effort", "required": false, - "description": "Effort level when this subagent is active. Overrides the session effort level. Default: inherits from session. Options: `low`, `medium`, `high`, `xhigh`, `max`; available levels depend on the model" + "description": "Effort level when this subagent is active. Overrides the session effort level, but not the [`CLAUDE_CODE_EFFORT_LEVEL`](https://code.claude.com/docs/en/env-vars#variables) environment variable. Options: `low`, `medium`, `high`, `xhigh`, `max`; available levels depend on the model. See [Choose an effort level](#choose-an-effort-level)" + }, + { + "name": "experimental", + "required": false, + "description": "Map of experimental options. Set its `cacheTtl` key to `5m` or `1h` to choose the [prompt cache lifetime](https://code.claude.com/docs/en/prompt-caching.md#choose-the-ttl-yourself) for this subagent's requests, at the frontmatter's place in the [cache lifetime precedence](https://code.claude.com/docs/en/prompt-caching.md#choose-the-ttl-yourself). Claude Code ignores any other value, ignores `1h` while your Claude subscription is using usage credits, and reads the field only from subagent files. Requires Claude Code v2.1.248 or later" }, { "name": "hooks", @@ -36,22 +46,22 @@ { "name": "initialPrompt", "required": false, - "description": "Auto-submitted as the first user turn when this agent runs as the main session agent (via `--agent` or the `agent` setting). [Commands](/en/commands) and [skills](/en/skills) are processed. Prepended to any user-provided prompt" + "description": "Auto-submitted as the first user turn when this agent runs as the main session agent (via `--agent` or the `agent` setting). [Commands](https://code.claude.com/docs/en/commands.md) and [skills](https://code.claude.com/docs/en/skills.md) are processed. Prepended to any user-provided prompt. Ignored for [plugin subagents](#choose-the-subagent-scope)" }, { "name": "isolation", "required": false, - "description": "Set to `worktree` to run the subagent in a temporary [git worktree](/en/worktrees), giving it an isolated copy of the repository. The worktree is automatically cleaned up if the subagent makes no changes" + "description": "Set to `worktree` to run the subagent in a temporary [git worktree](https://code.claude.com/docs/en/worktrees.md), giving it an isolated copy of the repository branched by default from your [default branch](https://code.claude.com/docs/en/worktrees.md#choose-the-base-branch) rather than the parent session's `HEAD`. The worktree is automatically cleaned up if the subagent makes no changes" }, { "name": "maxTurns", "required": false, - "description": "Maximum number of agentic turns before the subagent stops" + "description": "Maximum number of agentic turns before the subagent stops. When the subagent reaches the limit, Claude Code returns its output marked as partial, and Claude can [resume it](#resume-subagents) to continue. The partial marking requires Claude Code v2.1.246 or later" }, { "name": "mcpServers", "required": false, - "description": "[MCP servers](/en/mcp) available to this subagent. Each entry is either a server name referencing an already-configured server (e.g., `\"slack\"`) or an inline definition with the server name as key and a full [MCP server config](/en/mcp#installing-mcp-servers) as value. Ignored for [plugin subagents](#choose-the-subagent-scope)" + "description": "[MCP servers](https://code.claude.com/docs/en/mcp.md) available to this subagent. Each entry is either a server name referencing an already-configured server (e.g., `\"slack\"`) or an inline definition with the server name as key and a full [MCP server config](https://code.claude.com/docs/en/mcp.md#installing-mcp-servers) as value. Ignored for [plugin subagents](#choose-the-subagent-scope)" }, { "name": "memory", @@ -61,27 +71,32 @@ { "name": "model", "required": false, - "description": "[Model](#choose-a-model) to use: `sonnet`, `opus`, `haiku`, a full model ID (for example, `claude-opus-4-7`), or `inherit`. Defaults to `inherit`" + "description": "[Model](#choose-a-model) to use: `sonnet`, `opus`, `haiku`, `fable`, a full model ID such as `claude-opus-5-5`, or `inherit`. When you omit it, Claude Code picks the model in the [subagent model order](#choose-a-model)" }, { "name": "name", "required": true, - "description": "Unique identifier using lowercase letters and hyphens. [Hooks](/en/hooks#subagentstart) receive this value as `agent_type`. The filename does not have to match" + "description": "Unique identifier of at most 256 characters, such as `code-reviewer` or `reviewer-v2`. [Hooks](https://code.claude.com/docs/en/hooks.md#subagentstart) receive this value as `agent_type`. The filename doesn't have to match. Names can't contain `:`, which is reserved for [plugin-scoped identifiers](https://code.claude.com/docs/en/plugins/overview.md) such as `my-plugin:reviewer`" + }, + { + "name": "omitClaudeMd", + "required": false, + "description": "Set to `true` to start this subagent without the user, project, and local CLAUDE.md files in its [initial context](#what-loads-at-startup); [managed policy files](https://code.claude.com/docs/en/memory.md#how-claude-md-files-load) still load, except for [managed subagents](#choose-the-subagent-scope). Use it for subagents that take everything they need from the delegation prompt. Ignored when the agent runs as the main session agent via `--agent` or the `agent` setting. Requires Claude Code v2.1.271 or later" }, { "name": "permissionMode", "required": false, - "description": "[Permission mode](#permission-modes): `default`, `acceptEdits`, `auto`, `dontAsk`, `bypassPermissions`, or `plan`. Ignored for [plugin subagents](#choose-the-subagent-scope)" + "description": "[Permission mode](#permission-modes): `default`, `acceptEdits`, `auto`, `dontAsk`, `bypassPermissions`, `plan`, or `manual` as an alias for `default`. Ignored for [plugin subagents](#choose-the-subagent-scope)" }, { "name": "skills", "required": false, - "description": "[Skills](/en/skills) to preload into the subagent's context at startup. The full skill content is injected, not just the description. Subagents can still invoke unlisted project, user, and plugin skills through the Skill tool" + "description": "[Skills](https://code.claude.com/docs/en/skills.md) to preload into the subagent's context at startup. The full skill content is injected, not only the description. Subagents can still invoke unlisted project, user, and plugin skills through the Skill tool" }, { "name": "tools", "required": false, - "description": "[Tools](#available-tools) the subagent can use. Inherits all tools if omitted. To preload Skills into context, use the `skills` field rather than listing `Skill` here" + "description": "[Tools](#available-tools) the subagent can use, as a comma-separated string such as `Read, Grep, Bash` or a YAML list. Inherits every tool available to subagents if omitted. If no entry in the list resolves to a tool, the subagent usually [fails to launch](https://code.claude.com/docs/en/errors.md#agent-would-be-spawned-with-zero-tools) with an error naming the entries. To preload Skills into context, use the `skills` field rather than listing `Skill` here" } ] }