From 71622399e98714b9b2b643ba3fe2ef42de7c4a50 Mon Sep 17 00:00:00 2001 From: samkeen <17389+samkeen@users.noreply.github.com> Date: Mon, 31 Aug 2026 16:49:42 +0000 Subject: [PATCH] chore: sync catalog with upstream docs Auto-generated by .github/workflows/catalog-drift.yml. --- catalog/cli-reference.json | 263 +++-- catalog/env-vars.json | 904 +++++++++++--- catalog/hooks.json | 264 ++++- catalog/keybindings.json | 10 +- catalog/mcp.json | 2 +- catalog/model-config.json | 12 +- catalog/permissions.json | 14 +- catalog/settings.json | 2277 +++++++++++++++++++++++++++++++++--- catalog/sub-agents.json | 29 +- 9 files changed, 3294 insertions(+), 481 deletions(-) diff --git a/catalog/cli-reference.json b/catalog/cli-reference.json index 27cee14..1257a6b 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-08-31T16:49:42.015Z", + "commandCount": 34, + "flagCount": 76, "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](/docs/en/agent-view) 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](/docs/en/agent-view#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", + "description": "Attach to a [background session](/docs/en/agent-view#manage-sessions-from-the-shell) in this terminal", "example": "`claude attach 7c5dcf5d`" }, { @@ -66,62 +66,107 @@ }, { "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](/docs/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. `--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](/docs/en/permission-modes#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](/docs/en/server-managed-settings) or the `--settings` flag still apply. Requires Claude Code v2.1.212 or later. See [Inspect the defaults and your effective config](/docs/en/auto-mode-config#inspect-the-defaults-and-your-effective-config)", + "example": "`claude auto-mode reset --yes`" + }, + { + "name": "claude daemon status", + "description": "Print the background-session [supervisor's](/docs/en/agent-view#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](/docs/en/agent-view#the-supervisor-process) and the sessions it hosts. Pass `--keep-workers` to leave background sessions running so the next supervisor reconnects to them. `--any` confirms stopping an on-demand supervisor, which is the default. Use this to recover from an [unresponsive supervisor](/docs/en/agent-view#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`](/docs/en/commands#all-commands)", + "example": "`claude doctor`" + }, + { + "name": "claude gateway", + "description": "Start the self-hosted [Claude apps gateway](/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`](/docs/en/claude-apps-gateway-config). Available in Claude Code v2.1.195 and later.", + "example": "`claude gateway --config gateway.yaml`" + }, + { + "name": "claude import [codex|gemini]", + "description": "Start an interactive session that runs [`/import`](/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](/docs/en/env-vars#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](/docs/en/setup#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)", + "description": "Print recent output from a [background session](/docs/en/agent-view#manage-sessions-from-the-shell)", "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](/docs/en/mcp)." + }, + { + "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, then paste the redirect URL back at the prompt. Requires Claude Code v2.1.186 or later. See [Authenticate from the command line](/docs/en/mcp#authenticate-from-the-command-line)", + "example": "`claude mcp login sentry`" + }, + { + "name": "claude mcp logout ", + "description": "Clear stored OAuth credentials for an MCP server. Requires Claude Code v2.1.186 or later", + "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](/docs/en/plugins). Alias: `claude plugins`. See [plugin reference](/docs/en/plugins-reference#cli-commands-reference) 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)", + "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](/docs/en/claude-directory#clear-local-data)", "example": "`claude project 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](/docs/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](/docs/en/remote-control#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](/docs/en/remote-control#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](/docs/en/agent-view#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](/docs/en/agent-view#manage-sessions-from-the-shell) from the list. 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](/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](/docs/en/self-hosted-environments-deploy#troubleshooting), and `claude self-hosted-runner orchestrator` to spawn [on-demand runners](/docs/en/self-hosted-environments-configuration#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](/docs/en/authentication#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](/docs/en/agent-view#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](/docs/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. 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. Requires Claude Code v2.1.227 or later. See [Post findings to the pull request](/docs/en/ultrareview#post-findings-to-the-pull-request)", "example": "`claude ultrareview 1234 --json`" }, { @@ -133,9 +178,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; most `.claude/` configuration is [not discovered](/docs/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`](/docs/en/settings-reference#permissions-additionaldirectories) in settings", "example": "`claude --add-dir ../apps ../lib`" }, + { + "name": "--advisor ", + "description": "Enable the server-side [advisor tool](/docs/en/advisor) 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 5 access](/docs/en/advisor#choose-an-advisor-model)", + "example": "`claude --advisor opus`" + }, { "name": "--agent", "description": "Specify an agent for the current session (overrides the `agent` setting)", @@ -143,18 +193,18 @@ }, { "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](/docs/en/sub-agents#choose-the-subagent-scope). Claude Code validates the JSON at startup and exits on an invalid value; see [`Invalid --agents configuration`](/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](/docs/en/permission-modes#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](/docs/en/sub-agents)'s system prompt, nested subagents included, apart from a [forked subagent](/docs/en/sub-agents#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-system-prompt", @@ -166,9 +216,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](/docs/en/model-config#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`](/docs/en/settings-reference#tui) setting has no effect; attached [background sessions](/docs/en/agent-view) still render fullscreen. Takes precedence over [`CLAUDE_AX_SCREEN_READER`](/docs/en/env-vars) and the [`axScreenReader`](/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, 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`](/docs/en/env-vars). See [bare mode](/docs/en/headless#start-faster-with-bare-mode)", "example": "`claude --bare -p \"query\"`" }, { @@ -176,35 +236,35 @@ "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](/docs/en/channels) 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](/docs/en/chrome) for web automation and testing", "example": "`claude --chrome`" }, + { + "name": "--cloud", + "description": "With a task description, create a new [web session](/docs/en/claude-code-on-the-web) on claude.ai. 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](/docs/en/claude-code-on-the-web#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](/docs/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", "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](/docs/en/permission-modes#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](/docs/en/agent-view#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='!1p'`. The filter binds only in the `=` form; a space-separated filter enables debug mode without filtering", + "example": "`claude --debug='mcp,startup'`" }, { "name": "--debug-file ", @@ -216,39 +276,49 @@ "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](/docs/en/model-config#adjust-effort-level) for the current session. Options: `low`, `medium`, `high`, `xhigh`, `max`, or `ultracode`. Available levels depend on the model. `ultracode` starts the session at `xhigh` effort with [ultracode](/docs/en/workflows#let-claude-decide-with-ultracode) turned on, and requires Claude Code v2.1.203 or later. Overrides the [`modelSettings`](/docs/en/settings-reference#modelsettings) and [`effortLevel`](/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](/docs/en/self-hosted-environments) with the given ID. Environment IDs start with `ccpool_`. See [`--environment` dispatch behavior](/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", "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](/docs/en/model-config#fallback-model-chains). To persist a chain across sessions, use the [`fallbackModel` setting](/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](/docs/en/sub-agents) 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 emits only subagent `tool_use` and `tool_result` blocks. Requires `--print` and `--output-format stream-json`. Claude Code also forwards messages from [nested subagents](/docs/en/sub-agents#let-subagents-spawn-their-own-subagents), setting `parent_tool_use_id` to the ID of the Agent tool call that spawned each one; this requires Claude Code v2.1.219 or later. The [`CLAUDE_CODE_FORWARD_SUBAGENT_TEXT`](/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 +328,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](/docs/en/hooks#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](/docs/en/hooks#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](/docs/en/hooks#setup) and `SessionStart` hooks, then exit without starting a conversation", "example": "`claude --init-only`" }, { @@ -283,42 +353,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](/docs/en/agent-sdk/structured-outputs). 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](/docs/en/hooks#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": "Maximum dollar amount to spend on API calls before stopping (print mode only). Spend from [subagents](/docs/en/sub-agents) counts toward the cap. 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`](/docs/en/env-vars) startup timeout, 30 seconds by default; a server with a [cached tool list](/docs/en/mcp#managing-your-servers) skips the wait and connects on first use. 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 an alias for the latest model (`sonnet`, `opus`, `haiku`, or `fable`) or a model's full name. Overrides the [`model`](/docs/en/settings-reference#model) setting and [`ANTHROPIC_MODEL`](/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](/docs/en/chrome) 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`](/docs/en/env-vars) environment variable does the same in any mode", "example": "`claude -p --no-session-persistence \"query\"`" }, { @@ -328,12 +398,12 @@ }, { "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](/docs/en/permission-modes). 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](/docs/en/permission-modes#which-mode-a-session-starts-in). For `-p`, that's `default` when nothing is configured", "example": "`claude --permission-mode plan`" }, { "name": "--permission-prompt-tool", - "description": "Specify an MCP tool to handle permission prompts in non-interactive mode", + "description": "Specify an MCP tool to handle permission prompts in non-interactive mode. Claude Code waits for that tool's MCP server to connect before running the first turn, up to the [`MCP_TIMEOUT`](/docs/en/env-vars) startup timeout, 30 seconds by default.

The prompt tool can't approve an MCP tool marked as [requiring user interaction](/docs/en/mcp#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 --permission-prompt-tool mcp_auth_tool \"query\"`" }, { @@ -346,20 +416,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](/docs/en/interactive-mode#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](/docs/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", "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](/docs/en/permissions#working-directories), loads only [managed settings](/docs/en/managed-settings) and `--settings`, refuses [`bypassPermissions`](/docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode), and [refuses to create cloud sessions](/docs/en/errors#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`](/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](/docs/en/model-config#automatic-model-fallback). Sets [`CLAUDE_CODE_SAFE_MODE`](/docs/en/env-vars)", + "example": "`claude --safe-mode`" }, { "name": "--session-id", @@ -373,12 +463,12 @@ }, { "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](/docs/en/settings#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](/docs/en/managed-mcp#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`" }, { @@ -393,12 +483,12 @@ }, { "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](/docs/en/agent-teams) teammates display: `in-process` (default), `auto`, `tmux`, or `iterm2` (added in v2.1.186). Overrides the [`teammateMode`](/docs/en/settings-reference#teammatemode) setting for this session. See [Choose a display mode](/docs/en/agent-teams#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 [web session](/docs/en/claude-code-on-the-web) in your local terminal", "example": "`claude --teleport`" }, { @@ -408,37 +498,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 all, or tool names like `\"Bash,Edit,Read\"`. If you name one of the [task-tracking tools](/docs/en/tools-reference#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`](/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`](/docs/en/settings-reference#viewmode) setting for this session", "example": "`claude --verbose`" }, + { + "name": "`--allowedTools`, `--allowed-tools`", + "description": "Tools that execute without prompting for permission. See [permission rule syntax](/docs/en/settings-reference#permission-rule-syntax) for pattern matching. To restrict which tools are available, use `--tools` instead. If you name one of the [task-tracking tools](/docs/en/tools-reference#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](/docs/en/agent-view) 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. Cannot be combined with `-p`/`--print`; see the [error reference](/docs/en/errors#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, skipping [background sessions, sessions created with `claude -p` or the Agent SDK, and sessions whose first prompt was `/loop`](/docs/en/sessions#resume-a-session). `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 matching calls. A rule naming [`EndConversation`](/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 `. In an interactive session, if another live session on this machine already uses the name, Claude Code applies [a variant of it](/docs/en/sessions#name-your-sessions) instead.

[`/rename`](/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](/docs/en/agent-sdk/overview) for programmatic usage details)", "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](/docs/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", "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. 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](/docs/en/agent-view) appear in the picker marked with `bg`", "example": "`claude --resume auth-refactor`" }, { @@ -448,7 +553,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](/docs/en/worktrees) 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](/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..3afb687 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-08-31T16:49:37.748Z", + "count": 349, "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](/docs/en/claude-platform-on-aws), 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](/docs/en/claude-platform-on-aws) endpoint URL. Use for custom regions or when routing through an [LLM gateway](/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](/docs/en/amazon-bedrock#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](/docs/en/claude-platform-on-aws). 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. When set to a non-first-party host, [MCP tool search](/docs/en/mcp#scale-with-mcp-tool-search) is disabled by default. Set `ENABLE_TOOL_SEARCH=true` if your proxy forwards `tool_reference` blocks. As of v2.1.196, [Remote Control](/docs/en/remote-control#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](/docs/en/llm-gateway). See [Amazon Bedrock](/docs/en/amazon-bedrock)", "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](/docs/en/amazon-bedrock#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](/docs/en/amazon-bedrock#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](/docs/en/amazon-bedrock#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](/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, Claude Code fails the request with an error that identifies the pair by position. Requires Claude Code v2.1.227 or later. [Invalid request header value](/docs/en/errors#invalid-request-header-value) lists the exact character set and where the check runs", "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](/docs/en/model-config#add-a-custom-model-option)", "default": null }, { @@ -75,107 +80,152 @@ }, { "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](/docs/en/model-config#customize-pinned-model-display-and-capabilities) the custom model supports, for example `effort,thinking`. See [Model configuration](/docs/en/model-config#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 Fable 5 for [automatic model fallback](/docs/en/model-config#automatic-model-fallback) on third-party providers. See [Model configuration](/docs/en/model-config#environment-variables)", + "default": null + }, + { + "name": "ANTHROPIC_DEFAULT_FABLE_MODEL_DESCRIPTION", + "purpose": "Display description for the pinned Fable model in the `/model` picker. Defaults to `Custom Fable model` when not set. See [Model configuration](/docs/en/model-config#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. Defaults to the model ID when not set. See [Model configuration](/docs/en/model-config#customize-pinned-model-display-and-capabilities)", + "default": null + }, + { + "name": "ANTHROPIC_DEFAULT_FABLE_MODEL_SUPPORTED_CAPABILITIES", + "purpose": "Comma-separated list of [capabilities](/docs/en/model-config#customize-pinned-model-display-and-capabilities) the pinned Fable model supports, for example `effort,thinking`. See [Model configuration](/docs/en/model-config#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](/docs/en/costs#background-token-usage). See [Model configuration](/docs/en/model-config#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. Defaults to `Custom Haiku model` when not set. See [Model configuration](/docs/en/model-config#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. Defaults to the model ID when not set. See [Model configuration](/docs/en/model-config#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](/docs/en/model-config#customize-pinned-model-display-and-capabilities) the pinned Haiku model supports, for example `effort,thinking`. See [Model configuration](/docs/en/model-config#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](/docs/en/model-config#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](/docs/en/model-config#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, defaults to `Custom Opus model`, or `Custom Opus model (1M context)` if the pinned model ID has the `[1m]` suffix and `CLAUDE_CODE_DISABLE_1M_CONTEXT` isn't turned on. See [Model configuration](/docs/en/model-config#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. Defaults to the model ID when not set. See [Model configuration](/docs/en/model-config#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](/docs/en/model-config#customize-pinned-model-display-and-capabilities) the pinned Opus model supports, for example `effort,thinking`. See [Model configuration](/docs/en/model-config#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](/docs/en/model-config#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, defaults to `Custom Sonnet model`, or `Custom Sonnet model (1M context)` if the pinned model ID has the `[1m]` suffix and `CLAUDE_CODE_DISABLE_1M_CONTEXT` isn't turned on. See [Model configuration](/docs/en/model-config#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. Defaults to the model ID when not set. See [Model configuration](/docs/en/model-config#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](/docs/en/model-config#customize-pinned-model-display-and-capabilities) the pinned Sonnet model supports, for example `effort,thinking`. See [Model configuration](/docs/en/model-config#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](/docs/en/authentication#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](/docs/en/microsoft-foundry))", + "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](/docs/en/microsoft-foundry). 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](/docs/en/microsoft-foundry))", "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`). Required if `ANTHROPIC_FOUNDRY_BASE_URL` is not set (see [Microsoft Foundry](/docs/en/microsoft-foundry))", "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](/docs/en/model-config#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](/docs/en/authentication#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](/docs/en/authentication#sign-in-without-an-api-key). See [authentication precedence](/docs/en/authentication#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](/docs/en/costs)", "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](/docs/en/amazon-bedrock#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](/docs/en/llm-gateway). See [Google Cloud's Agent Platform](/docs/en/google-vertex-ai)", "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 for Google Cloud's Agent Platform requests. Overridden by `GCLOUD_PROJECT`, `GOOGLE_CLOUD_PROJECT`, or the project in your `GOOGLE_APPLICATION_CREDENTIALS` credential file. See [Google Cloud's Agent Platform](/docs/en/google-vertex-ai)", "default": null }, { @@ -183,6 +233,11 @@ "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](/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 and [Claude Platform on AWS](/docs/en/claude-platform-on-aws). The [stream watchdogs](/docs/en/network-config#streaming-idle-watchdogs) run independently of it and abort a long silent pause even when you set `0` here. Requires Claude Code v2.1.169 or later", + "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", @@ -190,7 +245,7 @@ }, { "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 }, { @@ -200,22 +255,37 @@ }, { "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). See [Output limits](/docs/en/tools-reference#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 long-running bash commands (default: 600000, or 10 minutes). The effective ceiling is the larger of this and `BASH_DEFAULT_TIMEOUT_MS`", "default": "600000" }, + { + "name": "BETA_TRACING_ENDPOINT", + "purpose": "OTLP endpoint for [detailed beta tracing](/docs/en/monitoring-usage#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](/docs/en/settings-reference#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`](/docs/en/claude-code-on-the-web#send-local-repositories-without-github) to bundle and upload your local repository even when GitHub access is available", + "default": null + }, + { + "name": "CLAUDE_AFK_COUNTDOWN_MS", + "purpose": "How many milliseconds before auto-continue the on-screen countdown appears on an unanswered [`AskUserQuestion`](/docs/en/tools-reference) dialog. Default `20000` (20 seconds), capped at the auto-continue timeout. Has no effect unless auto-continue is on; see the [`askUserQuestionTimeout`](/docs/en/settings-reference#askuserquestiontimeout) setting and `CLAUDE_AFK_TIMEOUT_MS`. Requires Claude Code v2.1.198 or later", + "default": null + }, + { + "name": "CLAUDE_AFK_TIMEOUT_MS", + "purpose": "How many milliseconds of idle time before an unanswered [`AskUserQuestion`](/docs/en/tools-reference) dialog auto-continues without you. Auto-continue is off by default; opt in with the [`askUserQuestionTimeout`](/docs/en/settings-reference#askuserquestiontimeout) setting. This variable is an override for demos and automated tests: when set, it takes precedence over that setting and turns auto-continue on even when the setting is unset or `never`. Setting `0` doesn't turn the timeout off; it closes the dialog immediately. In v2.1.198 and v2.1.199, auto-continue was on by default with a `60000` (60 seconds) timeout. Requires Claude Code v2.1.198 or later", "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](/docs/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. This also removes `general-purpose`, the subagent Claude Code runs when an Agent tool call omits `subagent_type`. Such a call then fails with [`subagent_type is required`](/docs/en/errors#subagent-type-is-required)", "default": null }, { @@ -230,12 +300,27 @@ }, { "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, subagents are moved to the background after running for approximately two minutes. Also enables [automatic backgrounding of long MCP tool calls](/docs/en/mcp#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](/docs/en/model-config#context-window-and-auto-compaction). Applies to both main conversations and subagents", + "default": null + }, + { + "name": "CLAUDE_AX_PREPARK_MS", + "purpose": "In [screen reader mode](/docs/en/accessibility#what-your-screen-reader-hears), how many milliseconds Claude Code waits, with the cursor at the start of the line, before it writes a new or changed line. Default `50`. Set `0` to write immediately. Claude Code caps the wait at `5000`. Requires Claude Code v2.1.233 or later", + "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`](/docs/en/settings-reference#axscreenreader) is `true`. The [`--ax-screen-reader`](/docs/en/cli-reference#cli-flags) flag takes precedence. Requires Claude Code v2.1.181 or later", + "default": null + }, + { + "name": "CLAUDE_AX_STARTUP_QUIET_MS", + "purpose": "In [screen reader mode](/docs/en/accessibility), how many milliseconds Claude Code holds the first interface render after the startup confirmation line, so your screen reader can speak the line in full before new output interrupts it. Default `3000`. Set `0` to render immediately. Claude Code caps the hold at `600000` (10 minutes). Your first keystroke ends the hold early. Requires Claude Code v2.1.217 or later", "default": null }, { @@ -243,6 +328,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](/docs/en/remote-control#mobile-push-notifications), so you stop getting pushes while you are actively using the computer. When the file is absent or unreadable, notifications are sent as normal. Claude Code checks the file once per push-triggering event rather than polling it. Requires Claude Code v2.1.181 or later", + "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 +348,79 @@ "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](/docs/en/fullscreen) 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](/docs/en/agent-view) on Windows", + "default": null + }, + { + "name": "CLAUDE_CODE_ALWAYS_ENABLE_EFFORT", + "purpose": "Set to `1` to send the [effort](/docs/en/model-config#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](/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 3 models, Sonnet 4.0 and 4.5, Opus 4.0 and 4.1, and Haiku 4.5, are still excluded so requests do not fail", + "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`](/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](/docs/en/artifacts) is published. Republishing an existing artifact does not open the browser regardless of this setting", + "default": null + }, + { + "name": "CLAUDE_CODE_ARTIFACT_COMMENTS", + "purpose": "Set to `0` to stop Claude reading and replying to [comments on an artifact](/docs/en/artifacts#collect-comments-on-an-artifact). Has no effect when `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` has [turned artifacts off](/docs/en/artifacts#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](/docs/en/artifacts#let-claude-reply-to-comments-on-its-own). Requires Claude Code v2.1.228 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](/docs/en/llm-gateway-protocol#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](/docs/en/permission-modes#eliminate-prompts-with-auto-mode) classifier requests even when you set `0`. In [System prompt attribution block](/docs/en/llm-gateway-protocol#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": "When `CLAUDE_AUTO_BACKGROUND_TASKS` is enabled, seconds between reminders to Claude to check on [background subagents](/docs/en/sub-agents#run-subagents-in-foreground-or-background) that are still running. Accepts a plain integer from `1` to `86400` only; any other value or spelling reads as unset. When unset, there are no check-in reminders. Requires Claude Code v2.1.248 or later", "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](/docs/en/model-config#set-the-auto-compact-window) in tokens, from `100000` to `1000000`. Accepts a plain integer such as `500000` only: a value like `500k` reads as `500` and clamps to the 100K minimum. Takes precedence over the `/autocompact` command, the `--autocompact` flag, and the `autoCompactWindow` setting. The status line's `used_percentage` always measures against the model's full context window, so once this variable is set, that percentage no longer indicates when compaction will run", "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](/docs/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`](/docs/en/settings-reference#autoconnectide) global config setting", + "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`](/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 wherever Claude Code signs with the default chain: [Amazon Bedrock](/docs/en/amazon-bedrock#credential-caching-and-resolution-timeout), [Claude Platform on AWS](/docs/en/claude-platform-on-aws), and the [Mantle endpoint](/docs/en/amazon-bedrock#use-the-mantle-endpoint). Requires Claude Code v2.1.207 or later", + "default": "60000" + }, + { + "name": "CLAUDE_CODE_BRIDGE_SESSION_ID", + "purpose": "Set automatically in Bash tool and [hook command](/docs/en/hooks) subprocesses while the session has an active [Remote Control](/docs/en/remote-control) connection, and removed when the connection ends. The value is the session's ID in `session_` form, the same identifier that appears in the session's `claude.ai/code` URL, so a script can link back to the session that ran it. Requires Claude Code v2.1.199 or later. In [cloud sessions](/docs/en/claude-code-on-the-web), 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](/docs/en/terminal-config#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](/docs/en/network-config#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](/docs/en/hooks) commands, and [status line](/docs/en/statusline) commands. Not set for stdio [MCP server](/docs/en/mcp) 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 +438,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` for the per-request timeout. 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,27 +450,42 @@ }, { "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`](/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 disable [1M context window](/docs/en/model-config#extended-context) support. When set, 1M model variants are unavailable in the model picker, and Claude Code holds sessions on models with a native 1M window, such as [Sonnet 5](/docs/en/model-config#sonnet-5-context-window) and Fable 5, to a 200K window; see [Extended context](/docs/en/model-config#extended-context) for how the hold is enforced. Useful for enterprise environments with compliance requirements. For its role in correcting the window for an unrecognized `[1m]` model ID, see [Correct the window for a gateway or custom model ID](/docs/en/model-config#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](/docs/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`. Has no effect on Fable 5, Sonnet 5, or Opus 4.7 and later, which always use adaptive reasoning", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_ADMIN_ENV_UNION", + "purpose": "Set to `1` to stop Claude Code from merging [managed settings](/docs/en/managed-settings#precedence-within-the-managed-tier) `env` blocks per key across admin sources, so only the highest-priority source's whole `env` block applies, as before v2.1.223. Set it in the environment that launches Claude Code, since Claude Code ignores a copy delivered through a settings `env` block. Requires Claude Code v2.1.223 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_ADVISOR_TOOL", + "purpose": "Set to `1` to disable the [advisor tool](/docs/en/advisor). 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](/docs/en/agent-view): `claude agents`, `--bg`, `/background`, and the on-demand supervisor. Equivalent to the [`disableAgentView`](/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](/docs/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`](/docs/en/settings-reference#tui) setting. You can also switch with `/tui default`. Does not apply to background sessions opened from [agent view](/docs/en/agent-view), which always use fullscreen rendering", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_ARTIFACT", + "purpose": "Set to `1` to turn off the [Artifact](/docs/en/artifacts) 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`](/docs/en/settings-reference#enableartifact) to `false`; the deprecated [`disableArtifact`](/docs/en/settings-reference#disableartifact) key also turns it off", "default": null }, { @@ -330,7 +495,7 @@ }, { "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](/docs/en/memory#auto-memory). Set to `0` to force auto memory on even when `--bare` mode or [`autoMemoryEnabled: false`](/docs/en/settings-reference#automemoryenabled) would otherwise disable it. When disabled, Claude does not create or load auto memory files", "default": null }, { @@ -338,54 +503,94 @@ "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", "default": null }, + { + "name": "CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_DEFAULT", + "purpose": "Set to `1` to stop Claude Code from treating an [Amazon Bedrock](/docs/en/amazon-bedrock) streaming response with a missing or empty `Content-Type` header as Amazon Bedrock's binary event stream. By default, Claude Code assumes a gateway dropped the header from an otherwise unmodified response, so it decodes the body and streaming keeps working. Set this only for a gateway that also re-emits the stream as server-sent events; Claude Code then reads the header-less body as server-sent events instead. Requires Claude Code v2.1.239 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_GUARD", + "purpose": "Set to `1` to skip the check that an [Amazon Bedrock](/docs/en/amazon-bedrock) streaming response carries the `application/vnd.amazon.eventstream` content-type. Without this variable, when a response carries a different content-type, Claude Code fails the request with an error naming that type, which means a [gateway or proxy is transforming the response](/docs/en/amazon-bedrock#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](/docs/en/agent-view) running background shell commands, dynamic workflows, and, as of v2.1.198, background subagents when the [supervisor](/docs/en/agent-view#the-supervisor-process) stops, restarts, or updates that session's process, instead of handing them to the session's next process. Affects only that handoff: backgrounding a session with `←` or [`/background`](/docs/en/agent-view#from-inside-a-session) still carries in-flight work over, and `CLAUDE_DISABLE_ADOPT` turns off both. 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](/docs/en/interactive-mode#background-bash-commands) when the operating system reports memory pressure. By default, on macOS and Linux, Claude Code terminates a background shell started in the main session on a memory-pressure signal once the session has been idle for 30 minutes and no turn or subagent is running. Windows has no memory-pressure signal, so this variable has no effect there. Requires Claude Code v2.1.193 or later", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_BUNDLED_SKILLS", + "purpose": "Set to `1` to disable the [skills](/docs/en/skills) and workflows included with Claude Code: bundled skills and workflows are removed entirely, while built-in commands like `/init` stay typable but are hidden from the model. `/doctor` stays typable like the built-in commands; hide it with `DISABLE_DOCTOR_COMMAND` instead. Skills from plugins, `.claude/skills/`, and `.claude/commands/` are unaffected. Equivalent to the [`disableBundledSkills`](/docs/en/settings-reference#disablebundledskills) setting", + "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 [scheduled tasks](/docs/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", "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 Anthropic-specific `anthropic-beta` request headers and beta tool-schema fields (such as `defer_loading` and `eager_input_streaming`) from API requests. Use this when a proxy gateway rejects requests with errors like \"Unexpected value(s) for the `anthropic-beta` header\" or \"Extra inputs are not permitted\". Standard fields (`name`, `description`, `input_schema`, `cache_control`) are preserved. [MCP tool search](/docs/en/mcp#scale-with-mcp-tool-search) is disabled and all MCP tools load upfront, even when you set `ENABLE_TOOL_SEARCH`. On Claude Code v2.1.227 or later, [managed settings](/docs/en/managed-settings) can keep tool search on. [Disable pre-release capabilities](/docs/en/llm-gateway-protocol#disable-pre-release-capabilities) covers where the override applies", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS", + "purpose": "Set to `1` to disable the built-in [Explore and Plan subagents](/docs/en/sub-agents#built-in-subagents). Claude explores with its search tools or the general-purpose subagent instead, and [plan mode](/docs/en/permission-modes#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](/docs/en/fast-mode)", "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`](/docs/en/settings-reference#feedbacksurveyrate) setting. See [Session quality surveys](/docs/en/data-usage#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](/docs/en/checkpointing). The `/rewind` command will not be able to restore code changes. Overrides the [`fileCheckpointingEnabled`](/docs/en/settings-reference#filecheckpointingenabled) setting", "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 system prompt. Useful when using your own git workflow skills. Takes precedence over the [`includeGitInstructions`](/docs/en/settings-reference#includegitinstructions) setting when set", "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.0 and 4.1 to the current Opus version on the Anthropic API. Use when you intentionally want to pin an older model. The remap does not run on Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry", "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](/docs/en/fullscreen). 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](/docs/en/fullscreen) 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](/docs/en/network-config#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](/docs/en/tools-reference#sendfeedback-tool-behavior), release notes, [gateway model discovery](/docs/en/llm-gateway-connect#add-gateway-models-to-the-model-picker) refreshes, and availability checks such as the [fast mode](/docs/en/fast-mode#use-fast-mode-behind-proxies-and-llm-gateways) check. It also stops the [background runs of plugin `command` sources](/docs/en/plugin-marketplaces#when-claude-code-re-runs-the-command), 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](/docs/en/remote-control#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`", "default": null }, { @@ -393,9 +598,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](/docs/en/remote-control#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](/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 }, { @@ -405,67 +620,92 @@ }, { "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. In Agent SDK and `claude -p` sessions, this also skips the background small/fast-model request that generates the session title", "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. The variable's behavior is unchanged from earlier versions; on models that think by default, omitting the parameter means the model may still think. To explicitly disable [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) on the Anthropic API, use `MAX_THINKING_TOKENS=0` instead, which is also ineffective on Fable 5 since it cannot have thinking turned off. On [third-party providers](/docs/en/third-party-integrations), `0` likewise omits the parameter, so the two variables behave the same there", + "default": null + }, + { + "name": "CLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENT", + "purpose": "Set to `1` to skip proactive [auto-compaction](/docs/en/costs#reduce-token-usage) when Claude Code doesn't recognize the model ID, such as an [LLM gateway](/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](/docs/en/model-config#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](/docs/en/fullscreen) 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_WORKFLOWS", + "purpose": "Set to `1` to disable [workflows](/docs/en/workflows#turn-workflows-off). Equivalent to the [`disableWorkflows`](/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. See [Adjust effort level](/docs/en/model-config#adjust-effort-level)", + "default": null + }, + { + "name": "CLAUDE_CODE_ENABLE_APPEND_SUBAGENT_PROMPT", + "purpose": "Set to `1` to enable appending extra text to the end of the system prompt of every [subagent](/docs/en/sub-agents) other than a [forked subagent](/docs/en/sub-agents#fork-the-current-conversation). The [`--append-subagent-system-prompt`](/docs/en/cli-reference#cli-flags) flag supplies the appended text and sets this variable automatically, so you don't need to set it yourself. Requires Claude Code v2.1.205 or later", + "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](/docs/en/claude-apps-gateway) sessions. In v2.1.158 through v2.1.206, setting this to `1` was required to make [auto mode](/docs/en/permission-modes#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](/docs/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`](/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](/docs/en/headless) after a background install completes. Off by default because the refresh changes the system prompt mid-session, which invalidates [prompt caching](/docs/en/prompt-caching) for that turn", "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](/docs/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", "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](/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`](/docs/en/settings-reference#availablemodels) allowlist the session receives; deliver the list through [MDM or a managed settings file](/docs/en/managed-settings#delivery-mechanisms), since [server-managed delivery is not available on gateway configurations](/docs/en/server-managed-settings#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](/docs/en/fast-mode) 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`](/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](/docs/en/interactive-mode#when-claude-code-skips-suggestions). Set to `true` to keep them on until you reach the limit. Requires Claude Code v2.1.238 or later. See [Prompt suggestions](/docs/en/interactive-mode#prompt-suggestions)", "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](/docs/en/tools-reference#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](/docs/en/interactive-mode#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. See [Monitoring](/docs/en/monitoring-usage)", + "default": null + }, + { + "name": "CLAUDE_CODE_ENABLE_TODO_TOOLS", + "purpose": "Set to `1` to get the task-tracking tools on the models listed under [Task tool availability](/docs/en/tools-reference#task-tool-availability), where Claude Code otherwise leaves them out. `CLAUDE_CODE_ENABLE_TASKS` still selects the Task tools or `TodoWrite`. Requires Claude Code v2.1.233 or later", "default": null }, { @@ -475,12 +715,12 @@ }, { "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](/docs/en/agent-teams). 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](/docs/en/agent-view) 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 }, { @@ -488,29 +728,44 @@ "purpose": "Override the default token limit for file reads. Useful when you need to read larger files in full", "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](/docs/en/fullscreen), this doesn't change the renderer", "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](/docs/en/sub-agents#turn-fork-mode-on-or-off), which lets Claude spawn [forked subagents](/docs/en/sub-agents#fork-the-current-conversation) itself and is on by default in interactive sessions only. Set to `1` to turn it on in `claude -p` and the Agent SDK as well, or `0` to turn it off in every kind of session. You can run `/subtask` whether or not fork mode is on. The interactive default requires Claude Code v2.1.232 or later; on earlier versions, set the variable to `1` to turn fork mode on", + "default": null + }, + { + "name": "CLAUDE_CODE_FORWARD_SUBAGENT_TEXT", + "purpose": "Set to `1` to emit [subagent](/docs/en/sub-agents) text and thinking blocks in `claude -p --output-format stream-json` output, the same behavior as the [`--forward-subagent-text`](/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_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](/docs/en/setup#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](/docs/en/tools-reference#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](/docs/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](/docs/en/settings-reference#respectgitignore)", "default": null }, { @@ -518,6 +773,11 @@ "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](/docs/en/goal#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_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 +790,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`](/docs/en/settings-reference#autoinstallideextension) to `false`", "default": null }, { @@ -538,21 +798,36 @@ "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_MAX_CONCURRENT_SUBAGENTS", + "purpose": "How many [subagents](/docs/en/sub-agents#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](/docs/en/model-config#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_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 defaults to 32000 for model IDs it doesn't recognize, such as gateway-specific names, and lowers values above a model's cap to the cap. Increasing this value reduces the effective context window available before [auto-compaction](/docs/en/costs#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). 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_SUBAGENT_SPAWN_DEPTH", + "purpose": "Number of [subagent layers](/docs/en/sub-agents#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](/docs/en/sub-agents) 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](/docs/en/sub-agents#concurrent-subagent-limit) and the [depth limit](/docs/en/sub-agents#let-subagents-spawn-their-own-subagents) still apply", + "default": "200" + }, { "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", @@ -560,14 +835,39 @@ }, { "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`](/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 the total number of [WebSearch](/docs/en/tools-reference#websearch-tool-behavior) 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", + "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](/docs/en/mcp#automatic-backgrounding-of-long-tool-calls) (default: 120000, or 2 minutes). Set to `0` to turn automatic backgrounding off. Requires Claude Code v2.1.212 or later", + "default": "120000" + }, + { + "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](/docs/en/mcp#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](/docs/en/cross-session-messaging#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](/docs/en/cross-session-messaging#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](/docs/en/cross-session-messaging#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](/docs/en/cross-session-messaging#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", @@ -575,12 +875,12 @@ }, { "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](/docs/en/fullscreen), a research preview that reduces flicker and keeps memory flat in long conversations. Overrides the [`tui`](/docs/en/settings-reference#tui) setting; you can also switch with `/tui fullscreen`", "default": null }, { @@ -595,32 +895,42 @@ }, { "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`](/docs/en/authentication#generate-a-long-lived-token). Unless you run [`/login`](/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](/docs/en/fast-mode) 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](/docs/en/monitoring-usage)", + "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](/docs/en/monitoring-usage)", "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](/docs/en/monitoring-usage)", "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](/docs/en/monitoring-usage#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](/docs/en/monitoring-usage)", "default": "2000" }, { "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](/docs/en/setup#auto-updates)", "default": null }, { @@ -635,27 +945,57 @@ }, { "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 git operations when installing or updating plugins (default: 120000). Increase this value for large repositories or slow network connections. See [Git operations time out](/docs/en/plugin-marketplaces#git-operations-time-out)", "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 cache when a `git pull` fails. Useful in offline or airgapped environments where re-cloning would fail the same way. See [Marketplace updates fail in offline environments](/docs/en/plugin-marketplaces#marketplace-updates-fail-in-offline-environments)", "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](/docs/en/plugin-marketplaces#pre-populate-plugins-for-containers)", + "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 continuous idle waiting after the final turn in [non-interactive mode](/docs/en/headless#background-tasks-at-exit) with the `-p` flag, while background subagents and workflows whose result is part of the output finish. Each turn that handles queued background results starts the count again. Default: `600000`, or 10 minutes. When idle waiting reaches the ceiling, Claude Code stops waiting for the remaining background tasks and exits. Set to `0` to wait indefinitely. This cap is separate from the five-second grace period that applies to plain background shells. Requires Claude Code v2.1.182 or later", + "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](/docs/en/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](/docs/en/managed-settings), not as a shell export, so the detached background service inherits it; project and local settings can't set it. Equivalent to the [`processWrapper` setting](/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](/docs/en/corporate-launcher) for the value format, what the launcher covers, and the contract the launcher must satisfy. Requires Claude Code v2.1.208 or later", + "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](/docs/en/sessions#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](/docs/en/prompt-caching#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)](/docs/en/monitoring-usage#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](/docs/en/managed-settings), whichever managed source delivers them, so the host's model configuration takes precedence over an out-of-date managed model pin. Claude Code also ignores model-selection variables such as `ANTHROPIC_MODEL` and the `ANTHROPIC_DEFAULT_*_MODEL` family in a managed `env` block; an [`availableModels`](/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](/docs/en/data-usage#default-behaviors-by-api-provider)", "default": null }, { @@ -665,17 +1005,27 @@ }, { "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](/docs/en/claude-code-on-the-web). 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](/docs/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 output back to the session](/docs/en/cloud-environments#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`](/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`. Before v2.1.221, Claude Code ignored `0` and other falsy values, so setting `0` still triggered the resume in non-interactive mode and unsetting the variable was the only way to turn it off", + "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 both the `CLAUDE_CODE_RESUME_INTERRUPTED_TURN` automatic resume and the injected `CLAUDE_CODE_RESUME_PROMPT` continuation message, and the session starts idle so you continue explicitly. Unset or `0` means no bound; a negative or non-numeric value applies a one-hour bound. Spawn scripts for long-running agents can set this so a restart against an old transcript doesn't re-run a stale prompt. Claude Code sets a one-hour bound itself when it restarts a crashed [agent view](/docs/en/agent-view) session that inherited its conversation from an interactive session. Requires Claude Code v2.1.211 or later", "default": null }, { @@ -683,6 +1033,16 @@ "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", "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 on a `429` that reports a spend limit or exhausted usage credits, even one from a [gateway spend cap](/docs/en/errors#spend-limit-reached) that resets on a schedule. Before v2.1.239, the watchdog retried these indefinitely. The watchdog backs off up to 5 minutes between attempts, or until the limit resets when the response carries a rate-limit reset time, so a session that hits a usage limit waits out the remaining window. On v2.1.199 or later it also raises the default retry count for other transient errors, such as server errors, timeouts, and dropped connections, to 300, roughly three hours of backoff, and removes the cap of 15 on `CLAUDE_CODE_MAX_RETRIES` if you set that variable explicitly. Requires Claude Code v2.1.186 or later", + "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`](/docs/en/cli-reference#cli-flags). Directly spawned child processes inherit the variable", + "default": null + }, { "name": "CLAUDE_CODE_SCRIPT_CAPS", "purpose": "JSON object limiting how many times specific scripts may be invoked per session when `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB` is set. Keys are substrings matched against the command text; values are integer call limits. For example, `{\"deploy.sh\": 2}` allows `deploy.sh` to be called at most twice. Matching is substring-based so shell-expansion tricks like `./scripts/deploy.sh $(evil)` still count against the cap. Runtime fan-out via `xargs` or `find -exec` is not detected; this is a defense-in-depth control", @@ -690,32 +1050,37 @@ }, { "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](/docs/en/fullscreen#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](/docs/en/tools-reference#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`](/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](/docs/en/hooks) subprocesses, and stdio [MCP server](/docs/en/mcp) 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](/docs/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", "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](/docs/en/hooks) commands, [status line](/docs/en/statusline) commands, and stdio [MCP server](/docs/en/mcp) 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, plugins, MCP servers, auto memory, and CLAUDE.md. Skills in a directory you pass with `--add-dir` still load. OAuth tokens and keychain credentials are not read, so Anthropic authentication must come from `ANTHROPIC_API_KEY` or an `apiKeyHelper` in `--settings`. Equivalent to passing [`--bare`](/docs/en/headless#start-faster-with-bare-mode)", "default": null }, { @@ -725,22 +1090,37 @@ }, { "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](/docs/en/claude-platform-on-aws), 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](/docs/en/amazon-bedrock#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](/docs/en/fast-mode#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](/docs/en/fast-mode#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 }, { @@ -750,12 +1130,22 @@ }, { "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_STOP_HOOK_BLOCK_CAP", + "purpose": "Maximum number of consecutive times a [Stop](/docs/en/hooks#stop) or [SubagentStop](/docs/en/hooks#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](/docs/en/sub-agents#choose-a-model), [agent team](/docs/en/agent-teams#specify-teammates-and-models) teammates, and [workflow](/docs/en/workflows) 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`. See [Choose a model](/docs/en/sub-agents#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_PROMPT_CACHE_TTL", + "purpose": "Set `5m` or `1h`, the only values Claude Code accepts, to choose the [prompt cache TTL](/docs/en/prompt-caching#cache-lifetime) for requests outside the main conversation, such as [subagents](/docs/en/sub-agents), 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 }, { @@ -773,49 +1163,74 @@ "purpose": "Timeout in milliseconds for synchronous plugin installation. When exceeded, Claude Code proceeds without plugins and logs an error. No default: without this variable, synchronous installation waits until complete", "default": "without" }, + { + "name": "CLAUDE_CODE_SYNC_SKILLS", + "purpose": "Set to `1` to download your enabled claude.ai skills into `~/.claude/skills/synced/` and resync every 10 minutes. Before it runs the first query, Claude Code waits up to `CLAUDE_CODE_SYNC_SKILLS_WAIT_TIMEOUT_MS` for the list of your skills. The downloads themselves finish in the background, and Claude waits for a skill's download when it invokes that skill. The `synced` folder name is [reserved for this download](/docs/en/skills#where-skills-live). Before v2.1.227, the skills downloaded into `~/.claude/skills/` directly. Applies only in non-interactive mode with the `-p` flag. Requires claude.ai authentication. [Claude Code on the web](/docs/en/claude-code-on-the-web) sessions receive your enabled claude.ai skills automatically; you don't need to set this there. Claude Code applies [extra rules to the downloaded skills](/docs/en/skills#how-synced-skills-behave), such as not running their `!` commands on your machine", + "default": null + }, + { + "name": "CLAUDE_CODE_SYNC_SKILLS_INSTALL_TIMEOUT_MS", + "purpose": "Timeout in milliseconds for a mid-session skills resync when `CLAUDE_CODE_SYNC_SKILLS` is set (default: 30000). Bounds the download triggered when the host requests a skill reload during the session. When exceeded, the resync stops and remaining downloads continue in the background", + "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`](/en/settings) setting", + "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`](/docs/en/settings-reference#syntaxhighlightingdisabled) setting", "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)", + "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](/docs/en/tools-reference#task-tool-availability). See [Task list](/docs/en/interactive-mode#task-list)", "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_TEAM_TEARDOWN_PARK_TIMEOUT_MS", + "purpose": "Override, in milliseconds, how long a non-interactive session waits at exit for its [agent team](/docs/en/agent-teams) 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", "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}/` on Unix or `/claude/` on Windows to this path. Default: `/tmp` on macOS, `os.tmpdir()` on Linux and Windows. As of v2.1.161, on macOS and Linux, [sandboxed](/docs/en/sandboxing) Bash subprocesses receive a short fallback `$TMPDIR` under the system default when your override is a long path, since some tools fail when temp paths get too long. Unsandboxed Bash commands inherit your shell's `$TMPDIR` unchanged. Claude Code's own temp files always use your override. Set it in your shell, user settings, or managed settings. Ignored in [project and local settings](/docs/en/settings-reference#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](/docs/en/terminal-config) 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](/docs/en/tools-reference#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](/docs/en/tools-reference#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_USE_ANTHROPIC_AWS", - "purpose": "Use [Claude Platform on AWS](/en/claude-platform-on-aws)", + "purpose": "Use [Claude Platform on AWS](/docs/en/claude-platform-on-aws)", "default": null }, { "name": "CLAUDE_CODE_USE_BEDROCK", - "purpose": "Use [Bedrock](/en/amazon-bedrock)", + "purpose": "Use [Amazon Bedrock](/docs/en/amazon-bedrock)", "default": null }, { "name": "CLAUDE_CODE_USE_FOUNDRY", - "purpose": "Use [Microsoft Foundry](/en/microsoft-foundry)", + "purpose": "Use [Microsoft Foundry](/docs/en/microsoft-foundry)", "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](/docs/en/amazon-bedrock#use-the-mantle-endpoint)", "default": null }, { @@ -825,62 +1240,102 @@ }, { "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)", + "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](/docs/en/tools-reference#powershell-tool)", "default": null }, { "name": "CLAUDE_CODE_USE_VERTEX", - "purpose": "Use [Vertex](/en/google-vertex-ai)", + "purpose": "Use [Google Cloud's Agent Platform](/docs/en/google-vertex-ai)", + "default": null + }, + { + "name": "CLAUDE_CODE_USER_DIALOG_TIMEOUT_MS", + "purpose": "Deadline in milliseconds for dialogs Claude Code forwards to a remote client, such as a [Remote Control](/docs/en/remote-control) or SDK host, and for the approval dialog for a [held cross-session message](/docs/en/cross-session-messaging#control-inbound-messages), before Claude Code cancels them; permission prompts and `AskUserQuestion` questions use their own flows and aren't governed by it. Also bounds the mid-session [Fable 5 usage-credits consent prompt](/docs/en/model-config#fable-5-and-usage-credits) in a session that may be running unattended. [Control inbound messages](/docs/en/cross-session-messaging#control-inbound-messages) and [non-interactive sessions](/docs/en/cross-session-messaging#non-interactive-sessions) cover the full held-message expiry rules, including the cases where the deadline doesn't apply. Overrides the [`dialogExpiry`](/docs/en/settings-reference#dialogexpiry) setting; `0` or a negative value disables the deadline", + "default": null + }, + { + "name": "CLAUDE_CODE_WEBFETCH_CACHE_TTL_MS", + "purpose": "Set to the number of milliseconds [WebFetch](/docs/en/tools-reference#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_WORKFLOW_PREFIX_STAGGER_MS", + "purpose": "Upper bound in milliseconds on how long a [workflow](/docs/en/workflows) 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](/docs/en/workflows#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_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](/docs/en/authentication#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. Ignored in [project and local settings](/docs/en/settings-reference#variables-claude-code-ignores-in-env)", "default": "~/.claude" }, + { + "name": "CLAUDE_DISABLE_ADOPT", + "purpose": "Set to `1` to stop in-flight background work instead of carrying it over when you background a session by pressing `←` or with [`/background`](/docs/en/agent-view#from-inside-a-session). 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", + "default": null + }, { "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](/docs/en/model-config#adjust-effort-level) in effect when the subprocess starts: `low`, `medium`, `high`, `xhigh`, or `max`. Ultracode is not a distinct level and reports as `xhigh`. Matches the `effort.level` field passed to [hooks](/docs/en/hooks). 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](/docs/en/network-config#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](/docs/en/claude-platform-on-aws) connections, and for streaming responses on [gateway](/docs/en/gateways) connections reached through `ANTHROPIC_BASE_URL` or `ANTHROPIC_AWS_BASE_URL`; before v2.1.222 it didn't run on those gateway connections, so the event-level watchdog could report a stall there even while keep-alive pings were arriving. For timeouts and how the timers interact, see [Streaming idle watchdogs](/docs/en/network-config#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](/docs/en/network-config#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](/docs/en/network-config#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. Also populated dynamically by [SessionStart](/docs/en/hooks#persist-environment-variables), [Setup](/docs/en/hooks#setup), [CwdChanged](/docs/en/hooks#cwdchanged), and [FileChanged](/docs/en/hooks#filechanged) hooks", + "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](/docs/en/errors#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](/docs/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", + "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](/docs/en/network-config#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](/docs/en/errors#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](/docs/en/network-config#streaming-idle-watchdogs)", + "default": null + }, + { + "name": "CLAUDE_SUBAGENT_BG_SHELL_MAX_MS", + "purpose": "Maximum lifetime in milliseconds for a [background shell command](/docs/en/interactive-mode#background-bash-commands) that a [subagent](/docs/en/sub-agents) started. Default `3600000` (60 minutes). When you set `0`, Claude Code applies the default instead of removing the cap. When the subagent runs in the foreground, Claude Code also ends the command when that subagent gives its final response, regardless of this cap. See [the background command lifetime rules](/docs/en/tools-reference#background-commands). Claude Code doesn't cap main-session background commands this way. For the memory-pressure limit that covers them, see [How backgrounding works](/docs/en/interactive-mode#how-backgrounding-works)", "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](/docs/en/hooks) commands, [status line](/docs/en/statusline) commands, stdio [MCP server](/docs/en/mcp) 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`](/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. The manual `/compact` command remains available. Use when you want explicit control over when compaction occurs. Overrides the [`autoCompactEnabled`](/docs/en/settings-reference#autocompactenabled) setting", "default": null }, { @@ -900,32 +1355,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`](/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](/docs/en/tools-reference#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 GrowthBook feature-flag fetching and use code defaults for every flag. This makes [Remote Control](/docs/en/remote-control#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,7 +1405,12 @@ }, { "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](/docs/en/prompt-caching#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 }, { @@ -970,7 +1430,7 @@ }, { "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 do not include user data like code, file paths, or bash commands. Also disables feature-flag fetching with the same effect as `DISABLE_GROWTHBOOK`, which makes [Remote Control](/docs/en/remote-control#requirements) and the other [features that need feature-flag fetching](#features-that-need-feature-flag-fetching) unavailable. See [Turn telemetry off for your organization](/docs/en/managed-settings#turn-telemetry-off-for-your-organization)", "default": null }, { @@ -985,17 +1445,22 @@ }, { "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 making [Remote Control](/docs/en/remote-control#requirements) and the other [features that need feature-flag fetching](#features-that-need-feature-flag-fetching) unavailable. Claude Code reads this variable as a standard boolean, so `0` leaves telemetry on, and honors it as the cross-tool convention recognized by many developer CLIs", + "default": null + }, + { + "name": "ENABLE_BETA_TRACING_DETAILED", + "purpose": "Set to `1`, together with `BETA_TRACING_ENDPOINT`, to turn on [detailed beta tracing](/docs/en/monitoring-usage#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](/docs/en/settings-reference#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](/docs/en/mcp#use-mcp-servers-from-claude-ai). Enabled by default for logged-in users. To disable per-project or per-org, set [`disableClaudeAiConnectors`](/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](/docs/en/prompt-caching#cache-lifetime) instead of the default 5 minutes. Intended for API key, [Amazon Bedrock](/docs/en/amazon-bedrock), [Google Cloud's Agent Platform](/docs/en/google-vertex-ai), [Microsoft Foundry](/docs/en/microsoft-foundry), and [Claude Platform on AWS](/docs/en/claude-platform-on-aws) users. Subscription users within included usage receive the 1-hour TTL automatically on the [main conversation](/docs/en/prompt-caching#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 per request bucket instead, use `CLAUDE_CODE_PROMPT_CACHE_TTL` and `CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL`, which take precedence over this variable", "default": null }, { @@ -1005,12 +1470,12 @@ }, { "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](/docs/en/mcp#scale-with-mcp-tool-search). Unset, Claude Code defers all MCP tools by default. It still loads them upfront on Google Cloud's Agent Platform models earlier than the Claude 4.5 generation, on a Microsoft Foundry deployment hosted on Azure, and when `ANTHROPIC_BASE_URL` points to a non-first-party host. `true` always defers and sends the beta header, except on those same Agent Platform models and Microsoft Foundry deployments; requests fail on proxies that don't support `tool_reference`. `auto` loads upfront when tool definitions fit within 10% of context. `auto:N` sets a custom threshold, such as `auto:5` for 5%. `false` loads all tools upfront. A value you set yourself is ignored when `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` is set. Before v2.1.221, Claude Code disabled tool search for all models on Google Cloud's Agent Platform unless you set this variable to `true`", "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", + "purpose": "Set to any non-empty value, such as `1`, to make every model stop retrying with a repeated-overload error when no fallback model is configured. **Setting it to `0` or `false` still enables this**, unlike most on/off variables; unset the variable to restore the default retry behavior. Without it, models Claude Code recognizes as Opus, Fable 5, or Mythos models stop retrying this way when you authenticate with an API key or a [third-party provider](/docs/en/third-party-integrations) rather than a Claude subscription. As of v2.1.160, a configured [fallback model chain](/docs/en/model-config#fallback-model-chains) triggers on repeated overload errors for any primary model, so this variable does not affect switching to a fallback model", "default": null }, { @@ -1018,9 +1483,14 @@ "purpose": "Set to `1` to force plugin auto-updates even when the main auto-updater is disabled via `DISABLE_AUTOUPDATER`", "default": null }, + { + "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. Claude Code renders the footer [PR or merge request badge](/docs/en/interactive-mode#pr-review-status) as a hyperlink even when it 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 +1505,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. Claude Code displays a warning when output exceeds 10,000 tokens. Tools that declare [`anthropic/maxResultSizeChars`](/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 (default: 25000)", "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 times Claude Code retries when the model's response fails validation against the [`--json-schema`](/docs/en/cli-reference#cli-flags) in non-interactive mode with the `-p` flag. The same retry count applies when a [workflow](/docs/en/workflows) subagent's structured output fails validation. Defaults to 5", "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](/docs/en/model-config#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 Fable 5, which cannot have thinking turned off; on [third-party providers](/docs/en/third-party-integrations), `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](/docs/en/errors#effort-isnt-available-with-thinking-turned-off), such as Opus 5. Nonzero values are ignored on adaptive reasoning models unless `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` is set", "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](/docs/en/mcp#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`](/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`](/docs/en/mcp#exempt-a-server-from-deferral) still make startup wait regardless, except when served from the [discovery cache](/docs/en/mcp#server-status-detail), since their tools must be present when the first prompt is built. In non-interactive mode (`-p`), Claude Code also waits for still-pending servers before the first turn regardless of this variable, with a longer deadline when you pass [`--mcp-config`](/docs/en/cli-reference#cli-flags) explicitly; see that flag's entry for the cached-server exception", + "default": "servers" + }, + { + "name": "MCP_DISCOVERY_CACHE", + "purpose": "Turns the [MCP discovery cache](/docs/en/mcp#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](/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](/docs/en/mcp#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](/docs/en/mcp#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](/docs/en/mcp#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](/docs/en/mcp#use-pre-configured-oauth-credentials)", + "default": null + }, + { + "name": "MCP_PROTOCOL_NEGOTIATION", + "purpose": "On the [v2 MCP client runtime](/docs/en/mcp#mcp-client-runtimes) only, whether Claude Code probes servers for MCP protocol revision 2026-07-28. Set `auto` to probe HTTP, claude.ai connector, and stdio servers; a server that doesn't answer the probe connects on the earlier protocol instead, as SSE and WebSocket servers always do. Set `legacy` to skip the probe for every server. Without the variable, Claude Code probes HTTP and claude.ai connector servers on Claude Code v2.1.232 or later, with the exceptions the [MCP client runtimes](/docs/en/mcp#mcp-client-runtimes) section lists. Any other value is ignored with a warning in the debug log. Requires Claude Code v2.1.221 or later", "default": null }, { @@ -1078,6 +1573,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](/docs/en/mcp#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 on Claude Code v2.1.232 or later, except where that section says it uses v1. On Claude Code v2.1.221 or later, the v2 runtime checks the issuer an MCP OAuth server returns in its authorization response and fails the sign-in with an error that begins `Issuer mismatch in authorization response` when it doesn't match. The v1 runtime doesn't run this check. If you set an unrecognized value, Claude Code ignores it and writes a warning to the debug log. Claude Code reads the value once per process. Requires Claude Code v2.1.218 or later", + "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 +1590,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,49 +1598,69 @@ "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](/docs/en/monitoring-usage#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, the value of `OTEL_LOG_USER_PROMPTS` is used instead. Set to `0` to keep responses redacted even when `OTEL_LOG_USER_PROMPTS` is set. Requires Claude Code v2.1.193 or later. See [Monitoring](/docs/en/monitoring-usage#assistant-response-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](/docs/en/settings-reference#variables-claude-code-ignores-in-env). See [Monitoring](/docs/en/monitoring-usage#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 input and output content in OpenTelemetry span events. Disabled by default to protect sensitive data. See [Monitoring](/docs/en/monitoring-usage)", "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, and other tool details in OpenTelemetry traces and logs. Disabled by default to protect PII. See [Monitoring](/docs/en/monitoring-usage)", "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). See [Monitoring](/docs/en/monitoring-usage)", "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](/docs/en/monitoring-usage)", + "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](/docs/en/monitoring-usage)", + "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](/docs/en/monitoring-usage#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](/docs/en/monitoring-usage)", "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](/docs/en/monitoring-usage)", "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](/docs/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", "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", + "purpose": "Maximum number of characters in [subagent](/docs/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" }, { @@ -1150,62 +1670,82 @@ }, { "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 4.0 Opus 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 4.0 Sonnet 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 4.1 Opus 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. Added in v2.1.154", + "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_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 } ] diff --git a/catalog/hooks.json b/catalog/hooks.json index ff4dd27..496e55e 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-08-31T16:49:38.830Z", + "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,10 +27,26 @@ "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", @@ -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: the fixed text `Blocked by classifier` in most sessions, or the classifier's written explanation when the session's classifier model provides one. For a denial where a safety check separate from auto mode refused the classifier's request or its response didn't parse, the reason starts with `Auto mode could not evaluate this action and is blocking it for safety`. For a denial because the classifier model was unavailable, the reason is the fixed text `Classifier unavailable`. See [Review denials](/docs/en/auto-mode-config#review-denials)" } ], - "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\": \"Blocked by classifier\"\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](/docs/en/permissions#manage-permissions) are still evaluated, so a hook returning `\"allow\"` doesn't override a matching deny rule" }, { "field": "updatedInput", @@ -152,6 +201,18 @@ "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", @@ -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](/docs/en/permission-modes#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,18 +291,34 @@ "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](/docs/en/prompt-caching#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 the [actions no mode auto-approves](/docs/en/permission-modes#actions-no-mode-auto-approves) and for `AskUserQuestion` and `ExitPlanMode`, which need [`updatedInput` paired with it](#allow-with-updatedinput). `\"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](/docs/en/permissions#manage-permissions) are still evaluated regardless of what the hook returns" }, { "field": "permissionDecisionReason", @@ -245,7 +326,7 @@ }, { "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](/docs/en/tools-reference#background-commands) 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 current session title if one is already set, for example via `--name` or `/rename`. A hook that emits `sessionTitle` can check `session_title` first to avoid overwriting a title the user set explicitly" + } + ], + "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. Applies in [non-interactive mode](/docs/en/headless) with the `-p` flag, where it becomes the first turn even if no prompt is provided. If a prompt is provided, it follows as the next turn. Unlike `additionalContext`, which attaches to an existing turn, this creates the turn" + }, + { + "field": "sessionTitle", + "description": "Sets the session title, with the same effect as `/rename`. Use to name sessions automatically from the launch folder, git branch, or worktree name. Applies when `source` is `\"startup\"`, `\"resume\"`, or `\"fork\"`; ignored on `\"clear\"` and `\"compact\"`" + }, + { + "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](/docs/en/skills) and command directories after the SessionStart hooks complete, so skills the hook installed are available in the same session, starting with the first prompt" } ] }, @@ -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`, `billing_error`, `invalid_request`, `model_not_found`, `server_error`, `max_output_tokens`, 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,10 @@ }, { "field": "team_name", - "description": "Name of the team. May be absent" + "description": "Deprecated. Session-derived team name; will be removed in a future release" } ], - "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 +539,15 @@ }, { "field": "team_name", - "description": "Name of the team. May be absent" + "description": "Deprecated. Session-derived team name; will be removed in a future release" } ], - "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](/docs/en/agent-teams) teammate is about to go idle", "inputFields": [ { "field": "teammate_name", @@ -405,10 +555,10 @@ }, { "field": "team_name", - "description": "Name of the team" + "description": "Deprecated. Session-derived team name; will be removed in a future release" } ], - "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 +569,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", @@ -452,19 +602,23 @@ { "field": "sessionTitle", "description": "Sets the session title. Use to name sessions automatically based on the prompt content" + }, + { + "field": "suppressOriginalPrompt", + "description": "If `true` when `decision` is `\"block\"`, omits the original prompt text from the block message shown to the user" } ] }, { "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 is being removed at session exit, when a subagent finishes, or when you delete a background session", "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 +636,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 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) below 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. Uses the same syntax as [permission rules](/docs/en/permissions)" }, { "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 +651,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 +676,12 @@ { "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 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" } ] }, @@ -557,7 +711,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](/docs/en/mcp#plugin-provided-mcp-servers), this is the scoped name `plugin::`, such as `plugin:my-plugin:db`, not the bare server key. The server must already be connected; the hook never triggers an OAuth or connection flow" }, { "field": "tool", @@ -577,7 +731,7 @@ { "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", @@ -592,9 +746,13 @@ "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](/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. Requires Claude Code v2.1.196 or later" + }, { "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", @@ -602,11 +760,11 @@ }, { "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](/docs/en/permissions#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](/docs/en/model-config#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](/docs/en/model-config#adjust-effort-level) says how it picks that level. Ultracode is not a distinct level and reports as `\"xhigh\"`. The object matches the [status line](/docs/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." }, { "field": "hook_event_name", @@ -618,7 +776,7 @@ }, { "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..6454d3a 100644 --- a/catalog/keybindings.json +++ b/catalog/keybindings.json @@ -1,7 +1,7 @@ { "source": "https://code.claude.com/docs/en/keybindings.md", - "fetchedAt": "2026-05-18T12:35:00.020Z", - "count": 20, + "fetchedAt": "2026-08-31T16:49:41.488Z", + "count": 19, "contexts": [ { "name": "Attachments", @@ -23,13 +23,9 @@ "name": "DiffDialog", "description": "Diff viewer navigation" }, - { - "name": "Doctor", - "description": "`/doctor` diagnostics screen" - }, { "name": "Footer", - "description": "Footer indicator navigation (tasks, teams, diff)" + "description": "Footer indicator navigation (tasks, teams, diff, artifacts)" }, { "name": "Global", diff --git a/catalog/mcp.json b/catalog/mcp.json index 2a643a7..2aa0b5f 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-08-31T16:49:40.141Z", "count": 3, "scopes": [ { diff --git a/catalog/model-config.json b/catalog/model-config.json index 40a8657..0daf8a3 100644 --- a/catalog/model-config.json +++ b/catalog/model-config.json @@ -1,11 +1,11 @@ { "source": "https://code.claude.com/docs/en/model-config.md", - "fetchedAt": "2026-05-22T14:01:08.197Z", - "count": 5, + "fetchedAt": "2026-08-31T16:49:42.321Z", + "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": "Balances token usage and intelligence. The default on every model except Opus 4.7" }, { "name": "low", @@ -19,9 +19,13 @@ "name": "medium", "description": "Reduces token usage for cost-sensitive work that can trade off some intelligence" }, + { + "name": "ultracode", + "description": "A Claude Code setting that plans a [dynamic workflow](/docs/en/workflows) for each substantive task with `xhigh` per-message reasoning" + }, { "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..08bf3a9 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-08-31T16:49:40.897Z", "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": "Auto-approves tool calls with background safety checks that verify actions 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](/docs/en/permission-modes#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. The label and alias require Claude Code v2.1.200 or later. The desktop app's label doesn't depend on your CLI version" }, { "name": "dontAsk", - "description": "Auto-denies tools unless pre-approved via `/permissions` or `permissions.allow` rules" + "description": "Auto-denies tools unless pre-approved via `/permissions` or `permissions.allow` rules. `AskUserQuestion`, MCP tools marked [`requiresUserInteraction`](/docs/en/mcp#require-approval-for-a-specific-tool), and connector tools [your organization set to `ask`](/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](/docs/en/permission-modes#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..f7011dd 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-08-31T16:49:37.327Z", + "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", @@ -404,11 +486,23 @@ ] } }, + { + "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 +601,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 +671,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 +714,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 +732,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 +757,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 +784,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 +822,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 +854,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 +962,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 +1019,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 +1033,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 +1061,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 +1080,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 +1098,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 +1121,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 +1176,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 +1230,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,58 +1251,139 @@ "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 all background task functionality" + "description": "Disable alternate screen buffer rendering. When set to 1, keeps conversation in native scrollback instead of fullscreen renderer" }, { - "key": "env.CLAUDE_CODE_DISABLE_CLAUDE_MDS", + "key": "env.CLAUDE_CODE_DISABLE_ARTIFACT", "type": "string", "enum": [ "0", "1" ], - "description": "Prevent loading CLAUDE.md memory files" + "description": "Disable the Artifact tool. Equivalent to setting disableArtifact. See https://code.claude.com/docs/en/env-vars" }, { - "key": "env.CLAUDE_CODE_DISABLE_CRON", + "key": "env.CLAUDE_CODE_DISABLE_ATTACHMENTS", "type": "string", "enum": [ "0", "1" ], - "description": "Disable scheduled/cron tasks" + "description": "Disable attachment processing" }, { - "key": "env.CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS", + "key": "env.CLAUDE_CODE_DISABLE_AUTO_MEMORY", "type": "string", "enum": [ "0", "1" ], - "description": "Strip anthropic-beta headers from API requests. See https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#21123" + "description": "Disable automatic memory feature" + }, + { + "key": "env.CLAUDE_CODE_DISABLE_BACKGROUND_TASKS", + "type": "string", + "enum": [ + "0", + "1" + ], + "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", + "enum": [ + "0", + "1" + ], + "description": "Prevent loading CLAUDE.md memory files" + }, + { + "key": "env.CLAUDE_CODE_DISABLE_CRON", + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Disable scheduled/cron tasks" + }, + { + "key": "env.CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS", + "type": "string", + "enum": [ + "0", + "1" + ], + "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", @@ -961,7 +1410,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 +1437,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 +1466,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 +1482,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 +1491,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 +1520,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 +1542,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 +1576,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 +1596,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 +1614,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 +1635,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 +1670,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 +1706,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 +1775,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 +1795,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 +1829,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 +1881,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 +1910,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 +1931,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 +1947,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 +2030,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 +2066,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,16 +2107,52 @@ "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": "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_BEDROCK_AUTH", + "type": "string", + "enum": [ + "0", + "1" + ], + "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", @@ -1426,190 +2161,900 @@ "description": "Skip Azure authentication for Foundry" }, { - "key": "env.CLAUDE_CODE_SKIP_MANTLE_AUTH", + "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", - "enum": [ - "0", - "1" - ], - "description": "Skip AWS authentication for Mantle" + "description": "HTTPS proxy URL (recommended over HTTP_PROXY)" }, { - "key": "env.CLAUDE_CODE_SKIP_PROMPT_HISTORY", + "key": "env.IS_DEMO", "type": "string", "enum": [ "0", "1" ], - "description": "Disable transcript writes entirely. See https://code.claude.com/docs/en/settings#environment-variables" + "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.CLAUDE_CODE_SKIP_VERTEX_AUTH", + "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.MCP_CONNECT_TIMEOUT_MS", + "type": "string", + "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.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": "OpenTelemetry metrics exporter configuration" + "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": "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 +3065,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 +3186,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 +3214,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 +3296,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 +3314,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", @@ -1764,6 +3354,14 @@ "$ref": "#/$defs/hookMatcher" } }, + { + "key": "hooks.MessageDisplay", + "type": "array", + "description": "Hooks that run while assistant message text is displayed", + "items": { + "$ref": "#/$defs/hookMatcher" + } + }, { "key": "hooks.Notification", "type": "array", @@ -1975,6 +3573,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 +3589,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 +3625,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 +3633,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 +3718,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 +3761,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 +3841,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 +3894,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 +3955,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 +3965,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 +4016,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 +4101,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 +4140,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 +4164,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 +4196,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 +4205,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 +4265,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 +4297,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 +4334,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": [ { @@ -2688,16 +4538,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 +4589,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 +4627,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 +4643,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 +4745,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..ae70b73 100644 --- a/catalog/sub-agents.json +++ b/catalog/sub-agents.json @@ -1,12 +1,12 @@ { "source": "https://code.claude.com/docs/en/sub-agents.md", - "fetchedAt": "2026-05-18T12:34:59.151Z", - "count": 16, + "fetchedAt": "2026-08-31T16:49:39.501Z", + "count": 17, "fields": [ { "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 run it in the foreground. Where [fork mode](#turn-fork-mode-on-or-off) is on, Claude Code already runs the subagents Claude spawns [in the background](#run-subagents-in-foreground-or-background)" }, { "name": "color", @@ -28,6 +28,11 @@ "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" }, + { + "name": "experimental", + "required": false, + "description": "Map of experimental options. Set its `cacheTtl` key to `5m` or `1h` to choose the [prompt cache lifetime](/docs/en/prompt-caching#choose-the-ttl-yourself) for this subagent's requests. 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", "required": false, @@ -36,22 +41,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](/docs/en/commands) and [skills](/docs/en/skills) are processed. Prepended to any user-provided prompt" }, { "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](/docs/en/worktrees), giving it an isolated copy of the repository branched by default from your [default branch](/docs/en/worktrees#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](/docs/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](/docs/en/mcp#installing-mcp-servers) as value. Ignored for [plugin subagents](#choose-the-subagent-scope)" }, { "name": "memory", @@ -61,27 +66,27 @@ { "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`, 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 using lowercase letters and hyphens. [Hooks](/docs/en/hooks#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](/docs/en/plugins) such as `my-plugin:reviewer`. Claude Code doesn't load a file whose name contains one and logs an error to the debug log. Before v2.1.218, such names were accepted" }, { "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`. The `manual` alias requires Claude Code v2.1.200 or later. 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](/docs/en/skills) 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. Inherits every tool available to subagents if omitted. If no entry in the list resolves to a tool, the subagent usually [fails to launch](/docs/en/errors#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" } ] }