Skip to main content

FIELD MANUAL / RELEASE 2.1.307

Claude Code CLI Reference

One searchable surface, reconciled from installed recursive help, official documentation, and the published settings schema.

Read the complete guide → CAPTURED 2026-10-22 · darwin-arm64
CMD
64
FLAGS
327
SLASH
120
CONFIG
249
ENV
391
834 entries shown
01

Command paths

Runtime-confirmed paths are captured from the installed release. Expand a row for flags and examples.

claude runtime review 83 flags
claude [options] [command] [prompt]

Start Claude Code interactively, run a headless prompt, or manage a session.

--add-dir <directories>

Add directories Claude may read and edit for this session.

runtime normal
--agent <agent>

Use a named agent for this session.

runtime review
--agents <json-or-file>

Define session subagents with a JSON object, or with --print a file that holds one.

runtime review
--allow-dangerously-skip-permissions

Control Claude Code allow dangerously skip permissions behavior.

runtime high risk
--allowed-tools, --allowedTools <tools>

Grant matching tools without a permission prompt.

runtime review
--append-system-prompt <prompt>

Append text to the default system prompt.

runtime review
--autocompact <auto-or-tokens>

Set the auto-compact context window for this session.

runtime normal
--ax-screen-reader

Control Claude Code ax screen reader behavior.

runtime normal
--background, --bg

Control Claude Code background behavior.

runtime normal
-r, --resume <session>

Resume a session by ID or name, or open the session picker.

runtime normal
--bare

Control Claude Code bare behavior.

runtime normal
--settings <file-or-json>

Load additional settings from a file or inline JSON.

runtime review
--plugin-dir <paths>

Load plugins from directories for this session.

runtime review
--betas <betas>

Include API beta headers for requests.

runtime normal
--brief

Enable the compact runtime presentation.

runtime normal
--chrome

Control Claude Code chrome behavior.

runtime normal
--cloud <description-or-session>

Create or attach to a Claude Code on the web session.

runtime normal
-c, --continue

Continue the most recent conversation in the current directory.

runtime normal
--dangerously-skip-permissions

Control Claude Code dangerously skip permissions behavior.

runtime high risk
-d, --debug <filter>

Enable debug mode, optionally filtering categories.

runtime normal
--debug-file <path>

Write debug logs to a file and enable debug mode.

runtime review
--desktop

Open the session in the Claude Desktop app instead of the terminal.

runtime normal
--disable-slash-commands

Control Claude Code disable slash commands behavior.

runtime normal
--disallowed-tools, --disallowedTools <tools>

Remove matching tools from the model-visible tool set.

runtime review
--effort <level>

Set the reasoning effort level for the session.

runtime normal
--environment <environment-id>

Create a cloud session on a named self-hosted environment.

runtime normal
--exclude-dynamic-system-prompt-sections

Control Claude Code exclude dynamic system prompt sections behavior.

runtime review
--fallback-model <model>

Use a fallback model when the primary model is overloaded.

runtime normal
--file <specs>

Download file resources at startup using file specifications.

runtime review
--fork-session

Control Claude Code fork session behavior.

runtime normal
--forward-subagent-text

Control Claude Code forward subagent text behavior.

runtime review
-p, --print

Print a non-interactive response and exit.

runtime normal
--output-format <format>

Select print-mode output: text, json, or stream-json.

runtime normal
--from-pr <pr>

Resume a session linked to a pull request.

runtime normal
-h, --help

Control Claude Code help behavior.

runtime normal
--ide

Control Claude Code ide behavior.

runtime normal
--include-hook-events

Control Claude Code include hook events behavior.

runtime normal
--include-partial-messages

Control Claude Code include partial messages behavior.

runtime normal
--input-format <format>

Select print-mode input: text or stream-json.

runtime normal
--json-schema <schema>

Validate print-mode structured output against a JSON Schema.

runtime normal
--max-budget-usd <amount>

Stop print-mode execution at an approximate dollar budget.

runtime normal
--mcp-config <configs>

Load MCP servers from JSON files or inline JSON.

runtime review
--model <model>

Choose a model alias or full model ID.

runtime normal
-n, --name <name>

Name the session.

runtime normal
--no-chrome

Control Claude Code no chrome behavior.

runtime normal
--no-session-persistence

Control Claude Code no session persistence behavior.

runtime normal
--permission-mode <mode>

Start in a selected permission mode.

runtime review
--permission-prompts <target>

Choose who answers print-mode permission prompts: the host or nobody.

runtime review
--permission-prompt-tool <tool>

Delegate permission prompts to an MCP tool in print mode.

runtime review
--plugin-url <urls>

Load plugins from URLs for this session.

runtime review
--prompt-suggestions

Control Claude Code prompt suggestions behavior.

runtime normal
--remote-control, --rc <name>

Start an interactive session with Remote Control enabled.

runtime normal
--remote-control-session-name-prefix <prefix>

Prefix automatically generated Remote Control session names.

runtime normal
--replay-user-messages

Replay stream-json user messages on stdout for acknowledgement.

runtime normal
--restricted

Remove code-running tools and WebFetch, ignore user/project/local settings, and confine file tools to the working directories.

runtime normal
--strict-mcp-config

Control Claude Code strict mcp config behavior.

runtime review
--safe-mode

Control Claude Code safe mode behavior.

runtime normal
--session-id <uuid>

Use a specific UUID for the new conversation.

runtime normal
--setting-sources <sources>

Choose which setting scopes to load.

runtime normal
--system-prompt <prompt>

Replace the default system prompt in print mode.

runtime review
--system-prompt-snapshot <on-or-off>

Record the system prompt once per conversation and reuse it verbatim, or render it fresh every request.

runtime review
--teleport <session>

Resume a Claude Code on the web session in this terminal.

runtime normal
--tmux

Control Claude Code tmux behavior.

runtime normal
--tools <tools>

Restrict the tools available to Claude.

runtime review
--verbose

Control Claude Code verbose behavior.

runtime normal
-v, --version

Control Claude Code version behavior.

runtime normal
-w, --worktree <name>

Start Claude in an isolated git worktree.

runtime normal
--advisor <model>

Enable the server-side advisor tool with a selected model.

conditional normal
--append-subagent-system-prompt <prompt>

Append instructions to every subagent system prompt in print mode.

docs review
--append-subagent-system-prompt-file <file>

Append a file to every subagent system prompt in print mode.

docs review
--append-system-prompt-file <file>

Append a file to the default system prompt in print mode.

docs review
--channels <channels>

Enable selected development channels for the session.

conditional normal
--dangerously-load-development-channels

Control Claude Code dangerously load development channels behavior.

conditional review
--enable-auto-mode

Control Claude Code enable auto mode behavior.

conditional normal
--exec <command>

Run a PTY-backed shell command as a background job with --background.

docs review
--init

Control Claude Code init behavior.

docs normal
--init-only

Control Claude Code init only behavior.

docs normal
--maintenance

Control Claude Code maintenance behavior.

docs review
--max-turns <turns>

Limit agentic turns in print mode.

docs normal
--ref <branch>

Choose the source ref for a session created with --environment.

docs normal
--remote

Control Claude Code remote behavior.

docs normal
--system-prompt-file <file>

Replace the default system prompt with a file in print mode.

docs review
--teammate-mode <mode>

Select the agent-team teammate display mode.

conditional normal
Examples claudeclaude -p "Explain this repository"claude --resume auth-refactorclaude --permission-mode plan

Source: Claude Code 2.1.307 recursive local help · Official Claude Code CLI reference · @anthropic-ai/claude-code 2.1.307 package metadata

claude agents runtime normal 17 flags
claude agents [options]

Open agent view or query active background sessions.

--add-dir <directory>

Set add dir for this command.

runtime normal
--agent <agent>

Set agent for this command.

runtime normal
--all

Set all for this command.

runtime normal
--allow-dangerously-skip-permissions

Set allow dangerously skip permissions for this command.

runtime high risk
--cwd <path>

Set cwd for this command.

runtime normal
--dangerously-skip-permissions

Set dangerously skip permissions for this command.

runtime high risk
--effort <level>

Set effort for this command.

runtime normal
-h, --help

Display help for this command.

runtime normal
--json

Set json for this command.

runtime normal
--mcp-config <config>

Set mcp config for this command.

runtime normal
--model <model>

Set model for this command.

runtime normal
--permission-mode <mode>

Set permission mode for this command.

runtime normal
--plugin-dir <path>

Set plugin dir for this command.

runtime normal
--restricted

Set restricted for this command.

runtime normal
--setting-sources <sources>

Set setting sources for this command.

runtime normal
--settings, -or-json <file-or-json>

Set settings for this command.

runtime normal
--strict-mcp-config

Set strict mcp config for this command.

runtime normal
Examples claude agents --json

Source: Claude Code 2.1.307 recursive local help

claude auth runtime normal 1 flags
claude auth [options] [command]

Manage Claude Code authentication.

-h, --help

Display help for this command.

runtime normal
Examples claude auth status

Source: Claude Code 2.1.307 recursive local help

claude auth login runtime review 5 flags
claude auth login [options]

Sign in with a Claude subscription or Anthropic Console account.

--claudeai

Set claudeai for this command.

runtime review
--console

Set console for this command.

runtime review
--email <email>

Set email for this command.

runtime review
-h, --help

Display help for this command.

runtime review
--sso

Set sso for this command.

runtime review
Examples claude auth login --console

Source: Claude Code 2.1.307 recursive local help

claude auth logout runtime review 1 flags
claude auth logout [options]

Sign out from the current Anthropic account.

-h, --help

Display help for this command.

runtime review
Examples claude auth logout

Source: Claude Code 2.1.307 recursive local help

claude auth status runtime normal 3 flags
claude auth status [options]

Inspect authentication state for scripts or humans.

-h, --help

Display help for this command.

runtime normal
--json

Set json for this command.

runtime normal
--text

Set text for this command.

runtime normal
Examples claude auth status --json

Source: Claude Code 2.1.307 recursive local help

claude auto-mode runtime normal 1 flags
claude auto-mode [options] [command]

Inspect, critique, or reset automatic permission-mode rules.

-h, --help

Display help for this command.

runtime normal
Examples claude auto-mode config

Source: Claude Code 2.1.307 recursive local help

claude auto-mode config runtime normal 1 flags
claude auto-mode config [options]

Print the effective automatic permission-mode configuration.

-h, --help

Display help for this command.

runtime normal
Examples claude auto-mode config

Source: Claude Code 2.1.307 recursive local help

claude auto-mode critique runtime normal 2 flags
claude auto-mode critique [options]

Ask a model to critique custom automatic permission rules.

-h, --help

Display help for this command.

runtime normal
--model <model>

Set model for this command.

runtime normal
Examples claude auto-mode critique --model sonnet

Source: Claude Code 2.1.307 recursive local help

claude auto-mode defaults runtime normal 2 flags
claude auto-mode defaults [options]

Print the shipped automatic permission-mode rule set.

-h, --help

Display help for this command.

runtime normal
--label <prefix>

Set label for this command.

runtime normal
Examples claude auto-mode defaults --label "Git Destructive"

Source: Claude Code 2.1.307 recursive local help

claude auto-mode reset runtime review 2 flags
claude auto-mode reset [options]

Remove user autoMode settings and restore shipped defaults.

-h, --help

Display help for this command.

runtime review
-y, --yes

Set yes for this command.

runtime review
Examples claude auto-mode reset --yes

Source: Claude Code 2.1.307 recursive local help

claude doctor runtime normal 1 flags
claude doctor [options]

Run read-only installation and settings diagnostics.

-h, --help

Display help for this command.

runtime normal
Examples claude doctor

Source: Claude Code 2.1.307 recursive local help

claude gateway runtime review 2 flags
claude gateway [options]

Start the administrator-managed Claude apps gateway.

--config <path>

Set config for this command.

runtime normal
-h, --help

Display help for this command.

runtime normal
Examples claude gateway --config gateway.yaml

Source: Claude Code 2.1.307 recursive local help

claude import runtime review 3 flags
claude import [options] [source]

Import configuration from another AI coding agent into Claude Code.

--dry-run

Set dry run for this command.

runtime normal
-h, --help

Display help for this command.

runtime normal
--yes

Set yes for this command.

runtime review
Examples claude import codex --dry-run

Source: Claude Code 2.1.307 recursive local help

claude install runtime review 2 flags
claude install [options] [target]

Install or reinstall a selected native Claude Code release.

--force

Set force for this command.

runtime review
-h, --help

Display help for this command.

runtime review
Examples claude install stable

Source: Claude Code 2.1.307 recursive local help

claude mcp runtime normal 1 flags
claude mcp [options] [command]

Configure Model Context Protocol servers.

-h, --help

Display help for this command.

runtime normal
Examples claude mcp list

Source: Claude Code 2.1.307 recursive local help

claude mcp add runtime review 8 flags
claude mcp add [options] <name> <commandOrUrl> [args...]

Add a stdio, SSE, or HTTP MCP server.

--callback-port <port>

Set callback port for this command.

runtime normal
--client-id <clientId>

Set client id for this command.

runtime normal
--client-secret

Set client secret for this command.

runtime review
-e, --env <env>

Set env for this command.

runtime review
-H, --header <header>

Set header for this command.

runtime review
-h, --help

Display help for this command.

runtime normal
-s, --scope <scope>

Set scope for this command.

runtime review
-t, --transport <transport>

Set transport for this command.

runtime normal
Examples claude mcp add --transport http sentry https://mcp.sentry.dev/mcp

Source: Claude Code 2.1.307 recursive local help

claude mcp add-from-claude-desktop runtime review 2 flags
claude mcp add-from-claude-desktop [options]

Import MCP servers from Claude Desktop on supported systems.

-h, --help

Display help for this command.

runtime normal
-s, --scope <scope>

Set scope for this command.

runtime review
Examples claude mcp add-from-claude-desktop --scope user

Source: Claude Code 2.1.307 recursive local help

claude mcp add-json runtime review 3 flags
claude mcp add-json [options] <name> <json>

Add an MCP server from a JSON configuration object.

--client-secret

Set client secret for this command.

runtime review
-h, --help

Display help for this command.

runtime normal
-s, --scope <scope>

Set scope for this command.

runtime review
Examples claude mcp add-json calendar '{"type":"http","url":"https://example.com/mcp"}'

Source: Claude Code 2.1.307 recursive local help

claude mcp get runtime normal 1 flags
claude mcp get [options] <name>

Inspect one configured MCP server and its approval state.

-h, --help

Display help for this command.

runtime normal
Examples claude mcp get sentry

Source: Claude Code 2.1.307 recursive local help

claude mcp list runtime normal 1 flags
claude mcp list [options]

List configured MCP servers and health-check approved servers.

-h, --help

Display help for this command.

runtime normal
Examples claude mcp list

Source: Claude Code 2.1.307 recursive local help

claude mcp login runtime review 2 flags
claude mcp login [options] <name>

Run the OAuth flow for a configured remote MCP server.

-h, --help

Display help for this command.

runtime review
--no-browser

Set no browser for this command.

runtime review
Examples claude mcp login sentry --no-browser

Source: Claude Code 2.1.307 recursive local help

claude mcp logout runtime review 1 flags
claude mcp logout [options] <name>

Clear stored OAuth credentials for an MCP server.

-h, --help

Display help for this command.

runtime review
Examples claude mcp logout sentry

Source: Claude Code 2.1.307 recursive local help

claude mcp remove runtime review 2 flags
claude mcp remove [options] <name>

Remove an MCP server from a selected configuration scope.

-h, --help

Display help for this command.

runtime review
-s, --scope <scope>

Set scope for this command.

runtime review
Examples claude mcp remove sentry --scope user

Source: Claude Code 2.1.307 recursive local help

claude mcp reset-project-choices runtime normal 1 flags
claude mcp reset-project-choices [options]

Reset approvals and rejections for project .mcp.json servers.

-h, --help

Display help for this command.

runtime review
Examples claude mcp reset-project-choices

Source: Claude Code 2.1.307 recursive local help

claude mcp serve runtime review 3 flags
claude mcp serve [options]

Expose Claude Code tools as a local stdio MCP server.

-d, --debug

Set debug for this command.

runtime normal
-h, --help

Display help for this command.

runtime normal
--verbose

Set verbose for this command.

runtime normal
Examples claude mcp serve

Source: Claude Code 2.1.307 recursive local help

claude plugin runtime normal 1 flags
claude plugin|plugins [options] [command]

Manage Claude Code plugins and marketplaces.

Aliases: plugins
-h, --help

Display help for this command.

runtime normal
Examples claude plugin list

Source: Claude Code 2.1.307 recursive local help

claude plugin configure runtime review 3 flags
claude plugin configure [options] <plugin>

Show a plugin's options and which are unset, or save values from stdin.

-h, --help

Display help for this command.

runtime normal
--json

Set json for this command.

runtime normal
--values-stdin

Set values stdin for this command.

runtime normal
Examples claude plugin configure example --json

Source: Claude Code 2.1.307 recursive local help

claude plugin details runtime normal 1 flags
claude plugin details [options] <name>

Show a plugin component inventory and projected token cost.

-h, --help

Display help for this command.

runtime normal
Examples claude plugin details code-review

Source: Claude Code 2.1.307 recursive local help

claude plugin disable runtime review 4 flags
claude plugin disable [options] [plugin]

Disable one or all enabled plugins at a scope.

-a, --all

Set all for this command.

runtime normal
-h, --help

Display help for this command.

runtime normal
--json

Set json for this command.

runtime normal
-s, --scope <scope>

Set scope for this command.

runtime review
Examples claude plugin disable code-review --scope project

Source: Claude Code 2.1.307 recursive local help

claude plugin enable runtime review 3 flags
claude plugin enable [options] <plugin>

Enable a disabled plugin at a scope.

-h, --help

Display help for this command.

runtime normal
--json

Set json for this command.

runtime normal
-s, --scope <scope>

Set scope for this command.

runtime review
Examples claude plugin enable code-review --scope project

Source: Claude Code 2.1.307 recursive local help

claude plugin eval runtime review 25 flags
claude plugin eval [options] [command] [target]

Run scored evaluation cases against a plugin.

--ablation <mode>

Set ablation for this command.

runtime normal
--allow-real-servers

Set allow real servers for this command.

runtime normal
--allow-tools <tools>

Set allow tools for this command.

runtime normal
--case <glob>

Set case for this command.

runtime normal
-j, --concurrency <n>

Set concurrency for this command.

runtime normal
--disallow-tools <tools>

Set disallow tools for this command.

runtime normal
--eval-dir <dir>

Set eval dir for this command.

runtime normal
-h, --help

Display help for this command.

runtime normal
--json <path>

Set json for this command.

runtime normal
--judge-model <model>

Set judge model for this command.

runtime normal
--keep-temp

Set keep temp for this command.

runtime normal
--max-cost-usd <usd>

Set max cost usd for this command.

runtime normal
--mocks <mode>

Set mocks for this command.

runtime normal
--model <model>

Set model for this command.

runtime normal
--no-publish

Set no publish for this command.

runtime review
--no-scaffold

Set no scaffold for this command.

runtime review
--output-dir <dir>

Set output dir for this command.

runtime normal
--publish-report

Set publish report for this command.

runtime review
--report <path>

Set report for this command.

runtime normal
--runs <n>

Set runs for this command.

runtime normal
--scaffold

Set scaffold for this command.

runtime review
--tag <tag>

Set tag for this command.

runtime normal
--threshold <0..1>

Set threshold for this command.

runtime normal
--trust-plugin

Set trust plugin for this command.

runtime normal
--verbose

Set verbose for this command.

runtime normal
Examples claude plugin eval ./my-plugin --report report.html

Source: Claude Code 2.1.307 recursive local help

claude plugin eval init runtime review 4 flags
claude plugin eval init [options] [name]

Author an eval suite interactively or create a bare case.

--bare

Set bare for this command.

runtime normal
--eval-dir <dir>

Set eval dir for this command.

runtime normal
-h, --help

Display help for this command.

runtime normal
-i, --interactive

Set interactive for this command.

runtime normal
Examples claude plugin eval init --bare regression

Source: Claude Code 2.1.307 recursive local help

claude plugin init runtime review 6 flags
claude plugin init|new [options] <name>

Scaffold a skills-directory plugin.

Aliases: plugin new
--author <name>

Set author for this command.

runtime normal
--author-email <email>

Set author email for this command.

runtime normal
--description <text>

Set description for this command.

runtime normal
-f, --force

Set force for this command.

runtime review
-h, --help

Display help for this command.

runtime normal
--with <components>

Set with for this command.

runtime normal
Examples claude plugin init my-plugin --with commands skills hooks

Source: Claude Code 2.1.307 recursive local help

claude plugin install runtime review 8 flags
claude plugin install|i [options] <plugin>

Install a plugin from a configured marketplace.

Aliases: plugin i
--accept-command <sha256>

Set accept command for this command.

runtime review
--config <key=value>

Set config for this command.

runtime review
-h, --help

Display help for this command.

runtime review
--json

Set json for this command.

runtime review
--marketplace <source>

Set marketplace for this command.

runtime review
--registry <url>

Set registry for this command.

runtime review
-s, --scope <scope>

Set scope for this command.

runtime review
-y, --yes

Set yes for this command.

runtime review
Examples claude plugin install code-review@claude-plugins-official

Source: Claude Code 2.1.307 recursive local help

claude plugin list runtime normal 4 flags
claude plugin list [options]

List installed or marketplace-available plugins.

--available

Set available for this command.

runtime normal
--data-size <plugin>

Set data size for this command.

runtime normal
-h, --help

Display help for this command.

runtime normal
--json

Set json for this command.

runtime normal
Examples claude plugin list --json

Source: Claude Code 2.1.307 recursive local help

claude plugin marketplace runtime normal 1 flags
claude plugin marketplace [options] [command]

Manage plugin marketplace sources.

-h, --help

Display help for this command.

runtime normal
Examples claude plugin marketplace list

Source: Claude Code 2.1.307 recursive local help

claude plugin marketplace add runtime review 5 flags
claude plugin marketplace add [options] <source>

Register a plugin marketplace source.

--claudeai

Set claudeai for this command.

runtime normal
-h, --help

Display help for this command.

runtime normal
--json

Set json for this command.

runtime normal
--scope <scope>

Set scope for this command.

runtime review
--sparse <paths>

Set sparse for this command.

runtime normal
Examples claude plugin marketplace add anthropics/claude-plugins-official

Source: Claude Code 2.1.307 recursive local help

claude plugin marketplace list runtime normal 2 flags
claude plugin marketplace list [options]

List configured plugin marketplaces.

-h, --help

Display help for this command.

runtime normal
--json

Set json for this command.

runtime normal
Examples claude plugin marketplace list --json

Source: Claude Code 2.1.307 recursive local help

claude plugin marketplace remove runtime review 3 flags
claude plugin marketplace remove|rm [options] <name>

Remove a configured plugin marketplace.

Aliases: plugin marketplace rm
-h, --help

Display help for this command.

runtime review
--json

Set json for this command.

runtime review
--scope <scope>

Set scope for this command.

runtime review
Examples claude plugin marketplace remove example

Source: Claude Code 2.1.307 recursive local help

claude plugin marketplace update runtime review 2 flags
claude plugin marketplace update [options] [name]

Refresh one or all configured plugin marketplaces.

-h, --help

Display help for this command.

runtime normal
--json

Set json for this command.

runtime normal
Examples claude plugin marketplace update

Source: Claude Code 2.1.307 recursive local help

claude plugin prune runtime review 4 flags
claude plugin prune|autoremove [options]

Remove auto-installed plugin dependencies no longer needed.

Aliases: plugin autoremove
--dry-run

Set dry run for this command.

runtime normal
-h, --help

Display help for this command.

runtime normal
-s, --scope <scope>

Set scope for this command.

runtime review
-y, --yes

Set yes for this command.

runtime review
Examples claude plugin prune --dry-run

Source: Claude Code 2.1.307 recursive local help

claude plugin tag runtime review 6 flags
claude plugin tag [options] [path]

Validate a plugin version and create an annotated release tag.

--dry-run

Set dry run for this command.

runtime normal
-f, --force

Set force for this command.

runtime review
-h, --help

Display help for this command.

runtime normal
-m, --message <msg>

Set message for this command.

runtime normal
--push

Set push for this command.

runtime review
--remote <name>

Set remote for this command.

runtime normal
Examples claude plugin tag --dry-run

Source: Claude Code 2.1.307 recursive local help

claude plugin test runtime review 1 flags
claude plugin test [dir]

Run a mod's *.test.ts and *.test.tsx files in the mod hook environment.

-h, --help

Display help for this command.

runtime normal
Examples claude plugin test ./my-mod

Source: Claude Code 2.1.307 recursive local help

claude plugin uninstall runtime review 6 flags
claude plugin uninstall|remove [options] <plugin>

Uninstall a plugin and optionally prune dependencies.

Aliases: plugin remove
-h, --help

Display help for this command.

runtime review
--json

Set json for this command.

runtime review
--keep-data

Set keep data for this command.

runtime review
--prune

Set prune for this command.

runtime review
-s, --scope <scope>

Set scope for this command.

runtime review
-y, --yes

Set yes for this command.

runtime review
Examples claude plugin uninstall example --scope user

Source: Claude Code 2.1.307 recursive local help

claude plugin update runtime review 5 flags
claude plugin update [options] <plugin>

Update an installed plugin.

--accept-command <sha256>

Set accept command for this command.

runtime normal
-h, --help

Display help for this command.

runtime normal
--json

Set json for this command.

runtime normal
-s, --scope <scope>

Set scope for this command.

runtime review
-y, --yes

Set yes for this command.

runtime review
Examples claude plugin update example

Source: Claude Code 2.1.307 recursive local help

claude plugin validate runtime normal 4 flags
claude plugin validate [options] <path>

Validate plugin structure and metadata.

-h, --help

Display help for this command.

runtime normal
--json

Set json for this command.

runtime normal
--profile <name>

Set profile for this command.

runtime normal
--strict

Set strict for this command.

runtime normal
Examples claude plugin validate ./my-plugin --strict

Source: Claude Code 2.1.307 recursive local help

claude purge runtime high risk 5 flags
claude purge [options] [path]

Delete Claude Code state for one project or, with --all, every project.

--all

Set all for this command.

runtime high risk
--dry-run

Set dry run for this command.

runtime high risk
-h, --help

Display help for this command.

runtime high risk
-i, --interactive

Set interactive for this command.

runtime high risk
-y, --yes

Set yes for this command.

runtime high risk
Examples claude purge ~/work/repo --dry-run

Source: Claude Code 2.1.307 recursive local help

claude setup-token runtime review 1 flags
claude setup-token [options]

Generate a long-lived OAuth token for CI and scripts.

-h, --help

Display help for this command.

runtime normal
Examples claude setup-token

Source: Claude Code 2.1.307 recursive local help

claude ultrareview runtime review 5 flags
claude ultrareview [options] [target]

Run a cloud-hosted multi-agent code review and print the findings.

-h, --help

Display help for this command.

runtime normal
--json

Set json for this command.

runtime normal
--no-post

Set no post for this command.

runtime normal
--post

Set post for this command.

runtime normal
--timeout <minutes>

Set timeout for this command.

runtime normal
Examples claude ultrareview 1234 --json

Source: Claude Code 2.1.307 recursive local help

claude update runtime review 1 flags
claude update|upgrade [options]

Check for and install Claude Code updates.

Aliases: upgrade
-h, --help

Display help for this command.

runtime normal
Examples claude update

Source: Claude Code 2.1.307 recursive local help

claude attach runtime review 0 flags
claude attach <id|name>

Open a background session in this terminal by short id or part of its name.

No command-specific flags.

Source: Claude Code 2.1.307 recursive local help · Official Claude Code CLI reference

claude daemon runtime normal 3 flags
claude daemon [subcommand] [options]

Inspect and manage the on-demand background-session supervisor.

--json-path <path>

Set json path for this command.

runtime normal
--log-file <path>

Set log file for this command.

runtime normal
-h, --help

Display help for this command.

runtime normal

Source: Claude Code 2.1.307 recursive local help · Official Claude Code CLI reference

claude daemon run runtime review 3 flags
claude daemon run [json-path]

Run the background-session supervisor in the foreground.

--json-path <path>

Set json path for this command.

runtime normal
--log-file <path>

Set log file for this command.

runtime normal
-h, --help

Display help for this command.

runtime normal

Source: Claude Code 2.1.307 recursive local help · Official Claude Code CLI reference

claude daemon status runtime normal 1 flags
claude daemon status

Show supervisor process, version, uptime, and workers.

-h, --help

Display help for this command.

runtime normal

Source: Claude Code 2.1.307 recursive local help · Official Claude Code CLI reference

claude daemon logs runtime normal 1 flags
claude daemon logs

Tail the supervisor log until interrupted.

-h, --help

Display help for this command.

runtime normal

Source: Claude Code 2.1.307 recursive local help · Official Claude Code CLI reference

claude daemon uninstall runtime review 1 flags
claude daemon uninstall

Remove a previously installed background service where supported.

-h, --help

Display help for this command.

runtime review

Source: Claude Code 2.1.307 recursive local help · Official Claude Code CLI reference

claude daemon stop runtime review 3 flags
claude daemon stop [options]

Stop the supervisor and its background sessions.

--any

Set any for this command.

runtime normal
--keep-workers

Set keep workers for this command.

runtime normal
-h, --help

Display help for this command.

runtime normal

Source: Claude Code 2.1.307 recursive local help · Official Claude Code CLI reference

claude logs runtime normal 0 flags
claude logs <id|name>

Print recent terminal output for a background session by id or name.

No command-specific flags.

Source: Claude Code 2.1.307 recursive local help · Official Claude Code CLI reference

claude respawn runtime review 1 flags
claude respawn <id>|--all

Restart a background session with its conversation intact.

--all

Set all for this command.

runtime normal

Source: Claude Code 2.1.307 recursive local help · Official Claude Code CLI reference

claude rm runtime review 2 flags
claude rm <id> [--discard-unpushed <commit>@<worktree-id>] [--force-remove-worktree <worktree-id>]

Delete a background session, and its worktree when that is safe, while retaining its transcript.

--discard-unpushed, -id <commit>

Set discard unpushed for this command.

runtime review
--force-remove-worktree, -id <worktree-id>

Set force remove worktree for this command.

runtime review

Source: Claude Code 2.1.307 recursive local help · Official Claude Code CLI reference

claude stop runtime review 0 flags
claude stop <id>

Stop a background session while retaining its conversation.

Aliases: kill

No command-specific flags.

Source: Claude Code 2.1.307 recursive local help · Official Claude Code CLI reference

claude remote-control runtime review 15 flags
claude remote-control [options]

Run a Remote Control server for claude.ai/code and the Claude mobile app without a local interactive session.

--name <name>

Set name for this command.

runtime normal
--remote-control-session-name-prefix <prefix>

Set remote control session name prefix for this command.

runtime normal
-c, --continue

Set continue for this command.

runtime normal
--session-id <id>

Set session id for this command.

runtime normal
--permission-mode <mode>

Set permission mode for this command.

runtime normal
--chrome

Set chrome for this command.

runtime normal
--no-chrome

Set no chrome for this command.

runtime normal
-d, --debug <filter>

Set debug for this command.

runtime normal
--debug-file <path>

Set debug file for this command.

runtime normal
-v, --verbose

Set verbose for this command.

runtime normal
-h, --help

Display help for this command.

runtime normal
--spawn <mode>

Set spawn for this command.

runtime normal
--capacity <N>

Set capacity for this command.

runtime normal
--create-session-in-dir

Set create session in dir for this command.

runtime normal
--no-create-session-in-dir

Set no create session in dir for this command.

runtime normal
Examples claude remote-control --name "My Project" --spawn worktree

Source: Claude Code 2.1.307 recursive local help · Official Claude Code CLI reference

claude self-hosted-runner runtime review 36 flags
claude self-hosted-runner [options]

Run a self-hosted environment runner that executes cloud sessions on your own infrastructure.

--api-url <url>

Set api url for this command.

runtime normal
--environment-secret-file <path>

Set environment secret file for this command.

runtime review
--lock-to-account <id>

Set lock to account for this command.

runtime normal
--client-label <label>

Set client label for this command.

runtime normal
--proxy-authorization-command <shell command>

Set proxy authorization command for this command.

runtime normal
--proxy-authorization-file <path>

Set proxy authorization file for this command.

runtime normal
--capacity <n>

Set capacity for this command.

runtime normal
--base-dir <path>

Set base dir for this command.

runtime normal
--exec-path <path>

Set exec path for this command.

runtime normal
--hooks-dir <path>

Set hooks dir for this command.

runtime normal
--session-stop-grace-sec <n>

Set session stop grace sec for this command.

runtime normal
--post-session-hook-timeout-sec <n>

Set post session hook timeout sec for this command.

runtime normal
--drain-wait-sec <n>

Set drain wait sec for this command.

runtime normal
--drain-marker-file <path>

Set drain marker file for this command.

runtime normal
--git-ssh-rewrite <host>

Set git ssh rewrite for this command.

runtime normal
--git-host-rewrite <from=to>

Set git host rewrite for this command.

runtime normal
--use-anthropic-git-proxy

Set use anthropic git proxy for this command.

runtime normal
--configure-git

Set configure git for this command.

runtime normal
--push-outcome-on-release

Set push outcome on release for this command.

runtime review
--trust-workspace <bool>

Set trust workspace for this command.

runtime normal
--remove-session-state <bool>

Set remove session state for this command.

runtime review
--confine-repo-settings <mode>

Set confine repo settings for this command.

runtime normal
--server-auto-mode-lists <mode>

Set server auto mode lists for this command.

runtime normal
--host-config-snapshot <disk|memory>

Set host config snapshot for this command.

runtime normal
--health-port <port>

Set health port for this command.

runtime normal
--log-level <level>

Set log level for this command.

runtime normal
--log-file <path>

Set log file for this command.

runtime normal
--exit-if-unused-min <n>

Set exit if unused min for this command.

runtime normal
--drain-grace-sec <n>

Set drain grace sec for this command.

runtime normal
--retire-at, -seconds <epoch-seconds>

Set retire at for this command.

runtime normal
--defer-shutdown-max-min <m>

Set defer shutdown max min for this command.

runtime normal
--release-idle-session-min <n>

Set release idle session min for this command.

runtime normal
--startup-timeout-min <n>

Set startup timeout min for this command.

runtime normal
--kill-session-after-min <n>

Set kill session after min for this command.

runtime normal
--debug-token-dir <path>

Set debug token dir for this command.

runtime normal
-h, --help

Display help for this command.

runtime normal
Examples claude self-hosted-runner --environment-secret-file ./runner.secret --capacity 2

Source: Claude Code 2.1.307 recursive local help · Official Claude Code CLI reference

02

Interactive commands

Commands typed at the beginning of a Claude Code session. Platform, plan, and environment restrictions remain explicit.

/add-dir docs

Add a working directory for file access during the current session.

Source: Official Claude Code commands reference
/advisor conditional

Enable or disable the advisor tool, which consults a second model for guidance at key moments during a task.

Source: Official Claude Code commands reference
/agents docs

Print a reminder to ask Claude to create or manage subagents, or to edit `.claude/agents/` or `~/.claude/agents/` directly.

Source: Official Claude Code commands reference
/artifact-capabilities conditional

Load the reference for the runtime capabilities a published artifact can use, such as calling your connectors or offering a file download, including which ones your account has.

Source: Official Claude Code commands reference
/artifact-diagramming conditional

Load diagramming guidance for Claude to follow in artifacts: when a diagram helps, what to draw, and how to write inline SVG that stays legible in light and dark themes.

Source: Official Claude Code commands reference
/artifacts conditional

List the artifacts you own or that are shared with you, then attach one to the session, open it in your browser, or copy its link.

Source: Official Claude Code commands reference
/auto-mode-setup conditional

Draft `autoMode.environment` entries from your project and recent sessions, then review the draft and save it to your user settings.

Source: Official Claude Code commands reference
/autocompact docs

Set the auto-compact window: how full the context window gets before Claude Code compacts automatically.

Source: Official Claude Code commands reference
/autofix-pr conditional

Spawn a cloud session that watches the current branch's PR and pushes fixes when CI fails or reviewers leave comments.

Source: Official Claude Code commands reference
/background conditional

Detach the current session to run as a background agent and free this terminal.

Aliases: /bg Source: Official Claude Code commands reference
/batch docs

Orchestrate large-scale changes across a codebase in parallel.

Source: Official Claude Code commands reference
/branch docs

Create a branch of the current conversation at this point, so you can try a different direction without losing the conversation as it stands.

Source: Official Claude Code commands reference
/btw docs

Ask a side question about the current session without adding to the conversation.

Source: Official Claude Code commands reference
/bug docs

Report a bug or share your conversation.

Aliases: /share Source: Official Claude Code commands reference
/cd docs

Move this session to a new working directory, keeping the conversation.

Source: Official Claude Code commands reference
/chrome conditional

Configure Claude in Chrome settings

Source: Official Claude Code commands reference
/claude-api conditional

Load Claude API and Managed Agents reference material for your project's language.

Source: Official Claude Code commands reference
/claude-in-chrome conditional

Have Claude carry out a task in your browser, such as testing a page, filling a form, or reading console logs, through Claude in Chrome.

Source: Official Claude Code commands reference
/clear docs

Start a new conversation with empty context.

Aliases: /reset, /new Source: Official Claude Code commands reference
/code-review docs

Review the current diff, or a PR number, branch, or path you pass, for correctness bugs.

Aliases: /review Source: Official Claude Code commands reference
/color docs

Set the prompt bar color for the current session.

Source: Official Claude Code commands reference
/compact docs

Free up context by summarizing the conversation so far.

Source: Official Claude Code commands reference
/config docs

Open the Settings interface to adjust theme, model, output style, and other preferences.

Aliases: /settings Source: Official Claude Code commands reference
/context docs

Visualize current context usage as a colored grid.

Source: Official Claude Code commands reference
/copy docs

Copy the last assistant response to clipboard.

Source: Official Claude Code commands reference
/cost docs

Alias for `/usage`

Source: Official Claude Code commands reference
/dataviz conditional

Design guidance for charts, graphs, and dashboards.

Source: Official Claude Code commands reference
/debug docs

Enable debug logging for the current session and troubleshoot issues by reading the session debug log.

Source: Official Claude Code commands reference
/deep-research conditional

Fan out web searches on a question, fetch and cross-check sources, and synthesize a cited report

Source: Official Claude Code commands reference
/design conditional

Draft UI mockups, screen flows, landing pages, or posters as artboards on one canvas, published as a Claude Design artifact, for example `/design a settings screen for a mobile banking app`.

Source: Official Claude Code commands reference
/design-login conditional

Authorize design-system access for `/design-sync` with your claude.ai account.

Source: Official Claude Code commands reference
/design-sync conditional

Convert your repo's React design system and upload it to Claude Design, so designs it produces use your real components.

Source: Official Claude Code commands reference
/desktop conditional

Continue the current session in the Claude Code Desktop app.

Aliases: /app Source: Official Claude Code commands reference
/diff docs

Review the changes in your working tree, including the edits Claude has made so far.

Source: Official Claude Code commands reference
/doctor docs

Run a setup checkup that diagnoses installation, settings, extension, and `CLAUDE.md` problems and proposes fixes that Claude applies after you confirm.

Aliases: /checkup Source: Official Claude Code commands reference
/effort docs

Set the effort level: `low` to `xhigh`, `max`, or `auto`; `status` prints it.

Source: Official Claude Code commands reference
/exit docs

Exit the CLI.

Aliases: /quit Source: Official Claude Code commands reference
/export docs

Export the current conversation as plain text.

Source: Official Claude Code commands reference
/fast conditional

Toggle fast mode on or off.

Source: Official Claude Code commands reference
/feedback docs

Send product feedback about Claude Code.

Source: Official Claude Code commands reference
/fewer-permission-prompts docs

Scan your transcripts for common read-only Bash and MCP tool calls, then add a prioritized allowlist to project `.claude/settings.json` to reduce permission prompts

Source: Official Claude Code commands reference
/focus conditional

Toggle the focus view, which shows only your last prompt, a one-line tool-call summary with edit diffstats, and the final response.

Source: Official Claude Code commands reference
/fork docs

Copy the current conversation into a new background session and keep working here.

Source: Official Claude Code commands reference
/goal docs

Set a goal: Claude keeps working across turns until the condition is met or the goal clears for another reason.

Source: Official Claude Code commands reference
/heapdump docs

Write a JavaScript heap snapshot and a memory breakdown to `~/Desktop`, or your home directory on Linux without a Desktop folder, for diagnosing high memory usage.

Source: Official Claude Code commands reference
/help docs

Show help and available commands

Source: Official Claude Code commands reference
/hooks docs

View hook configurations

Source: Official Claude Code commands reference
/ide docs

Manage IDE integrations and show status

Source: Official Claude Code commands reference
/import docs

Bring configuration from OpenAI Codex, Google Gemini CLI, or Cursor on your machine into Claude Code, including instruction files, MCP servers, commands, subagents, and skills.

Source: Official Claude Code commands reference
/init docs

Initialize project with a `CLAUDE.md` guide.

Source: Official Claude Code commands reference
/insights docs

Generate an HTML report analyzing your recent sessions on this machine: which projects you work in, how you use Claude Code, where things go wrong, and features to try.

Source: Official Claude Code commands reference
/install-github-app conditional

Install the Claude GitHub App for a repository, with an optional step to set up GitHub Actions workflows and secrets.

Source: Official Claude Code commands reference
/install-slack-app conditional

Install the Claude Slack app.

Source: Official Claude Code commands reference
/keybindings docs

Open your keyboard shortcuts file

Source: Official Claude Code commands reference
/list-agents docs

List the subagents, agent team teammates, and other Claude Code sessions Claude can message, with the name to use for each.

Source: Official Claude Code commands reference
/login docs

Sign in to your Anthropic account

Source: Official Claude Code commands reference
/logout docs

Sign out from your Anthropic account

Source: Official Claude Code commands reference
/loop docs

Run a prompt repeatedly while the session stays open.

Aliases: /proactive Source: Official Claude Code commands reference
/mcp docs

Manage MCP server connections and OAuth authentication.

Source: Official Claude Code commands reference
/memory docs

Edit `CLAUDE.md` files, enable or disable auto memory, and view auto memory entries

Source: Official Claude Code commands reference
/mobile conditional

Show QR code to download the Claude mobile app.

Aliases: /ios, /android Source: Official Claude Code commands reference
/model docs

Switch the AI model and save it as your default for new sessions.

Source: Official Claude Code commands reference
/output-style docs

List output styles or switch to one, for example `/output-style concise`.

Source: Official Claude Code commands reference
/passes docs

Share a free week of Claude Code with friends.

Source: Official Claude Code commands reference
/permissions docs

Manage allow, ask, and deny rules for tool permissions.

Aliases: /allowed-tools Source: Official Claude Code commands reference
/plan docs

Enter plan mode directly from the prompt.

Source: Official Claude Code commands reference
/plugin docs

Manage Claude Code plugins.

Source: Official Claude Code commands reference
/plugin-authoring docs

Load the reference Claude works from to write a mod.

Source: Official Claude Code commands reference
/powerup docs

Discover Claude Code features through quick interactive lessons with animated demos

Source: Official Claude Code commands reference
/pr-comments historical

Removed in v2.1.91.

Source: Official Claude Code commands reference
/privacy-settings conditional

View and update your privacy settings.

Source: Official Claude Code commands reference
/radio conditional

Open Claude FM lo-fi radio in your browser.

Source: Official Claude Code commands reference
/rate-limit-options conditional

Show ways to keep working when a claude.ai usage limit blocks a request: wait and continue automatically when the limit resets, add usage credits, or upgrade your plan.

Source: Official Claude Code commands reference
/recap docs

Generate a one-line summary of the current session on demand.

Source: Official Claude Code commands reference
/release-notes docs

View the changelog in an interactive version picker.

Source: Official Claude Code commands reference
/reload-plugins docs

Reload all active plugins to apply pending changes without restarting.

Source: Official Claude Code commands reference
/reload-skills docs

Re-scan skill and command directories so skills added or changed on disk during the session become available without restarting.

Source: Official Claude Code commands reference
/remote-control conditional

Make this session available for Remote Control from claude.ai.

Aliases: /rc Source: Official Claude Code commands reference
/remote-env conditional

Choose the default cloud environment for cloud sessions you start from the CLI

Source: Official Claude Code commands reference
/rename docs

Rename the current session and show the name on the prompt bar.

Source: Official Claude Code commands reference
/resume docs

Resume a conversation by ID or name, or open the session picker.

Aliases: /continue Source: Official Claude Code commands reference
/review docs

Alias of `/code-review`: reviews the current diff, or a PR number, branch, or path you pass, such as `/review 1234`, and takes the same effort levels and flags.

Source: Official Claude Code commands reference
/rewind docs

Rewind the conversation and/or code to a previous point, or summarize from a selected message.

Aliases: /checkpoint, /undo Source: Official Claude Code commands reference
/run docs

Launch and drive your project's app to see a change working, not only passing tests.

Source: Official Claude Code commands reference
/run-skill-generator docs

Teach `/run` and `/verify` how to build, launch, and drive your project's app from a clean environment by writing a per-project skill

Source: Official Claude Code commands reference
/sandbox docs

Toggle sandbox mode.

Source: Official Claude Code commands reference
/schedule docs

Create, update, list, or run cloud scheduled tasks, formerly routines.

Aliases: /routines Source: Official Claude Code commands reference
/scroll-speed docs

Adjust mouse wheel scroll speed interactively.

Source: Official Claude Code commands reference
/security-review docs

Analyze the changes on your current branch for security vulnerabilities.

Source: Official Claude Code commands reference
/setup-bedrock conditional

Configure Amazon Bedrock authentication, region, and model pins through an interactive wizard.

Source: Official Claude Code commands reference
/setup-vertex conditional

Configure Google Cloud's Agent Platform authentication, project, region, and model pins through an interactive wizard.

Source: Official Claude Code commands reference
/simplify docs

Review the changed code for cleanup opportunities and apply the fixes.

Source: Official Claude Code commands reference
/skill-doctor conditional

Show what each of your skills costs in context and how often it gets used, so you can find skills to turn off.

Source: Official Claude Code commands reference
/skills docs

List available skills.

Source: Official Claude Code commands reference
/slides conditional

Make a new presentation as a Claude Slides artifact filled from your brief, for example `/slides a quarterly review of the platform team`.

Source: Official Claude Code commands reference
/stats docs

Alias for `/usage`.

Source: Official Claude Code commands reference
/status docs

Open the Settings interface on the Status tab, showing version, model, account, and connectivity.

Source: Official Claude Code commands reference
/statusline docs

Configure Claude Code's status line.

Source: Official Claude Code commands reference
/stickers conditional

Order Claude Code stickers

Source: Official Claude Code commands reference
/stop conditional

Stop the background session you're attached to, or the one you send it to as a peek reply; the transcript and any worktree are kept.

Source: Official Claude Code commands reference
/subtask docs

Spawn a forked subagent: a background subagent that inherits the full conversation and works on the task while you keep working.

Source: Official Claude Code commands reference
/tasks docs

View and manage background work in the current session, including subagents that have finished.

Source: Official Claude Code commands reference
/team-onboarding conditional

Generate a team onboarding guide from your Claude Code usage history.

Source: Official Claude Code commands reference
/teleport conditional

Pull a cloud session into this terminal.

Aliases: /tp Source: Official Claude Code commands reference
/terminal-setup conditional

Install a Shift+Enter keybinding for newlines in VS Code, Cursor, Devin Desktop, Alacritty, or Zed.

Source: Official Claude Code commands reference
/theme docs

Change the color theme.

Source: Official Claude Code commands reference
/tui docs

Set the terminal UI renderer and relaunch into it with your conversation intact.

Source: Official Claude Code commands reference
/ultraplan conditional

Removed.

Source: Official Claude Code commands reference
/ultrareview conditional

Run a deep, multi-agent code review in a cloud sandbox with ultrareview.

Source: Official Claude Code commands reference
/update-config docs

Describe a settings change, such as allowing a command, setting an environment variable, or adding a hook, and Claude edits the matching `settings.json` file.

Source: Official Claude Code commands reference
/upgrade conditional

Open the upgrade page in your browser to switch to a higher plan tier.

Source: Official Claude Code commands reference
/usage docs

Show session cost, plan usage limits, and activity stats.

Source: Official Claude Code commands reference
/usage-credits conditional

Configure usage credits, or request them from your admin, when you hit a limit.

Source: Official Claude Code commands reference
/verify docs

Confirm a code change does what it should by building your project's app, running it, and observing the result, rather than relying on tests or type checks.

Source: Official Claude Code commands reference
/vim historical

Removed in v2.1.92.

Source: Official Claude Code commands reference
/voice conditional

Toggle voice dictation, or enable it in a specific mode.

Source: Official Claude Code commands reference
/web-setup conditional

Connect your GitHub account for cloud sessions using your local `gh` CLI credentials

Source: Official Claude Code commands reference
/workflow-authoring conditional

Load the reference for writing dynamic workflow scripts: the script API, resume behavior, quality patterns, and worked examples.

Source: Official Claude Code commands reference
/workflows docs

Open the workflow progress view to watch, pause, resume, or save running and completed workflows

Source: Official Claude Code commands reference
/plugin-dev:create-plugin preview

Run the public plugin-dev asset workflow for creating a Claude Code plugin.

Source: Public Claude Code v2.1.307 plugin assets
03

Settings keys

The union of the official settings table and published top-level JSON Schema keys.

$schema url

Enable editor validation against the published Claude Code settings schema.

docs
advisorModel string

Pick which model answers when Claude asks the advisor tool

docs
agent string

Start every session as a named subagent with its prompt, tools, and model

docs
agentPushNotifEnabled boolean

Let Claude send a push notification to your phone when it decides to

docs
allowAllClaudeAiMcps boolean

Load the claude.ai connectors Claude Code fetches itself alongside a deployed `managed-mcp.json`

docs
allowClaudeInChromeWithManagedMcp boolean

Let the built-in Claude in Chrome server run alongside a deployed `managed-mcp.json`

docs
allowedChannelPlugins array

Replace the default allowlist of channel plugins that can push messages

docs
allowedHttpHookUrls array

Limit which URLs HTTP hooks can target

docs
allowedMcpServers array

Allowlist which MCP servers users can add

docs
allowedProviders array

Limit which API providers a machine may use

docs
allowManagedHooksOnly boolean

Run only the hooks your organization deploys

docs
allowManagedMcpServersOnly boolean

Make the managed MCP allowlist the only one that applies

docs
allowManagedPermissionRulesOnly boolean

Make managed settings the only settings source of permission rules

docs
alwaysThinkingEnabled boolean

Turn extended thinking off for every session

docs
apiKeyHelper string

Generate the API credential with your own command

docs sensitive
appendPlugins array

Run your organization's mods after every mod a user installs

docs
askUserQuestionTimeout string

Let an unanswered question auto-continue after idle time

docs
attribution object

Customize the attribution Claude Code adds to commits and pull requests

docs
attribution.commit string

Change or hide the trailer Claude Code adds to commits

docs
attribution.pr string

Change or hide the attribution line in pull request descriptions

docs
attribution.sessionUrl boolean

Omit the claude.ai session link from cloud and Remote Control commits

docs
autoCompactEnabled boolean

Turn automatic compaction off or on

docs
autoCompactWindow integer

Set the token threshold from 100000 to 1000000 for automatic context compaction.

docs
autoConnectIde boolean

Connect to a running VS Code or JetBrains IDE automatically from an external terminal

docs
autoContinueAtUsageLimit boolean

Wait in the open session and continue the task automatically after a claude.ai usage limit resets

docs
autoInstallIdeExtension boolean

Turn off automatic install of the IDE extension from a VS Code terminal

docs
autoMemoryDirectory string

Store auto memory in a directory you choose

docs
autoMemoryEnabled boolean

Turn auto memory off or on

docs
autoMode object

Customize automatic permission-mode classification rules.

docs
autoMode.classifyAllShell boolean

Send every shell command through the auto mode classifier, even ones a narrow allow rule matches

docs
autoScrollEnabled boolean

Follow new output to the bottom in fullscreen rendering

docs
autoUpdatesChannel string

Follow the stable release channel instead of latest

docs
availableModels array

Restrict which models people can pick

docs
availableModelsMatch enum

Make each `availableModels` model ID entry permit only the version it names

docs
awaySummaryEnabled boolean

Turn off the session recap shown when you come back to the terminal

docs
awsAuthRefresh string

Refresh expired Bedrock credentials in `.aws` with your own command

docs sensitive
awsCredentialExport string

Supply Bedrock credentials as JSON from your own command

docs sensitive
axScreenReader boolean

Render screen-reader friendly output

docs
bashEditDiffEnabled boolean

Record the files that changed while a Bash command ran in every permission mode

docs
bashOutputMaxChars number

Set how much of a successful command's output Claude receives inline

docs
blockedMarketplaces array

Block plugin marketplace sources for your organization

docs
browserExternalPageTools string

Keep Claude's tools off external pages in the desktop Browser pane

docs
channelsEnabled boolean

Allow channels for your organization

docs
claudeInChromeDefaultEnabled boolean

Turn on Chrome integration when a session starts, in the interactive CLI and the VS Code extension

docs
claudeMd string

Inject organization-wide CLAUDE.md instructions from managed settings

docs
claudeMdExcludes array

Skip specific CLAUDE.md files when memory loads

docs
cleanupPeriodDays integer

Choose how many days Claude Code keeps transcripts before deleting them

docs
companyAnnouncements array

Show your organization's announcements at startup

docs
copyFullResponse boolean

Make `/copy` copy the full response without showing the picker

docs
copyOnSelect boolean

Turn off automatic copying of text you select with the mouse in fullscreen rendering and agent view

docs
crossSessionInbound enum

Choose whether inbound cross-session messages are accepted, held for approval, or refused.

docs
defaultShell string

Choose whether Bash or PowerShell runs the shell commands you type with the `!` prefix

docs
defaultToAgentsView boolean

Open agent view instead of a new conversation when you run `claude` with no arguments

docs
deniedMcpServers array

Block specific MCP servers by URL, command, or name

docs
deniedModels array

Block specific models, even ones `availableModels` permits

docs
desktopSessionCleanupPeriodDays number

Set an age limit in days for Claude Desktop and Cowork transcripts

docs
dialogExpiry enum

Set the expiry for dialogs forwarded to Remote Control or SDK hosts.

docs
diffTool string

Choose whether Claude's proposed file changes open in the VS Code or JetBrains diff viewer or stay in the terminal

docs
disableAgentView boolean

Turn off background agents and agent view

docs
disableAllHooks boolean

Turn off hooks, a custom status line, and a custom `@` file suggestion command at once

docs
disableArtifact boolean

Deprecated; use `enableArtifact` to turn the Artifact tool off

docs
disableAutoMode string

Remove auto mode from the permission mode cycle

docs
disableBrowserExternalNavigation boolean

Limit the desktop Browser pane to localhost for people and Claude

docs
disableBundledSkills boolean

Turn off the skills and workflows included with Claude Code

docs
disableClaudeAiConnectors boolean

Turn off claude.ai connectors so Claude Code doesn't fetch them

docs
disableCommandPluginSources boolean

Block plugins that install by running a marketplace-declared command

docs
disableDeepLinkRegistration string

Stop Claude Code from registering the `claude-cli://` handler

docs
disableDesktopLocalSessions boolean

Turn off Desktop Code sessions that run on the device, leaving SSH to other hosts and cloud

docs
disabledMcpjsonServers array

Reject specific servers from a project's `.mcp.json`

docs
disableMobileSimulatorTools boolean

Block Claude's tools in the desktop iOS Simulator pane

docs
disableRemoteControl boolean

Turn off Remote Control everywhere it can start

docs
disableSideloadFlags boolean

Reject the CLI flags that sideload plugins, subagents, and MCP servers

docs
disableSkillShellExecution boolean

Stop skills and custom commands from running inline shell

docs
disableWorkflows boolean

Turn dynamic workflows off for everyone; use `enableWorkflows` for yourself

docs
editorMode string

Use vim key bindings in the input prompt

docs
effortLevel string

Set the default reasoning effort level.

docs
emojiCompletionEnabled boolean

Turn off `:shortcode:` emoji suggestions and replacement in the prompt input

docs
enableAllProjectMcpServers boolean

Approve every server in project `.mcp.json` files without a prompt

docs
enableArtifact boolean

Turn the Artifact tool off with a `false` in any file; no file can turn it back on

docs
enabledMcpjsonServers array

Approve specific servers from a project's `.mcp.json`

docs
enabledPlugins object

Enable or disable plugins by their plugin@marketplace identifier.

docs
enableWorkflows boolean

Turn dynamic workflows on or off against your plan's default

docs
enforceAvailableModels boolean

Keep the `/model` Default choice inside your `availableModels` allowlist

docs
env object

Set environment variables for every Claude Code session; values can contain secrets.

docs sensitive
externalEditorContext boolean

Show Claude's last response as comments when you press Ctrl+G to edit

docs
extraKnownMarketplaces object

Declare additional plugin marketplaces in team settings.

docs
fallbackModel array

Name backup models for when the primary is overloaded

docs
fastMode boolean

Turn fast mode on for sessions where it's available

docs
fastModePerSessionOptIn boolean

Require people to turn fast mode on each session

docs
feedbackDrafts enum

Control whether Claude queues feedback drafts for you to review

docs
feedbackSurveyRate number

Change how often the session quality survey appears

docs
fileCheckpointingEnabled boolean

Turn off or on the file snapshots that `/rewind` restores

docs
fileSuggestion object

Supply `@` file autocomplete from your own command

docs
footerLinksRegexes array

Make issue or review IDs in output into clickable links below the input box

docs
forceLoginGatewayUrl string

Set the gateway URL the login screen connects to

docs
forceLoginMethod string

Restrict login to claude.ai, Claude Console, or a cloud gateway

docs
forceLoginOrgUUID object

Pin claude.ai logins to your organization; only a managed source enforces it

docs
forceRemoteSettingsRefresh boolean

Block startup until server-managed settings are freshly fetched

docs
gatewayInternalNetworks array

Let `/login` reach a cloud gateway on public IPv4 space your organization uses internally

docs
gcpAuthRefresh string

Refresh Google Cloud credentials with your own command

docs sensitive
hooks object

Register shell, prompt, agent, or HTTP handlers for Claude Code lifecycle events.

docs
httpHookAllowedEnvVars array

Limit which env vars HTTP hooks can put in headers

docs sensitive
idleCompaction boolean

Stop Claude Code from compacting a long conversation while your terminal session is idle

docs
includeCoAuthoredBy boolean

Deprecated; use `attribution` to hide or change commit and PR attribution

docs sensitive
includeGitInstructions boolean

Remove the built-in commit and PR instructions from Claude's context

docs
inputNeededNotifEnabled boolean

Get a push notification when Claude is waiting on you

docs
isolatePeerMachines boolean

Require approval before a reply reaches a Claude Code session on another machine.

docs
keybindingFlavor string

Deprecated and has no effect; the word-editing shortcuts always follow readline conventions

docs
language string

Have Claude respond in a language other than English

docs
leftArrowOpensAgents boolean

Turn off the `←` shortcut that backgrounds the session and opens agent view

docs
managedMcpServers array

Provide remote MCP servers to every user alongside the ones they add

docs
managedSourcesBehavior enum

Compose every managed source you deploy instead of using the highest-priority one alone

docs
maxEffortLevel enum

Cap the effort level for every model or per model, on every provider

docs
maxProseWidth number

Cap how wide the prose in Claude's responses runs in a wide terminal

docs
minimumVersion string

Keep auto-updates from installing anything below a version

docs
model string

Set the default Claude model alias or full model ID.

docs
modelOverrides object

Map model IDs to your provider's IDs, such as Bedrock ARNs

docs
modelPicker object

Choose which models the `/model` picker lists, in your own order and with your own labels

docs
modelPricing object

Report spend at your organization's contracted rates instead of list price

docs
modelSettings object

Keep a saved effort level or auto-compact window per model, or cap one model's effort

docs
otelHeadersHelper string

Generate rotating OpenTelemetry headers with your own command

docs sensitive
outputStyle string

Change Claude's role, tone, and output format with an output style

docs
parentSettingsBehavior string

Apply or drop restrictions an SDK or IDE host passes when you deploy managed settings

docs
permissionExplainerEnabled boolean

Removed in v2.1.257, together with the `Ctrl+E` command explanation on shell permission prompts

historical
permissions object

Define allow, ask, deny, additional-directory, and permission-mode policy.

docs
permissions.additionalDirectories array

Give Claude file access to directories outside the current one

docs
permissions.allow array

Approve listed tool uses without a prompt

docs
permissions.ask array

Always prompt before listed tool uses

docs
permissions.blockReadsOutsideWorkingDirectories boolean

Make the file tools refuse reads outside the working directories in every permission mode

docs
permissions.defaultMode enum

Set the permission mode new sessions start in

docs
permissions.deny array

Block listed tool uses, including reads of files that hold secrets

docs
permissions.disableBypassPermissionsMode string

Prevent anyone from entering bypassPermissions mode

docs
plansDirectory string

Choose where plan mode writes plan files

docs
pluginConfigs object

Store the answers you gave a plugin's configuration dialog

docs
pluginSuggestionMarketplaces array

Choose which marketplaces can surface plugin install suggestions in `/plugin`

docs
pluginTrustMessage string

Add your own text to the plugin trust warning

docs
policyHelper object

Run an executable that computes managed settings at startup

docs
policyHelper.path string

Name the helper executable Claude Code runs

docs
policyHelper.refreshIntervalMs integer

Re-run the helper in the background on an interval

docs
policyHelper.timeoutMs integer

Set how long Claude Code waits for the helper

docs
preferredNotifChannel string

Choose a terminal bell or desktop notification for task completion

docs
prefersReducedMotion boolean

Reduce or turn off spinner, shimmer, and flash animations

docs
prependPlugins array

Run your organization's mods before every mod a user installs

docs
processWrapper string

Run Claude Code's background processes through a corporate launcher on macOS and Linux

docs
promptCacheTtl enum

Choose the prompt cache lifetime for the main conversation

docs
promptSuggestionEnabled boolean

Show or hide predicted next-prompt suggestions in the input box.

docs
prStatusFooterEnabled boolean

Turn off the prompt footer's PR review status badge and the pull request check behind it

docs
prUrlTemplate string

Point PR links at an internal code-review tool instead of github.com

docs
remote.defaultEnvironmentId string

Pick the default cloud environment for `claude --cloud`; a self-hosted `ccpool_` ID is read only from user and managed settings and `--settings`

docs sensitive
remoteControlAtStartup boolean

Connect Remote Control automatically when a session starts

docs
requireCoworkFullVmSandbox boolean

Configure Claude Code's requireCoworkFullVmSandbox setting.

docs
requiredMaximumVersion string

Refuse to start on a version newer than your organization allows

docs
requiredMinimumVersion string

Refuse to start on a version older than your organization requires

docs
respectGitignore boolean

Keep gitignored files out of the `@` file picker

docs
respondToBashCommands boolean

Stop Claude from responding after a `!` shell command runs

docs
sandbox object

Configure filesystem, network, credential, and command sandbox policy.

docs
sandbox.allowAppleEvents boolean

Let sandboxed commands send Apple Events on macOS

docs
sandbox.allowUnsandboxedCommands boolean

Let Claude retry a blocked command outside the sandbox, or forbid it

docs
sandbox.autoAllowBashIfSandboxed boolean

Run sandboxed commands without a permission prompt

docs
sandbox.bwrapPath string

Point the sandbox at a bubblewrap binary outside `PATH`

docs
sandbox.credentials object

Hide or mask credential files and variables inside the sandbox

docs sensitive
sandbox.credentials.allowPlaintextInject boolean

Let masked credentials reach plain HTTP services on trusted test networks

docs sensitive
sandbox.credentials.awsPairs array

Link custom-named AWS key variables into one credential for re-signing

docs sensitive
sandbox.credentials.envVars array

Unset or mask an environment variable inside the sandbox

docs sensitive
sandbox.credentials.files array

Block or mask reads of a credential file inside the sandbox

docs sensitive
sandbox.credentials.sigv4 object

Choose whether streaming, presigned, or SigV4A AWS requests fail or pass through

docs sensitive
sandbox.enabled boolean

Turn on Bash sandboxing on macOS, Linux, and WSL2

docs
sandbox.enableWeakerNestedSandbox boolean

Run the Linux sandbox inside an unprivileged container

docs
sandbox.enableWeakerNetworkIsolation boolean

Let `gh`, `gcloud`, and `terraform` verify TLS behind a MITM proxy inside the sandbox on macOS

docs
sandbox.excludedCommands array

Name commands Claude Code can run outside the sandbox

docs
sandbox.failIfUnavailable boolean

Refuse to start when the sandbox can't, instead of running unsandboxed

docs
sandbox.filesystem object

Control which paths sandboxed commands can read and write

docs
sandbox.filesystem.allowManagedReadPathsOnly boolean

Stop developers from re-opening read paths your organization blocked

docs
sandbox.filesystem.allowRead array

Re-open reading inside a region `denyRead` blocks

docs
sandbox.filesystem.allowWrite array

Add paths sandboxed commands can write to

docs
sandbox.filesystem.denyRead array

Block sandboxed commands from reading specific paths

docs
sandbox.filesystem.denyWrite array

Block sandboxed commands from writing to specific paths

docs
sandbox.filesystem.disabled boolean

Turn off filesystem isolation while keeping network isolation

docs
sandbox.ignoreViolations object

Silence violation reports for paths a command is expected to probe

docs
sandbox.network object

Control which hosts, ports, and sockets sandboxed commands reach

docs
sandbox.network.allowAllUnixSockets boolean

Let sandboxed commands connect to every Unix socket

docs
sandbox.network.allowedDomains array

Pre-allow domains so sandboxed commands don't prompt for them

docs
sandbox.network.allowLocalBinding boolean

Let sandboxed commands listen on network ports and connect to localhost on macOS

docs
sandbox.network.allowMachLookup array

Let macOS sandboxed tools like the iOS Simulator or Playwright reach their XPC services

docs
sandbox.network.allowManagedDomainsOnly boolean

Lock the network allowlist to managed settings

docs
sandbox.network.allowUnixSockets array

List Unix socket paths sandboxed commands can use on macOS

docs
sandbox.network.deniedDomains array

Block domains for sandboxed commands, even inside an allowed wildcard

docs
sandbox.network.httpProxyPort number

Route sandbox HTTP traffic through your own proxy

docs
sandbox.network.socksProxyPort number

Route sandbox SOCKS traffic through your own proxy

docs
sandbox.network.strictAllowlist boolean

Deny hosts outside the allowlist instead of prompting

docs
sandbox.network.tlsTerminate object

Have the sandbox proxy terminate TLS so it can read HTTPS requests

docs
sandbox.ripgrep object

Use your own ripgrep binary inside the sandbox

docs
sandbox.socatPath string

Point the sandbox proxy at a `socat` binary outside `PATH`

docs
showClearContextOnPlanAccept boolean

Show a "clear context" option on the plan accept screen

docs
showThinkingSummaries boolean

See summaries of Claude's thinking instead of a collapsed stub

docs
showTurnDuration boolean

Hide the "Cooked for" duration after each response

docs
skillListingBudgetFraction number

Reserve more or less context for the skill listing

docs
skillListingMaxDescChars integer

Cap each skill's description length in the skill listing

docs
skillOverrides object

Hide or collapse a skill without editing its SKILL.md

docs
skipAutoPermissionPrompt boolean

Skip the one-time notice Claude Code shows when you first enter auto mode yourself rather than through the built-in default

docs
skipDangerousModePermissionPrompt boolean

Skip the confirmation dialog before bypassPermissions mode

docs
skippedMarketplaces array

Configure Claude Code's skippedMarketplaces setting.

docs
skippedPlugins array

Configure Claude Code's skippedPlugins setting.

docs
skipWebFetchPreflight boolean

Skip the WebFetch hostname check when Anthropic is unreachable

docs
spellcheck object

Underline misspelled words in the prompt input with a spell checker you install

docs
spinnerTipsEnabled boolean

Hide tips in the spinner while Claude works

docs
spinnerTipsOverride object

Add your own tips to the spinner rotation, or replace the built-in tips

docs
spinnerVerbs object

Add or replace the verbs shown while a turn runs

docs
sshConfigs array

Add SSH connections to the Desktop environment selector

docs
sshHostAllowlist array

Limit which hosts Desktop SSH sessions can reach

docs
statusLine object

Configure a command-backed status line.

docs
strictKnownMarketplaces array

Allowlist the marketplace sources users can add and install from

docs
strictPluginOnlyCustomization object

Block skills, agents, hooks, and MCP servers from user and project sources

docs
strictPluginOnlyCustomization.agents string

Lock agents to plugin and managed sources

docs
strictPluginOnlyCustomization.hooks string

Lock hooks to plugin and managed sources

docs
strictPluginOnlyCustomization.mcp string

Lock MCP servers to plugin and managed sources

docs
strictPluginOnlyCustomization.skills string

Lock skills to plugin and managed sources

docs
subagentPromptCacheTtl enum

Choose the prompt cache lifetime for subagents and other requests outside the main conversation

docs
subagentStatusLine object

Rewrite rows in the subagent task display with your own command

docs
switchModelsOnFlag boolean

Switch models automatically or pause when a safety classifier flags a request

docs
syncClaudeAiPlugins boolean

Stop loading the plugins enabled on your claude.ai account and stop downloading new ones

docs
syncClaudeAiSkills boolean

Stop loading the skills enabled on your claude.ai account and stop downloading new ones

docs
syntaxHighlightingDisabled boolean

Turn off syntax highlighting in diffs and code blocks

docs
taskOutputMaxChars integer

Removed in v2.1.277, together with the `TaskOutput` tool it sized

historical
teammateDefaultModel string

Removed in v2.1.234; see Specify teammates and models for how Claude Code picks a teammate's model

historical
teammateMode string

Choose how agent team teammates display

docs
terminalProgressBarEnabled boolean

Hide the terminal progress bar in terminals that support it

docs
terminalTitleFromRename boolean

Stop `/rename` and `--name` from changing the terminal tab title

docs
theme string

Pick the interface color theme, built-in or custom

docs
timeFormat enum

Show the times in the interface on a 12-hour or 24-hour clock, in UTC, or with a strftime pattern

docs
timeZone string

Show the times in the interface in a time zone other than your system's

docs
tui string

Choose the fullscreen or classic terminal renderer

docs
ultracode boolean

Have Claude plan a workflow for each substantive task without being asked

docs
useAutoModeDuringPlan boolean

Let the auto mode classifier review shell commands in plan mode; set `false` to get prompts instead

docs
verbose boolean

Show full tool output instead of truncated summaries; `viewMode` takes precedence when both are set

docs
viewMode string

Start every session in default, verbose, or focus view

docs
vimInsertModeRemaps object

Map a two-key INSERT-mode sequence such as `jj` to Escape

docs
voice object

Turn on voice dictation and pick hold or tap mode

docs
voiceEnabled boolean

Turn on voice dictation with the older single-key form

docs
wheelScrollAccelerationEnabled boolean

Turn off mouse-wheel acceleration in fullscreen rendering

docs
workflowKeywordTriggerEnabled boolean

Let the word `ultracode` in a prompt start a workflow; set `false` to type it without starting one

docs
workflowSizeGuideline string

Set the agent count Claude aims for in dynamic workflows

docs
worktree object

Configure worktree creation, sparse paths, symlinks, and background isolation.

docs
worktree.baseRef string

Branch new worktrees from the remote default branch or your local HEAD

docs
worktree.bgIsolation boolean

Let background sessions edit the working copy without a worktree

docs
worktree.location string

Choose where Desktop SSH sessions create their worktrees on a remote machine

docs
worktree.sparsePaths array

Check out only the directories you need in each worktree

docs
worktree.symlinkDirectories array

Symlink large directories into each worktree instead of duplicating them

docs
wslInheritsWindowsSettings boolean

Have WSL read managed settings from the Windows policy chain

docs
04

Environment variables

The complete official environment-variable table captured for this release snapshot.

ANTHROPIC_API_KEY ENV

API key sent as `X-Api-Key` header.

docs sensitive
ANTHROPIC_AUTH_TOKEN ENV

Custom value for the `Authorization` header (the value you set here will be prefixed with `Bearer `)

docs sensitive
ANTHROPIC_AWS_API_KEY ENV

Workspace API key for Claude Platform on AWS, generated in the AWS Console.

conditional sensitive
ANTHROPIC_AWS_BASE_URL ENV

Override the Claude Platform on AWS endpoint URL.

conditional
ANTHROPIC_AWS_WORKSPACE_ID ENV

Required for Claude Platform on AWS.

conditional
ANTHROPIC_BASE_URL ENV

Override the API endpoint to route requests through a proxy or gateway.

docs
ANTHROPIC_BEDROCK_BASE_URL ENV

Override the Amazon Bedrock endpoint URL.

conditional
ANTHROPIC_BEDROCK_MANTLE_BASE_URL ENV

Override the Amazon Bedrock Mantle endpoint URL.

conditional
ANTHROPIC_BEDROCK_REGION_PREFIX ENV

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.

conditional
ANTHROPIC_BEDROCK_SERVICE_TIER ENV

Amazon Bedrock service tier (`default`, `flex`, or `priority`).

conditional
ANTHROPIC_BETAS ENV

Comma-separated list of additional `anthropic-beta` header values to include in API requests.

docs
ANTHROPIC_CUSTOM_HEADERS ENV

Custom headers to add to requests (`Name: Value` format, newline-separated for multiple headers).

docs sensitive
ANTHROPIC_CUSTOM_MODEL_OPTION ENV

Model ID to add as a custom entry in the `/model` picker.

docs
ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION ENV

Display description for the custom model entry in the `/model` picker.

docs
ANTHROPIC_CUSTOM_MODEL_OPTION_NAME ENV

Display name for the custom model entry in the `/model` picker.

docs
ANTHROPIC_CUSTOM_MODEL_OPTION_SUPPORTED_CAPABILITIES ENV

Comma-separated list of capabilities the custom model supports, for example `effort,thinking`.

docs
ANTHROPIC_DEFAULT_FABLE_MODEL ENV

Model ID that the `fable` alias resolves to, and the ID Claude Code recognizes as a Fable model for automatic model fallback on third-party providers.

docs
ANTHROPIC_DEFAULT_FABLE_MODEL_DESCRIPTION ENV

Display description for the pinned Fable model in the `/model` picker.

docs
ANTHROPIC_DEFAULT_FABLE_MODEL_NAME ENV

Display name for the pinned Fable model in the `/model` picker.

docs
ANTHROPIC_DEFAULT_FABLE_MODEL_SUPPORTED_CAPABILITIES ENV

Comma-separated list of capabilities the pinned Fable model supports, for example `effort,thinking`.

docs
ANTHROPIC_DEFAULT_HAIKU_MODEL ENV

Model ID that the `haiku` alias resolves to, also used for background functionality.

docs
ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION ENV

Display description for the pinned Haiku model in the `/model` picker.

docs
ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME ENV

Display name for the pinned Haiku model in the `/model` picker.

docs
ANTHROPIC_DEFAULT_HAIKU_MODEL_SUPPORTED_CAPABILITIES ENV

Comma-separated list of capabilities the pinned Haiku model supports, for example `effort,thinking`.

docs
ANTHROPIC_DEFAULT_MODEL ENV

Model that new sessions start on by default.

docs
ANTHROPIC_DEFAULT_OPUS_MODEL ENV

Model ID that the `opus` alias resolves to, and that `opusplan` uses while Plan Mode is active.

docs
ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION ENV

Display description for the pinned Opus model in the `/model` picker.

docs
ANTHROPIC_DEFAULT_OPUS_MODEL_NAME ENV

Display name for the pinned Opus model in the `/model` picker.

docs
ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES ENV

Comma-separated list of capabilities the pinned Opus model supports, for example `effort,thinking`.

docs
ANTHROPIC_DEFAULT_SONNET_MODEL ENV

Model ID that the `sonnet` alias resolves to, and that `opusplan` uses when Plan Mode is not active.

docs
ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION ENV

Display description for the pinned Sonnet model in the `/model` picker.

docs
ANTHROPIC_DEFAULT_SONNET_MODEL_NAME ENV

Display name for the pinned Sonnet model in the `/model` picker.

docs
ANTHROPIC_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIES ENV

Comma-separated list of capabilities the pinned Sonnet model supports, for example `effort,thinking`.

docs
ANTHROPIC_FEDERATION_RULE_ID ENV

Federation rule ID for Workload Identity Federation.

docs
ANTHROPIC_FOUNDRY_API_KEY ENV

API key for Microsoft Foundry authentication (see Microsoft Foundry)

conditional sensitive
ANTHROPIC_FOUNDRY_AUTH_TOKEN ENV

Bearer token for Microsoft Foundry authentication, such as a Microsoft Entra access token.

conditional sensitive
ANTHROPIC_FOUNDRY_BASE_URL ENV

Full base URL for the Microsoft Foundry resource (for example, `https://my-resource.services.ai.azure.com/anthropic`).

conditional
ANTHROPIC_FOUNDRY_RESOURCE ENV

Microsoft Foundry resource name (for example, `my-resource`).

conditional
ANTHROPIC_MODEL ENV

Name of the model setting to use (see Model Configuration)

docs
ANTHROPIC_ORGANIZATION_ID ENV

Organization ID for Workload Identity Federation.

docs
ANTHROPIC_PROFILE ENV

Name of the Anthropic profile to authenticate with, such as one created by `ant auth login` or by signing in to a Console account without an API key.

docs
ANTHROPIC_SMALL_FAST_MODEL ENV

\[DEPRECATED] Name of Haiku-class model for background tasks

docs
ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION ENV

Override AWS region for the Haiku-class model when using Amazon Bedrock or Amazon Bedrock Mantle.

conditional
ANTHROPIC_VERTEX_BASE_URL ENV

Override Google Cloud's Agent Platform endpoint URL.

conditional
ANTHROPIC_VERTEX_PROJECT_ID ENV

GCP project ID that Google Cloud's Agent Platform requests are addressed to.

conditional
ANTHROPIC_WORKSPACE_ID ENV

Workspace ID for workload identity federation.

docs
API_FORCE_IDLE_TIMEOUT ENV

Override the 5-minute body idle timeout that aborts a streaming model response when no bytes arrive.

docs
API_TIMEOUT_MS ENV

Time in milliseconds that each API request attempt has to receive its response headers.

docs
AWS_BEARER_TOKEN_BEDROCK ENV

Amazon Bedrock API key for authentication (see Amazon Bedrock API keys)

conditional
BASH_DEFAULT_TIMEOUT_MS ENV

Default timeout for a foreground Bash or PowerShell tool command, in milliseconds (default: 120000, or 2 minutes).

docs
BASH_MAX_OUTPUT_LENGTH ENV

Maximum number of characters of bash output that Claude Code reads back into a command's result (default: 30000; maximum: 150000).

docs
BASH_MAX_TIMEOUT_MS ENV

Maximum timeout the model can set for a foreground Bash or PowerShell tool command, in milliseconds (default: 600000, or 10 minutes).

docs
BETA_TRACING_ENDPOINT ENV

OTLP/HTTP endpoint for detailed beta tracing: with `ENABLE_BETA_TRACING_DETAILED=1`, logs and traces go there instead of to the configured exporters.

docs
CCR_FORCE_BUNDLE ENV

Set to `1` to force `claude --cloud` to bundle and upload your local repository instead of cloning from its remote

docs
CLAUDECODE ENV

Set to `1` in subprocesses Claude Code spawns (Bash and PowerShell tools, tmux sessions, hook commands, status line commands, stdio MCP server subprocesses).

docs
CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS ENV

Set to `1` to disable all built-in subagent types such as Explore and Plan.

docs
CLAUDE_AGENT_SDK_MCP_NO_PREFIX ENV

Set to `1` to skip the `mcp__<server>__` prefix on tool names from SDK-created MCP servers.

conditional
CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS ENV

Stall timeout in milliseconds for subagents.

docs
CLAUDE_AUTOCOMPACT_PCT_OVERRIDE ENV

Set the percentage (1-100) of the auto-compact window at which auto-compaction triggers.

conditional
CLAUDE_AUTO_BACKGROUND_TASKS ENV

Set to `1` to force-enable automatic backgrounding of long-running agent tasks.

docs
CLAUDE_AX_PREPARK_MS ENV

In screen reader mode, how many milliseconds Claude Code waits before it writes a new or changed line.

docs
CLAUDE_AX_SCREEN_READER ENV

Set to `1` to render screen-reader friendly output: flat text without decorative borders or animations.

docs
CLAUDE_AX_STARTUP_QUIET_MS ENV

In screen reader mode, how many milliseconds Claude Code holds the first interface render after the startup confirmation line, so your screen reader can speak the line in full before new output interrupts it.

docs
CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR ENV

Return to the original working directory after each Bash or PowerShell command in the main session

docs
CLAUDE_BYTE_STREAM_IDLE_TIMEOUT_MS ENV

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.

docs
CLAUDE_CLIENT_PRESENCE_FILE ENV

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.

docs
CLAUDE_CODE_ACCESSIBILITY ENV

Set to `1` to keep the native terminal cursor visible and disable the inverted-text cursor indicator.

docs
CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD ENV

Set to `1` to load memory files from directories specified with `--add-dir`.

docs
CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT ENV

Set to `1` to repaint the entire screen on every frame in fullscreen rendering instead of sending incremental updates.

docs
CLAUDE_CODE_ALWAYS_ENABLE_EFFORT ENV

Set to `1` to send the effort parameter with every request, even when Claude Code does not recognize the model ID as effort-capable.

docs
CLAUDE_CODE_API_KEY_HELPER_TTL_MS ENV

Interval in milliseconds at which credentials should be refreshed (when using `apiKeyHelper`)

docs sensitive
CLAUDE_CODE_ARTIFACT_AUTO_OPEN ENV

Set to `0` to stop Claude Code from opening the browser automatically when a new artifact is published

docs
CLAUDE_CODE_ARTIFACT_COMMENTS ENV

Set to `0` to stop Claude reading and replying to comments on an artifact.

docs
CLAUDE_CODE_ARTIFACT_COMMENTS_AUTOREACT ENV

Set to `0` to stop Claude replying on its own to comments sent to it.

docs
CLAUDE_CODE_ARTIFACT_PUBLISH_EDITS ENV

Set to `0` to stop Claude from applying small changes to an artifact's file as part of publishing it.

docs
CLAUDE_CODE_ATTRIBUTION_HEADER ENV

Set to `0` to omit the attribution block, which carries the client version and a prompt fingerprint, from the start of the system prompt.

docs
CLAUDE_CODE_AUTO_BACKGROUND_WORKER_CHECKIN_SECONDS ENV

Removed in v2.1.283.

docs
CLAUDE_CODE_AUTO_COMPACT_WINDOW ENV

Set the auto-compact window, how full the context gets before compaction, from `100000` to `1000000` tokens.

docs
CLAUDE_CODE_AUTO_CONNECT_IDE ENV

Override automatic IDE connection.

conditional
CLAUDE_CODE_AUTO_MODE_MODEL ENV

Sets the model for the classifier requests Claude Code sends in auto mode.

docs
CLAUDE_CODE_AUTO_MODE_SERVER ENV

Controls whether Claude Code asks the server to review auto mode actions.

docs
CLAUDE_CODE_AWS_CHAIN_RESOLVE_TIMEOUT_MS ENV

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`).

conditional
CLAUDE_CODE_BASH_EDIT_DIFF ENV

Set to `0` to turn off the diff of the files that changed while a Bash command ran, or `1` to record it in every permission mode.

docs
CLAUDE_CODE_BG_TASKS_REPORT_RUNNING ENV

Set to `0` to make a non-interactive session report an idle status to its host at every turn end, even while background work is still running.

docs
CLAUDE_CODE_BRIDGE_SESSION_ID ENV

Set automatically in Bash tool and hook command subprocesses while the session has an active Remote Control connection, and removed when the connection ends.

docs
CLAUDE_CODE_BS_AS_CTRL_BACKSPACE ENV

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.

docs
CLAUDE_CODE_CERT_STORE ENV

Comma-separated list of CA certificate sources for TLS connections.

docs
CLAUDE_CODE_CHILD_SESSION ENV

Set to `1` in subprocesses Claude Code spawns via the Bash, PowerShell, and Monitor tools, hook commands, and status line commands.

docs
CLAUDE_CODE_CLIENT_CERT ENV

Path to client certificate file for mTLS authentication

docs
CLAUDE_CODE_CLIENT_KEY ENV

Path to client private key file for mTLS authentication

docs sensitive
CLAUDE_CODE_CLIENT_KEY_PASSPHRASE ENV

Passphrase for encrypted CLAUDE\_CODE\_CLIENT\_KEY (optional)

docs sensitive
CLAUDE_CODE_CONNECT_TIMEOUT_MS ENV

Removed in v2.1.186 and now a no-op.

docs
CLAUDE_CODE_DEBUG_LOGS_DIR ENV

Override the debug log file path.

docs
CLAUDE_CODE_DEBUG_LOG_LEVEL ENV

Minimum log level written to the debug log file.

docs
CLAUDE_CODE_DISABLE_1M_CONTEXT ENV

Set to `1` to turn off 1M context window support.

docs
CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING ENV

Set to `1` to disable adaptive reasoning on Opus 4.6 and Sonnet 4.6 and fall back to the fixed thinking budget controlled by `MAX_THINKING_TOKENS`.

docs
CLAUDE_CODE_DISABLE_ADVISOR_TOOL ENV

Set to `1` to disable the advisor tool.

docs
CLAUDE_CODE_DISABLE_AGENT_VIEW ENV

Set to `1` to turn off background agents and agent view: `claude agents`, `--bg`, `/background`, and the on-demand supervisor.

docs
CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN ENV

Set to `1` to disable fullscreen rendering and use the classic main-screen renderer.

docs
CLAUDE_CODE_DISABLE_ARTIFACT ENV

Set to `1` to turn off the Artifact tool, which publishes session output as a private web page on claude.ai.

docs
CLAUDE_CODE_DISABLE_ATTACHMENTS ENV

Set to `1` to disable attachment processing.

docs
CLAUDE_CODE_DISABLE_AUTH_REFRESH_LOCK ENV

Set to `1` to make a Claude Code process run its `gcpAuthRefresh` or `awsAuthRefresh` command itself instead of waiting while another process runs it.

docs
CLAUDE_CODE_DISABLE_AUTO_MEMORY ENV

Set to `1` to disable auto memory.

docs
CLAUDE_CODE_DISABLE_BACKGROUND_TASKS ENV

Set to `1` to disable all background task functionality, including the `run_in_background` parameter on Bash and subagent tools, auto-backgrounding, and the Ctrl+B shortcut

docs
CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_DEFAULT ENV

Set to `1` to stop Claude Code from treating an Amazon Bedrock streaming response with a missing or empty `Content-Type` header as Amazon Bedrock's binary event stream.

conditional
CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_GUARD ENV

Set to `1` to skip the check that an Amazon Bedrock streaming response carries the `application/vnd.amazon.eventstream` content-type.

conditional
CLAUDE_CODE_DISABLE_BG_EXIT_HANDOFF ENV

Set to `1` to stop a background session's in-flight work when the supervisor stops, restarts, or updates that session's process, instead of handing it to the session's next process.

docs
CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP ENV

Set to `1` to stop Claude Code from terminating background shell commands under memory pressure.

docs
CLAUDE_CODE_DISABLE_BUNDLED_SKILLS ENV

Set to `1` to disable the skills and workflows included with Claude Code: bundled skills and workflows are removed entirely, while built-in commands like `/init` stay typable but are hidden from the model.

docs
CLAUDE_CODE_DISABLE_CFC_PROMPT ENV

Set to `1` to keep the Claude in Chrome browser tools available while omitting the Chrome section of the system prompt and the `/claude-in-chrome` bundled skill.

docs
CLAUDE_CODE_DISABLE_CLAUDE_MDS ENV

Set to `1` to prevent loading any CLAUDE.md memory files into context, including user, project, and auto memory files

docs
CLAUDE_CODE_DISABLE_CRON ENV

Set to `1` to disable session-scoped scheduled tasks.

docs
CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT ENV

Set to `1` to turn off the time limit on critical-path removal prompts.

docs
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS ENV

Set to `1` to strip pre-release `anthropic-beta` request headers, the body fields that pair with them, and beta tool-schema fields such as `defer_loading` and `eager_input_streaming` from API requests.

conditional
CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS ENV

Set to `1` to disable the built-in Explore and Plan subagents.

docs
CLAUDE_CODE_DISABLE_FAST_MODE ENV

Set to `1` to disable fast mode

docs
CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY ENV

Set to `1` to disable the "How is Claude doing?" session quality surveys.

docs
CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING ENV

Set to `1` to disable file checkpointing.

docs
CLAUDE_CODE_DISABLE_FILE_MENTIONS ENV

Set to `1` to stop Claude Code from expanding `@` mentions of files and directories.

docs
CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS ENV

Set to `1` to remove built-in commit and PR workflow instructions and the git status snapshot from Claude's context.

docs
CLAUDE_CODE_DISABLE_INLINE_SHELL_RM_PROMPT ENV

Set to `1` to stop Claude Code from reading scripts passed to a shell with `-c`, such as `bash -c 'rm -rf ~'`, for critical-path removals.

docs
CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP ENV

Set to `1` to prevent automatic remapping of Opus 4 and Opus 4.1 to the current Opus version on the Anthropic API.

docs
CLAUDE_CODE_DISABLE_MODEL_ACCESS_FALLBACK ENV

Set to `1` to stop Claude Code on Amazon Bedrock and Google Cloud's Agent Platform from switching to an older model when your account loses access to a session's model mid-session; the refused request fails at once…

docs
CLAUDE_CODE_DISABLE_MOUNTED_DRIVE_RM_PROMPT ENV

Set to `1` to turn off the mounted drive prompt for paths such as `/Volumes/USB`.

docs
CLAUDE_CODE_DISABLE_MOUSE ENV

Set to `1` to disable mouse tracking in fullscreen rendering.

docs
CLAUDE_CODE_DISABLE_MOUSE_CLICKS ENV

Set to `1` to disable click, drag, and hover handling in fullscreen rendering while keeping mouse-wheel scrolling.

docs
CLAUDE_CODE_DISABLE_MTLS_RELOAD_ON_STALE_CONNECTION ENV

Set to `1` to stop Claude Code from re-reading the mTLS client certificate and key when an API request fails with a connection-level error, such as a connection reset or a TLS handshake error.

docs
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC ENV

Set to any non-empty value, such as `1`, to disable nonessential network traffic: auto-updates, telemetry, error reporting, the `/feedback` command, Claude-drafted feedback, release notes, the PR and MR status badge…

docs
CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK ENV

Set to `1` to disable the non-streaming fallback when a streaming request fails mid-stream.

docs
CLAUDE_CODE_DISABLE_NOTIFICATION_PRESENCE_CHECK ENV

Set to `1` to send the `PushNotification` tool's desktop notification even while you are typing in or focused on the terminal.

docs
CLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALL ENV

Set to `1` to disable automatic registration of the official plugin marketplace.

docs
CLAUDE_CODE_DISABLE_PERMISSION_PROMPT_NOTIFY_HOOKS ENV

Set to `1` to stop Claude Code from running your `Notification` hooks for unanswered permission requests in sessions where Claude Code sends them to the Agent SDK's `canUseTool` callback, which is how Claude Desktop…

docs
CLAUDE_CODE_DISABLE_POLICY_SKILLS ENV

Set to `1` to skip loading skills from the system-wide managed skills directory.

docs
CLAUDE_CODE_DISABLE_POWERSHELL_CMD_RM_DENY ENV

Set to `1` to turn off the PowerShell tool check that denies the `cmd` built-ins `rd`, `rmdir`, `del`, and `erase` on a system path, such as a drive root or your home directory.

conditional
CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK ENV

Set to `1` to turn off the automatic model switch when a safety classifier flags a request, the behavior the `switchModelsOnFlag` setting controls

docs
CLAUDE_CODE_DISABLE_STRUCTURED_OUTPUTS ENV

Set to `1` to stop Claude Code from sending the structured-output `output_config.format` field and the `anthropic-beta` value that pairs with it, for an LLM gateway whose upstream rejects them.

docs
CLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPT ENV

Set to `1` to turn off the critical-path check for a recursive `rm` whose target is entirely the output of a command substitution, such as `rm -rf "$(pwd)"`.

docs
CLAUDE_CODE_DISABLE_TERMINAL_TITLE ENV

Set to `1` to disable automatic terminal title updates based on conversation context.

docs
CLAUDE_CODE_DISABLE_THINKING ENV

Set to `1` to omit the `thinking` parameter from API requests entirely.

docs
CLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENT ENV

Set to `1` to skip proactive auto-compaction when Claude Code doesn't recognize the model ID, such as an LLM gateway alias.

docs
CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL ENV

Set to `1` to disable virtual scrolling in fullscreen rendering and render every message in the transcript.

docs
CLAUDE_CODE_DISABLE_WEB_FETCH ENV

Set to `1` to turn off the WebFetch tool.

docs
CLAUDE_CODE_DISABLE_WINDOWS_SHELL_LAUNCHER ENV

Set to `1` to start PowerShell tool commands on Windows directly instead of through the `cmd.exe` launcher.

docs
CLAUDE_CODE_DISABLE_WORKFLOWS ENV

Set to `1` to disable workflows.

docs
CLAUDE_CODE_EFFORT_LEVEL ENV

Set the effort level for supported models.

docs
CLAUDE_CODE_EMIT_SESSION_STATE_EVENTS ENV

Set to `1` to add `session_state_changed` messages, which carry the session's state, to the message stream.

docs
CLAUDE_CODE_ENABLE_AUTO_MODE ENV

Accepted for compatibility with older releases and has no effect.

docs
CLAUDE_CODE_ENABLE_AWAY_SUMMARY ENV

Override session recap availability.

docs
CLAUDE_CODE_ENABLE_BACKGROUND_PLUGIN_REFRESH ENV

Set to `1` to refresh plugin state at turn boundaries in non-interactive mode after a background install completes.

docs
CLAUDE_CODE_ENABLE_CFC ENV

Set to `1` to start a CLI session with Chrome integration on, or `0` to start with it off.

docs
CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL ENV

Set to `1` to route the "How is Claude doing?" session quality survey to your own OpenTelemetry collector when Anthropic-bound nonessential traffic is blocked.

docs
CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING ENV

Controls whether tool call inputs stream from the API as Claude generates them.

docs
CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY ENV

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.

docs
CLAUDE_CODE_ENABLE_OPUS_4_7_FAST_MODE ENV

Removed in v2.1.142, when the fast mode default moved from Opus 4.6 to Opus 4.7

docs
CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION ENV

Set to `false` to turn off prompt suggestions, the grayed-out predictions that appear in your prompt input.

docs
CLAUDE_CODE_ENABLE_TASKS ENV

Selects which task-tracking tools Claude Code provides in sessions that have them.

docs
CLAUDE_CODE_ENABLE_TELEMETRY ENV

Set to `1` to enable OpenTelemetry data collection for metrics and logging.

docs
CLAUDE_CODE_ENABLE_TODO_TOOLS ENV

Set to `1` to get the task-tracking tools on every model.

docs
CLAUDE_CODE_EXIT_AFTER_STOP_DELAY ENV

Time in milliseconds to wait after the query loop becomes idle before automatically exiting.

docs
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS ENV

Set to `1` to enable agent teams.

conditional
CLAUDE_CODE_EXTRA_BODY ENV

JSON object to merge into the top level of every API request body.

docs
CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS ENV

Override the default token limit for file reads, which is 25,000 tokens.

docs
CLAUDE_CODE_FORCE_SESSION_PERSISTENCE ENV

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.

docs
CLAUDE_CODE_FORCE_STRIKETHROUGH ENV

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.

docs
CLAUDE_CODE_FORCE_SYNC_OUTPUT ENV

Set to `1` to force-enable DEC private mode 2026 synchronized output when your terminal supports it but is not auto-detected.

docs
CLAUDE_CODE_FORCE_TERMINAL_IMAGES ENV

Set to `1` to draw mod `Image` elements as pictures when your terminal draws kitty graphics protocol images with Unicode placeholders and you still see an `Image`'s dimmed `alt` text.

docs
CLAUDE_CODE_FORK_SUBAGENT ENV

Controls fork mode, which is on by default and lets Claude start forks on its own.

docs
CLAUDE_CODE_FORWARD_SUBAGENT_TEXT ENV

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.

docs
CLAUDE_CODE_GATEWAY_HINT_HEADERS ENV

Set to `1` to send the gateway hint headers, such as `x-claude-code-request-class` and `x-claude-code-compaction`, on a custom proxy or a third-party provider such as Amazon Bedrock or Claude Platform on AWS.

docs
CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS ENV

Timeout in milliseconds for the gateway model discovery request that `CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY` turns on (default: `3000`).

docs
CLAUDE_CODE_GIT_BASH_PATH ENV

Windows only: path to the Git Bash executable (`bash.exe`).

docs
CLAUDE_CODE_GLOB_HIDDEN ENV

Set to `false` to exclude dotfiles from results when Claude invokes the Glob tool.

docs
CLAUDE_CODE_GLOB_NO_IGNORE ENV

Set to `false` to make the Glob tool respect `.gitignore` patterns.

docs
CLAUDE_CODE_GLOB_TIMEOUT_SECONDS ENV

Timeout in seconds for Glob tool file discovery.

docs
CLAUDE_CODE_GOAL_CHECKIN_MINUTES ENV

How many minutes background work can keep an active goal waiting before Claude Code asks Claude to check on it.

docs
CLAUDE_CODE_GZIP_REQUEST_BODIES ENV

Set to `0` to turn off gzip compression of Claude API, telemetry, and artifact publish request bodies sent to `api.anthropic.com`.

docs
CLAUDE_CODE_HIDE_CWD ENV

Set to `1` to hide the working directory in the startup logo.

conditional
CLAUDE_CODE_IDE_HOST_OVERRIDE ENV

Override the host address used to connect to the IDE extension.

conditional
CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL ENV

Set to `1` to skip auto-installation of IDE extensions.

conditional
CLAUDE_CODE_IDE_SKIP_VALID_CHECK ENV

Set to `1` to skip validation of IDE lockfile entries during connection.

conditional
CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS ENV

Context size, in tokens, at which idle compaction applies to a conversation (default: `200000`).

docs
CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS ENV

How many subagents can be running in one session before the Agent tool refuses to spawn another (default: 20).

docs
CLAUDE_CODE_MAX_CONTEXT_TOKENS ENV

Override the context window size Claude Code assumes for the active model.

docs
CLAUDE_CODE_MAX_MCP_DESCRIPTION_LENGTH ENV

Maximum length in characters of MCP tool descriptions and MCP server instructions that Claude Code sends to the model.

conditional
CLAUDE_CODE_MAX_OUTPUT_TOKENS ENV

Set the maximum number of output tokens for most requests.

docs
CLAUDE_CODE_MAX_RETRIES ENV

Override the number of times to retry failed API requests (default: 10).

docs
CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION ENV

Removed in v2.1.224 and now a no-op.

docs
CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH ENV

Number of subagent layers allowed below the main conversation (default: 3).

docs
CLAUDE_CODE_MAX_TURNS ENV

Cap the number of agentic turns when no explicit limit is passed.

docs
CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION ENV

Cap on WebSearch calls (default: 200).

docs
CLAUDE_CODE_MCP_ALLOWLIST_ENV ENV

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

conditional
CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS ENV

Elapsed time in milliseconds before a still-running MCP tool call moves to a background task (default: 120000, or 2 minutes).

conditional
CLAUDE_CODE_MCP_STARTUP_WAIT_MS ENV

How long in milliseconds the first turn of a non-interactive session waits for MCP servers that are still connecting, in place of the default first-turn wait.

conditional
CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT ENV

Idle timeout in milliseconds for MCP tool calls.

conditional
CLAUDE_CODE_MESSAGING_SOCKET ENV

Set by Claude Code, not by you: in sessions that bind an inbox socket, Claude Code exports that socket's path to hooks and Bash commands when it binds the socket.

docs
CLAUDE_CODE_MESSAGING_TOKEN ENV

Set by Claude Code, not by you: in sessions that bind an inbox socket, Claude Code exports this per-session token to hooks and Bash commands alongside `CLAUDE_CODE_MESSAGING_SOCKET`.

docs
CLAUDE_CODE_NATIVE_CURSOR ENV

Set to `1` to show the terminal's own cursor at the input caret instead of a drawn block.

docs
CLAUDE_CODE_NEW_INIT ENV

Set to `1` to make `/init` run an interactive setup flow.

docs
CLAUDE_CODE_NONBLOCKING_STDOUT ENV

Set to `1` to write terminal output through a second non-blocking file descriptor, so a terminal that stops reading, such as a paused tmux control-mode pane or a stalled SSH connection, can't freeze Claude Code…

docs
CLAUDE_CODE_NONSTREAMING_TIMEOUT_RETRIES ENV

Limit how many times Claude Code re-sends a non-streaming request that times out.

docs
CLAUDE_CODE_NO_FLICKER ENV

Set to `1` to enable fullscreen rendering, a research preview that reduces flicker and keeps memory flat in long conversations.

docs
CLAUDE_CODE_OAUTH_REFRESH_TOKEN ENV

OAuth refresh token for Claude.ai authentication.

docs
CLAUDE_CODE_OAUTH_SCOPES ENV

Space-separated OAuth scopes the refresh token was issued with, such as `"user:profile user:inference user:sessions:claude_code"`.

docs
CLAUDE_CODE_OAUTH_TOKEN ENV

OAuth access token for claude.ai authentication.

docs sensitive
CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE ENV

Removed in v2.1.160 and now a no-op.

conditional
CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH ENV

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.

docs
CLAUDE_CODE_OTEL_DIAG_STDERR ENV

Set to `1` to write OpenTelemetry exporter diagnostic errors to stderr.

docs
CLAUDE_CODE_OTEL_FLUSH_TIMEOUT_MS ENV

Timeout in milliseconds for flushing pending OpenTelemetry spans (default: 5000).

docs
CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS ENV

Interval for refreshing dynamic OpenTelemetry headers in milliseconds (default: 1740000 / 29 minutes).

docs
CLAUDE_CODE_OTEL_SHUTDOWN_TIMEOUT_MS ENV

Timeout in milliseconds for the OpenTelemetry exporter to finish on shutdown (default: 2000).

docs
CLAUDE_CODE_OVERLOADED_RETRY_BASE_DELAY_MS ENV

Starting delay in milliseconds, in place of the default 500, of the exponential backoff between automatic retries of a request that the API rejects with a `529` overloaded error.

docs
CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS ENV

Ceiling in milliseconds, in place of the default 32000, on the exponential backoff between automatic retries of a request that the API rejects with a `529` overloaded error.

docs
CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE ENV

Set to `1` to let Claude Code run your package manager's upgrade command in the background when a new version is available.

docs
CLAUDE_CODE_PERFORCE_MODE ENV

Set to `1` to enable Perforce-aware write protection.

conditional
CLAUDE_CODE_PLUGIN_CACHE_DIR ENV

Override the plugins root directory.

docs
CLAUDE_CODE_PLUGIN_DIRS ENV

Plugin directories to load for the session, each loaded the way a `--plugin-dir` flag loads it.

docs
CLAUDE_CODE_PLUGIN_DIR_WATCH ENV

Controls whether Claude Code reloads a mod when the mod's files change.

docs
CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS ENV

Timeout in milliseconds for cloning or refreshing a plugin marketplace (default: 120000).

docs
CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE ENV

Set to `1` to skip the re-clone attempt and keep using the existing marketplace checkout when a marketplace refresh can't reach or authenticate to the remote.

docs
CLAUDE_CODE_PLUGIN_PREFER_HTTPS ENV

Set to `1` to clone GitHub `owner/repo` shorthand sources over HTTPS instead of SSH.

docs
CLAUDE_CODE_PLUGIN_SEED_DIR ENV

Path to one or more read-only plugin seed directories, separated by `:` on Unix or `;` on Windows.

docs
CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY ENV

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.

conditional
CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS ENV

Ceiling in milliseconds on idle waiting for background work, such as subagents and workflows, after the final turn in non-interactive mode with the `-p` flag.

docs
CLAUDE_CODE_PROCESS_WRAPPER ENV

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`.

docs
CLAUDE_CODE_PROJECT_DIR_NAME ENV

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.

docs
CLAUDE_CODE_PROMPT_CACHE_TTL ENV

Set `5m` or `1h`, the only values Claude Code accepts, to choose the prompt cache TTL for the main conversation: your interactive, `-p`, and SDK turns, plus the helpers that run inline with them.

docs
CLAUDE_CODE_PROPAGATE_TRACEPARENT ENV

Set to `1` to propagate W3C trace context when `ANTHROPIC_BASE_URL` points at a custom proxy.

docs
CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST ENV

Set by host platforms that embed Claude Code and manage model provider routing on its behalf.

conditional
CLAUDE_CODE_PROXY_RESOLVES_HOSTS ENV

Set to `1` to allow the proxy to perform DNS resolution instead of the caller.

docs
CLAUDE_CODE_REMOTE ENV

Set automatically to `true` when Claude Code is running as a cloud session.

conditional
CLAUDE_CODE_REMOTE_SESSION_ID ENV

Set automatically in cloud sessions to the current session's ID.

conditional
CLAUDE_CODE_RESTRICTED ENV

Set to `1` to start the session in restricted mode, the same as passing `--restricted`.

docs
CLAUDE_CODE_RESUME_INTERRUPTED_TURN ENV

Set to `1` to automatically resume if the previous session ended mid-turn.

docs
CLAUDE_CODE_RESUME_INTERRUPTED_TURN_MAX_AGE_MS ENV

Maximum age in milliseconds of the last transcript message for a session that ended mid-turn to continue automatically on resume.

docs
CLAUDE_CODE_RESUME_PROMPT ENV

Override the continuation message Claude Code sends to Claude when `CLAUDE_CODE_RESUME_INTERRUPTED_TURN` continues an interrupted turn instead of resending its prompt, or when you resume a deferred tool call with `-p`.

docs
CLAUDE_CODE_RETRY_WATCHDOG ENV

Set to `1` for unattended sessions such as eval harnesses, CI jobs, or remote workers.

docs
CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MS ENV

Maximum time in milliseconds that each API request spends waiting out `429` and `529` errors when `CLAUDE_CODE_RETRY_WATCHDOG` is set.

docs
CLAUDE_CODE_RETRY_WATCHDOG_USAGE_LIMIT_RECHECK_MS ENV

Minimum interval in milliseconds between checks of whether a usage limit was already lifted, while a request waits for that limit to reset with `CLAUDE_CODE_RETRY_WATCHDOG` set.

docs
CLAUDE_CODE_SAFE_MODE ENV

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…

docs
CLAUDE_CODE_SCRIPT_CAPS ENV

JSON object limiting how many times specific scripts may be invoked per session when `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB` is set.

docs
CLAUDE_CODE_SCROLL_SPEED ENV

Set the mouse wheel scroll multiplier in fullscreen rendering.

docs
CLAUDE_CODE_SEND_FEEDBACK ENV

Set to `0` to turn off Claude-drafted feedback for a session.

docs
CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS ENV

Override the time budget in milliseconds for SessionEnd hooks.

docs
CLAUDE_CODE_SESSION_ID ENV

Set automatically to the current session ID in Bash and PowerShell tool subprocesses, hook command subprocesses, and stdio MCP server subprocesses.

docs
CLAUDE_CODE_SHELL ENV

Set the shell Claude Code uses to run Bash tool commands.

docs
CLAUDE_CODE_SHELL_PREFIX ENV

Command prefix that wraps shell commands Claude Code spawns: Bash tool calls, hook commands, status line commands, and stdio MCP server startup commands.

docs
CLAUDE_CODE_SIMPLE ENV

Set to `1` to run with a minimal system prompt and only the Bash, file read, and file edit tools.

docs
CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT ENV

Choose between Claude Code's full system prompt and a shorter one with abbreviated tool descriptions.

docs
CLAUDE_CODE_SKIP_ANTHROPIC_AWS_AUTH ENV

Skip client-side authentication for Claude Platform on AWS, for gateways that sign requests themselves

conditional
CLAUDE_CODE_SKIP_AWS_CRED_CACHE ENV

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.

conditional
CLAUDE_CODE_SKIP_BEDROCK_AUTH ENV

Skip AWS authentication for Amazon Bedrock (for example, when using an LLM gateway)

conditional
CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS ENV

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`.

docs
CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK ENV

Set to `1` to skip the client-side fast mode availability check, for proxies that intercept the check's request rather than refuse it.

docs
CLAUDE_CODE_SKIP_FOUNDRY_AUTH ENV

Skip Azure authentication for Microsoft Foundry, for a proxy or gateway that injects its own `Authorization` header.

conditional
CLAUDE_CODE_SKIP_MANTLE_AUTH ENV

Skip AWS authentication for Amazon Bedrock Mantle (for example, when using an LLM gateway)

conditional
CLAUDE_CODE_SKIP_MODEL_ACCESS_MEMORY ENV

The startup model checks on Amazon Bedrock and Google Cloud's Agent Platform remember on this machine which models they found your account can't invoke, for up to a day.

docs
CLAUDE_CODE_SKIP_PROMPT_HISTORY ENV

Set to `1` to skip writing prompt history and session transcripts to disk.

docs
CLAUDE_CODE_SKIP_VERTEX_AUTH ENV

Skip Google authentication for Google Cloud's Agent Platform (for example, when using an LLM gateway)

conditional
CLAUDE_CODE_STARTUP_FAILURE_RESULTS ENV

Set to `1` to have a session started with `--output-format stream-json` write a result message naming why Claude Code refused to start for startup failures that otherwise end with stderr alone.

docs
CLAUDE_CODE_STOP_HOOK_BLOCK_CAP ENV

Maximum number of consecutive times a Stop or SubagentStop hook may block the turn from ending before Claude Code overrides it and ends the turn anyway (default: 8).

docs
CLAUDE_CODE_SUBAGENT_MODEL ENV

The default model for subagents, agent team teammates, and workflow agents that aren't assigned a model another way.

docs
CLAUDE_CODE_SUBAGENT_MODEL_FORCE ENV

Set to `1` to force one model onto subagents, teammates, and workflow agents.

docs
CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL ENV

Set `5m` or `1h`, the only values Claude Code accepts, to choose the prompt cache TTL for requests outside the main conversation, such as subagents, workflows, and background work.

docs
CLAUDE_CODE_SUBPROCESS_ENV_SCRUB ENV

Set to `1` to strip credentials from the environments of the subprocesses Claude Code starts, such as Bash commands, hooks, and stdio MCP servers.

docs
CLAUDE_CODE_SYNC_PLUGIN_INSTALL ENV

Set to `1` in non-interactive mode (the `-p` flag) to wait for plugin installation to complete before the first query.

docs
CLAUDE_CODE_SYNC_PLUGIN_INSTALL_TIMEOUT_MS ENV

Timeout in milliseconds for synchronous plugin installation.

docs
CLAUDE_CODE_SYNC_SKILLS ENV

Set to `1` in non-interactive mode with the `-p` flag to make Claude Code download the skills enabled for your claude.ai account in that run and wait for the list of them, up to…

docs
CLAUDE_CODE_SYNC_SKILLS_INSTALL_TIMEOUT_MS ENV

Timeout in milliseconds for the skills resync that runs mid-session when an app built on the Agent SDK reloads skills (default: 30000).

docs
CLAUDE_CODE_SYNC_SKILLS_WAIT_TIMEOUT_MS ENV

Timeout in milliseconds for the first query to wait for the initial skill list when `CLAUDE_CODE_SYNC_SKILLS` is set (default: 5000).

docs
CLAUDE_CODE_SYNTAX_HIGHLIGHT ENV

Set to `false` to disable syntax highlighting in diff output.

docs
CLAUDE_CODE_TASK_LIST_ID ENV

Share a task list across sessions.

docs
CLAUDE_CODE_TMPDIR ENV

Override the temp directory used for internal temp files.

docs
CLAUDE_CODE_TMUX_TRUECOLOR ENV

Set to any non-empty value, such as `1`, to allow 24-bit truecolor output inside tmux.

conditional
CLAUDE_CODE_TOOL_MEMORY_CGROUP_EXCLUDE ENV

On Linux and WSL, set to a comma-separated list of the kinds of processes Claude Code excludes from the tool memory cap, such as `mcp` or `lsp`.

docs
CLAUDE_CODE_TOOL_MEMORY_LIMIT ENV

On Linux and WSL, set to a size such as `4G` to cap the memory that Bash and PowerShell tool commands can use, and Monitor tool commands on v2.1.246 or later.

docs
CLAUDE_CODE_TRANSCRIPT_LOCAL_GC ENV

Set to `1` to limit how large the transcript file of a long `-p` or Agent SDK session grows.

docs
CLAUDE_CODE_USER_DIALOG_TIMEOUT_MS ENV

Deadline in milliseconds before Claude Code cancels a dialog it forwards to a remote client such as a Remote Control or SDK host, or the approval dialog for a held cross-session message; permission prompts and…

docs
CLAUDE_CODE_USE_ANTHROPIC_AWS ENV

Use Claude Platform on AWS

conditional
CLAUDE_CODE_USE_BEDROCK ENV

Use Amazon Bedrock

conditional
CLAUDE_CODE_USE_FOUNDRY ENV

Use Microsoft Foundry

conditional
CLAUDE_CODE_USE_MANTLE ENV

Use the Amazon Bedrock Mantle endpoint

conditional
CLAUDE_CODE_USE_POWERSHELL_TOOL ENV

Controls the PowerShell tool.

conditional
CLAUDE_CODE_USE_VERTEX ENV

Use Google Cloud's Agent Platform

conditional
CLAUDE_CODE_WEBFETCH_CACHE_TTL_MS ENV

Set to the number of milliseconds WebFetch keeps each fetched URL's response cached.

docs
CLAUDE_CODE_WEBFETCH_DEADLINE_MS ENV

Upper bound in milliseconds on how long WebFetch waits for a page to download, including any redirects it follows.

docs
CLAUDE_CODE_WEB_SEARCH_REFILLS_PER_HOUR ENV

Rate at which a session's WebSearch limit refills, in calls per hour.

docs
CLAUDE_CODE_WORKER_CHECKIN_SCHEDULE ENV

When `CLAUDE_AUTO_BACKGROUND_TASKS` is set to `1`, how long Claude Code waits before each reminder to Claude to check on background subagents that are still running.

docs
CLAUDE_CODE_WORKFLOW_MAX_CONCURRENT_AGENTS ENV

How many agents a single workflow run executes at once, from `1` to `256`.

docs
CLAUDE_CODE_WORKFLOW_PREFIX_STAGGER_MS ENV

Upper bound in milliseconds on how long a workflow agent waits for a same-prefix sibling's first response to begin before sending its own first request.

docs
CLAUDE_CODE_YOU_SHOULD_KNOW_DEBUG ENV

Set to `1` to show, above the prompt, a line for each of the last three checks the You should know mod made in this session.

docs
CLAUDE_CONFIG_DIR ENV

Override the configuration directory (default: `~/.claude`).

docs
CLAUDE_EFFORT ENV

Set automatically in Bash tool subprocesses and hook commands to the effort level in effect when the subprocess starts: `low`, `medium`, `high`, `xhigh`, or `max`.

docs
CLAUDE_ENABLE_BYTE_WATCHDOG ENV

Set to `1` to force-enable the byte-level streaming idle watchdog, or set to `0` to force-disable it.

docs
CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCK ENV

Set to `1` to enable the byte-level streaming idle watchdog on Amazon Bedrock `vnd.amazon.eventstream` responses, which also enables the first-byte deadline on Bedrock streaming requests.

conditional
CLAUDE_ENABLE_STREAM_WATCHDOG ENV

Set to `0` to force-disable the event-level streaming idle watchdog, or set to `1` to force-enable it.

docs
CLAUDE_ENV_FILE ENV

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.

docs
CLAUDE_JOB_DIR ENV

Set by Claude Code in each background session to that session's `~/.claude/jobs/<id>` directory.

docs
CLAUDE_PID ENV

Claude Code sets this to its own process ID in the subprocesses it spawns: Bash and PowerShell tool commands and hook commands.

docs
CLAUDE_REMOTE_CONTROL_SESSION_NAME_PREFIX ENV

Prefix for auto-generated Remote Control session names when no explicit name is provided.

conditional
CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS ENV

Deadline in milliseconds for the first response byte of a streaming request, on the connections where the first-byte deadline runs.

docs
CLAUDE_STREAM_IDLE_TIMEOUT_MS ENV

Timeout in milliseconds before the event- and byte-level streaming idle watchdogs close a stalled connection.

docs
CLAUDE_SUBAGENT_BG_SHELL_MAX_MS ENV

Removed in v2.1.260 and now a no-op.

docs
DEBUG ENV

Set to `1` to enable debug mode, equivalent to launching with `--debug`.

docs
DISABLE_AUTOUPDATER ENV

Set to `1` to disable automatic background updates.

docs
DISABLE_AUTO_COMPACT ENV

Set to `1` to disable automatic compaction when approaching the context limit, along with idle compaction.

docs
DISABLE_COMPACT ENV

Set to `1` to disable all compaction: both automatic compaction and the manual `/compact` command

docs
DISABLE_COST_WARNINGS ENV

Set to `1` to disable cost warning messages

docs
DISABLE_DOCTOR_COMMAND ENV

Set to `1` to hide the `/doctor` setup checkup skill and its `/checkup` alias.

docs
DISABLE_ERROR_REPORTING ENV

Set to any non-empty value, such as `1`, to opt out of error reporting.

docs
DISABLE_EXTRA_USAGE_COMMAND ENV

Set to `1` to hide the `/usage-credits` command that lets users purchase additional usage beyond rate limits

docs
DISABLE_FEEDBACK_COMMAND ENV

Set to `1` to disable the `/feedback` command and Claude-drafted feedback.

docs
DISABLE_GROWTHBOOK ENV

Set to `1` or `true` to disable GrowthBook feature-flag fetching and use code defaults for every flag.

docs
DISABLE_INSTALLATION_CHECKS ENV

Set to `1` to disable installation warnings.

docs
DISABLE_INSTALL_GITHUB_APP_COMMAND ENV

Set to `1` to hide the `/install-github-app` command.

docs
DISABLE_INTERLEAVED_THINKING ENV

Set to `1` to prevent sending the interleaved-thinking beta header.

docs
DISABLE_LOGIN_COMMAND ENV

Set to `1` to hide the `/login` command.

docs
DISABLE_LOGOUT_COMMAND ENV

Set to `1` to hide the `/logout` command

docs
DISABLE_PROMPT_CACHING ENV

Set to `1` to disable prompt caching for all models (takes precedence over per-model settings)

docs
DISABLE_PROMPT_CACHING_FABLE ENV

Set to `1` to disable prompt caching for Fable models

docs
DISABLE_PROMPT_CACHING_HAIKU ENV

Set to `1` to disable prompt caching for the default Haiku model, wherever it runs

docs
DISABLE_PROMPT_CACHING_OPUS ENV

Set to `1` to disable prompt caching for the default Opus model

docs
DISABLE_PROMPT_CACHING_SONNET ENV

Set to `1` to disable prompt caching for the default Sonnet model

docs
DISABLE_TELEMETRY ENV

Set to any non-empty value, such as `1`, to opt out of telemetry.

docs
DISABLE_UPDATES ENV

Set to `1` to block all updates including manual `claude update` and `claude install`.

docs
DISABLE_UPGRADE_COMMAND ENV

Set to `1` to hide the `/upgrade` command

docs
DO_NOT_TRACK ENV

Set to `1` to opt out of telemetry, with the same effect as `DISABLE_TELEMETRY`, including on feature-flag fetching.

docs
ENABLE_BETA_TRACING_DETAILED ENV

Set to `1`, and set `BETA_TRACING_ENDPOINT` to your OTLP/HTTP collector endpoint, to turn on detailed beta tracing, which adds content-bearing span attributes and the `claude_code.hook` span.

docs
ENABLE_CLAUDEAI_MCP_SERVERS ENV

Set to `false` to stop Claude Code from fetching claude.ai MCP servers.

conditional
ENABLE_PROMPT_CACHING_1H ENV

Set to `1` to request a 1-hour prompt cache TTL instead of the default 5 minutes.

docs
ENABLE_PROMPT_CACHING_1H_BEDROCK ENV

Deprecated.

conditional
ENABLE_TOOL_SEARCH ENV

Controls MCP tool search.

docs
FORCE_AUTOUPDATE_PLUGINS ENV

Set to `1` to force plugin auto-updates even when the main auto-updater is disabled via `DISABLE_AUTOUPDATER`

docs
FORCE_HYPERLINK ENV

Set to `1` to enable clickable OSC 8 hyperlinks when your terminal supports them but isn't auto-detected, or `0` to disable them.

docs
FORCE_PROMPT_CACHING_5M ENV

Set to `1` to force the 5-minute prompt cache TTL even when 1-hour TTL would otherwise apply.

docs
HTTP_PROXY ENV

Specify HTTP proxy server for network connections

docs
HTTPS_PROXY ENV

Specify HTTPS proxy server for network connections

docs
IS_DEMO ENV

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.

docs
MAX_MCP_OUTPUT_TOKENS ENV

Maximum number of tokens allowed in MCP tool responses (default: 25000).

conditional
MAX_STRUCTURED_OUTPUT_RETRIES ENV

Number of attempts Claude Code allows when the model's response fails validation against the `--json-schema` in non-interactive mode with the `-p` flag; after that many failed attempts with no valid output, the run…

docs
MAX_THINKING_TOKENS ENV

Fixed token budget for extended thinking.

docs
MCP_CLIENT_SECRET ENV

OAuth client secret for MCP servers that require pre-configured credentials.

conditional sensitive
MCP_CONNECTION_NONBLOCKING ENV

Controls whether startup waits for MCP servers to connect before the first query.

conditional
MCP_CONNECT_TIMEOUT_MS ENV

How long blocking MCP startup waits, in milliseconds, for the connection batch before snapshotting the tool list (default: 5000).

conditional
MCP_DISCOVERY_CACHE ENV

Turns the MCP discovery cache on or off.

conditional
MCP_DISCOVERY_CACHE_MAX_STALE_S ENV

Maximum age, in seconds, of a discovery-cache entry (default: 14400, or 4 hours).

conditional
MCP_DISCOVERY_CACHE_STRIKES ENV

At a start where a discovery-cache entry is older than `MCP_DISCOVERY_CACHE_TTL_S`, Claude Code refreshes it in the background.

conditional
MCP_DISCOVERY_CACHE_TTL_S ENV

Seconds for which Claude Code uses a discovery-cache entry without refreshing it (default: 900).

conditional
MCP_OAUTH_CALLBACK_PORT ENV

Fixed port for the OAuth redirect callback, as an alternative to `--callback-port` when adding an MCP server with pre-configured credentials

conditional
MCP_PROTOCOL_NEGOTIATION ENV

On the v2 MCP client runtime only, whether Claude Code probes servers for MCP protocol revision 2026-07-28.

conditional
MCP_REMOTE_SERVER_CONNECTION_BATCH_SIZE ENV

Maximum number of remote MCP servers (HTTP/SSE) to connect in parallel during startup (default: 20)

conditional
MCP_SDK_GENERATION ENV

Pin which MCP client runtime this process connects to MCP servers with: `v1`, built on MCP TypeScript SDK 1.x, or `v2`, built on MCP TypeScript SDK 2.0.

conditional
MCP_SERVER_CONNECTION_BATCH_SIZE ENV

Maximum number of local MCP servers (stdio) to connect in parallel during startup (default: 3)

conditional
MCP_TIMEOUT ENV

Timeout in milliseconds for MCP server startup (default: 30000, or 30 seconds)

conditional
MCP_TOOL_TIMEOUT ENV

Timeout in milliseconds for MCP tool execution (default: 100000000, about 28 hours).

conditional
NO_PROXY ENV

List of domains and IPs to which requests will be directly issued, bypassing proxy

docs
OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT ENV

Standard OpenTelemetry SDK limit on attribute value length.

docs
OTEL_LOG_ASSISTANT_RESPONSES ENV

Set to `1` to include the model's response text on `assistant_response` OpenTelemetry log events.

docs
OTEL_LOG_MANAGED_SETTINGS ENV

Set to `1` to add the redacted managed settings, and a SHA-256 digest of the settings before redaction, to `managed_settings_resolved` OpenTelemetry log events.

docs
OTEL_LOG_RAW_API_BODIES ENV

Emit Anthropic Messages API request and response JSON as `api_request_body` / `api_response_body` log events.

docs
OTEL_LOG_TOOL_CONTENT ENV

Set to `1` to include tool content in the `tool.output` OpenTelemetry span event.

docs
OTEL_LOG_TOOL_DETAILS ENV

Set to `1` to include tool input arguments; MCP server names; user-authored workflow names; raw error strings on tool failures; the refusal `category` on `api_refusal` events; real agent, skill, plugin, and MCP server…

docs
OTEL_LOG_USER_PROMPTS ENV

Set to `1` to include user prompt text in OpenTelemetry traces and logs.

docs
OTEL_METRICS_INCLUDE_ACCOUNT_UUID ENV

Set to `false` to exclude account UUID from metrics attributes (default: included).

docs
OTEL_METRICS_INCLUDE_ENTRYPOINT ENV

Set to `true` to include the session entrypoint in metrics attributes (default: excluded).

docs
OTEL_METRICS_INCLUDE_REPOSITORY ENV

Set to `true` to tag OpenTelemetry metrics and events with `vcs.*` attributes identifying the session's repository (default: excluded).

docs
OTEL_METRICS_INCLUDE_RESOURCE_ATTRIBUTES ENV

As of v2.1.161, Claude Code attaches `OTEL_RESOURCE_ATTRIBUTES` keys to metric datapoint labels.

docs
OTEL_METRICS_INCLUDE_SESSION_ID ENV

Set to `false` to exclude session ID from metrics attributes (default: included).

docs
OTEL_METRICS_INCLUDE_VERSION ENV

Set to `true` to include Claude Code version in metrics attributes (default: excluded).

docs
SLASH_COMMAND_TOOL_CHAR_BUDGET ENV

Override the character budget for skill metadata shown to the Skill tool.

docs
TASK_MAX_OUTPUT_LENGTH ENV

Removed in v2.1.277 and now a no-op, together with the `TaskOutput` tool it sized.

docs
USE_BUILTIN_RIPGREP ENV

Set to `0` to use system-installed `rg` instead of `rg` included with Claude Code

docs
VERTEX_REGION_CLAUDE_3_5_HAIKU ENV

Override region for Claude 3.5 Haiku when using Google Cloud's Agent Platform

conditional
VERTEX_REGION_CLAUDE_3_5_SONNET ENV

Override region for Claude 3.5 Sonnet when using Google Cloud's Agent Platform

conditional
VERTEX_REGION_CLAUDE_3_7_SONNET ENV

Override region for Claude 3.7 Sonnet when using Google Cloud's Agent Platform

conditional
VERTEX_REGION_CLAUDE_4_0_OPUS ENV

Override region for Claude Opus 4 when using Google Cloud's Agent Platform

conditional
VERTEX_REGION_CLAUDE_4_0_SONNET ENV

Override region for Claude Sonnet 4 when using Google Cloud's Agent Platform

conditional
VERTEX_REGION_CLAUDE_4_1_OPUS ENV

Override region for Claude Opus 4.1 when using Google Cloud's Agent Platform

conditional
VERTEX_REGION_CLAUDE_4_5_OPUS ENV

Override region for Claude Opus 4.5 when using Google Cloud's Agent Platform

conditional
VERTEX_REGION_CLAUDE_4_5_SONNET ENV

Override region for Claude Sonnet 4.5 when using Google Cloud's Agent Platform

conditional
VERTEX_REGION_CLAUDE_4_6_OPUS ENV

Override region for Claude Opus 4.6 when using Google Cloud's Agent Platform

conditional
VERTEX_REGION_CLAUDE_4_6_SONNET ENV

Override region for Claude Sonnet 4.6 when using Google Cloud's Agent Platform

conditional
VERTEX_REGION_CLAUDE_4_7_OPUS ENV

Override region for Claude Opus 4.7 when using Google Cloud's Agent Platform

conditional
VERTEX_REGION_CLAUDE_4_8_OPUS ENV

Override region for Claude Opus 4.8 when using Google Cloud's Agent Platform

conditional
VERTEX_REGION_CLAUDE_5_5_OPUS ENV

Override region for Claude Opus 5.5 when using Google Cloud's Agent Platform.

conditional
VERTEX_REGION_CLAUDE_5_5_SONNET ENV

Override region for Claude Sonnet 5.5 when using Google Cloud's Agent Platform.

conditional
VERTEX_REGION_CLAUDE_5_OPUS ENV

Override region for Claude Opus 5 when using Google Cloud's Agent Platform.

conditional
VERTEX_REGION_CLAUDE_5_SONNET ENV

Override region for Claude Sonnet 5 when using Google Cloud's Agent Platform.

conditional
VERTEX_REGION_CLAUDE_FABLE_5 ENV

Override region for Claude Fable 5 when using Google Cloud's Agent Platform.

conditional
VERTEX_REGION_CLAUDE_FABLE_5_1 ENV

Override region for Claude Fable 5.1 when using Google Cloud's Agent Platform.

conditional
VERTEX_REGION_CLAUDE_HAIKU_4_5 ENV

Override region for Claude Haiku 4.5 when using Google Cloud's Agent Platform

conditional
VERTEX_REGION_CLAUDE_HAIKU_5_5 ENV

Override region for Claude Haiku 5.5 when using Google Cloud's Agent Platform.

conditional
05

Operational workflows

PLAYBOOK 01 runtime

Run Claude Code headlessly

Use print mode with bounded turns, structured output, and explicit permissions for scripts and CI.

  1. Start with a bounded text runnormal
    claude -p --max-turns 8 "Review the current diff" Print mode writes the final response and exits.
  2. Request machine-readable outputnormal
    claude -p --output-format json --json-schema '{"type":"object"}' "Summarize the diff" JSON output and a schema make downstream parsing explicit.
  3. Grant only required toolsreview
    claude -p --allowed-tools "Read" "Grep" "Bash(git diff *)" "Review this change" Narrow permission rules keep automation bounded.

Command IDs: claude

Source: Claude Code 2.1.307 recursive local help · Official Claude Code CLI reference

PLAYBOOK 02 runtime

Continue or resume a session

Continue the latest conversation, resume a named session, or attach to a background session.

  1. Continue the latest project sessionnormal
    claude --continue Loads the most recent conversation associated with this directory.
  2. Resume a named sessionnormal
    claude --resume auth-refactor Resumes by session ID or user-assigned name.
  3. Attach to a background sessionnormal
    claude attach 7c5dcf5d Connects the current terminal while the session keeps running.

Command IDs: claude · claude.attach

Source: Claude Code 2.1.307 recursive local help · Official Claude Code CLI reference

PLAYBOOK 03 runtime

Design permission boundaries

Choose a permission mode, add narrow allow rules, and keep bypass mode visibly high risk.

  1. Start in plan modenormal
    claude --permission-mode plan Plan mode supports repository analysis before edits.
  2. Allow specific read-only commandsreview
    claude --allowed-tools "Read" "Grep" "Bash(git diff *)" Tool-pattern rules are safer than broad shell access.
  3. Troubleshoot customizations safelynormal
    claude --safe-mode Safe mode disables project customizations, hooks, plugins, skills, and MCP.

Command IDs: claude

Source: Claude Code 2.1.307 recursive local help · Official Claude Code CLI reference · Official Claude Code all-settings reference

PLAYBOOK 04 runtime

Add and authenticate an MCP server

Register a server at the intended scope, inspect it, and run OAuth separately when required.

  1. Add a remote serverreview
    claude mcp add --transport http sentry https://mcp.sentry.dev/mcp --scope user Choose local, user, or project scope deliberately.
  2. Inspect approval and healthnormal
    claude mcp get sentry Unapproved project servers remain pending and are not connected.
  3. Authenticate over SSHreview
    claude mcp login sentry --no-browser Prints an authorization URL rather than opening a browser.

Command IDs: claude.mcp.add · claude.mcp.get · claude.mcp.login

Source: Claude Code 2.1.307 recursive local help · Official Claude Code CLI reference

PLAYBOOK 05 runtime

Install plugins and inspect skills and hooks

Add a trusted marketplace, install at a scope, then inspect the loaded skills and hooks in-session.

  1. Add a marketplacereview
    claude plugin marketplace add anthropics/claude-plugins-official Marketplace sources determine which plugins are installable.
  2. Install at project scopereview
    claude plugin install code-review@claude-plugins-official --scope project Project scope shares plugin policy with the repository.
  3. Inspect runtime componentsnormal
    Use /skills, /hooks, and /plugin inside Claude Code to verify what loaded.

Command IDs: claude.plugin.marketplace.add · claude.plugin.install

Source: Claude Code 2.1.307 recursive local help · Official Claude Code commands reference · Public Claude Code v2.1.307 plugin assets

PLAYBOOK 06 runtime

Launch and monitor agents

Define a session agent, start work in the background, and inspect active sessions as JSON.

  1. Start a named agent in the backgroundreview
    claude --background --agent reviewer "Review the current branch" The command returns a session ID for later management.
  2. List active agentsnormal
    claude agents --json JSON mode supports external monitoring and orchestration.
  3. Read recent outputnormal
    claude logs 7c5dcf5d Inspect progress without attaching to the session.

Command IDs: claude · claude.agents · claude.logs

Source: Claude Code 2.1.307 recursive local help · Official Claude Code CLI reference

06

Version drift

Differences between the pinned runtime, current documentation, public source assets, and historical surfaces.

claude.drift.docs-flags docs-ahead

The official CLI reference documents flags omitted by Claude Code 2.1.307 root help; they remain docs-confirmed or conditional, never runtime-confirmed by inference.

Source: Claude Code 2.1.307 recursive local help · Official Claude Code CLI reference
claude.drift.runtime-flags runtime-ahead

Claude Code 2.1.307 root help and the official CLI reference retain distinct release and documentation surfaces; availability is recorded per source rather than inferred.

Source: Claude Code 2.1.307 recursive local help · Official Claude Code CLI reference
claude.drift.public-repository source-ahead

The public repository contains distributable plugin assets but no built-in CLI implementation source for release 2.1.307.

Source: Public Claude Code v2.1.307 plugin assets · @anthropic-ai/claude-code 2.1.307 package metadata
claude.drift.removed-commands removed

/pr-comments and /vim are retained only as historical documentation entries and must not be presented as current universal commands.

Source: Official Claude Code commands reference
07

Evidence ledger