modified Claude Code on Amazon Bedrock View current →
--- a/amazon-bedrock.md +++ b/amazon-bedrock.md @@ -135,7 +135,7 @@ Model type| Default value ---|--- -Primary model| `global.anthropic.claude-sonnet-4-6` +Primary model| `us.anthropic.claude-sonnet-4-5-20250929-v1:0` Small/fast model| `us.anthropic.claude-haiku-4-5-20251001-v1:0` To customize models further, use one of these methods: @@ -220,6 +220,14 @@ ​ +1M token context window + +Claude Opus 4.6 and Sonnet 4.6 support the [1M token context window](<https://platform.claude.com/docs/en/build-with-claude/context-windows#1m-token-context-window>) on Amazon Bedrock. Claude Code automatically enables the extended context window when you select a 1M model variant. To enable the 1M context window for your pinned model, append `[1m]` to the model ID. See [Pin models for third-party deployments](</docs/en/model-config#pin-models-for-third-party-deployments>) for details. + +## + +​ + AWS Guardrails [Amazon Bedrock Guardrails](<https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html>) let you implement content filtering for Claude Code. Create a Guardrail in the [Amazon Bedrock console](<https://console.aws.amazon.com/bedrock/>), publish a version, then add the Guardrail headers to your [settings file](</docs/en/settings>). Enable Cross-Region inference on your Guardrail if you’re using cross-region inference profiles. Example configuration: @@ -271,4 +279,5 @@ * [Bedrock documentation](<https://docs.aws.amazon.com/bedrock/>) * [Bedrock pricing](<https://aws.amazon.com/bedrock/pricing/>) * [Bedrock inference profiles](<https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-support.html>) - * [Claude Code on Amazon Bedrock: Quick Setup Guide](<https://community.aws/content/2tXkZKrZzlrlu0KfH8gST5Dkppq/claude-code-on-amazon-bedrock-quick-setup-guide>)\- [Claude Code Monitoring Implementation (Bedrock)](<https://github.com/aws-solutions-library-samples/guidance-for-claude-code-with-amazon-bedrock/blob/main/assets/docs/MONITORING.md>) + * [Claude Code on Amazon Bedrock: Quick Setup Guide](<https://community.aws/content/2tXkZKrZzlrlu0KfH8gST5Dkppq/claude-code-on-amazon-bedrock-quick-setup-guide>) + * [Claude Code Monitoring Implementation (Bedrock)](<https://github.com/aws-solutions-library-samples/guidance-for-claude-code-with-amazon-bedrock/blob/main/assets/docs/MONITORING.md>)
modified Changelog View current →
--- a/changelog.md +++ b/changelog.md @@ -1,4 +1,30 @@ This page is generated from the [CHANGELOG.md on GitHub](<https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md>). Run `claude --version` to check your installed version. + +​ + +2.1.90 + +April 1, 2026 + + * Added `/powerup` — interactive lessons teaching Claude Code features with animated demos + * Added `CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE` env var to keep the existing marketplace cache when `git pull` fails, useful in offline environments + * Added `.husky` to protected directories (acceptEdits mode) + * Fixed an infinite loop where the rate-limit options dialog would repeatedly auto-open after hitting your usage limit, eventually crashing the session + * Fixed `--resume` causing a full prompt-cache miss on the first request for users with deferred tools, MCP servers, or custom agents (regression since v2.1.69) + * Fixed `Edit`/`Write` failing with “File content has changed” when a PostToolUse format-on-save hook rewrites the file between consecutive edits + * Fixed `PreToolUse` hooks that emit JSON to stdout and exit with code 2 not correctly blocking the tool call + * Fixed collapsed search/read summary badge appearing multiple times in fullscreen scrollback when a CLAUDE.md file auto-loads during a tool call + * Fixed auto mode not respecting explicit user boundaries (“don’t push”, “wait for X before Y”) even when the action would otherwise be allowed + * Fixed click-to-expand hover text being nearly invisible on light terminal themes + * Fixed UI crash when malformed tool input reached the permission dialog + * Fixed headers disappearing when scrolling `/model`, `/config`, and other selection screens + * Hardened PowerShell tool permission checks: fixed trailing `&` background job bypass, `-ErrorAction Break` debugger hang, archive-extraction TOCTOU, and parse-fail fallback deny-rule degradation + * Improved performance: eliminated per-turn JSON.stringify of MCP tool schemas on cache-key lookup + * Improved performance: SSE transport now handles large streamed frames in linear time (was quadratic) + * Improved performance: SDK sessions with long conversations no longer slow down quadratically on transcript writes + * Improved `/resume` all-projects view to load project sessions in parallel, improving load times for users with many projects + * Changed `--resume` picker to no longer show sessions created by `claude -p` or SDK invocations + * Removed `Get-DnsClientCache` and `ipconfig /displaydns` from auto-allow (DNS cache privacy) ​
modified CLI reference View current →
--- a/cli-reference.md +++ b/cli-reference.md @@ -23,7 +23,7 @@ `claude auto-mode defaults`| Print the built-in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) classifier rules as JSON. Use `claude auto-mode config` to see your effective config with settings applied| `claude auto-mode defaults > rules.json` `claude mcp`| Configure Model Context Protocol (MCP) servers| See the [Claude Code MCP documentation](</docs/en/mcp>). `claude plugin`| Manage Claude Code [plugins](</docs/en/plugins>). Alias: `claude plugins`. See [plugin reference](</docs/en/plugins-reference#cli-commands-reference>) for subcommands| `claude plugin install code-review@claude-plugins-official` -`claude remote-control`| Start a [Remote Control](</docs/en/remote-control>) server to control Claude Code from Claude.ai or the Claude app. Runs in server mode (no local interactive session). See [Server mode flags](</docs/en/remote-control#server-mode>)| `claude remote-control --name "My Project"` +`claude remote-control`| Start a [Remote Control](</docs/en/remote-control>) server to control Claude Code from Claude.ai or the Claude app. Runs in server mode (no local interactive session). See [Server mode flags](</docs/en/remote-control#start-a-remote-control-session>)| `claude remote-control --name "My Project"` ## @@ -31,13 +31,12 @@ CLI flags -Customize Claude Code’s behavior with these command-line flags: +Customize Claude Code’s behavior with these command-line flags. `claude --help` does not list every flag, so a flag’s absence from `--help` does not mean it is unavailable. Flag| Description| Example ---|---|--- `--add-dir`| Add additional working directories for Claude to read and edit files. Grants file access; most `.claude/` configuration is [not discovered](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) from these directories. Validates each path exists as a directory| `claude --add-dir ../apps ../lib` `--agent`| Specify an agent for the current session (overrides the `agent` setting)| `claude --agent my-custom-agent` -`--agent-teams`| Enable experimental [agent teams](</docs/en/agent-teams>). Makes the `SendMessage`, `TeamCreate`, and `TeamDelete` tools available. Equivalent to `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`| `claude --agent-teams` `--agents`| Define custom subagents dynamically via JSON. Uses the same field names as subagent [frontmatter](</docs/en/sub-agents#supported-frontmatter-fields>), plus a `prompt` field for the agent’s instructions| `claude --agents '{"reviewer":{"description":"Reviews code","prompt":"You are a code reviewer"}}'` `--allow-dangerously-skip-permissions`| Add `bypassPermissions` to the `Shift+Tab` mode cycle without starting in it. Lets you begin in a different mode like `plan` and switch to `bypassPermissions` later. See [permission modes](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>)| `claude --permission-mode plan --allow-dangerously-skip-permissions` `--allowedTools`| Tools that execute without prompting for permission. See [permission rule syntax](</docs/en/settings#permission-rule-syntax>) for pattern matching. To restrict which tools are available, use `--tools` instead| `"Bash(git log *)" "Bash(git diff *)" "Read"` @@ -61,10 +60,11 @@ `--ide`| Automatically connect to IDE on startup if exactly one valid IDE is available| `claude --ide` `--init`| Run initialization hooks and start interactive mode| `claude --init` `--init-only`| Run initialization hooks and exit (no interactive session)| `claude --init-only` -`--include-partial-messages`| Include partial streaming events in output. Requires `--print`, `--output-format stream-json`, and `--verbose`| `claude -p --output-format stream-json --verbose --include-partial-messages "query"` +`--include-hook-events`| Include all hook lifecycle events in the output stream. Requires `--output-format stream-json`| `claude -p --output-format stream-json --include-hook-events "query"` +`--include-partial-messages`| Include partial streaming events in output. Requires `--print` and `--output-format stream-json`| `claude -p --output-format stream-json --include-partial-messages "query"` `--input-format`| Specify input format for print mode (options: `text`, `stream-json`)| `claude -p --output-format json --input-format stream-json` `--json-schema`| Get validated JSON output matching a JSON Schema after agent completes its workflow (print mode only, see [structured outputs](<https://platform.claude.com/docs/en/agent-sdk/structured-outputs>))| `claude -p --json-schema '{"type":"object","properties":{...}}' "query"` -`--maintenance`| Run maintenance hooks and exit| `claude --maintenance` +`--maintenance`| Run maintenance hooks and start interactive mode| `claude --maintenance` `--max-budget-usd`| Maximum dollar amount to spend on API calls before stopping (print mode only)| `claude -p --max-budget-usd 5.00 "query"` `--max-turns`| Limit the number of agentic turns (print mode only). Exits with an error when the limit is reached. No limit by default| `claude -p --max-turns 3 "query"` `--mcp-config`| Load MCP servers from JSON files or strings (space-separated)| `claude --mcp-config ./mcp.json` @@ -81,8 +81,8 @@ `--plugin-dir`| Load plugins from a directory for this session only. Each flag takes one path. Repeat the flag for multiple directories: `--plugin-dir A --plugin-dir B`| `claude --plugin-dir ./my-plugins` `--print`, `-p`| Print response without interactive mode (see [Agent SDK documentation](<https://platform.claude.com/docs/en/agent-sdk/overview>) for programmatic usage details)| `claude -p "query"` `--remote`| Create a new [web session](</docs/en/claude-code-on-the-web>) on claude.ai with the provided task description| `claude --remote "Fix the login bug"` -`--remote-control`, `--rc`| Start an interactive session with [Remote Control](</docs/en/remote-control#interactive-session>) enabled so you can also control it from claude.ai or the Claude app. Optionally pass a name for the session| `claude --remote-control "My Project"` -`--replay-user-messages`| Re-emit user messages from stdin back on stdout for acknowledgment. Requires `--print`, `--input-format stream-json`, `--output-format stream-json`, and `--verbose`| `claude -p --input-format stream-json --output-format stream-json --verbose --replay-user-messages` +`--remote-control`, `--rc`| Start an interactive session with [Remote Control](</docs/en/remote-control#start-a-remote-control-session>) enabled so you can also control it from claude.ai or the Claude app. Optionally pass a name for the session| `claude --remote-control "My Project"` +`--replay-user-messages`| Re-emit user messages from stdin back on stdout for acknowledgment. Requires `--input-format stream-json` and `--output-format stream-json`| `claude -p --input-format stream-json --output-format stream-json --replay-user-messages` `--resume`, `-r`| Resume a specific session by ID or name, or show an interactive picker to choose a session| `claude --resume auth-refactor` `--session-id`| Use a specific session ID for the conversation (must be a valid UUID)| `claude --session-id "550e8400-e29b-41d4-a716-446655440000"` `--setting-sources`| Comma-separated list of setting sources to load (`user`, `project`, `local`)| `claude --setting-sources user,project` @@ -91,7 +91,7 @@ `--system-prompt`| Replace the entire system prompt with custom text| `claude --system-prompt "You are a Python expert"` `--system-prompt-file`| Load system prompt from a file, replacing the default prompt| `claude --system-prompt-file ./custom-prompt.txt` `--teleport`| Resume a [web session](</docs/en/claude-code-on-the-web>) in your local terminal| `claude --teleport` -`--teammate-mode`| Set how [agent team](</docs/en/agent-teams>) teammates display: `auto` (default), `in-process`, or `tmux`. See [set up agent teams](</docs/en/agent-teams#set-up-agent-teams>)| `claude --teammate-mode in-process` +`--teammate-mode`| Set how [agent team](</docs/en/agent-teams>) teammates display: `auto` (default), `in-process`, or `tmux`. See [Choose a display mode](</docs/en/agent-teams#choose-a-display-mode>)| `claude --teammate-mode in-process` `--tmux`| Create a tmux session for the worktree. Requires `--worktree`. Uses iTerm2 native panes when available; pass `--tmux=classic` for traditional tmux| `claude -w feature-auth --tmux` `--tools`| Restrict which built-in tools Claude can use. Use `""` to disable all, `"default"` for all, or tool names like `"Bash,Edit,Read"`| `claude --tools "Bash,Edit,Read"` `--verbose`| Enable verbose logging, shows full turn-by-turn output| `claude --verbose`
modified Built-in commands View current →
--- a/commands.md +++ b/commands.md @@ -38,7 +38,7 @@ `/mobile`| Show QR code to download the Claude mobile app. Aliases: `/ios`, `/android` `/model [model]`| Select or change the AI model. For models that support it, use left/right arrows to [adjust effort level](</docs/en/model-config#adjust-effort-level>). The change takes effect immediately without waiting for the current response to finish `/passes`| Share a free week of Claude Code with friends. Only visible if your account is eligible -`/permissions`| View or update [permissions](</docs/en/permissions#manage-permissions>). Alias: `/allowed-tools` +`/permissions`| Manage allow, ask, and deny rules for tool permissions. Opens an interactive dialog where you can view rules by scope, add or remove rules, manage working directories, and review [recent auto mode denials](</docs/en/permissions#review-auto-mode-denials>). Alias: `/allowed-tools` `/plan [description]`| Enter plan mode directly from the prompt. Pass an optional description to enter plan mode and immediately start with that task, for example `/plan fix the auth bug` `/plugin`| Manage Claude Code [plugins](</docs/en/plugins>) `/pr-comments [PR]`| Fetch and display comments from a GitHub pull request. Automatically detects the PR for the current branch, or pass a PR URL or number. Requires the `gh` CLI @@ -59,7 +59,7 @@ `/status`| Open the Settings interface (Status tab) showing version, model, account, and connectivity. Works while Claude is responding, without waiting for the current response to finish `/statusline`| Configure Claude Code’s [status line](</docs/en/statusline>). Describe what you want, or run without arguments to auto-configure from your shell prompt `/stickers`| Order Claude Code stickers -`/tasks`| List and manage background tasks +`/tasks`| List and manage background tasks. Also available as `/bashes` `/terminal-setup`| Configure terminal keybindings for Shift+Enter and other shortcuts. Only visible in terminals that need it, like VS Code, Alacritty, or Warp `/theme`| Change the color theme. Includes light and dark variants, colorblind-accessible (daltonized) themes, and ANSI themes that use your terminal’s color palette `/upgrade`| Open the upgrade page to switch to a higher plan tier
modified Common workflows View current →
--- a/common-workflows.md +++ b/common-workflows.md @@ -519,7 +519,7 @@ Extended thinking controls how much internal reasoning Claude performs before responding. More thinking provides more space to explore solutions, analyze edge cases, and self-correct mistakes. **With Opus 4.6 and Sonnet 4.6** , thinking uses adaptive reasoning: the model dynamically allocates thinking tokens based on the [effort level](</docs/en/model-config#adjust-effort-level>) you select. This is the recommended way to tune the tradeoff between speed and reasoning depth. **With older models** , thinking uses a fixed token budget drawn from your output allocation. The budget varies by model; see [`MAX_THINKING_TOKENS`](</docs/en/env-vars>) for per-model ceilings. You can limit the budget with that environment variable, or disable thinking entirely via `/config` or the `Option+T`/`Alt+T` toggle. On Opus 4.6 and Sonnet 4.6, [adaptive reasoning](</docs/en/model-config#adjust-effort-level>) controls thinking depth, so `MAX_THINKING_TOKENS` only applies when set to `0` to disable thinking, or when `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1` reverts these models to the fixed budget. See [environment variables](</docs/en/env-vars>). -You’re charged for all thinking tokens used, even though Claude 4 models show summarized thinking +You’re charged for all thinking tokens used even when thinking summaries are redacted. In interactive mode, thinking appears as a collapsed stub by default. Set `showThinkingSummaries: true` in `settings.json` to show full summaries. * * * @@ -855,7 +855,7 @@ * Use pipes to integrate Claude into existing shell scripts * Combine with other Unix tools for powerful workflows - * Consider using —output-format for structured output + * Consider using `--output-format` for structured output ###
modified Let Claude use your computer from the CLI View current →
--- a/computer-use.md +++ b/computer-use.md @@ -199,7 +199,7 @@ Feature| Desktop| CLI ---|---|--- -Enable| Toggle in **Settings > Desktop app > General**| Enable `computer-use` in `/mcp` +Enable| Toggle in **Settings > General** (under **Desktop app**)| Enable `computer-use` in `/mcp` Denied apps list| Configurable in Settings| Not yet available Auto-unhide toggle| Optional| Always on Dispatch integration| Dispatch-spawned sessions can use computer use| Not applicable
modified Discover and install prebuilt plugins through marketplaces View current →
--- a/discover-plugins.md +++ b/discover-plugins.md @@ -406,7 +406,7 @@ If you see “unknown command” or the `/plugin` command doesn’t appear: - 1. **Check your version** : Run `claude --version`. Plugins require version 1.0.33 or later. + 1. **Check your version** : Run `claude --version` to see what’s installed. 2. **Update Claude Code** : * **Homebrew** : `brew upgrade claude-code` * **npm** : `npm update -g @anthropic-ai/claude-code`
modified Environment variables View current →
--- a/env-vars.md +++ b/env-vars.md @@ -158,6 +158,7 @@ `MAX_STRUCTURED_OUTPUT_RETRIES`| Number of times to retry when the model’s response fails validation against the [`--json-schema`](</docs/en/cli-reference#cli-flags>) in non-interactive mode (the `-p` flag). Defaults to 5 `MAX_THINKING_TOKENS`| Override the [extended thinking](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking>) token budget. The ceiling is the model’s [max output tokens](<https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison>) minus one. Set to `0` to disable thinking entirely. On models with adaptive reasoning (Opus 4.6, Sonnet 4.6), the budget is ignored unless adaptive reasoning is disabled via `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` `MCP_CLIENT_SECRET`| OAuth client secret for MCP servers that require [pre-configured credentials](</docs/en/mcp#use-pre-configured-oauth-credentials>). Avoids the interactive prompt when adding a server with `--client-secret` +`MCP_CONNECTION_NONBLOCKING`| Set to `true` in non-interactive mode (`-p`) to skip the MCP connection wait entirely. Useful for scripted pipelines where MCP tools are not needed. Without this variable, the first query waits up to 5 seconds for `--mcp-config` server connections `MCP_OAUTH_CALLBACK_PORT`| Fixed port for the OAuth redirect callback, as an alternative to `--callback-port` when adding an MCP server with [pre-configured credentials](</docs/en/mcp#use-pre-configured-oauth-credentials>) `MCP_REMOTE_SERVER_CONNECTION_BATCH_SIZE`| Maximum number of remote MCP servers (HTTP/SSE) to connect in parallel during startup (default: 20) `MCP_SERVER_CONNECTION_BATCH_SIZE`| Maximum number of local MCP servers (stdio) to connect in parallel during startup (default: 3)
modified Fullscreen rendering View current →
--- a/fullscreen.md +++ b/fullscreen.md @@ -1,4 +1,4 @@ -Fullscreen rendering is an opt-in research preview and requires Claude Code v2.1.88 or later. Enable it with `CLAUDE_CODE_NO_FLICKER=1`. Behavior may change based on feedback. +Fullscreen rendering is an opt-in research preview and requires Claude Code v2.1.89 or later. Enable it with `CLAUDE_CODE_NO_FLICKER=1`. Behavior may change based on feedback. Fullscreen rendering is an alternative rendering path for the Claude Code CLI that eliminates flicker, keeps memory usage flat in long conversations, and adds mouse support. It draws the interface on the terminal’s alternate screen buffer, like `vim` or `htop`, and only renders messages that are currently visible. This reduces the amount of data sent to your terminal on each update. The difference is most noticeable in terminal emulators where rendering throughput is the bottleneck, such as the VS Code integrated terminal, tmux, and iTerm2. If your terminal scroll position jumps to the top while Claude is working, or the screen flashes as tool output streams in, this mode addresses those. @@ -65,7 +65,7 @@ `Ctrl+End`| Jump to the latest message and re-enable auto-follow Mouse wheel| Scroll a few lines at a time -On keyboards without dedicated `PgUp`, `PgDn`, `Home`, or `End` keys, like MacBook keyboards, hold `Fn` with the arrow keys: `Fn+↑` sends `PgUp`, `Fn+↓` sends `PgDn`, `Fn+←` sends `Home`, and `Fn+→` sends `End`. That makes `Ctrl+Fn+→` the jump-to-bottom shortcut. If that feels awkward, scroll to the bottom with the mouse wheel to resume following, or rebind `scroll:bottom` to something reachable. Scrolling up pauses auto-follow so new output does not pull you back to the bottom. Press `Ctrl+End` or scroll to the bottom to resume following. These actions are rebindable. See [Keybindings](</docs/en/keybindings>) to customize them. The action names are `scroll:pageUp`, `scroll:pageDown`, `scroll:top`, and `scroll:bottom`. Additional actions with no default binding include `scroll:lineUp`, `scroll:lineDown`, `scroll:halfPageUp`, `scroll:halfPageDown`, `scroll:fullPageUp`, and `scroll:fullPageDown`. +On keyboards without dedicated `PgUp`, `PgDn`, `Home`, or `End` keys, like MacBook keyboards, hold `Fn` with the arrow keys: `Fn+↑` sends `PgUp`, `Fn+↓` sends `PgDn`, `Fn+←` sends `Home`, and `Fn+→` sends `End`. That makes `Ctrl+Fn+→` the jump-to-bottom shortcut. If that feels awkward, scroll to the bottom with the mouse wheel to resume following, or rebind `scroll:bottom` to something reachable. Scrolling up pauses auto-follow so new output does not pull you back to the bottom. Press `Ctrl+End` or scroll to the bottom to resume following. These actions are rebindable. See [Keybindings](</docs/en/keybindings>) to customize them. The action names are `scroll:pageUp`, `scroll:pageDown`, `scroll:top`, and `scroll:bottom`. Additional actions with no default binding include `scroll:lineUp`, `scroll:lineDown`, `scroll:halfPageUp`, `scroll:halfPageDown`, `scroll:fullPageUp`, and `scroll:fullPageDown`. Mouse wheel scrolling requires your terminal to forward mouse events to Claude Code. Most terminals do this whenever an application requests it. iTerm2 makes it a per-profile setting: if the wheel does nothing but `PgUp` and `PgDn` work, open Settings → Profiles → Terminal and turn on Enable mouse reporting. The same setting is also required for click-to-expand and text selection to work. ###
modified Claude Code GitHub Actions View current →
--- a/github-actions.md +++ b/github-actions.md @@ -633,11 +633,11 @@ github_token: ${{ steps.app-token.outputs.token }} trigger_phrase: "@claude" use_vertex: "true" - claude_args: '--model claude-sonnet-4@20250514 --max-turns 10' + claude_args: '--model claude-sonnet-4-5@20250929 --max-turns 10' env: ANTHROPIC_VERTEX_PROJECT_ID: ${{ steps.auth.outputs.project_id }} CLOUD_ML_REGION: us-east5 - VERTEX_REGION_CLAUDE_3_7_SONNET: us-east5 + VERTEX_REGION_CLAUDE_4_5_SONNET: us-east5 The project ID is automatically retrieved from the Google Cloud authentication step, so you don’t need to hardcode it.
modified Claude Code on Google Vertex AI View current →
--- a/google-vertex-ai.md +++ b/google-vertex-ai.md @@ -90,7 +90,7 @@ export VERTEX_REGION_CLAUDE_HAIKU_4_5=us-east5 export VERTEX_REGION_CLAUDE_4_6_SONNET=europe-west1 -Each model version has its own `VERTEX_REGION_CLAUDE_*` variable. See the [Environment variables reference](</docs/en/env-vars>) for the full list. Check [Vertex Model Garden](<https://console.cloud.google.com/vertex-ai/model-garden>) to determine which models support global endpoints versus regional only. [Prompt caching](<https://platform.claude.com/docs/en/build-with-claude/prompt-caching>) is automatically supported when you specify the `cache_control` ephemeral flag. To disable it, set `DISABLE_PROMPT_CACHING=1`. For heightened rate limits, contact Google Cloud support. When using Vertex AI, the `/login` and `/logout` commands are disabled since authentication is handled through Google Cloud credentials. +Most model versions have a corresponding `VERTEX_REGION_CLAUDE_*` variable. See the [Environment variables reference](</docs/en/env-vars>) for the full list. Check [Vertex Model Garden](<https://console.cloud.google.com/vertex-ai/model-garden>) to determine which models support global endpoints versus regional only. [Prompt caching](<https://platform.claude.com/docs/en/build-with-claude/prompt-caching>) is automatically supported when you specify the `cache_control` ephemeral flag. To disable it, set `DISABLE_PROMPT_CACHING=1`. For heightened rate limits, contact Google Cloud support. When using Vertex AI, the `/login` and `/logout` commands are disabled since authentication is handled through Google Cloud credentials. ### @@ -110,7 +110,7 @@ Model type| Default value ---|--- -Primary model| `claude-sonnet-4-6` +Primary model| `claude-sonnet-4-5@20250929` Small/fast model| `claude-haiku-4-5@20251001` To customize models further:
modified Hooks reference View current →
Show diff (208 lines)
--- a/hooks.md +++ b/hooks.md @@ -18,6 +18,7 @@ `UserPromptSubmit`| When you submit a prompt, before Claude processes it `PreToolUse`| Before a tool call executes. Can block it `PermissionRequest`| When a permission dialog appears +`PermissionDenied`| When a tool call is denied by the auto mode classifier. Return `{retry: true}` to tell the model it may retry the denied tool call `PostToolUse`| After a tool call succeeds `PostToolUseFailure`| After a tool call fails `Notification`| When Claude Code sends a notification @@ -174,7 +175,7 @@ Event| What the matcher filters| Example matcher values ---|---|--- -`PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest`| tool name| `Bash`, `Edit|Write`, `mcp__.*` +`PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest`, `PermissionDenied`| tool name| `Bash`, `Edit|Write`, `mcp__.*` `SessionStart`| how the session started| `startup`, `resume`, `clear`, `compact` `SessionEnd`| why the session ended| `clear`, `resume`, `logout`, `prompt_input_exit`, `bypass_permissions_disabled`, `other` `Notification`| notification type| `permission_prompt`, `idle_prompt`, `auth_success`, `elicitation_dialog` @@ -216,7 +217,7 @@ Match MCP tools -[MCP](</docs/en/mcp>) server tools appear as regular tools in tool events (`PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest`), so you can match them the same way you match any other tool name. MCP tools follow the naming pattern `mcp__<server>__<tool>`, for example: +[MCP](</docs/en/mcp>) server tools appear as regular tools in tool events (`PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest`, `PermissionDenied`), so you can match them the same way you match any other tool name. MCP tools follow the naming pattern `mcp__<server>__<tool>`, for example: * `mcp__memory__create_entities`: Memory server’s create entities tool * `mcp__filesystem__read_file`: Filesystem server’s read file tool @@ -278,7 +279,7 @@ Field| Required| Description ---|---|--- `type`| yes| `"command"`, `"http"`, `"prompt"`, or `"agent"` -`if`| no| Permission rule syntax to filter when this hook runs, such as `"Bash(git *)"` or `"Edit(*.ts)"`. The hook only spawns if the tool call matches the pattern. Only evaluated on tool events: `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, and `PermissionRequest`. On other events, a hook with `if` set never runs. Uses the same syntax as [permission rules](</docs/en/permissions>) +`if`| no| Permission rule syntax to filter when this hook runs, such as `"Bash(git *)"` or `"Edit(*.ts)"`. The hook only spawns if the tool call matches the pattern. Only evaluated on tool events: `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest`, and `PermissionDenied`. On other events, a hook with `if` set never runs. Uses the same syntax as [permission rules](</docs/en/permissions>) `timeout`| no| Seconds before canceling. Defaults: 600 for command, 30 for prompt, 60 for agent `statusMessage`| no| Custom spinner message displayed while the hook runs `once`| no| If `true`, runs only once per session then is removed. Skills only, not agents. See Hooks in skills and agents @@ -539,6 +540,7 @@ `StopFailure`| No| Output and exit code are ignored `PostToolUse`| No| Shows stderr to Claude (tool already ran) `PostToolUseFailure`| No| Shows stderr to Claude (tool already failed) +`PermissionDenied`| No| Exit code and stderr are ignored (denial already occurred). Use JSON `hookSpecificOutput.retry: true` to tell the model it may retry `Notification`| No| Shows stderr to user only `SubagentStart`| No| Shows stderr to user only `SessionStart`| No| Shows stderr to user only @@ -579,7 +581,7 @@ You must choose one approach per hook, not both: either use exit codes alone for signaling, or exit 0 and print JSON for structured control. Claude Code only processes JSON on exit 0. If you exit 2, any JSON is ignored. -Your hook’s stdout must contain only the JSON object. If your shell profile prints text on startup, it can interfere with JSON parsing. See [JSON validation failed](</docs/en/hooks-guide#json-validation-failed>) in the troubleshooting guide. The JSON object supports three kinds of fields: +Your hook’s stdout must contain only the JSON object. If your shell profile prints text on startup, it can interfere with JSON parsing. See [JSON validation failed](</docs/en/hooks-guide#json-validation-failed>) in the troubleshooting guide. Hook output injected into context (`additionalContext`, `systemMessage`, or plain stdout) is capped at 10,000 characters. Output that exceeds this limit is saved to a file and replaced with a preview and file path, the same way large tool results are handled. The JSON object supports three kinds of fields: * **Universal fields** like `continue` work across all events. These are listed in the table below. * **Top-level`decision` and `reason`** are used by some events to block or provide feedback. @@ -608,8 +610,9 @@ ---|---|--- UserPromptSubmit, PostToolUse, PostToolUseFailure, Stop, SubagentStop, ConfigChange| Top-level `decision`| `decision: "block"`, `reason` TeammateIdle, TaskCreated, TaskCompleted| Exit code or `continue: false`| Exit code 2 blocks the action with stderr feedback. JSON `{"continue": false, "stopReason": "..."}` also stops the teammate entirely, matching `Stop` hook behavior -PreToolUse| `hookSpecificOutput`| `permissionDecision` (allow/deny/ask), `permissionDecisionReason` +PreToolUse| `hookSpecificOutput`| `permissionDecision` (allow/deny/ask/defer), `permissionDecisionReason` PermissionRequest| `hookSpecificOutput`| `decision.behavior` (allow/deny) +PermissionDenied| `hookSpecificOutput`| `retry: true` tells the model it may retry the denied tool call WorktreeCreate| path return| Command hook prints path on stdout; HTTP hook returns `hookSpecificOutput.worktreePath`. Hook failure or missing path fails creation Elicitation| `hookSpecificOutput`| `action` (accept/decline/cancel), `content` (form field values for accept) ElicitationResult| `hookSpecificOutput`| `action` (accept/decline/cancel), `content` (form field values override) @@ -858,7 +861,7 @@ PreToolUse -Runs after Claude creates tool parameters and before processing the tool call. Matches on tool name: `Bash`, `Edit`, `Write`, `Read`, `Glob`, `Grep`, `Agent`, `WebFetch`, `WebSearch`, `AskUserQuestion`, `ExitPlanMode`, and any MCP tool names. Use PreToolUse decision control to allow, deny, or ask for permission to use the tool. +Runs after Claude creates tool parameters and before processing the tool call. Matches on tool name: `Bash`, `Edit`, `Write`, `Read`, `Glob`, `Grep`, `Agent`, `WebFetch`, `WebSearch`, `AskUserQuestion`, `ExitPlanMode`, and any MCP tool names. Use PreToolUse decision control to allow, deny, ask, or defer the tool call. #### @@ -976,16 +979,16 @@ PreToolUse decision control -`PreToolUse` hooks can control whether a tool call proceeds. Unlike other hooks that use a top-level `decision` field, PreToolUse returns its decision inside a `hookSpecificOutput` object. This gives it richer control: three outcomes (allow, deny, or ask) plus the ability to modify tool input before execution. +`PreToolUse` hooks can control whether a tool call proceeds. Unlike other hooks that use a top-level `decision` field, PreToolUse returns its decision inside a `hookSpecificOutput` object. This gives it richer control: four outcomes (allow, deny, ask, or defer) plus the ability to modify tool input before execution. Field| Description ---|--- -`permissionDecision`| `"allow"` skips the permission prompt. `"deny"` prevents the tool call. `"ask"` prompts the user to confirm. [Deny and ask rules](</docs/en/permissions#manage-permissions>) still apply when a hook returns `"allow"` -`permissionDecisionReason`| For `"allow"` and `"ask"`, shown to the user but not Claude. For `"deny"`, shown to Claude -`updatedInput`| Modifies the tool’s input parameters before execution. Replaces the entire input object, so include unchanged fields alongside modified ones. Combine with `"allow"` to auto-approve, or `"ask"` to show the modified input to the user -`additionalContext`| String added to Claude’s context before the tool executes - -When a hook returns `"ask"`, the permission prompt displayed to the user includes a label identifying where the hook came from: for example, `[User]`, `[Project]`, `[Plugin]`, or `[Local]`. This helps users understand which configuration source is requesting confirmation. +`permissionDecision`| `"allow"` skips the permission prompt. `"deny"` prevents the tool call. `"ask"` prompts the user to confirm. `"defer"` exits gracefully so the tool can be resumed later. [Deny and ask rules](</docs/en/permissions#manage-permissions>) still apply when a hook returns `"allow"` +`permissionDecisionReason`| For `"allow"` and `"ask"`, shown to the user but not Claude. For `"deny"`, shown to Claude. For `"defer"`, ignored +`updatedInput`| Modifies the tool’s input parameters before execution. Replaces the entire input object, so include unchanged fields alongside modified ones. Combine with `"allow"` to auto-approve, or `"ask"` to show the modified input to the user. For `"defer"`, ignored +`additionalContext`| String added to Claude’s context before the tool executes. For `"defer"`, ignored + +When multiple PreToolUse hooks return different decisions, precedence is `deny` > `defer` > `ask` > `allow`. When a hook returns `"ask"`, the permission prompt displayed to the user includes a label identifying where the hook came from: for example, `[User]`, `[Project]`, `[Plugin]`, or `[Local]`. This helps users understand which configuration source is requesting confirmation. { "hookSpecificOutput": { @@ -1002,6 +1005,42 @@ `AskUserQuestion` and `ExitPlanMode` require user interaction and normally block in [non-interactive mode](</docs/en/headless>) with the `-p` flag. Returning `permissionDecision: "allow"` together with `updatedInput` satisfies that requirement: the hook reads the tool’s input from stdin, collects the answer through your own UI, and returns it in `updatedInput` so the tool runs without prompting. Returning `"allow"` alone is not sufficient for these tools. For `AskUserQuestion`, echo back the original `questions` array and add an `answers` object mapping each question’s text to the chosen answer. PreToolUse previously used top-level `decision` and `reason` fields, but these are deprecated for this event. Use `hookSpecificOutput.permissionDecision` and `hookSpecificOutput.permissionDecisionReason` instead. The deprecated values `"approve"` and `"block"` map to `"allow"` and `"deny"` respectively. Other events like PostToolUse and Stop continue to use top-level `decision` and `reason` as their current format. + +#### + +​ + +Defer a tool call for later + +`"defer"` is for integrations that run `claude -p` as a subprocess and read its JSON output, such as an Agent SDK app or a custom UI built on top of Claude Code. It lets that calling process pause Claude at a tool call, collect input through its own interface, and resume where it left off. Claude Code honors this value only in [non-interactive mode](</docs/en/headless>) with the `-p` flag. In interactive sessions it logs a warning and ignores the hook result. + +The `defer` value requires Claude Code v2.1.89 or later. Earlier versions do not recognize it and the tool proceeds through the normal permission flow. + +The `AskUserQuestion` tool is the typical case: Claude wants to ask the user something, but there is no terminal to answer in. The round trip works like this: + + 1. Claude calls `AskUserQuestion`. The `PreToolUse` hook fires. + 2. The hook returns `permissionDecision: "defer"`. The tool does not execute. The process exits with `stop_reason: "tool_deferred"` and the pending tool call preserved in the transcript. + 3. The calling process reads `deferred_tool_use` from the SDK result, surfaces the question in its own UI, and waits for an answer. + 4. The calling process runs `claude -p --resume <session-id>`. The same tool call fires `PreToolUse` again. + 5. The hook returns `permissionDecision: "allow"` with the answer in `updatedInput`. The tool executes and Claude continues. + +The `deferred_tool_use` field carries the tool’s `id`, `name`, and `input`. The `input` is the parameters Claude generated for the tool call, captured before execution: + + { + "type": "result", + "subtype": "success", + "stop_reason": "tool_deferred", + "session_id": "abc123", + "deferred_tool_use": { + "id": "toolu_01abc", + "name": "AskUserQuestion", + "input": { "questions": [{ "question": "Which framework?", "header": "Framework", "options": [{"label": "React"}, {"label": "Vue"}], "multiSelect": false }] } + } + } + +There is no timeout or retry limit. The session remains on disk until you resume it. If the answer is not ready when you resume, the hook can return `"defer"` again and the process exits the same way. The calling process controls when to break the loop by eventually returning `"allow"` or `"deny"` from the hook. `"defer"` only works when Claude makes a single tool call in the turn. If Claude makes several tool calls at once, `"defer"` is ignored with a warning and the tool proceeds through the normal permission flow. The constraint exists because resume can only re-run one tool: there is no way to defer one call from a batch without leaving the others unresolved. If the deferred tool is no longer available when you resume, the process exits with `stop_reason: "tool_deferred_unavailable"` and `is_error: true` before the hook fires. This happens when an MCP server that provided the tool is not connected for the resumed session. The `deferred_tool_use` payload is still included so you can identify which tool went missing. + +`--resume` does not restore the permission mode from the prior session. Pass the same `--permission-mode` flag on resume that was active when the tool was deferred. Claude Code logs a warning if the modes differ. ### @@ -1209,6 +1248,58 @@ "additionalContext": "Additional information about the failure for Claude" } } + +### + +​ + +PermissionDenied + +Runs when the [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) classifier denies a tool call. This hook only fires in auto mode: it does not run when you manually deny a permission dialog, when a `PreToolUse` hook blocks a call, or when a `deny` rule matches. Use it to log classifier denials, adjust configuration, or tell the model it may retry the tool call. Matches on tool name, same values as PreToolUse. + +#### + +​ + +PermissionDenied input + +In addition to the common input fields, PermissionDenied hooks receive `tool_name`, `tool_input`, `tool_use_id`, and `reason`. + + { + "session_id": "abc123", + "transcript_path": "/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl", + "cwd": "/Users/...", + "permission_mode": "auto", + "hook_event_name": "PermissionDenied", + "tool_name": "Bash", + "tool_input": { + "command": "rm -rf /tmp/build", + "description": "Clean build directory" + }, + "tool_use_id": "toolu_01ABC123...", + "reason": "Auto mode denied: command targets a path outside the project" + } + +Field| Description +---|--- +`reason`| The classifier’s explanation for why the tool call was denied + +#### + +​ + +PermissionDenied decision control + +PermissionDenied hooks can tell the model it may retry the denied tool call. Return a JSON object with `hookSpecificOutput.retry` set to `true`: + + { + "hookSpecificOutput": { + "hookEventName": "PermissionDenied", + "retry": true + } + } + +When `retry` is `true`, Claude Code adds a message to the conversation telling the model it may retry the tool call. The denial itself is not reversed. If your hook does not return JSON, or returns `retry: false`, the denial stands and the model receives the original rejection message. ### @@ -2088,6 +2179,7 @@ * `FileChanged` * `InstructionsLoaded` * `Notification` + * `PermissionDenied` * `PostCompact` * `PreCompact` * `SessionEnd`
modified Automate workflows with hooks View current →
--- a/hooks-guide.md +++ b/hooks-guide.md @@ -370,6 +370,7 @@ `UserPromptSubmit`| When you submit a prompt, before Claude processes it `PreToolUse`| Before a tool call executes. Can block it `PermissionRequest`| When a permission dialog appears +`PermissionDenied`| When a tool call is denied by the auto mode classifier. Return `{retry: true}` to tell the model it may retry the denied tool call `PostToolUse`| After a tool call succeeds `PostToolUseFailure`| After a tool call fails `Notification`| When Claude Code sends a notification @@ -471,13 +472,13 @@ } } -Claude Code reads `permissionDecision` and cancels the tool call, then feeds `permissionDecisionReason` back to Claude as feedback. These three options are specific to `PreToolUse`: +With `"deny"`, Claude Code cancels the tool call and feeds `permissionDecisionReason` back to Claude. These `permissionDecision` values are specific to `PreToolUse`: * `"allow"`: skip the interactive permission prompt. Deny and ask rules, including enterprise managed deny lists, still apply * `"deny"`: cancel the tool call and send the reason to Claude * `"ask"`: show the permission prompt to the user as normal -Returning `"allow"` skips the interactive prompt but does not override [permission rules](</docs/en/permissions#manage-permissions>). If a deny rule matches the tool call, the call is blocked even when your hook returns `"allow"`. If an ask rule matches, the user is still prompted. This means deny rules from any settings scope, including [managed settings](</docs/en/settings#settings-files>), always take precedence over hook approvals. Other events use different decision patterns. For example, `PostToolUse` and `Stop` hooks use a top-level `decision: "block"` field, while `PermissionRequest` uses `hookSpecificOutput.decision.behavior`. See the [summary table](</docs/en/hooks#decision-control>) in the reference for a full breakdown by event. For `UserPromptSubmit` hooks, use `additionalContext` instead to inject text into Claude’s context. Prompt-based hooks (`type: "prompt"`) handle output differently: see Prompt-based hooks. +A fourth value, `"defer"`, is available in [non-interactive mode](</docs/en/headless>) with the `-p` flag. It exits the process with the tool call preserved so an Agent SDK wrapper can collect input and resume. See [Defer a tool call for later](</docs/en/hooks#defer-a-tool-call-for-later>) in the reference. Returning `"allow"` skips the interactive prompt but does not override [permission rules](</docs/en/permissions#manage-permissions>). If a deny rule matches the tool call, the call is blocked even when your hook returns `"allow"`. If an ask rule matches, the user is still prompted. This means deny rules from any settings scope, including [managed settings](</docs/en/settings#settings-files>), always take precedence over hook approvals. Other events use different decision patterns. For example, `PostToolUse` and `Stop` hooks use a top-level `decision: "block"` field, while `PermissionRequest` uses `hookSpecificOutput.decision.behavior`. See the [summary table](</docs/en/hooks#decision-control>) in the reference for a full breakdown by event. For `UserPromptSubmit` hooks, use `additionalContext` instead to inject text into Claude’s context. Prompt-based hooks (`type: "prompt"`) handle output differently: see Prompt-based hooks. ### @@ -504,7 +505,7 @@ Event| What the matcher filters| Example matcher values ---|---|--- -`PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest`| tool name| `Bash`, `Edit|Write`, `mcp__.*` +`PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest`, `PermissionDenied`| tool name| `Bash`, `Edit|Write`, `mcp__.*` `SessionStart`| how the session started| `startup`, `resume`, `clear`, `compact` `SessionEnd`| why the session ended| `clear`, `resume`, `logout`, `prompt_input_exit`, `bypass_permissions_disabled`, `other` `Notification`| notification type| `permission_prompt`, `idle_prompt`, `auth_success`, `elicitation_dialog` @@ -610,7 +611,7 @@ } } -The hook process only spawns when the Bash command starts with `git`. Other Bash commands skip this handler entirely. The `if` field accepts the same patterns as permission rules: `"Bash(git *)"`, `"Edit(*.ts)"`, and so on. To match multiple tool names, use separate handlers each with its own `if` value, or match at the `matcher` level where pipe alternation is supported. `if` only works on tool events: `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, and `PermissionRequest`. Adding it to any other event prevents the hook from running. +The hook process only spawns when the Bash command starts with `git`. Other Bash commands skip this handler entirely. The `if` field accepts the same patterns as permission rules: `"Bash(git *)"`, `"Edit(*.ts)"`, and so on. To match multiple tool names, use separate handlers each with its own `if` value, or match at the `matcher` level where pipe alternation is supported. `if` only works on tool events: `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest`, and `PermissionDenied`. Adding it to any other event prevents the hook from running. ###
modified How Claude Code works View current →
--- a/how-claude-code-works.md +++ b/how-claude-code-works.md @@ -88,7 +88,7 @@ Interfaces -You can access Claude Code through the terminal, the [desktop app](</docs/en/desktop>), [IDE extensions](</docs/en/ide-integrations>), [claude.ai/code](<https://claude.ai/code>), [Remote Control](</docs/en/remote-control>), [Slack](</docs/en/slack>), and [CI/CD pipelines](</docs/en/github-actions>). The interface determines how you see and interact with Claude, but the underlying agentic loop is identical. See [Use Claude Code everywhere](</docs/en/overview#use-claude-code-everywhere>) for the full list. +You can access Claude Code through the terminal, the [desktop app](</docs/en/desktop>), [IDE extensions](</docs/en/vs-code>), [claude.ai/code](<https://claude.ai/code>), [Remote Control](</docs/en/remote-control>), [Slack](</docs/en/slack>), and [CI/CD pipelines](</docs/en/github-actions>). The interface determines how you see and interact with Claude, but the underlying agentic loop is identical. See [Use Claude Code everywhere](</docs/en/overview#use-claude-code-everywhere>) for the full list. ##
modified Interactive mode View current →
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -301,6 +301,7 @@ * Does not require Claude to interpret or approve the command * Supports history-based autocomplete: type a partial command and press **Tab** to complete from previous `!` commands in the current project * Exit with `Escape`, `Backspace`, or `Ctrl+U` on an empty prompt + * Pasting text that starts with `!` into an empty prompt enters bash mode automatically, matching typed `!` behavior This is useful for quick shell operations while maintaining conversation context.
modified Model configuration View current →
--- a/model-config.md +++ b/model-config.md @@ -23,7 +23,8 @@ Model alias| Behavior ---|--- -**`default`**| Recommended model setting, depending on your account type +**`default`**| Special value that clears any model override and reverts to the recommended model for your account type. Not itself a model alias +**`best`**| Uses the most capable available model, currently equivalent to `opus` **`sonnet`**| Uses the latest Sonnet model (currently Sonnet 4.6) for daily coding tasks **`opus`**| Uses the latest Opus model (currently Opus 4.6) for complex reasoning tasks **`haiku`**| Uses the fast and efficient Haiku model for simple tasks
modified Enterprise network configuration View current →
--- a/network-config.md +++ b/network-config.md @@ -84,10 +84,10 @@ * `claude.ai`: authentication for claude.ai accounts * `platform.claude.com`: authentication for Anthropic Console accounts -Ensure these URLs are allowlisted in your proxy configuration and firewall rules. This is especially important when using Claude Code in containerized or restricted network environments. The native installer and update checks also require the following URLs. If you install Claude Code through npm or manage your own binary distribution, end users may not need access: +Ensure these URLs are allowlisted in your proxy configuration and firewall rules. This is especially important when using Claude Code in containerized or restricted network environments. The native installer and update checks also require the following URLs. Allowlist both, since the installer and auto-updater fetch from `storage.googleapis.com` while plugin downloads use `downloads.claude.ai`. If you install Claude Code through npm or manage your own binary distribution, end users may not need access: - * `downloads.claude.ai`: CDN hosting the install script, version pointers, manifests, and executables - * `storage.googleapis.com`: legacy download bucket, deprecation in progress + * `storage.googleapis.com`: download bucket for the Claude Code binary and auto-updater + * `downloads.claude.ai`: CDN hosting the install script, version pointers, manifests, signing keys, and plugin executables [Claude Code on the web](</docs/en/claude-code-on-the-web>) and [Code Review](</docs/en/code-review>) connect to your repositories from Anthropic-managed infrastructure. If your GitHub Enterprise Cloud organization restricts access by IP address, enable [IP allow list inheritance for installed GitHub Apps](<https://docs.github.com/en/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization#allowing-access-by-github-apps>). The Claude GitHub App registers its IP ranges, so enabling this setting allows access without manual configuration. To [add the ranges to your allow list manually](<https://docs.github.com/en/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization#adding-an-allowed-ip-address>) instead, or to configure other firewalls, see the [Anthropic API IP addresses](<https://platform.claude.com/docs/en/api/ip-addresses>). For self-hosted [GitHub Enterprise Server](</docs/en/github-enterprise-server>) instances behind a firewall, allowlist the same [Anthropic API IP addresses](<https://platform.claude.com/docs/en/api/ip-addresses>) so Anthropic infrastructure can reach your GHES host to clone repositories and post review comments.
modified Output styles View current →
--- a/output-styles.md +++ b/output-styles.md @@ -19,10 +19,11 @@ Output styles directly modify Claude Code’s system prompt. - * All output styles exclude instructions for efficient output (such as responding concisely). * Custom output styles exclude instructions for coding (such as verifying code with tests), unless `keep-coding-instructions` is true. * All output styles have their own custom instructions added to the end of the system prompt. * All output styles trigger reminders for Claude to adhere to the output style instructions during the conversation. + +Token usage depends on the style. Adding instructions to the system prompt increases input tokens, though prompt caching reduces this cost after the first request in a session. The built-in Explanatory and Learning styles produce longer responses than Default by design, which increases output tokens. For custom styles, output token usage depends on what your instructions tell Claude to produce. ##
modified Claude Code overview View current →
--- a/overview.md +++ b/overview.md @@ -38,7 +38,7 @@ curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd -**Windows requires[Git for Windows](<https://git-scm.com/downloads/win>).** Install it first if you don’t have it. +If you see `The token '&&' is not a valid statement separator`, you’re in PowerShell, not CMD. Use the PowerShell command above instead. Your prompt shows `PS C:\` when you’re in PowerShell.**Windows requires[Git for Windows](<https://git-scm.com/downloads/win>).** Install it first if you don’t have it. Native installations automatically update in the background to keep you on the latest version.
modified Choose a permission mode View current →
--- a/permission-modes.md +++ b/permission-modes.md @@ -212,7 +212,7 @@ The fallback design keeps false positives from derailing a session: a mistaken block costs Claude a retry, not your progress. If the classifier blocks an action 3 times in a row or 20 times total in one session, auto mode pauses and Claude Code resumes prompting for each action. These thresholds are not configurable. - * **CLI** : you see a notification in the status area. Approving the prompted action resets the denial counters, so you can continue in auto mode + * **CLI** : you see a notification in the status area, and the denied action appears in `/permissions` under the Recently denied tab. Approving the prompted action resets the denial counters, so you can continue in auto mode * **Non-interactive mode** with the `-p` flag: aborts the session, since there is no user to prompt Repeated blocks usually mean one of two things: the task genuinely requires actions the classifier is built to stop, or the classifier is missing context about your trusted infrastructure and treating safe actions as risky. If the blocks look like false positives, or if the classifier misses something it should have caught, use `/feedback` to report it. If blocks are happening because the classifier doesn’t recognize your repos or services as trusted, have an administrator [configure trusted infrastructure](</docs/en/permissions#configure-the-auto-mode-classifier>) in managed settings.
modified Configure permissions View current →
--- a/permissions.md +++ b/permissions.md @@ -45,9 +45,9 @@ `dontAsk`| Auto-denies tools unless pre-approved via `/permissions` or `permissions.allow` rules `bypassPermissions`| Skips permission prompts except for writes to protected directories (see warning below) -`bypassPermissions` mode skips permission prompts. Writes to `.git`, `.claude`, `.vscode`, and `.idea` directories still prompt for confirmation to prevent accidental corruption of repository state and local configuration. Writes to `.claude/commands`, `.claude/agents`, and `.claude/skills` are exempt and do not prompt, because Claude routinely writes there when creating skills, subagents, and commands. Only use this mode in isolated environments like containers or VMs where Claude Code cannot cause damage. Administrators can prevent this mode by setting `disableBypassPermissionsMode` to `"disable"` in managed settings. - -To prevent `bypassPermissions` or `auto` mode from being used, set `permissions.disableBypassPermissionsMode` or `disableAutoMode` to `"disable"` in any [settings file](</docs/en/settings#settings-files>). These are most useful in managed settings where they cannot be overridden. +`bypassPermissions` mode skips permission prompts. Writes to `.git`, `.claude`, `.vscode`, and `.idea` directories still prompt for confirmation to prevent accidental corruption of repository state and local configuration. Writes to `.claude/commands`, `.claude/agents`, and `.claude/skills` are exempt and do not prompt, because Claude routinely writes there when creating skills, subagents, and commands. Only use this mode in isolated environments like containers or VMs where Claude Code cannot cause damage. Administrators can prevent this mode by setting `permissions.disableBypassPermissionsMode` to `"disable"` in managed settings. + +To prevent `bypassPermissions` or `auto` mode from being used, set `permissions.disableBypassPermissionsMode` or `permissions.disableAutoMode` to `"disable"` in any [settings file](</docs/en/settings#settings-files>). These are most useful in managed settings where they cannot be overridden. ## @@ -314,6 +314,14 @@ `disableBypassPermissionsMode` is typically placed in managed settings to enforce organizational policy, but it works from any scope. A user can set it in their own settings to lock themselves out of bypass mode. Access to [Remote Control](</docs/en/remote-control>) and [web sessions](</docs/en/claude-code-on-the-web>) is not controlled by a managed settings key. On Team and Enterprise plans, an admin enables or disables these features in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>). + +## + +​ + +Review auto mode denials + +When [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) denies a tool call, a notification appears and the denied action is recorded in `/permissions` under the Recently denied tab. Press `r` on a denied action to mark it for retry: when you exit the dialog, Claude Code sends a message telling the model it may retry that tool call and resumes the conversation. To react to denials programmatically, use the [`PermissionDenied` hook](</docs/en/hooks#permissiondenied>). ##
modified Create and distribute a plugin marketplace View current →
--- a/plugin-marketplaces.md +++ b/plugin-marketplaces.md @@ -595,6 +595,8 @@ For full configuration options, see [Plugin settings](</docs/en/settings#plugin-settings>). +If you use a local `directory` or `file` source with a relative path, the path resolves against your repository’s main checkout. When you run Claude Code from a git worktree, the path still points at the main checkout, so all worktrees share the same marketplace location. Marketplace state is stored once per user in `~/.claude/plugins/known_marketplaces.json`, not per project. + ### ​
modified Create plugins View current →
--- a/plugins.md +++ b/plugins.md @@ -45,7 +45,6 @@ Prerequisites * Claude Code [installed and authenticated](</docs/en/quickstart#step-1-install-claude-code>) - * Claude Code version 1.0.33 or later (run `claude --version` to check) If you don’t see the `/plugin` command, update Claude Code to the latest version. See [Troubleshooting](</docs/en/troubleshooting>) for upgrade instructions.
modified Plugins reference View current →
--- a/plugins-reference.md +++ b/plugins-reference.md @@ -92,6 +92,7 @@ `UserPromptSubmit`| When you submit a prompt, before Claude processes it `PreToolUse`| Before a tool call executes. Can block it `PermissionRequest`| When a permission dialog appears +`PermissionDenied`| When a tool call is denied by the auto mode classifier. Return `{retry: true}` to tell the model it may retry the denied tool call `PostToolUse`| After a tool call succeeds `PostToolUseFailure`| After a tool call fails `Notification`| When Claude Code sends a notification
modified Quickstart View current →
--- a/quickstart.md +++ b/quickstart.md @@ -41,7 +41,7 @@ curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd -**Windows requires[Git for Windows](<https://git-scm.com/downloads/win>).** Install it first if you don’t have it. +If you see `The token '&&' is not a valid statement separator`, you’re in PowerShell, not CMD. Use the PowerShell command above instead. Your prompt shows `PS C:\` when you’re in PowerShell.**Windows requires[Git for Windows](<https://git-scm.com/downloads/win>).** Install it first if you don’t have it. Native installations automatically update in the background to keep you on the latest version.
modified Run prompts on a schedule View current →
--- a/scheduled-tasks.md +++ b/scheduled-tasks.md @@ -125,9 +125,9 @@ ​ -Three-day expiry +Seven-day expiry -Recurring tasks automatically expire 3 days after creation. The task fires one final time, then deletes itself. This bounds how long a forgotten loop can run. If you need a recurring task to last longer, cancel and recreate it before it expires, or use [Cloud scheduled tasks](</docs/en/web-scheduled-tasks>) or [Desktop scheduled tasks](</docs/en/desktop#schedule-recurring-tasks>) for durable scheduling. +Recurring tasks automatically expire 7 days after creation. The task fires one final time, then deletes itself. This bounds how long a forgotten loop can run. If you need a recurring task to last longer, cancel and recreate it before it expires, or use [Cloud scheduled tasks](</docs/en/web-scheduled-tasks>) or [Desktop scheduled tasks](</docs/en/desktop#schedule-recurring-tasks>) for durable scheduling. ##
modified Claude Code settings View current →
--- a/settings.md +++ b/settings.md @@ -177,9 +177,7 @@ `awsCredentialExport`| Custom script that outputs JSON with AWS credentials (see [advanced credential configuration](</docs/en/amazon-bedrock#advanced-credential-configuration>))| `/bin/generate_aws_grant.sh` `blockedMarketplaces`| (Managed settings only) Blocklist of marketplace sources. Blocked sources are checked before downloading, so they never touch the filesystem. See [Managed marketplace restrictions](</docs/en/plugin-marketplaces#managed-marketplace-restrictions>)| `[{ "source": "github", "repo": "untrusted/plugins" }]` `channelsEnabled`| (Managed settings only) Allow [channels](</docs/en/channels>) for Team and Enterprise users. Unset or `false` blocks channel message delivery regardless of what users pass to `--channels`| `true` -`cleanupPeriodDays`| Sessions inactive for longer than this period are deleted at startup (default: 30 days). - -Setting to `0` deletes all existing transcripts at startup and disables session persistence entirely. No new `.jsonl` files are written, `/resume` shows no conversations, and hooks receive an empty `transcript_path`.| `20` +`cleanupPeriodDays`| Sessions inactive for longer than this period are deleted at startup (default: 30 days, minimum 1). Setting to `0` is rejected with a validation error. To disable transcript writes entirely in non-interactive mode (`-p`), use the `--no-session-persistence` flag or the `persistSession: false` SDK option; there is no interactive-mode equivalent.| `20` `companyAnnouncements`| Announcement to display to users at startup. If multiple announcements are provided, they will be cycled through at random.| `["Welcome to Acme Corp! Review our code guidelines at docs.acme.com"]` `defaultShell`| Default shell for input-box `!` commands. Accepts `"bash"` (default) or `"powershell"`. Setting `"powershell"` routes interactive `!` commands through PowerShell on Windows. Requires `CLAUDE_CODE_USE_POWERSHELL_TOOL=1`. See [PowerShell tool](</docs/en/tools-reference#powershell-tool>)| `"powershell"` `deniedMcpServers`| When set in managed-settings.json, denylist of MCP servers that are explicitly blocked. Applies to all scopes including managed servers. Denylist takes precedence over allowlist. See [Managed MCP configuration](</docs/en/mcp#managed-mcp-configuration>)| `[{ "serverName": "filesystem" }]` @@ -195,7 +193,7 @@ `feedbackSurveyRate`| Probability (0–1) that the [session quality survey](</docs/en/data-usage#session-quality-surveys>) appears when eligible. Set to `0` to suppress entirely. Useful when using Bedrock, Vertex, or Foundry where the default sample rate does not apply| `0.05` `fileSuggestion`| Configure a custom script for `@` file autocomplete. See File suggestion settings| `{"type": "command", "command": "~/.claude/file-suggestion.sh"}` `forceLoginMethod`| Use `claudeai` to restrict login to Claude.ai accounts, `console` to restrict login to Claude Console (API usage billing) accounts| `claudeai` -`forceLoginOrgUUID`| Specify the UUID of an organization to automatically select it during login, bypassing the organization selection step. Requires `forceLoginMethod` to be set| `"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"` +`forceLoginOrgUUID`| Require login to belong to a specific organization. Accepts a single UUID string, which also pre-selects that organization during login, or an array of UUIDs where any listed organization is accepted without pre-selection. When set in managed settings, login fails if the authenticated account does not belong to a listed organization; an empty array fails closed and blocks login with a misconfiguration message| `"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"` or `["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy"]` `hooks`| Configure custom commands to run at lifecycle events. See [hooks documentation](</docs/en/hooks>) for format| See [hooks](</docs/en/hooks>) `httpHookAllowedEnvVars`| Allowlist of environment variable names HTTP hooks may interpolate into headers. When set, each hook’s effective `allowedEnvVars` is the intersection with this list. Undefined = no restriction. Arrays merge across settings sources. See Hook configuration| `["MY_TOKEN", "HOOK_SECRET"]` `includeCoAuthoredBy`| **Deprecated** : Use `attribution` instead. Whether to include the `co-authored-by Claude` byline in git commits and pull requests (default: `true`)| `false` @@ -211,6 +209,7 @@ `prefersReducedMotion`| Reduce or disable UI animations (spinners, shimmer, flash effects) for accessibility| `true` `respectGitignore`| Control whether the `@` file picker respects `.gitignore` patterns. When `true` (default), files matching `.gitignore` patterns are excluded from suggestions| `false` `showClearContextOnPlanAccept`| Show the “clear context” option on the plan accept screen. Defaults to `false`. Set to `true` to restore the option| `true` +`showThinkingSummaries`| Show [extended thinking](</docs/en/common-workflows#use-extended-thinking-thinking-mode>) summaries in interactive sessions. When unset or `false` (default in interactive mode), thinking blocks are redacted by the API and shown as a collapsed stub. Redaction only changes what you see, not what the model generates: to reduce thinking spend, [lower the budget or disable thinking](</docs/en/common-workflows#use-extended-thinking-thinking-mode>) instead. Non-interactive mode (`-p`) and SDK callers always receive summaries regardless of this setting| `true` `spinnerTipsEnabled`| Show tips in the spinner while Claude is working. Set to `false` to disable tips (default: `true`)| `false` `spinnerTipsOverride`| Override spinner tips with custom strings. `tips`: array of tip strings. `excludeDefault`: if `true`, only show custom tips; if `false` or absent, custom tips are merged with built-in tips| `{ "excludeDefault": true, "tips": ["Use our internal tool X"] }` `spinnerVerbs`| Customize the action verbs shown in the spinner and turn duration messages. Set `mode` to `"replace"` to use only your verbs, or `"append"` to add them to the defaults| `{"mode": "append", "verbs": ["Pondering", "Crafting"]}`
modified Advanced setup View current →
Show diff (102 lines)
--- a/setup.md +++ b/setup.md @@ -55,7 +55,7 @@ curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd -**Windows requires[Git for Windows](<https://git-scm.com/downloads/win>).** Install it first if you don’t have it. +If you see `The token '&&' is not a valid statement separator`, you’re in PowerShell, not CMD. Use the PowerShell command above instead. Your prompt shows `PS C:\` when you’re in PowerShell.**Windows requires[Git for Windows](<https://git-scm.com/downloads/win>).** Install it first if you don’t have it. Native installations automatically update in the background to keep you on the latest version. @@ -288,12 +288,84 @@ Binary integrity and code signing -You can verify the integrity of Claude Code binaries using SHA256 checksums and code signatures. - - * SHA256 checksums for all platforms are published in the release manifests at `https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/{VERSION}/manifest.json`. Replace `{VERSION}` with a version number such as `2.0.30`. - * Signed binaries are distributed for the following platforms: - * **macOS** : signed by “Anthropic PBC” and notarized by Apple - * **Windows** : signed by “Anthropic, PBC” +Each release publishes a `manifest.json` containing SHA256 checksums for every platform binary. The manifest is signed with an Anthropic GPG key, so verifying the signature on the manifest transitively verifies every binary it lists. + +#### + +​ + +Verify the manifest signature + +The following steps require a POSIX shell with `gpg` and `curl`. On Windows, run them in Git Bash or WSL. + +1 + +Download and import the public key + +The release signing key is published at a fixed URL. + + curl -fsSL https://downloads.claude.ai/keys/claude-code.asc | gpg --import + +Display the fingerprint of the imported key. + + gpg --fingerprint [[email protected]](</cdn-cgi/l/email-protection>) + +Confirm the output includes this fingerprint: + + 31DD DE24 DDFA B679 F42D 7BD2 BAA9 29FF 1A7E CACE + +2 + +Download the manifest and signature + +Set `VERSION` to the release you want to verify. + + REPO=https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases + VERSION=2.1.89 + curl -fsSLO "$REPO/$VERSION/manifest.json" + curl -fsSLO "$REPO/$VERSION/manifest.json.sig" + +3 + +Verify the signature + +Verify the detached signature against the manifest. + + gpg --verify manifest.json.sig manifest.json + +A valid result reports `Good signature from "Anthropic Claude Code Release Signing <[[email protected]](</cdn-cgi/l/email-protection>)>"`.`gpg` also prints `WARNING: This key is not certified with a trusted signature!` for any freshly imported key. This is expected. The `Good signature` line confirms the cryptographic check passed. The fingerprint comparison in Step 1 confirms the key itself is authentic. + +4 + +Check the binary against the manifest + +Compare the SHA256 checksum of your downloaded binary with the value listed under `platforms.<platform>.checksum` in `manifest.json`. + + * Linux + + * macOS + + * Windows PowerShell + + sha256sum claude + + shasum -a 256 claude + + (Get-FileHash claude.exe -Algorithm SHA256).Hash.ToLower() + +Manifest signatures are available for releases from `2.1.89` onward. Earlier releases publish checksums in `manifest.json` without a detached signature. + +#### + +​ + +Platform code signatures + +In addition to the signed manifest, individual binaries carry platform-native code signatures where supported. + + * **macOS** : signed by “Anthropic PBC” and notarized by Apple. Verify with `codesign --verify --verbose ./claude`. + * **Windows** : signed by “Anthropic, PBC”. Verify with `Get-AuthenticodeSignature .\claude.exe`. + * **Linux** : use the manifest signature above to verify integrity. Linux binaries are not individually code-signed. ##
modified Create custom subagents View current →
--- a/sub-agents.md +++ b/sub-agents.md @@ -56,7 +56,6 @@ Agent| Model| When Claude uses it ---|---|--- -Bash| Inherits| Running terminal commands in a separate context statusline-setup| Sonnet| When you run `/statusline` to configure your status line Claude Code Guide| Haiku| When you ask questions about Claude Code features @@ -164,10 +163,11 @@ Location| Scope| Priority| How to create ---|---|---|--- -`--agents` CLI flag| Current session| 1 (highest)| Pass JSON when launching Claude Code -`.claude/agents/`| Current project| 2| Interactive or manual -`~/.claude/agents/`| All your projects| 3| Interactive or manual -Plugin’s `agents/` directory| Where plugin is enabled| 4 (lowest)| Installed with [plugins](</docs/en/plugins>) +Managed settings| Organization-wide| 1 (highest)| Deployed via [managed settings](</docs/en/settings>) +`--agents` CLI flag| Current session| 2| Pass JSON when launching Claude Code +`.claude/agents/`| Current project| 3| Interactive or manual +`~/.claude/agents/`| All your projects| 4| Interactive or manual +Plugin’s `agents/` directory| Where plugin is enabled| 5 (lowest)| Installed with [plugins](</docs/en/plugins>) **Project subagents** (`.claude/agents/`) are ideal for subagents specific to a codebase. Check them into version control so your team can use and improve them collaboratively. Project subagents are discovered by walking up from the current working directory. Directories added with `--add-dir` [grant file access only](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) and are not scanned for subagents. To share subagents across projects, use `~/.claude/agents/` or a [plugin](</docs/en/plugins>). **User subagents** (`~/.claude/agents/`) are personal subagents available in all your projects. **CLI-defined subagents** are passed as JSON when launching Claude Code. They exist only for that session and aren’t saved to disk, making them useful for quick testing or automation scripts. You can define multiple subagents in a single `--agents` call: @@ -184,7 +184,7 @@ } }' -The `--agents` flag accepts JSON with the same frontmatter fields as file-based subagents: `description`, `prompt`, `tools`, `disallowedTools`, `model`, `permissionMode`, `mcpServers`, `hooks`, `maxTurns`, `skills`, `initialPrompt`, `memory`, `effort`, `background`, and `isolation`. Use `prompt` for the system prompt, equivalent to the markdown body in file-based subagents. **Plugin subagents** come from [plugins](</docs/en/plugins>) you’ve installed. They appear in `/agents` alongside your custom subagents. See the [plugin components reference](</docs/en/plugins-reference#agents>) for details on creating plugin subagents. +The `--agents` flag accepts JSON with the same frontmatter fields as file-based subagents: `description`, `prompt`, `tools`, `disallowedTools`, `model`, `permissionMode`, `mcpServers`, `hooks`, `maxTurns`, `skills`, `initialPrompt`, `memory`, `effort`, `background`, `isolation`, and `color`. Use `prompt` for the system prompt, equivalent to the markdown body in file-based subagents. **Managed subagents** are deployed by organization administrators. Place markdown files in `.claude/agents/` inside the [managed settings directory](</docs/en/settings#settings-files>), using the same frontmatter format as project and user subagents. Managed definitions take precedence over project and user subagents with the same name. **Plugin subagents** come from [plugins](</docs/en/plugins>) you’ve installed. They appear in `/agents` alongside your custom subagents. See the [plugin components reference](</docs/en/plugins-reference#agents>) for details on creating plugin subagents. For security reasons, plugin subagents do not support the `hooks`, `mcpServers`, or `permissionMode` frontmatter fields. These fields are ignored when loading agents from a plugin. If you need them, copy the agent file into `.claude/agents/` or `~/.claude/agents/`. You can also add rules to [`permissions.allow`](</docs/en/settings#permission-settings>) in `settings.json` or `settings.local.json`, but these rules apply to the entire session, not just the plugin subagent. @@ -227,15 +227,16 @@ `tools`| No| Tools the subagent can use. Inherits all tools if omitted `disallowedTools`| No| Tools to deny, removed from inherited or specified list `model`| No| Model to use: `sonnet`, `opus`, `haiku`, a full model ID (for example, `claude-opus-4-6`), or `inherit`. Defaults to `inherit` -`permissionMode`| No| Permission mode: `default`, `acceptEdits`, `dontAsk`, `bypassPermissions`, or `plan` +`permissionMode`| No| Permission mode: `default`, `acceptEdits`, `auto`, `dontAsk`, `bypassPermissions`, or `plan` `maxTurns`| No| Maximum number of agentic turns before the subagent stops `skills`| No| [Skills](</docs/en/skills>) to load into the subagent’s context at startup. The full skill content is injected, not just made available for invocation. Subagents don’t inherit skills from the parent conversation -`mcpServers`| No| [MCP servers](</docs/en/mcp>) available to this subagent. Each entry is either a server name referencing an already-configured server (e.g., `"slack"`) or an inline definition with the server name as key and a full [MCP server config](</docs/en/mcp#configure-mcp-servers>) as value +`mcpServers`| No| [MCP servers](</docs/en/mcp>) available to this subagent. Each entry is either a server name referencing an already-configured server (e.g., `"slack"`) or an inline definition with the server name as key and a full [MCP server config](</docs/en/mcp#installing-mcp-servers>) as value `hooks`| No| Lifecycle hooks scoped to this subagent `memory`| No| Persistent memory scope: `user`, `project`, or `local`. Enables cross-session learning `background`| No| Set to `true` to always run this subagent as a background task. Default: `false` `effort`| No| Effort level when this subagent is active. Overrides the session effort level. Default: inherits from session. Options: `low`, `medium`, `high`, `max` (Opus 4.6 only) `isolation`| No| Set to `worktree` to run the subagent in a temporary [git worktree](</docs/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees>), giving it an isolated copy of the repository. The worktree is automatically cleaned up if the subagent makes no changes +`color`| No| Display color for the subagent in the task list and transcript. Accepts `red`, `blue`, `green`, `yellow`, `purple`, `orange`, `pink`, or `cyan` `initialPrompt`| No| Auto-submitted as the first user turn when this agent runs as the main session agent (via `--agent` or the `agent` setting). [Commands](</docs/en/commands>) and [skills](</docs/en/skills>) are processed. Prepended to any user-provided prompt ### @@ -349,6 +350,7 @@ ---|--- `default`| Standard permission checking with prompts `acceptEdits`| Auto-accept file edits +`auto`| [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>): an AI classifier evaluates each tool call `dontAsk`| Auto-deny permission prompts (explicitly allowed tools still work) `bypassPermissions`| Skip permission prompts `plan`| Plan mode (read-only exploration) @@ -597,7 +599,7 @@ @"code-reviewer (agent)" look at the auth changes -Your full message still goes to Claude, which writes the subagent’s task prompt based on what you asked. The @-mention controls which subagent Claude invokes, not what prompt it receives. Subagents provided by an enabled [plugin](</docs/en/plugins>) appear in the typeahead as `<plugin-name>:<agent-name>`. You can also type the mention manually without using the picker: `@agent-<name>` for local subagents, or `@agent-<plugin-name>:<agent-name>` for plugin subagents. **Run the whole session as a subagent.** Pass [`--agent <name>`](</docs/en/cli-reference>) to start a session where the main thread itself takes on that subagent’s system prompt, tool restrictions, and model: +Your full message still goes to Claude, which writes the subagent’s task prompt based on what you asked. The @-mention controls which subagent Claude invokes, not what prompt it receives. Subagents provided by an enabled [plugin](</docs/en/plugins>) appear in the typeahead as `<plugin-name>:<agent-name>`. Named background subagents currently running in the session also appear in the typeahead, showing their status next to the name. You can also type the mention manually without using the picker: `@agent-<name>` for local subagents, or `@agent-<plugin-name>:<agent-name>` for plugin subagents. **Run the whole session as a subagent.** Pass [`--agent <name>`](</docs/en/cli-reference>) to start a session where the main thread itself takes on that subagent’s system prompt, tool restrictions, and model: claude --agent code-reviewer @@ -704,7 +706,7 @@ Resume subagents -Each subagent invocation creates a new instance with fresh context. To continue an existing subagent’s work instead of starting over, ask Claude to resume it. Resumed subagents retain their full conversation history, including all previous tool calls, results, and reasoning. The subagent picks up exactly where it stopped rather than starting fresh. When a subagent completes, Claude receives its agent ID. Claude uses the `SendMessage` tool with the agent’s ID as the `to` field to resume it. The `SendMessage` tool is only available when [agent teams](</docs/en/agent-teams>) are enabled via `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` or the `--agent-teams` flag. To resume a subagent, ask Claude to continue the previous work: +Each subagent invocation creates a new instance with fresh context. To continue an existing subagent’s work instead of starting over, ask Claude to resume it. Resumed subagents retain their full conversation history, including all previous tool calls, results, and reasoning. The subagent picks up exactly where it stopped rather than starting fresh. When a subagent completes, Claude receives its agent ID. Claude uses the `SendMessage` tool with the agent’s ID as the `to` field to resume it. The `SendMessage` tool is only available when [agent teams](</docs/en/agent-teams>) are enabled via `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`. To resume a subagent, ask Claude to continue the previous work: Use the code-reviewer subagent to review the authentication module [Agent completes]
modified Tools reference View current →
--- a/tools-reference.md +++ b/tools-reference.md @@ -21,7 +21,7 @@ `PowerShell`| Executes PowerShell commands on Windows. Opt-in preview. See PowerShell tool| Yes `Read`| Reads the contents of files| No `ReadMcpResourceTool`| Reads a specific MCP resource by URI| No -`SendMessage`| Sends a message to an [agent team](</docs/en/agent-teams>) teammate, or [resumes a subagent](</docs/en/sub-agents#resume-subagents>) by its agent ID. Stopped subagents auto-resume in the background. Only available when `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` or the `--agent-teams` flag is set| No +`SendMessage`| Sends a message to an [agent team](</docs/en/agent-teams>) teammate, or [resumes a subagent](</docs/en/sub-agents#resume-subagents>) by its agent ID. Stopped subagents auto-resume in the background. Only available when `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` is set| No `Skill`| Executes a [skill](</docs/en/skills#control-who-invokes-a-skill>) within the main conversation| Yes `TaskCreate`| Creates a new task in the task list| No `TaskGet`| Retrieves full details for a specific task| No @@ -29,8 +29,8 @@ `TaskOutput`| (Deprecated) Retrieves output from a background task. Prefer `Read` on the task’s output file path| No `TaskStop`| Kills a running background task by ID| No `TaskUpdate`| Updates task status, dependencies, details, or deletes tasks| No -`TeamCreate`| Creates an [agent team](</docs/en/agent-teams>) with multiple teammates. Only available when `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` or the `--agent-teams` flag is set| No -`TeamDelete`| Disbands an agent team and cleans up teammate processes. Only available when `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` or the `--agent-teams` flag is set| No +`TeamCreate`| Creates an [agent team](</docs/en/agent-teams>) with multiple teammates. Only available when `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` is set| No +`TeamDelete`| Disbands an agent team and cleans up teammate processes. Only available when `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` is set| No `TodoWrite`| Manages the session task checklist. Available in non-interactive mode and the [Agent SDK](</docs/en/headless>); interactive sessions use TaskCreate, TaskGet, TaskList, and TaskUpdate instead| No `ToolSearch`| Searches for and loads deferred tools when [tool search](</docs/en/mcp#scale-with-mcp-tool-search>) is enabled| No `WebFetch`| Fetches content from a specified URL| Yes