Changes on
59 changes detected
--- a/agent-loop.md
+++ b/agent-loop.md
@@ -43,7 +43,7 @@
* **`AssistantMessage`:** emitted after each Claude response, including the final text-only one. Contains text content blocks and tool call blocks from that turn.
* **`UserMessage`:** emitted after each tool execution with the tool result content sent back to Claude. Also emitted for any user inputs you stream mid-loop.
* **`StreamEvent`:** only emitted when partial messages are enabled. Contains raw API streaming events (text deltas, tool input chunks). See [Stream responses](</docs/en/agent-sdk/streaming-output>).
- * **`ResultMessage`:** the last message, always. Contains the final text result, token usage, cost, and session ID. Check the `subtype` field to determine whether the task succeeded or hit a limit. See Handle the result.
+ * **`ResultMessage`:** marks the end of the agent loop. Contains the final text result, token usage, cost, and session ID. Check the `subtype` field to determine whether the task succeeded or hit a limit. A small number of trailing system events, such as `prompt_suggestion`, can arrive after it, so iterate the stream to completion rather than breaking on the result. See Handle the result.
These five types cover the full agent loop lifecycle in both SDKs. The TypeScript SDK also yields additional observability events (hook events, tool progress, rate limits, task notifications) that provide extra detail but are not required to drive the loop. See the [Python message types reference](</docs/en/agent-sdk/python#message-types>) and [TypeScript message types reference](</docs/en/agent-sdk/typescript#message-types>) for the complete lists.
@@ -124,7 +124,7 @@
* **`disallowed_tools` / `disallowedTools`** blocks listed tools, regardless of other settings. See [Permissions](</docs/en/agent-sdk/permissions>) for the order that rules are checked before a tool runs.
* **`permission_mode` / `permissionMode`** controls what happens to tools that aren’t covered by allow or deny rules. See Permission mode for available modes.
-You can also scope individual tools with rules like `"Bash(npm:*)"` to allow only specific commands. See [Permissions](</docs/en/agent-sdk/permissions>) for the full rule syntax. When a tool is denied, Claude receives a rejection message as the tool result and typically attempts a different approach or reports that it couldn’t proceed.
+You can also scope individual tools with rules like `"Bash(npm *)"` to allow only specific commands. See [Permissions](</docs/en/agent-sdk/permissions>) for the full rule syntax. When a tool is denied, Claude receives a rejection message as the tool result and typically attempts a different approach or reports that it couldn’t proceed.
###
@@ -168,6 +168,7 @@
`"low"`| Minimal reasoning, fast responses| File lookups, listing directories
`"medium"`| Balanced reasoning| Routine edits, standard tasks
`"high"`| Thorough analysis| Refactors, debugging
+`"xhigh"`| Extended reasoning depth| Coding and agentic tasks; recommended on Opus 4.7
`"max"`| Maximum reasoning depth| Multi-step problems requiring deep analysis
If you don’t set `effort`, the Python SDK leaves the parameter unset and defers to the model’s default behavior. The TypeScript SDK defaults to `"high"`.
@@ -222,10 +223,10 @@
Source| When it loads| Impact
---|---|---
**System prompt**| Every request| Small fixed cost, always present
-**CLAUDE.md files**| Session start, when [`settingSources`](</docs/en/agent-sdk/claude-code-features>) is enabled| Full content in every request (but prompt-cached, so only the first request pays full cost)
+**CLAUDE.md files**| Session start, via [`settingSources`](</docs/en/agent-sdk/claude-code-features>)| Full content in every request (but prompt-cached, so only the first request pays full cost)
**Tool definitions**| Every request| Each tool adds its schema; use [MCP tool search](</docs/en/agent-sdk/mcp#mcp-tool-search>) to load tools on-demand instead of all at once
**Conversation history**| Accumulates over turns| Grows with each turn: prompts, responses, tool inputs, tool outputs
-**Skill descriptions**| Session start (with setting sources enabled)| Short summaries; full content loads only when invoked
+**Skill descriptions**| Session start, via setting sources| Short summaries; full content loads only when invoked
Large tool outputs consume significant context. Reading a big file or running a command with verbose output can use thousands of tokens in a single turn. Context accumulates across turns, so longer sessions with many tool calls build up significantly more context than short ones.
--- a/amazon-bedrock.md
+++ b/amazon-bedrock.md
@@ -158,9 +158,9 @@
Pin specific model versions when deploying to multiple users. Without pinning, model aliases such as `sonnet` and `opus` resolve to the latest version, which may not yet be available in your Bedrock account when Anthropic releases an update. Claude Code falls back to the previous version at startup when the latest is unavailable, but pinning lets you control when your users move to a new model.
-Set these environment variables to specific Bedrock model IDs:
-
- export ANTHROPIC_DEFAULT_OPUS_MODEL='us.anthropic.claude-opus-4-6-v1'
+Set these environment variables to specific Bedrock model IDs. Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias on Bedrock resolves to Opus 4.6. Set it to the Opus 4.7 ID to use the latest model:
+
+ export ANTHROPIC_DEFAULT_OPUS_MODEL='us.anthropic.claude-opus-4-7'
export ANTHROPIC_DEFAULT_SONNET_MODEL='us.anthropic.claude-sonnet-4-6'
export ANTHROPIC_DEFAULT_HAIKU_MODEL='us.anthropic.claude-haiku-4-5-20251001-v1:0'
@@ -191,10 +191,11 @@
Map each model version to an inference profile
-The `ANTHROPIC_DEFAULT_*_MODEL` environment variables configure one inference profile per model family. If your organization needs to expose several versions of the same family in the `/model` picker, each routed to its own application inference profile ARN, use the `modelOverrides` setting in your [settings file](</docs/en/settings#settings-files>) instead. This example maps three Opus versions to distinct ARNs so users can switch between them without bypassing your organization’s inference profiles:
+The `ANTHROPIC_DEFAULT_*_MODEL` environment variables configure one inference profile per model family. If your organization needs to expose several versions of the same family in the `/model` picker, each routed to its own application inference profile ARN, use the `modelOverrides` setting in your [settings file](</docs/en/settings#settings-files>) instead. This example maps four Opus versions to distinct ARNs so users can switch between them without bypassing your organization’s inference profiles:
{
"modelOverrides": {
+ "claude-opus-4-7": "arn:aws:bedrock:us-east-2:123456789012:application-inference-profile/opus-47-prod",
"claude-opus-4-6": "arn:aws:bedrock:us-east-2:123456789012:application-inference-profile/opus-46-prod",
"claude-opus-4-5-20251101": "arn:aws:bedrock:us-east-2:123456789012:application-inference-profile/opus-45-prod",
"claude-opus-4-1-20250805": "arn:aws:bedrock:us-east-2:123456789012:application-inference-profile/opus-41-prod"
@@ -263,7 +264,7 @@
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.
+Claude Opus 4.7, 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. The setup wizard offers a 1M context option when it pins models. To enable it for a manually pinned model instead, 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.
##
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,54 @@
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.112
+
+April 16, 2026
+
+ * Fixed “claude-opus-4-7 is temporarily unavailable” for auto mode
+
+
+
+2.1.111
+
+April 16, 2026
+
+ * Claude Opus 4.7 xhigh is now available! Use /effort to tune speed vs. intelligence
+ * Auto mode is now available for Max subscribers when using Opus 4.7
+ * Added `xhigh` effort level for Opus 4.7, sitting between `high` and `max`. Available via `/effort`, `--effort`, and the model picker; other models fall back to `high`
+ * `/effort` now opens an interactive slider when called without arguments, with arrow-key navigation between levels and Enter to confirm
+ * Added “Auto (match terminal)” theme option that matches your terminal’s dark/light mode — select it from `/theme`
+ * Added `/less-permission-prompts` skill — scans transcripts for common read-only Bash and MCP tool calls and proposes a prioritized allowlist for `.claude/settings.json`
+ * Added `/ultrareview` for running comprehensive code review in the cloud using parallel multi-agent analysis and critique — invoke with no arguments to review your current branch, or `/ultrareview <PR#>` to fetch and review a specific GitHub PR
+ * Auto mode no longer requires `--enable-auto-mode`
+ * Windows: PowerShell tool is progressively rolling out. Opt in or out with `CLAUDE_CODE_USE_POWERSHELL_TOOL`. On Linux and macOS, enable with `CLAUDE_CODE_USE_POWERSHELL_TOOL=1` (requires `pwsh` on PATH)
+ * Read-only bash commands with glob patterns (e.g. `ls *.ts`) and commands starting with `cd <project-dir> &&` no longer trigger a permission prompt
+ * Suggest the closest matching subcommand when `claude <word>` is invoked with a near-miss typo (e.g. `claude udpate` → “Did you mean `claude update`?”)
+ * Plan files are now named after your prompt (e.g. `fix-auth-race-snug-otter.md`) instead of purely random words
+ * Improved `/setup-vertex` and `/setup-bedrock` to show the actual `settings.json` path when `CLAUDE_CONFIG_DIR` is set, seed model candidates from existing pins on re-run, and offer a “with 1M context” option for supported models
+ * `/skills` menu now supports sorting by estimated token count — press `t` to toggle
+ * `Ctrl+U` now clears the entire input buffer (previously: delete to start of line); press `Ctrl+Y` to restore
+ * `Ctrl+L` now forces a full screen redraw in addition to clearing the prompt input
+ * Transcript view footer now shows `[` (dump to scrollback) and `v` (open in editor) shortcuts
+ * The “+N lines” marker for truncated long pastes is now a full-width rule for easier scanning
+ * Headless `--output-format stream-json` now includes `plugin_errors` on the init event when plugins are demoted for unsatisfied dependencies
+ * Added `OTEL_LOG_RAW_API_BODIES` environment variable to emit full API request and response bodies as OpenTelemetry log events for debugging
+ * Suppressed spurious decompression, network, and transient error messages that could appear in the TUI during normal operation
+ * Reverted the v2.1.110 cap on non-streaming fallback retries — it traded long waits for more outright failures during API overload
+ * Fixed terminal display tearing (random characters, drifting input) in iTerm2 + tmux setups when terminal notifications are sent
+ * Fixed `@` file suggestions re-scanning the entire project on every turn in non-git working directories, and showing only config files in freshly-initialized git repos with no tracked files
+ * Fixed LSP diagnostics from before an edit appearing after it, causing the model to re-read files it just edited
+ * Fixed tab-completing `/resume` immediately resuming an arbitrary titled session instead of showing the session picker
+ * Fixed `/context` grid rendering with extra blank lines between rows
+ * Fixed `/clear` dropping the session name set by `/rename`, causing statusline output to lose `session_name`
+ * Improved plugin error handling: dependency errors now distinguish conflicting, invalid, and overly complex version requirements; fixed stale resolved versions after `plugin update`; `plugin install` now recovers from interrupted prior installs
+ * Fixed Claude calling a non-existent `commit` skill and showing “Unknown skill: commit” for users without a custom `/commit` command
+ * Fixed 429 rate-limit errors on Bedrock/Vertex/Foundry referencing status.claude.com (it only covers Anthropic-operated providers)
+ * Fixed feedback surveys appearing back-to-back after dismissing one
+ * Fixed bare URLs in bash/PowerShell/MCP tool output being unclickable when the terminal wraps them across lines
+ * Windows: `CLAUDE_ENV_FILE` and SessionStart hook environment files now apply (previously a no-op)
+ * Windows: permission rules with drive-letter paths are now correctly root-anchored, and paths differing only by drive-letter case are recognized as the same path
@@ -14,7 +64,7 @@
* Improved `/plugin` Installed tab — items needing attention and favorites appear at the top, disabled items are hidden behind a fold, and `f` favorites the selected item
* Improved `/doctor` to warn when an MCP server is defined in multiple config scopes with different endpoints
* `--resume`/`--continue` now resurrects unexpired scheduled tasks
- * `/autocompact`, `/context`, `/exit`, and `/reload-plugins` now work from Remote Control (mobile/web) clients
+ * `/context`, `/exit`, and `/reload-plugins` now work from Remote Control (mobile/web) clients
* Write tool now informs the model when you edit the proposed content in the IDE diff before accepting
* Bash tool now enforces the documented maximum timeout instead of accepting arbitrarily large values
* SDK/headless sessions now read `TRACEPARENT`/`TRACESTATE` from the environment for distributed trace linking
--- a/claude-code-features.md
+++ b/claude-code-features.md
@@ -1,12 +1,12 @@
-The Agent SDK is built on the same foundation as Claude Code, which means your SDK agents have access to the same filesystem-based features: project instructions (`CLAUDE.md` and rules), skills, hooks, and more. By default, the SDK loads no filesystem settings. Your agent runs in isolation mode with only what you pass programmatically. To load CLAUDE.md, skills, or filesystem hooks, set `settingSources` to tell the SDK where to look. For a conceptual overview of what each feature does and when to use it, see [Extend Claude Code](</docs/en/features-overview>).
-
-##
-
-
-
-Enable Claude Code features with settingSources
-
-The setting sources option ([`setting_sources`](</docs/en/agent-sdk/python#claude-agent-options>) in Python, [`settingSources`](</docs/en/agent-sdk/typescript#setting-source>) in TypeScript) controls which filesystem-based settings the SDK loads. Without it, your agent won’t discover skills, `CLAUDE.md` files, or project-level hooks. This example loads both user-level and project-level settings by setting `settingSources` to `["user", "project"]`:
+The Agent SDK is built on the same foundation as Claude Code, which means your SDK agents have access to the same filesystem-based features: project instructions (`CLAUDE.md` and rules), skills, hooks, and more. When you omit `settingSources`, `query()` reads the same filesystem settings as the Claude Code CLI: user, project, and local settings, CLAUDE.md files, and `.claude/` skills, agents, and commands. To run without these, pass `settingSources: []`, which limits the agent to what you configure programmatically. Managed policy settings and the global `~/.claude.json` config are read regardless of this option. See What settingSources does not control. For a conceptual overview of what each feature does and when to use it, see [Extend Claude Code](</docs/en/features-overview>).
+
+##
+
+
+
+Control filesystem settings with settingSources
+
+The setting sources option ([`setting_sources`](</docs/en/agent-sdk/python#claude-agent-options>) in Python, [`settingSources`](</docs/en/agent-sdk/typescript#setting-source>) in TypeScript) controls which filesystem-based settings the SDK loads. Pass an explicit list to opt in to specific sources, or pass an empty array to disable user, project, and local settings. This example loads both user-level and project-level settings by setting `settingSources` to `["user", "project"]`:
Python
@@ -39,9 +39,23 @@
`"user"`| User CLAUDE.md, `~/.claude/rules/*.md`, user skills, user settings| `~/.claude/`
`"local"`| CLAUDE.local.md (gitignored), `.claude/settings.local.json`| `<cwd>/`
-To match the full Claude Code CLI behavior, use `["user", "project", "local"]`.
-
-The `cwd` option determines where the SDK looks for project settings. If neither `cwd` nor any of its parent directories contains a `.claude/` folder, project-level features won’t load. Auto memory (the `~/.claude/projects/<project>/memory/` directory that Claude Code uses to persist notes across interactive sessions) is a CLI-only feature and is never loaded by the SDK.
+Omitting `settingSources` is equivalent to `["user", "project", "local"]`. The `cwd` option determines where the SDK looks for project settings. If neither `cwd` nor any of its parent directories contains a `.claude/` folder, project-level features won’t load.
+
+###
+
+
+
+What settingSources does not control
+
+`settingSources` covers user, project, and local settings. A few inputs are read regardless of its value:
+
+Input| Behavior| To disable
+---|---|---
+Managed policy settings| Always loaded when present on the host| Remove the managed settings file
+`~/.claude.json` global config| Always read| Relocate with `CLAUDE_CONFIG_DIR` in `env`
+Auto memory at `~/.claude/projects/<project>/memory/`| Loaded by default into the system prompt| Set `autoMemoryEnabled: false` in settings, or `CLAUDE_CODE_DISABLE_AUTO_MEMORY=1` in `env`
+
+Do not rely on default `query()` options for multi-tenant isolation. Because the inputs above are read regardless of `settingSources`, an SDK process can pick up host-level configuration and per-directory memory. For multi-tenant deployments, run each tenant in its own filesystem and set `settingSources: []` plus `CLAUDE_CODE_DISABLE_AUTO_MEMORY=1` in `env`. See [Secure deployment](</docs/en/agent-sdk/secure-deployment>).
##
@@ -79,7 +93,7 @@
Skills
-Skills are markdown files that give your agent specialized knowledge and invocable workflows. Unlike `CLAUDE.md` (which loads every session), skills load on demand. The agent receives skill descriptions at startup and loads the full content when relevant. To use skills in the SDK, set `settingSources` so the agent discovers skill files from the filesystem. The `Skill` tool is enabled by default when you don’t specify `allowedTools`. If you are using an `allowedTools` allowlist, include `"Skill"` explicitly.
+Skills are markdown files that give your agent specialized knowledge and invocable workflows. Unlike `CLAUDE.md` (which loads every session), skills load on demand. The agent receives skill descriptions at startup and loads the full content when relevant. Skills are discovered from the filesystem through `settingSources`. With default options, user and project skills load automatically. The `Skill` tool is enabled by default when you don’t specify `allowedTools`. If you are using an `allowedTools` allowlist, include `"Skill"` explicitly.
Python
Show diff (115 lines)
--- a/claude-code-on-the-web.md
+++ b/claude-code-on-the-web.md
@@ -125,13 +125,13 @@
Run tests, start services, and add packages
-Claude runs tests as part of working on a task. Ask for it in your prompt, like “fix the failing tests in `tests/`” or “run pytest after each change.” Test runners like pytest, jest, and cargo test work out of the box since they’re pre-installed. PostgreSQL and Redis are pre-installed but not running by default. Start each one in a setup script or ask Claude to start it during the session:
+Claude runs tests as part of working on a task. Ask for it in your prompt, like “fix the failing tests in `tests/`” or “run pytest after each change.” Test runners like pytest, jest, and cargo test work out of the box since they’re pre-installed. PostgreSQL and Redis are pre-installed but not running by default. Ask Claude to start each one during the session:
service postgresql start
service redis-server start
-Docker is available for running containerized services. Network access to pull images follows your environment’s access level. To add packages that aren’t pre-installed, use a setup script so they’re available at session start. You can also ask Claude to install packages during the session, but those installs don’t persist across sessions.
+Docker is available for running containerized services. Ask Claude to run `docker compose up` to start your project’s services. Network access to pull images follows your environment’s access level, and the Trusted defaults include Docker Hub and other common registries. If your images are large or slow to pull, add `docker compose pull` or `docker compose build` to your setup script. The pulled images are saved in the cached environment, so each new session has them on disk. The cache stores files only, not running processes, so Claude still starts the containers each session. To add packages that aren’t pre-installed, use a setup script. The script’s output is cached, so packages you install there are available at the start of every session without reinstalling each time. You can also ask Claude to install packages mid-session, but those installs don’t carry over to other sessions.
###
@@ -179,9 +179,17 @@
#!/bin/bash
apt update && apt install -y gh
-Setup scripts run only when creating a new session. They are skipped when resuming an existing session. If the script exits non-zero, the session fails to start. Append `|| true` to non-critical commands to avoid blocking the session on an intermittent install failure.
+If the script exits non-zero, the session fails to start. Append `|| true` to non-critical commands to avoid blocking the session on an intermittent install failure.
Setup scripts that install packages need network access to reach registries. The default **Trusted** network access allows connections to common package registries including npm, PyPI, RubyGems, and crates.io. Scripts will fail to install packages if your environment uses **None** network access.
+
+###
+
+
+
+Environment caching
+
+The setup script runs the first time you start a session in an environment. After it completes, Anthropic snapshots the filesystem and reuses that snapshot as the starting point for later sessions. New sessions start with your dependencies, tools, and Docker images already on disk, and the setup script step is skipped. This keeps startup fast even when the script installs large toolchains or pulls container images. The cache captures files, not running processes. Anything the setup script writes to disk carries over. Services or containers it starts do not, so start those per session by asking Claude or with a SessionStart hook. The setup script runs again to rebuild the cache when you change the environment’s setup script or allowed network hosts, and when the cache reaches its expiry after roughly seven days. Resuming an existing session never re-runs the setup script. You don’t need to enable caching or manage snapshots yourself.
###
@@ -195,7 +203,7 @@
---|---|---
Attached to| The cloud environment| Your repository
Configured in| Cloud environment UI| `.claude/settings.json` in your repo
-Runs| Before Claude Code launches, on new sessions only| After Claude Code launches, on every session including resumed
+Runs| Before Claude Code launches, when no cached environment is available| After Claude Code launches, on every session including resumed
Scope| Cloud environments only| Both local and cloud
SessionStart hooks can also be defined in your user-level `~/.claude/settings.json` locally, but user-level settings don’t carry over to cloud sessions. In the cloud, only hooks committed to the repo run.
@@ -241,9 +249,9 @@
* **No cloud-only scoping** : hooks run in both local and cloud sessions. To skip local execution, check the `CLAUDE_CODE_REMOTE` environment variable as shown above.
* **Requires network access** : install commands need to reach package registries. If your environment uses **None** network access, these hooks fail. The default allowlist under **Trusted** covers npm, PyPI, RubyGems, and crates.io.
* **Proxy compatibility** : all outbound traffic passes through a security proxy. Some package managers don’t work correctly with this proxy. Bun is a known example.
- * **Adds startup latency** : hooks run each time a session starts or resumes. Keep install scripts fast by checking whether dependencies are already present before reinstalling.
-
-To persist environment variables for subsequent Bash commands, write to the file at `$CLAUDE_ENV_FILE`. See [SessionStart hooks](</docs/en/hooks#sessionstart>) for details. Custom environment images and snapshots are not yet supported.
+ * **Adds startup latency** : hooks run each time a session starts or resumes, unlike setup scripts which benefit from environment caching. Keep install scripts fast by checking whether dependencies are already present before reinstalling.
+
+To persist environment variables for subsequent Bash commands, write to the file at `$CLAUDE_ENV_FILE`. See [SessionStart hooks](</docs/en/hooks#sessionstart>) for details. Replacing the base image with your own Docker image is not yet supported. Use a setup script to install what you need on top of the provided image, or run your image as a container alongside Claude with `docker compose`.
##
@@ -798,6 +806,46 @@
+Troubleshooting
+
+For runtime API errors that appear in the conversation such as `API Error: 500`, `529 Overloaded`, `429`, or `Prompt is too long`, see the [Error reference](</docs/en/errors>). Those errors and their fixes are shared with the CLI and Desktop app. The sections below cover issues specific to cloud sessions.
+
+###
+
+
+
+Session creation failed
+
+If a new session fails to start with `Session creation failed` or stalls at provisioning, Claude Code could not allocate a cloud environment.
+
+ * Check [status.claude.com](<https://status.claude.com>) for cloud session incidents
+ * Retry after a minute, as capacity is provisioned on demand
+ * Confirm your repository is reachable. Private repositories require either the GitHub App installed with access to that repository, or a `gh` token synced via `/web-setup`. See GitHub authentication options.
+
+###
+
+
+
+Remote Control session expired or access denied
+
+`--teleport` connects through the same Remote Control session infrastructure that cloud sessions use, so authentication and session-expiry errors surface with Remote Control wording. You may see `Remote Control session has expired` or `Access denied`. The connection token is short-lived and scoped to your account.
+
+ * Run `/login` locally to refresh your credentials, then reconnect
+ * Confirm you are signed in to the same account that owns the session
+ * If you see `Remote Control may not be available for this organization`, your admin has not enabled remote sessions for your plan
+
+###
+
+
+
+Environment expired
+
+Cloud sessions stop after a period of inactivity and the underlying environment is reclaimed. From a local terminal, this surfaces as `Could not resume session ... its environment has expired. Creating a fresh session instead.` On the web, the session is marked expired in the session list. Reopen the session from [claude.ai/code](<https://claude.ai/code>) to provision a fresh environment with your conversation history restored.
+
+##
+
+
+
Limitations
Before relying on cloud sessions for a workflow, account for these constraints:
@@ -812,6 +860,8 @@
Related resources
+ * [Ultraplan](</docs/en/ultraplan>): draft a plan in a cloud session and review it in your browser
+ * [Ultrareview](</docs/en/ultrareview>): run a deep multi-agent code review in a cloud sandbox
* [Routines](</docs/en/routines>): automate work on a schedule, via API call, or in response to GitHub events
* [Hooks configuration](</docs/en/hooks>): run scripts at session lifecycle events
* [Settings reference](</docs/en/settings>): all configuration options
--- a/cli-reference.md
+++ b/cli-reference.md
@@ -25,6 +25,8 @@
`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#start-a-remote-control-session>)| `claude remote-control --name "My Project"`
`claude setup-token`| Generate a long-lived OAuth token for CI and scripts. Prints the token to the terminal without saving it. Requires a Claude subscription. See [Generate a long-lived token](</docs/en/authentication#generate-a-long-lived-token>)| `claude setup-token`
+
+If you mistype a subcommand, Claude Code suggests the closest match and exits without starting a session. For example, `claude udpate` prints `Did you mean claude update?`.
##
@@ -54,7 +56,8 @@
`--debug-file <path>`| Write debug logs to a specific file path. Implicitly enables debug mode. Takes precedence over `CLAUDE_CODE_DEBUG_LOGS_DIR`| `claude --debug-file /tmp/claude-debug.log`
`--disable-slash-commands`| Disable all skills and commands for this session| `claude --disable-slash-commands`
`--disallowedTools`| Tools that are removed from the model’s context and cannot be used| `"Bash(git log *)" "Bash(git diff *)" "Edit"`
-`--effort`| Set the [effort level](</docs/en/model-config#adjust-effort-level>) for the current session. Options: `low`, `medium`, `high`, `max` (Opus 4.6 only). Session-scoped and does not persist to settings| `claude --effort high`
+`--effort`| Set the [effort level](</docs/en/model-config#adjust-effort-level>) for the current session. Options: `low`, `medium`, `high`, `xhigh`, `max`; available levels depend on the model. Session-scoped and does not persist to settings| `claude --effort high`
+`--enable-auto-mode`| Removed in v2.1.111. Auto mode is now in the `Shift+Tab` cycle by default; use `--permission-mode auto` to start in it| `claude --permission-mode auto`
`--exclude-dynamic-system-prompt-sections`| Move per-machine sections from the system prompt (working directory, environment info, memory paths, git status) into the first user message. Improves prompt-cache reuse across different users and machines running the same task. Only applies with the default system prompt; ignored when `--system-prompt` or `--system-prompt-file` is set. Use with `-p` for scripted, multi-user workloads| `claude -p --exclude-dynamic-system-prompt-sections "query"`
`--fallback-model`| Enable automatic fallback to specified model when default model is overloaded (print mode only)| `claude -p --fallback-model sonnet "query"`
`--fork-session`| When resuming, create a new session ID instead of reusing the original (use with `--resume` or `--continue`)| `claude --resume abc123 --fork-session`
@@ -77,7 +80,6 @@
`--no-chrome`| Disable [Chrome browser integration](</docs/en/chrome>) for this session| `claude --no-chrome`
`--no-session-persistence`| Disable session persistence so sessions are not saved to disk and cannot be resumed (print mode only)| `claude -p --no-session-persistence "query"`
`--output-format`| Specify output format for print mode (options: `text`, `json`, `stream-json`)| `claude -p "query" --output-format json`
-`--enable-auto-mode`| Unlock [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) in the `Shift+Tab` cycle. Requires a Team, Enterprise, or API plan and Claude Sonnet 4.6 or Opus 4.6| `claude --enable-auto-mode`
`--permission-mode`| Begin in a specified [permission mode](</docs/en/permission-modes>). Accepts `default`, `acceptEdits`, `plan`, `auto`, `dontAsk`, or `bypassPermissions`. Overrides `defaultMode` from settings files| `claude --permission-mode plan`
`--permission-prompt-tool`| Specify an MCP tool to handle permission prompts in non-interactive mode| `claude -p --permission-prompt-tool mcp_auth_tool "query"`
`--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`
--- a/commands.md
+++ b/commands.md
@@ -10,7 +10,7 @@
`/btw <question>`| Ask a quick [side question](</docs/en/interactive-mode#side-questions-with-btw>) without adding to the conversation
`/chrome`| Configure [Claude in Chrome](</docs/en/chrome>) settings
`/claude-api`| **[Skill](</docs/en/skills#bundled-skills>).** Load Claude API reference material for your project’s language (Python, TypeScript, Java, Go, Ruby, C#, PHP, or cURL) and Managed Agents reference. Covers tool use, streaming, batches, structured outputs, and common pitfalls. Also activates automatically when your code imports `anthropic` or `@anthropic-ai/sdk`
-`/clear`| Clear conversation history and free up context. Aliases: `/reset`, `/new`
+`/clear`| Start a new conversation with empty context. The previous conversation stays available in `/resume`. To free up context while continuing the same conversation, use `/compact` instead. Aliases: `/reset`, `/new`
`/color [color|default]`| Set the prompt bar color for the current session. Available colors: `red`, `blue`, `green`, `yellow`, `purple`, `orange`, `pink`, `cyan`. Use `default` to reset
`/compact [instructions]`| Compact conversation with optional focus instructions
`/config`| Open the [Settings](</docs/en/settings>) interface to adjust theme, model, [output style](</docs/en/output-styles>), and other preferences. Alias: `/settings`
@@ -21,12 +21,14 @@
`/desktop`| Continue the current session in the Claude Code Desktop app. macOS and Windows only. Alias: `/app`
`/diff`| Open an interactive diff viewer showing uncommitted changes and per-turn diffs. Use left/right arrows to switch between the current git diff and individual Claude turns, and up/down to browse files
`/doctor`| Diagnose and verify your Claude Code installation and settings. Results show with status icons. Press `f` to have Claude fix any reported issues
-`/effort [low|medium|high|max|auto]`| Set the model [effort level](</docs/en/model-config#adjust-effort-level>). `low`, `medium`, and `high` persist across sessions. `max` applies to the current session only and requires Opus 4.6. `auto` resets to the model default. Without an argument, shows the current level. Takes effect immediately without waiting for the current response to finish
+`/effort [level|auto]`| Set the model [effort level](</docs/en/model-config#adjust-effort-level>). Accepts `low`, `medium`, `high`, `xhigh`, or `max`; available levels depend on the model and `max` is session-only. `auto` resets to the model default. Without an argument, opens an interactive slider; use left and right arrows to pick a level and `Enter` to apply. Takes effect immediately without waiting for the current response to finish
`/exit`| Exit the CLI. Alias: `/quit`
`/export [filename]`| Export the current conversation as plain text. With a filename, writes directly to that file. Without, opens a dialog to copy to clipboard or save to a file
`/extra-usage`| Configure extra usage to keep working when rate limits are hit
`/fast [on|off]`| Toggle [fast mode](</docs/en/fast-mode>) on or off
`/feedback [report]`| Submit feedback about Claude Code. Alias: `/bug`
+`/focus`| Toggle the focus view, which shows only your last prompt, a one-line tool-call summary with edit diffstats, and the final response. The selection persists across sessions. Only available in [fullscreen rendering](</docs/en/fullscreen>)
+`/heapdump`| Write a JavaScript heap snapshot and a memory breakdown to `~/Desktop` for diagnosing high memory usage. See [troubleshooting](</docs/en/troubleshooting#high-cpu-or-memory-usage>)
`/help`| Show help and available commands
`/hooks`| View [hook](</docs/en/hooks>) configurations for tool events
`/ide`| Manage IDE integrations and show status
@@ -35,13 +37,14 @@
`/install-github-app`| Set up the [Claude GitHub Actions](</docs/en/github-actions>) app for a repository. Walks you through selecting a repo and configuring the integration
`/install-slack-app`| Install the Claude Slack app. Opens a browser to complete the OAuth flow
`/keybindings`| Open or create your keybindings configuration file
+`/less-permission-prompts`| **[Skill](</docs/en/skills#bundled-skills>).** 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
`/login`| Sign in to your Anthropic account
`/logout`| Sign out from your Anthropic account
`/loop [interval] [prompt]`| **[Skill](</docs/en/skills#bundled-skills>).** Run a prompt repeatedly while the session stays open. Omit the interval and Claude self-paces between iterations. Omit the prompt and Claude runs an autonomous maintenance check, or the prompt in `.claude/loop.md` if present. Example: `/loop 5m check if the deploy finished`. See [Run prompts on a schedule](</docs/en/scheduled-tasks>). Alias: `/proactive`
`/mcp`| Manage MCP server connections and OAuth authentication
`/memory`| Edit `CLAUDE.md` memory files, enable or disable [auto-memory](</docs/en/memory#auto-memory>), and view auto-memory entries
`/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
+`/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>). With no argument, opens a picker that asks for confirmation when the conversation has prior output, since the next response re-reads the full history without cached context. Once confirmed, the change applies 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`| 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`
@@ -49,21 +52,22 @@
`/powerup`| Discover Claude Code features through quick interactive lessons with animated demos
`/pr-comments [PR]`| Removed in v2.1.91. Ask Claude directly to view pull request comments instead. On earlier versions, fetches and displays 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
`/privacy-settings`| View and update your privacy settings. Only available for Pro and Max plan subscribers
+`/recap`| Generate a one-line summary of the current session on demand. See [Session recap](</docs/en/interactive-mode#session-recap>) for the automatic recap that appears after you’ve been away
`/release-notes`| View the changelog in an interactive version picker. Select a specific version to see its release notes, or choose to show all versions
`/reload-plugins`| Reload all active [plugins](</docs/en/plugins>) to apply pending changes without restarting. Reports counts for each reloaded component and flags any load errors
`/remote-control`| Make this session available for [remote control](</docs/en/remote-control>) from claude.ai. Alias: `/rc`
`/remote-env`| Configure the default remote environment for [web sessions started with `--remote`](</docs/en/claude-code-on-the-web#configure-your-environment>)
`/rename [name]`| Rename the current session and show the name on the prompt bar. Without a name, auto-generates one from conversation history
`/resume [session]`| Resume a conversation by ID or name, or open the session picker. Alias: `/continue`
-`/review`| Deprecated. Install the [`code-review` plugin](<https://github.com/anthropics/claude-plugins-official/tree/main/plugins/code-review>) instead: `claude plugin install code-review@claude-plugins-official`
-`/rewind`| Rewind the conversation and/or code to a previous point, or summarize from a selected message. See [checkpointing](</docs/en/checkpointing>). Alias: `/checkpoint`
+`/review [PR]`| Review a pull request locally in your current session. For a deeper cloud-based review, see [`/ultrareview`](</docs/en/ultrareview>)
+`/rewind`| Rewind the conversation and/or code to a previous point, or summarize from a selected message. See [checkpointing](</docs/en/checkpointing>). Aliases: `/checkpoint`, `/undo`
`/sandbox`| Toggle [sandbox mode](</docs/en/sandboxing>). Available on supported platforms only
-`/schedule [description]`| Create, update, list, or run [routines](</docs/en/routines>). Claude walks you through the setup conversationally
+`/schedule [description]`| Create, update, list, or run [routines](</docs/en/routines>). Claude walks you through the setup conversationally. Alias: `/routines`
`/security-review`| Analyze pending changes on the current branch for security vulnerabilities. Reviews the git diff and identifies risks like injection, auth issues, and data exposure
`/setup-bedrock`| Configure [Amazon Bedrock](</docs/en/amazon-bedrock>) authentication, region, and model pins through an interactive wizard. Only visible when `CLAUDE_CODE_USE_BEDROCK=1` is set. First-time Bedrock users can also access this wizard from the login screen
`/setup-vertex`| Configure [Google Vertex AI](</docs/en/google-vertex-ai>) authentication, project, region, and model pins through an interactive wizard. Only visible when `CLAUDE_CODE_USE_VERTEX=1` is set. First-time Vertex AI users can also access this wizard from the login screen
`/simplify [focus]`| **[Skill](</docs/en/skills#bundled-skills>).** Review your recently changed files for code reuse, quality, and efficiency issues, then fix them. Spawns three review agents in parallel, aggregates their findings, and applies fixes. Pass text to focus on specific concerns: `/simplify focus on memory efficiency`
-`/skills`| List available [skills](</docs/en/skills>)
+`/skills`| List available [skills](</docs/en/skills>). Press `t` to sort by token count
`/stats`| Visualize daily usage, session history, streaks, and model preferences
`/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
@@ -72,8 +76,10 @@
`/team-onboarding`| Generate a team onboarding guide from your Claude Code usage history. Claude analyzes your sessions, commands, and MCP server usage from the past 30 days and produces a markdown guide a teammate can paste as a first message to get set up quickly
`/teleport`| Pull a [Claude Code on the web](</docs/en/claude-code-on-the-web#from-web-to-terminal>) session into this terminal: opens a picker, then fetches the branch and conversation. Also available as `/tp`. Requires a claude.ai subscription
`/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
+`/theme`| Change the color theme. Includes an `auto` option that follows your terminal’s dark or light mode, light and dark variants, colorblind-accessible (daltonized) themes, and ANSI themes that use your terminal’s color palette
+`/tui [default|fullscreen]`| Set the terminal UI renderer and relaunch into it with your conversation intact. `fullscreen` enables the [flicker-free alt-screen renderer](</docs/en/fullscreen>). With no argument, prints the active renderer
`/ultraplan <prompt>`| Draft a plan in an [ultraplan](</docs/en/ultraplan>) session, review it in your browser, then execute remotely or send it back to your terminal
+`/ultrareview [PR]`| Run a deep, multi-agent code review in a cloud sandbox with [ultrareview](</docs/en/ultrareview>). Includes 3 free runs on Pro and Max, then requires [extra usage](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>)
`/upgrade`| Open the upgrade page to switch to a higher plan tier
`/usage`| Show plan usage limits and rate limit status
`/vim`| Removed in v2.1.92. To toggle between Vim and Normal editing modes, use `/config` → Editor mode
--- a/common-workflows.md
+++ b/common-workflows.md
@@ -488,7 +488,7 @@
Use extended thinking (thinking mode)
-[Extended thinking](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking>) is enabled by default, giving Claude space to reason through complex problems step-by-step before responding. This reasoning is visible in verbose mode, which you can toggle on with `Ctrl+O`. During extended thinking, progress hints appear below the indicator to show that Claude is actively working. Additionally, Opus 4.6 and Sonnet 4.6 support adaptive reasoning: instead of a fixed thinking token budget, the model dynamically allocates thinking based on your [effort level](</docs/en/model-config#adjust-effort-level>) setting. Extended thinking and adaptive reasoning work together to give you control over how deeply Claude reasons before responding. Extended thinking is particularly valuable for complex architectural decisions, challenging bugs, multi-step implementation planning, and evaluating tradeoffs between different approaches.
+[Extended thinking](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking>) is enabled by default, giving Claude space to reason through complex problems step-by-step before responding. This reasoning is visible in verbose mode, which you can toggle on with `Ctrl+O`. During extended thinking, progress hints appear below the indicator to show that Claude is actively working. Additionally, [models that support effort](</docs/en/model-config#adjust-effort-level>) use adaptive reasoning: instead of a fixed thinking token budget, the model dynamically decides whether and how much to think based on your effort level setting and the task at hand. Adaptive reasoning lets Claude respond faster to routine prompts and reserve deeper thinking for steps that benefit from it. Extended thinking is particularly valuable for complex architectural decisions, challenging bugs, multi-step implementation planning, and evaluating tradeoffs between different approaches.
Phrases like “think”, “think hard”, and “think more” are interpreted as regular prompt instructions and don’t allocate thinking tokens.
@@ -502,12 +502,12 @@
Scope| How to configure| Details
---|---|---
-**Effort level**| Run `/effort`, adjust in `/model`, or set [`CLAUDE_CODE_EFFORT_LEVEL`](</docs/en/env-vars>)| Control thinking depth for Opus 4.6 and Sonnet 4.6. See [Adjust effort level](</docs/en/model-config#adjust-effort-level>)
-**`ultrathink` keyword**| Include “ultrathink” anywhere in your prompt| Sets effort to high for that turn on Opus 4.6 and Sonnet 4.6. Useful for one-off tasks requiring deep reasoning without permanently changing your effort setting
+**Effort level**| Run `/effort`, adjust in `/model`, or set [`CLAUDE_CODE_EFFORT_LEVEL`](</docs/en/env-vars>)| Control thinking depth on [supported models](</docs/en/model-config#adjust-effort-level>)
+**`ultrathink` keyword**| Include “ultrathink” anywhere in your prompt| Adds an in-context instruction telling the model to reason more on that turn. Does not change the effort level itself; see [Adjust effort level](</docs/en/model-config#adjust-effort-level>) for that
**Toggle shortcut**| Press `Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle thinking on/off for the current session (all models). May require [terminal configuration](</docs/en/terminal-config>) to enable Option key shortcuts
**Global default**| Use `/config` to toggle thinking mode| Sets your default across all projects (all models).
Saved as `alwaysThinkingEnabled` in `~/.claude/settings.json`
-**Limit token budget**| Set [`MAX_THINKING_TOKENS`](</docs/en/env-vars>) environment variable| Limit the thinking budget to a specific number of tokens. On Opus 4.6 and Sonnet 4.6, only `0` applies unless adaptive reasoning is disabled. Example: `export MAX_THINKING_TOKENS=10000`
+**Limit token budget**| Set [`MAX_THINKING_TOKENS`](</docs/en/env-vars>) environment variable| Limit the thinking budget to a specific number of tokens. On models with adaptive reasoning, only `0` applies unless adaptive reasoning is disabled. Example: `export MAX_THINKING_TOKENS=10000`
To view Claude’s thinking process, press `Ctrl+O` to toggle verbose mode and see the internal reasoning displayed as gray italic text.
@@ -517,7 +517,7 @@
How extended thinking works
-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>).
+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. On [models that support effort](</docs/en/model-config#adjust-effort-level>), thinking uses adaptive reasoning: the model dynamically allocates thinking tokens based on the effort level you select. This is the recommended way to tune the tradeoff between speed and reasoning depth. If you want Claude to think more or less often than your effort level would otherwise produce, you can also say so directly in your prompt or in `CLAUDE.md`. 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 models with adaptive reasoning, `MAX_THINKING_TOKENS` only applies when set to `0` to disable thinking, or when `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1` reverts the model to the fixed budget. `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` applies to Opus 4.6 and Sonnet 4.6 only. Opus 4.7 always uses adaptive reasoning and does not support a fixed thinking budget. See [environment variables](</docs/en/env-vars>).
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.
@@ -535,7 +535,7 @@
* `claude --resume` opens a conversation picker or resumes by name
* `claude --from-pr 123` resumes sessions linked to a specific pull request
-From inside an active session, use `/resume` to switch to a different conversation. Sessions are stored per project directory. The `/resume` picker shows interactive sessions from the same git repository, including worktrees. When you select a session from another worktree of the same repository, Claude Code resumes it directly without requiring you to switch directories first. Sessions created by `claude -p` or SDK invocations do not appear in the picker, but you can still resume one by passing its session ID or custom name to `claude --resume <session-id-or-name>`. Custom names set with `--name` or `/rename` are accepted in addition to session IDs.
+From inside an active session, use `/resume` to switch to a different conversation. Sessions are stored per project directory. By default, the `/resume` picker shows interactive sessions from the current worktree, with keyboard shortcuts to widen the list to other worktrees or projects, search, preview, and rename. See Use the session picker below for the full shortcut reference. When you select a session from another worktree of the same repository, Claude Code resumes it directly without requiring you to switch directories first. Selecting a session from an unrelated project copies a `cd` and resume command to your clipboard instead. Resuming by name resolves across the current repository and its worktrees. Both `claude --resume <name>` and `/resume <name>` look for an exact match and resume it directly, even if the session lives in a different worktree. When the name is ambiguous, `claude --resume <name>` opens the picker with the name pre-filled as a search term. `/resume <name>` from inside a session reports an error instead, so run `/resume` with no argument to open the picker and choose. Sessions created by `claude -p` or SDK invocations do not appear in the picker, but you can still resume one by passing its session ID directly to `claude --resume <session-id>`.
###
@@ -557,7 +557,7 @@
/rename auth-refactor
-You can also rename any session from the picker: run `/resume`, navigate to a session, and press `R`.
+You can also rename any session from the picker: run `/resume`, navigate to a session, and press `Ctrl+R`.
2
@@ -584,19 +584,21 @@
`↑` / `↓`| Navigate between sessions
`→` / `←`| Expand or collapse grouped sessions
`Enter`| Select and resume the highlighted session
-`P`| Preview the session content
-`R`| Rename the highlighted session
-`/`| Search to filter sessions
-`A`| Toggle between current directory and all projects
-`B`| Filter to sessions from your current git branch
+`Space`| Preview the session content. `Ctrl+V` also works on terminals that do not capture it as paste
+`Ctrl+R`| Rename the highlighted session
+`/` or any printable character other than `Space`| Enter search mode and filter sessions
+`Ctrl+A`| Show sessions from all projects on this machine. Press again to restore the current repository
+`Ctrl+W`| Show sessions from all worktrees of the current repository. Press again to restore the current worktree. Only shown in multi-worktree repositories
+`Ctrl+B`| Filter to sessions from your current git branch. Press again to show sessions from all branches
`Esc`| Exit the picker or search mode
**Session organization:** The picker displays sessions with helpful metadata:
- * Session name or initial prompt
+ * Session name if set, otherwise the conversation summary or first user prompt
* Time elapsed since last activity
* Message count
* Git branch (if applicable)
+ * Project path, shown after widening to all projects with `Ctrl+A`
Forked sessions (created with `/branch`, `/rewind`, or `--fork-session`) are grouped together under their root session, making it easier to find related conversations.
@@ -607,7 +609,7 @@
* Use `--resume session-name` when you know which session you need
* Use `--resume` (without a name) when you need to browse and select
* For scripts, use `claude --continue --print "prompt"` to resume in non-interactive mode
- * Press `P` in the picker to preview a session before resuming it
+ * Press `Space` in the picker to preview a session before resuming it
* The resumed conversation starts with the same model and configuration as the original
How it works:
@@ -910,7 +912,7 @@
[Routines](</docs/en/routines>)| Anthropic-managed infrastructure| Tasks that should run even when your computer is off. Can also trigger on API calls or GitHub events in addition to a schedule. Configure at [claude.ai/code/routines](<https://claude.ai/code/routines>).
[Desktop scheduled tasks](</docs/en/desktop-scheduled-tasks>)| Your machine, via the desktop app| Tasks that need direct access to local files, tools, or uncommitted changes.
[GitHub Actions](</docs/en/github-actions>)| Your CI pipeline| Tasks tied to repo events like opened PRs, or cron schedules that should live alongside your workflow config.
-[`/loop`](</docs/en/scheduled-tasks>)| The current CLI session| Quick polling while a session is open. Tasks are cancelled when you exit.
+[`/loop`](</docs/en/scheduled-tasks>)| The current CLI session| Quick polling while a session is open. Tasks stop when you start a new conversation; `--resume` and `--continue` restore unexpired ones.
When writing prompts for scheduled tasks, be explicit about what success looks like and what to do with results. The task runs autonomously, so it can’t ask clarifying questions. For example: “Review open PRs labeled `needs-review`, leave inline comments on any issues, and post a summary in the `#eng-reviews` Slack channel.”
--- a/cost-tracking.md
+++ b/cost-tracking.md
@@ -45,7 +45,7 @@
Get the total cost of a query
-The result message ([TypeScript](</docs/en/agent-sdk/typescript#sdk-result-message>), [Python](</docs/en/agent-sdk/python#result-message>)) is the last message in every `query()` call. It includes `total_cost_usd`, the cumulative cost across all steps in that call. This works for both success and error results. If you use sessions to make multiple `query()` calls, each result only reflects the cost of that individual call. The following examples iterate over the message stream from a `query()` call and print the total cost when the `result` message arrives:
+The result message ([TypeScript](</docs/en/agent-sdk/typescript#sdk-result-message>), [Python](</docs/en/agent-sdk/python#result-message>)) marks the end of the agent loop for a `query()` call. It includes `total_cost_usd`, the cumulative estimated cost across all steps in that call. This works for both success and error results. If you use sessions to make multiple `query()` calls, each result only reflects the cost of that individual call. The following examples iterate over the message stream from a `query()` call and print the total cost when the `result` message arrives:
TypeScript
--- a/desktop.md
+++ b/desktop.md
@@ -1,4 +1,14 @@
-The Code tab within the Claude Desktop app lets you use Claude Code through a graphical interface instead of the terminal. Desktop adds these capabilities on top of the standard Claude Code experience:
+The Code tab within the Claude Desktop app lets you use Claude Code through a graphical interface instead of the terminal.
+
+## Download for macOS
+
+Universal build for Intel and Apple Silicon
+
+## Download for Windows
+
+For x64 processors
+
+For Windows ARM64, download the [ARM64 installer](<https://claude.ai/api/desktop/win32/arm64/setup/latest/redirect?utm_source=claude_code&utm_medium=docs>). Linux is not supported. After installing, launch Claude, sign in, and click the **Code** tab. See the [Get started guide](</docs/en/desktop-quickstart>) for a full walkthrough of your first session. Desktop adds these capabilities on top of the standard Claude Code experience:
* Parallel sessions with automatic Git worktree isolation
* Drag-and-drop layout with an integrated terminal, file editor, and preview pane
@@ -12,8 +22,6 @@
* Connectors for GitHub, Slack, Linear, and more
* Local, SSH, and cloud environments
-New to Desktop? Start with [Get started](</docs/en/desktop-quickstart>) to install the app and make your first edit.
-
The workspace layout, terminal, file editor, side chats, and view modes described on this page require Claude Desktop v1.2581.0 or later. Open **Claude → Check for Updates** on macOS or **Help → Check for Updates** on Windows to update.
This page covers working with code, arranging your workspace, computer use, managing sessions, extending Claude Code, and configuration. It also includes a CLI comparison and troubleshooting.
@@ -73,7 +81,7 @@
**Ask permissions**| `default`| Claude asks before editing files or running commands. You see a diff and can accept or reject each change. Recommended for new users.
**Auto accept edits**| `acceptEdits`| Claude auto-accepts file edits and common filesystem commands like `mkdir`, `touch`, and `mv`, but still asks before running other terminal commands. Use this when you trust file changes and want faster iteration.
**Plan mode**| `plan`| Claude reads files and runs commands to explore, then proposes a plan without editing your source code. Good for complex tasks where you want to review the approach first.
-**Auto**| `auto`| Claude executes all actions with background safety checks that verify alignment with your request. Reduces permission prompts while maintaining oversight. Currently a research preview. Available on Team, Enterprise, and API plans. Requires Claude Sonnet 4.6 or Opus 4.6. Enable in your Settings → Claude Code.
+**Auto**| `auto`| Claude executes all actions with background safety checks that verify alignment with your request. Reduces permission prompts while maintaining oversight. Currently a research preview. Available on Max, Team, Enterprise, and API plans. Requires Claude Sonnet 4.6, Opus 4.6, or Opus 4.7 on Team, Enterprise, and API plans; Claude Opus 4.7 only on Max plans. Not available on Pro plans or third-party providers. Enable in your Settings → Claude Code.
**Bypass permissions**| `bypassPermissions`| Claude runs without any permission prompts, equivalent to `--dangerously-skip-permissions` in the CLI. Enable in your Settings → Claude Code under “Allow bypass permissions mode”. Only use this in sandboxed containers or VMs. Enterprise admins can disable this option.
The `dontAsk` permission mode is available only in the [CLI](</docs/en/permission-modes#allow-only-pre-approved-tools-with-dontask-mode>).
@@ -560,7 +568,7 @@
Local sessions
-The desktop app does not always inherit your full shell environment. On macOS, when you launch the app from the Dock or Finder, it reads your shell profile, such as `~/.zshrc` or `~/.bashrc`, to extract `PATH` and a fixed set of Claude Code variables, but other variables you export there are not picked up. On Windows, the app inherits user and system environment variables but does not read PowerShell profiles. To set environment variables for local sessions and dev servers on any platform, open the environment dropdown in the prompt box, hover over **Local** , and click the gear icon to open the local environment editor. Variables you save here are stored encrypted on your machine and apply to every local session and preview server you start. You can also add variables to the `env` key in your `~/.claude/settings.json` file, though these reach Claude sessions only and not dev servers. See [environment variables](</docs/en/env-vars>) for the full list of supported variables. [Extended thinking](</docs/en/common-workflows#use-extended-thinking-thinking-mode>) is enabled by default, which improves performance on complex reasoning tasks but uses additional tokens. To disable thinking entirely, set `MAX_THINKING_TOKENS` to `0` in the local environment editor. On Opus 4.6 and Sonnet 4.6, any other `MAX_THINKING_TOKENS` value is ignored because adaptive reasoning controls thinking depth instead. To use a fixed thinking budget on these models, also set `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` to `1`.
+The desktop app does not always inherit your full shell environment. On macOS, when you launch the app from the Dock or Finder, it reads your shell profile, such as `~/.zshrc` or `~/.bashrc`, to extract `PATH` and a fixed set of Claude Code variables, but other variables you export there are not picked up. On Windows, the app inherits user and system environment variables but does not read PowerShell profiles. To set environment variables for local sessions and dev servers on any platform, open the environment dropdown in the prompt box, hover over **Local** , and click the gear icon to open the local environment editor. Variables you save here are stored encrypted on your machine and apply to every local session and preview server you start. You can also add variables to the `env` key in your `~/.claude/settings.json` file, though these reach Claude sessions only and not dev servers. See [environment variables](</docs/en/env-vars>) for the full list of supported variables. [Extended thinking](</docs/en/common-workflows#use-extended-thinking-thinking-mode>) is enabled by default, which improves performance on complex reasoning tasks but uses additional tokens. To disable thinking entirely, set `MAX_THINKING_TOKENS` to `0` in the local environment editor. On models with [adaptive reasoning](</docs/en/model-config#adjust-effort-level>), any other `MAX_THINKING_TOKENS` value is ignored because adaptive reasoning controls thinking depth instead. On Opus 4.6 and Sonnet 4.6, set `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` to `1` to use a fixed thinking budget; Opus 4.7 always uses adaptive reasoning and has no fixed-budget mode.
###
@@ -752,6 +760,8 @@
Troubleshooting
+The sections below cover issues specific to the desktop app. For runtime API errors that appear in the chat such as `API Error: 500`, `529 Overloaded`, `429`, or `Prompt is too long`, see the [Error reference](</docs/en/errors>). Those errors and their fixes are the same across the CLI, desktop, and web.
+
###
@@ -839,15 +849,6 @@
* **PATH not updated after install** : open a new terminal window. PATH updates only apply to new terminal sessions.
* **Concurrent installation error** : if you see an error about another installation in progress but there isn’t one, try running the installer as Administrator.
- * **ARM64** : Windows ARM64 devices are fully supported.
-
-###
-
-
-
-Cowork tab unavailable on Intel Macs
-
-The Cowork tab requires Apple Silicon (M1 or later) on macOS. On Windows, Cowork is available on all supported hardware. The Chat and Code tabs work normally on Intel Macs.
###
--- a/desktop-quickstart.md
+++ b/desktop-quickstart.md
@@ -1,14 +1,14 @@
-The desktop app gives you Claude Code with a graphical interface built for running multiple sessions side by side: a sidebar for managing parallel work, a drag-and-drop layout with an integrated terminal and file editor, visual diff review, live app preview, GitHub PR monitoring with auto-merge, and scheduled tasks. No terminal required. Download Claude for your platform:
+The desktop app gives you Claude Code with a graphical interface built for running multiple sessions side by side: a sidebar for managing parallel work, a drag-and-drop layout with an integrated terminal and file editor, visual diff review, live app preview, GitHub PR monitoring with auto-merge, and scheduled tasks. No terminal required.
-## macOS
+## Download for macOS
Universal build for Intel and Apple Silicon
-## Windows
+## Download for Windows
For x64 processors
-For Windows ARM64, download the [ARM64 installer](<https://claude.ai/api/desktop/win32/arm64/setup/latest/redirect?utm_source=claude_code&utm_medium=docs>). Linux is not currently supported.
+For Windows ARM64, download the [ARM64 installer](<https://claude.ai/api/desktop/win32/arm64/setup/latest/redirect?utm_source=claude_code&utm_medium=docs>). Linux is not supported.
Claude Code requires a [Pro, Max, Team, or Enterprise subscription](<https://claude.com/pricing?utm_source=claude_code&utm_medium=docs&utm_content=desktop_quickstart_pricing>).
@@ -30,13 +30,7 @@
Install and sign in
-Download Claude for your platform and run the installer:
-
- * [macOS](<https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect?utm_source=claude_code&utm_medium=docs>): universal build for Intel and Apple Silicon
- * [Windows x64](<https://claude.ai/api/desktop/win32/x64/setup/latest/redirect?utm_source=claude_code&utm_medium=docs>): for x64 processors
- * [Windows ARM64](<https://claude.ai/api/desktop/win32/arm64/setup/latest/redirect?utm_source=claude_code&utm_medium=docs>): for ARM processors
-
-Launch Claude from your Applications folder (macOS) or Start menu (Windows). Sign in with your Anthropic account.
+Download the installer for your platform from the links above and run it. Launch Claude from your Applications folder on macOS or the Start menu on Windows, then sign in with your Anthropic account.
2
--- a/desktop-scheduled-tasks.md
+++ b/desktop-scheduled-tasks.md
@@ -13,7 +13,7 @@
Runs on| Anthropic cloud| Your machine| Your machine
Requires machine on| No| Yes| Yes
Requires open session| No| No| Yes
-Persistent across restarts| Yes| Yes| No (session-scoped)
+Persistent across restarts| Yes| Yes| Restored on `--resume` if unexpired
Access to local files| No (fresh clone)| Yes| Yes
MCP servers| Connectors configured per task| [Config files](</docs/en/mcp>) and connectors| Inherits from session
Permission prompts| No (runs autonomously)| Configurable per task| Inherits from session
--- a/discover-plugins.md
+++ b/discover-plugins.md
@@ -265,7 +265,7 @@
* **Project scope** : install for all collaborators on this repository (adds to `.claude/settings.json`)
* **Local scope** : install for yourself in this repository only (not shared with collaborators)
-You may also see plugins with **managed** scope—these are installed by administrators via [managed settings](</docs/en/settings#settings-files>) and cannot be modified. Run `/plugin` and go to the **Installed** tab to see your plugins grouped by scope.
+You may also see plugins with **managed** scope—these are installed by administrators via [managed settings](</docs/en/settings#settings-files>) and cannot be modified.
Make sure you trust a plugin before installing it. Anthropic does not control what MCP servers, files, or other software are included in plugins and cannot verify that they work as intended. Check each plugin’s homepage for more information.
@@ -275,7 +275,13 @@
Manage installed plugins
-Run `/plugin` and go to the **Installed** tab to view, enable, disable, or uninstall your plugins. Type to filter the list by plugin name or description. You can also manage plugins with direct commands. Disable a plugin without uninstalling:
+Run `/plugin` and go to the **Installed** tab to view, enable, disable, or uninstall your plugins. The list is grouped by scope and sorted so you see problems first: plugins with load errors or unresolved dependencies appear at the top, followed by your favorites, with disabled plugins folded behind a collapsed header at the bottom. From the list you can:
+
+ * press `f` to favorite or unfavorite the selected plugin
+ * type to filter by plugin name or description
+ * press Enter to open a plugin’s detail view and enable, disable, or uninstall it
+
+When you install a plugin that declares dependencies, the install output lists which dependencies were auto-installed alongside it. You can also manage plugins with direct commands. Disable a plugin without uninstalling:
/plugin disable plugin-name@marketplace-name
--- a/env-vars.md
+++ b/env-vars.md
@@ -57,7 +57,7 @@
`CLAUDE_CODE_DEBUG_LOGS_DIR`| Override the debug log file path. Despite the name, this is a file path, not a directory. Requires debug mode to be enabled separately via `--debug` or `/debug`: setting this variable alone does not enable logging. The [`--debug-file`](</docs/en/cli-reference#cli-flags>) flag does both at once. Defaults to `~/.claude/debug/<session-id>.txt`
`CLAUDE_CODE_DEBUG_LOG_LEVEL`| Minimum log level written to the debug log file. Values: `verbose`, `debug` (default), `info`, `warn`, `error`. Set to `verbose` to include high-volume diagnostics like full status line command output, or raise to `error` to reduce noise
`CLAUDE_CODE_DISABLE_1M_CONTEXT`| Set to `1` to disable [1M context window](</docs/en/model-config#extended-context>) support. When set, 1M model variants are unavailable in the model picker. Useful for enterprise environments with compliance requirements
-`CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING`| Set to `1` to disable [adaptive reasoning](</docs/en/model-config#adjust-effort-level>) for Opus 4.6 and Sonnet 4.6. When disabled, these models fall back to the fixed thinking budget controlled by `MAX_THINKING_TOKENS`
+`CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING`| Set to `1` to disable [adaptive reasoning](</docs/en/model-config#adjust-effort-level>) on Opus 4.6 and Sonnet 4.6 and fall back to the fixed thinking budget controlled by `MAX_THINKING_TOKENS`. Has no effect on Opus 4.7, which always uses adaptive reasoning
`CLAUDE_CODE_DISABLE_ATTACHMENTS`| Set to `1` to disable attachment processing. File mentions with `@` syntax are sent as plain text instead of being expanded into file content
`CLAUDE_CODE_DISABLE_AUTO_MEMORY`| Set to `1` to disable [auto memory](</docs/en/memory#auto-memory>). Set to `0` to force auto memory on during the gradual rollout. When disabled, Claude does not create or load auto memory files
`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`| 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
@@ -76,7 +76,9 @@
`CLAUDE_CODE_DISABLE_TERMINAL_TITLE`| Set to `1` to disable automatic terminal title updates based on conversation context
`CLAUDE_CODE_DISABLE_THINKING`| Set to `1` to force-disable [extended thinking](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking>) regardless of model support or other settings. More direct than `MAX_THINKING_TOKENS=0`
`CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL`| Set to `1` to disable virtual scrolling in [fullscreen rendering](</docs/en/fullscreen>) and render every message in the transcript. Use this if scrolling in fullscreen mode shows blank regions where messages should appear
-`CLAUDE_CODE_EFFORT_LEVEL`| Set the effort level for supported models. Values: `low`, `medium`, `high`, `max` (Opus 4.6 only), or `auto` to use the model default. Takes precedence over `/effort` and the `effortLevel` setting. See [Adjust effort level](</docs/en/model-config#adjust-effort-level>)
+`CLAUDE_CODE_EFFORT_LEVEL`| Set the effort level for supported models. Values: `low`, `medium`, `high`, `xhigh`, `max`, or `auto` to use the model default. Available levels depend on the model. Takes precedence over `/effort` and the `effortLevel` setting. See [Adjust effort level](</docs/en/model-config#adjust-effort-level>)
+`CLAUDE_CODE_ENABLE_AWAY_SUMMARY`| Override [session recap](</docs/en/interactive-mode#session-recap>) availability. Set to `0` to force recaps off regardless of the `/config` toggle. Set to `1` to force recaps on when [`awaySummaryEnabled`](</docs/en/settings#available-settings>) is `false`. Takes precedence over the setting and `/config` toggle
+`CLAUDE_CODE_ENABLE_BACKGROUND_PLUGIN_REFRESH`| Set to `1` to refresh plugin state at turn boundaries in [non-interactive mode](</docs/en/headless>) after a background install completes. Off by default because the refresh changes the system prompt mid-session, which invalidates [prompt caching](<https://platform.claude.com/docs/en/build-with-claude/prompt-caching>) for that turn
`CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING`| Set to `1` to force-enable fine-grained tool input streaming. Without this, the API buffers tool input parameters fully before sending delta events, which can delay display on large tool inputs. Anthropic API only: has no effect on Bedrock, Vertex, or Foundry
`CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION`| Set to `false` to disable prompt suggestions (the “Prompt suggestions” toggle in `/config`). These are the grayed-out predictions that appear in your prompt input after Claude responds. See [Prompt suggestions](</docs/en/interactive-mode#prompt-suggestions>)
`CLAUDE_CODE_ENABLE_TASKS`| Set to `1` to enable the task tracking system in non-interactive mode (the `-p` flag). Tasks are on by default in interactive mode. See [Task list](</docs/en/interactive-mode#task-list>)
@@ -96,7 +98,7 @@
`CLAUDE_CODE_MAX_RETRIES`| Override the number of times to retry failed API requests (default: 10)
`CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY`| Maximum number of read-only tools and subagents that can execute in parallel (default: 10). Higher values increase parallelism but consume more resources
`CLAUDE_CODE_NEW_INIT`| Set to `1` to make `/init` run an interactive setup flow. The flow asks which files to generate, including CLAUDE.md, skills, and hooks, before exploring the codebase and writing them. Without this variable, `/init` generates a CLAUDE.md automatically without prompting.
-`CLAUDE_CODE_NO_FLICKER`| Set to `1` to enable [fullscreen rendering](</docs/en/fullscreen>), a research preview that reduces flicker and keeps memory flat in long conversations
+`CLAUDE_CODE_NO_FLICKER`| Set to `1` to enable [fullscreen rendering](</docs/en/fullscreen>), a research preview that reduces flicker and keeps memory flat in long conversations. Equivalent to the [`tui`](</docs/en/settings#available-settings>) setting; you can also switch with `/tui fullscreen`
`CLAUDE_CODE_OAUTH_REFRESH_TOKEN`| OAuth refresh token for Claude.ai authentication. When set, `claude auth login` exchanges this token directly instead of opening a browser. Requires `CLAUDE_CODE_OAUTH_SCOPES`. Useful for provisioning authentication in automated environments
`CLAUDE_CODE_OAUTH_SCOPES`| Space-separated OAuth scopes the refresh token was issued with, such as `"user:profile user:inference user:sessions:claude_code"`. Required when `CLAUDE_CODE_OAUTH_REFRESH_TOKEN` is set
`CLAUDE_CODE_OAUTH_TOKEN`| OAuth access token for Claude.ai authentication. Alternative to `/login` for SDK and automated environments. Takes precedence over keychain-stored credentials. Generate one with [`claude setup-token`](</docs/en/authentication#generate-a-long-lived-token>)
@@ -113,7 +115,7 @@
`CLAUDE_CODE_REMOTE_SESSION_ID`| Set automatically in [cloud sessions](</docs/en/claude-code-on-the-web>) to the current session’s ID. Read this to construct a link back to the session transcript. See [Link artifacts back to the session](</docs/en/claude-code-on-the-web#link-artifacts-back-to-the-session>)
`CLAUDE_CODE_RESUME_INTERRUPTED_TURN`| Set to `1` to automatically resume if the previous session ended mid-turn. Used in SDK mode so the model continues without requiring the SDK to re-send the prompt
`CLAUDE_CODE_SCRIPT_CAPS`| JSON object limiting how many times specific scripts may be invoked per session when `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB` is set. Keys are substrings matched against the command text; values are integer call limits. For example, `{"deploy.sh": 2}` allows `deploy.sh` to be called at most twice. Matching is substring-based so shell-expansion tricks like `./scripts/deploy.sh $(evil)` still count against the cap. Runtime fan-out via `xargs` or `find -exec` is not detected; this is a defense-in-depth control
-`CLAUDE_CODE_SCROLL_SPEED`| Set the mouse wheel scroll multiplier in [fullscreen rendering](</docs/en/fullscreen#adjust-wheel-scroll-speed>). Accepts values from 1 to 20. Set to `3` to match `vim` if your terminal sends one wheel event per notch without amplification
+`CLAUDE_CODE_SCROLL_SPEED`| Set the mouse wheel scroll multiplier in [fullscreen rendering](</docs/en/fullscreen#mouse-wheel-scrolling>). Accepts values from 1 to 20. Set to `3` to match `vim` if your terminal sends one wheel event per notch without amplification
`CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS`| Override the time budget in milliseconds for [SessionEnd](</docs/en/hooks#sessionend>) hooks. Applies to session exit, `/clear`, and switching sessions via interactive `/resume`. By default the budget is 1.5 seconds, automatically raised to the highest per-hook `timeout` configured in settings files, up to 60 seconds. Timeouts on plugin-provided hooks do not raise the budget
`CLAUDE_CODE_SHELL`| Override automatic shell detection. Useful when your login shell differs from your preferred working shell (for example, `bash` vs `zsh`)
`CLAUDE_CODE_SHELL_PREFIX`| Command prefix to wrap all bash commands (for example, for logging or auditing). Example: `/path/to/logger.sh` will execute `/path/to/logger.sh <command>`
@@ -135,7 +137,7 @@
`CLAUDE_CODE_USE_BEDROCK`| Use [Bedrock](</docs/en/amazon-bedrock>)
`CLAUDE_CODE_USE_FOUNDRY`| Use [Microsoft Foundry](</docs/en/microsoft-foundry>)
`CLAUDE_CODE_USE_MANTLE`| Use the Bedrock [Mantle endpoint](</docs/en/amazon-bedrock#use-the-mantle-endpoint>)
-`CLAUDE_CODE_USE_POWERSHELL_TOOL`| Set to `1` to enable the PowerShell tool on Windows (opt-in preview). When enabled, Claude can run PowerShell commands natively instead of routing through Git Bash. Only supported on native Windows, not WSL. See [PowerShell tool](</docs/en/tools-reference#powershell-tool>)
+`CLAUDE_CODE_USE_POWERSHELL_TOOL`| Controls the PowerShell tool. On Windows, the tool is rolling out progressively: set to `1` to opt in or `0` to opt out. On Linux, macOS, and WSL, set to `1` to enable it, which requires `pwsh` on your `PATH`. When enabled on Windows, Claude can run PowerShell commands natively instead of routing through Git Bash. See [PowerShell tool](</docs/en/tools-reference#powershell-tool>)
`CLAUDE_CODE_USE_VERTEX`| Use [Vertex](</docs/en/google-vertex-ai>)
`CLAUDE_CONFIG_DIR`| Override the configuration directory (default: `~/.claude`). All settings, credentials, session history, and plugins are stored under this path. Useful for running multiple accounts side by side: for example, `alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude'`
`CLAUDE_ENABLE_BYTE_WATCHDOG`| Set to `1` to force-enable the byte-level streaming idle watchdog, or set to `0` to force-disable it. When unset, the watchdog is enabled by default for Anthropic API connections. The byte watchdog aborts a connection when no bytes arrive on the wire for the duration set by `CLAUDE_STREAM_IDLE_TIMEOUT_MS`, with a minimum of 5 minutes, independent of the event-level watchdog
@@ -163,16 +165,18 @@
`DISABLE_TELEMETRY`| Set to `1` to opt out of Statsig telemetry (note that Statsig events do not include user data like code, file paths, or bash commands)
`DISABLE_UPGRADE_COMMAND`| Set to `1` to hide the `/upgrade` command
`ENABLE_CLAUDEAI_MCP_SERVERS`| Set to `false` to disable [claude.ai MCP servers](</docs/en/mcp#use-mcp-servers-from-claude-ai>) in Claude Code. Enabled by default for logged-in users
-`ENABLE_PROMPT_CACHING_1H_BEDROCK`| Set to `1` when using [Bedrock](</docs/en/amazon-bedrock>) to request a 1-hour prompt cache TTL instead of the default 5 minutes. Bedrock only
+`ENABLE_PROMPT_CACHING_1H`| Set to `1` to request a 1-hour prompt cache TTL instead of the default 5 minutes. Intended for API key, [Bedrock](</docs/en/amazon-bedrock>), [Vertex](</docs/en/google-vertex-ai>), and [Foundry](</docs/en/microsoft-foundry>) users. Subscription users receive 1-hour TTL automatically. 1-hour cache writes are billed at a higher rate
+`ENABLE_PROMPT_CACHING_1H_BEDROCK`| Deprecated. Use `ENABLE_PROMPT_CACHING_1H` instead
`ENABLE_TOOL_SEARCH`| Controls [MCP tool search](</docs/en/mcp#scale-with-mcp-tool-search>). Unset: all MCP tools deferred by default, but loaded upfront when `ANTHROPIC_BASE_URL` points to a non-first-party host. Values: `true` (always defer including proxies), `auto` (threshold mode: load upfront if tools fit within 10% of context), `auto:N` (custom threshold, e.g., `auto:5` for 5%), `false` (load all upfront)
`FALLBACK_FOR_ALL_PRIMARY_MODELS`| Set to any non-empty value to trigger fallback to [`--fallback-model`](</docs/en/cli-reference#cli-flags>) after repeated overload errors on any primary model. By default, only Opus models trigger the fallback
`FORCE_AUTOUPDATE_PLUGINS`| Set to `1` to force plugin auto-updates even when the main auto-updater is disabled via `DISABLE_AUTOUPDATER`
+`FORCE_PROMPT_CACHING_5M`| Set to `1` to force the 5-minute prompt cache TTL even when 1-hour TTL would otherwise apply. Overrides `ENABLE_PROMPT_CACHING_1H`
`HTTP_PROXY`| Specify HTTP proxy server for network connections
`HTTPS_PROXY`| Specify HTTPS proxy server for network connections
`IS_DEMO`| Set to `1` to enable demo mode: hides your email and organization name from the header and `/status` output, and skips onboarding. Useful when streaming or recording a session
`MAX_MCP_OUTPUT_TOKENS`| Maximum number of tokens allowed in MCP tool responses. Claude Code displays a warning when output exceeds 10,000 tokens. Tools that declare [`anthropic/maxResultSizeChars`](</docs/en/mcp#raise-the-limit-for-a-specific-tool>) use that character limit for text content instead, but image content from those tools is still subject to this variable (default: 25000)
`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`
+`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](</docs/en/model-config#adjust-effort-level>), 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>)
@@ -181,6 +185,7 @@
`MCP_TIMEOUT`| Timeout in milliseconds for MCP server startup (default: 30000, or 30 seconds)
`MCP_TOOL_TIMEOUT`| Timeout in milliseconds for MCP tool execution (default: 100000000, about 28 hours)
`NO_PROXY`| List of domains and IPs to which requests will be directly issued, bypassing proxy
+`OTEL_LOG_RAW_API_BODIES`| Set to `1` to emit the full Anthropic Messages API request and response JSON as OpenTelemetry log events (`api_request_body`, `api_response_body`). Disabled by default; bodies include the entire conversation history. See [Monitoring](</docs/en/monitoring-usage>)
`OTEL_LOG_TOOL_CONTENT`| Set to `1` to include tool input and output content in OpenTelemetry span events. Disabled by default to protect sensitive data. See [Monitoring](</docs/en/monitoring-usage>)
`OTEL_LOG_TOOL_DETAILS`| Set to `1` to include tool input arguments, MCP server names, and tool details in OpenTelemetry traces and logs. Disabled by default to protect PII. See [Monitoring](</docs/en/monitoring-usage>)
`OTEL_LOG_USER_PROMPTS`| Set to `1` to include user prompt text in OpenTelemetry traces and logs. Disabled by default (prompts are redacted). See [Monitoring](</docs/en/monitoring-usage>)
@@ -200,6 +205,7 @@
`VERTEX_REGION_CLAUDE_4_5_SONNET`| Override region for Claude Sonnet 4.5 when using Vertex AI
`VERTEX_REGION_CLAUDE_4_6_OPUS`| Override region for Claude Opus 4.6 when using Vertex AI
`VERTEX_REGION_CLAUDE_4_6_SONNET`| Override region for Claude Sonnet 4.6 when using Vertex AI
+`VERTEX_REGION_CLAUDE_4_7_OPUS`| Override region for Claude Opus 4.7 when using Vertex AI
`VERTEX_REGION_CLAUDE_HAIKU_4_5`| Override region for Claude Haiku 4.5 when using Vertex AI
Standard OpenTelemetry exporter variables (`OTEL_METRICS_EXPORTER`, `OTEL_LOGS_EXPORTER`, `OTEL_EXPORTER_OTLP_ENDPOINT`, `OTEL_EXPORTER_OTLP_PROTOCOL`, `OTEL_EXPORTER_OTLP_HEADERS`, `OTEL_METRIC_EXPORT_INTERVAL`, `OTEL_RESOURCE_ATTRIBUTES`, and signal-specific variants) are also supported. See [Monitoring](</docs/en/monitoring-usage>) for configuration details.
Show diff (580 lines)
--- a/errors.md
+++ b/errors.md
@@ -0,0 +1,577 @@
+This page lists runtime errors Claude Code displays and how to recover from each one, plus what to check when responses seem off without an error. For installation errors such as `command not found` or TLS failures during setup, see [Troubleshooting](</docs/en/troubleshooting>). These errors and recovery commands apply across the CLI, the [Desktop app](</docs/en/desktop>), and [Claude Code on the web](</docs/en/claude-code-on-the-web>), since all three wrap the same Claude Code CLI. For surface-specific issues, see the troubleshooting section on that surface’s page.
+
+Claude Code calls the Claude API for model responses, so most runtime errors map to an underlying API error code. This page covers what each error means inside Claude Code and how to recover. For the raw HTTP status code definitions, see the [Claude Platform error reference](<https://platform.claude.com/docs/en/api/errors>).
+
+##
+
+
+
+Find your error
+
+Match the message you see in your terminal to a section below.
+
+Message| Section
+---|---
+`API Error: 500 ... Internal server error`| Server errors
+`API Error: Repeated 529 Overloaded errors`| Server errors
+`Request timed out`| Server errors, or Network if the message mentions your internet connection
+`<model> is temporarily unavailable, so auto mode cannot determine the safety of...`| Server errors
+`You've hit your session limit` / `You've hit your weekly limit`| Usage limits
+`Server is temporarily limiting requests`| Usage limits
+`Request rejected (429)`| Usage limits
+`Credit balance is too low`| Usage limits
+`Not logged in · Please run /login`| Authentication
+`Invalid API key`| Authentication
+`This organization has been disabled`| Authentication
+`OAuth token revoked` / `OAuth token has expired`| Authentication
+`does not meet scope requirement user:profile`| Authentication
+`Unable to connect to API`| Network
+`SSL certificate verification failed`| Network
+`Prompt is too long`| Request errors
+`Error during compaction: Conversation too long`| Request errors
+`Request too large`| Request errors
+`Image was too large`| Request errors
+`PDF too large` / `PDF is password protected`| Request errors
+`Extra inputs are not permitted`| Request errors
+`There's an issue with the selected model`| Request errors
+`Claude Opus is not available with the Claude Pro plan`| Request errors
+`thinking.type.enabled is not supported for this model`| Request errors
+`max_tokens must be greater than thinking.budget_tokens`| Request errors
+`API Error: 400 due to tool use concurrency issues`| Request errors
+Responses seem lower quality than usual| Response quality
+
+##
+
+
+
+Automatic retries
+
+Claude Code retries transient failures before showing you an error. Server errors, overloaded responses, request timeouts, temporary 429 throttles, and dropped connections are all retried up to 10 times with exponential backoff. While retrying, the spinner shows a `Retrying in Ns · attempt x/y` countdown. When you see one of the errors on this page, those retries have already been exhausted. You can tune the behavior with two environment variables:
+
+Variable| Default| Effect
+---|---|---
+[`CLAUDE_CODE_MAX_RETRIES`](</docs/en/env-vars>)| 10| Number of retry attempts. Lower it to surface failures faster in scripts; raise it to wait through longer incidents.
+[`API_TIMEOUT_MS`](</docs/en/env-vars>)| 600000| Per-request timeout in milliseconds. Raise it for slow networks or proxies.
+
+##
+
+
+
+Server errors
+
+These errors come from Anthropic infrastructure rather than your account or request.
+
+###
+
+
+
+API Error: 500 Internal server error
+
+Claude Code shows the raw API response body for any 5xx status. The example below shows a 500 response:
+
+ API Error: 500 {"type":"error","error":{"type":"api_error","message":"Internal server error"}} · check status.claude.com
+
+This indicates an unexpected failure inside the API. It is not caused by your prompt, settings, or account. **What to do:**
+
+ * Check [status.claude.com](<https://status.claude.com>) for active incidents
+ * Wait a minute, then send your message again. Your original message is still in the conversation, so for a long prompt you can type `try again` instead of pasting the whole thing.
+ * If the error persists with no posted incident, run `/feedback` so Anthropic can investigate with your request details. See Report an error if `/feedback` is unavailable on your provider.
+
+###
+
+
+
+API Error: Repeated 529 Overloaded errors
+
+The API is temporarily at capacity across all users. Claude Code has already retried several times before showing this message:
+
+ API Error: Repeated 529 Overloaded errors · check status.claude.com
+
+A 529 is not your usage limit and does not count against your quota. **What to do:**
+
+ * Check [status.claude.com](<https://status.claude.com>) for capacity notices
+ * Try again in a few minutes
+ * Run `/model` and switch to a different model to keep working, since capacity is tracked per model. Claude Code prompts you to do this when one model is under particularly high load, for example `Opus is experiencing high load, please use /model to switch to Sonnet`.
+
+###
+
+
+
+Request timed out
+
+The API did not respond before the connection deadline.
+
+ Request timed out
+
+This can happen during periods of high load or when a very large response is being generated. The default request timeout is 10 minutes. **What to do:**
+
+ * Retry the request
+ * For long-running tasks, break the work into smaller prompts
+ * If a slow network or proxy is the cause, raise `API_TIMEOUT_MS` as described in Automatic retries
+ * If timeouts are frequent and your network is otherwise healthy, see Network and connection errors below
+
+###
+
+
+
+Auto mode cannot determine the safety of an action
+
+The model that [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) uses to classify actions is overloaded, so auto mode blocked the action instead of approving it unchecked.
+
+ <model> is temporarily unavailable, so auto mode cannot determine the safety of <tool> right now. Wait briefly and then try this action again.
+
+Reads, searches, and edits inside your working directory skip the classifier, so they keep working during the outage. **What to do:**
+
+ * Retry after a few seconds; Claude sees the same message and usually retries on its own
+ * If retries keep failing, continue with read-only tasks and come back to the blocked action later
+ * This is transient and unrelated to [auto mode eligibility](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>); you do not need to change settings
+
+##
+
+
+
+Usage limits
+
+These errors mean a quota tied to your account or plan has been reached. They are distinct from server errors, which affect everyone.
+
+###
+
+
+
+You’ve hit your session limit
+
+Subscription plans include a rolling usage allowance. When it runs out you see one of these messages:
+
+ You've hit your session limit · resets 3:45pm
+ You've hit your weekly limit · resets Mon 12:00am
+ You've hit your Opus limit · resets 3:45pm
+
+Claude Code blocks further requests until the reset time shown in the message. **What to do:**
+
+ * Wait for the reset time shown in the error
+ * Run `/usage` to see your plan limits and when they reset
+ * Run `/extra-usage` to buy additional usage on Pro and Max, or to request it from your admin on Team and Enterprise. See [Extra usage for paid plans](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>) for how this is billed.
+ * To upgrade your plan for higher base limits, see [claude.com/pricing](<https://claude.com/pricing>)
+
+To watch your remaining allowance before you hit the limit, add the `rate_limits` fields to a [custom status line](</docs/en/statusline#rate-limit-usage>), or in the Desktop app click the [usage ring](</docs/en/desktop#check-usage>) next to the model picker.
+
+###
+
+
+
+Server is temporarily limiting requests
+
+The API applied a short-lived throttle that is unrelated to your plan quota.
+
+ API Error: Server is temporarily limiting requests (not your usage limit)
+
+This is retried automatically before being shown. **What to do:**
+
+ * Wait briefly and try again
+ * Check [status.claude.com](<https://status.claude.com>) if it persists
+
+###
+
+
+
+Request rejected (429)
+
+You have hit the rate limit configured for your API key, Amazon Bedrock project, or Google Vertex AI project.
+
+ API Error: Request rejected (429) · this may be a temporary capacity issue
+
+**What to do:**
+
+ * Run `/status` and confirm the active credential is the one you expect. A stray `ANTHROPIC_API_KEY` in your environment can route requests through a low-tier key instead of your subscription.
+ * Check your provider console for the active limits and request a higher tier if needed
+ * For Anthropic API keys, see the [rate limits reference](<https://platform.claude.com/docs/en/api/rate-limits>) for how tiers work and how to set per-workspace caps
+ * Reduce concurrency: lower [`CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY`](</docs/en/env-vars>), avoid running many parallel subagents, or switch to a smaller model with `/model` for high-volume scripted runs
+
+###
+
+
+
+Credit balance is too low
+
+Your Console organization has run out of prepaid credits.
+
+ Credit balance is too low
+
+**What to do:**
+
+ * Add credits at [platform.claude.com/settings/billing](<https://platform.claude.com/settings/billing>), and consider enabling auto-reload there so the balance refills before it hits zero
+ * Switch to subscription authentication with `/login` if you have a Pro, Max, Team, or Enterprise plan
+ * Set per-workspace spend caps in the Console to prevent a single project from draining the org balance. See [Manage costs effectively](</docs/en/costs>).
+
+##
+
+
+
+Authentication errors
+
+These errors mean Claude Code cannot prove who you are to the API. Run `/status` at any time to see which credential is currently active.
+
+###
+
+
+
+Not logged in
+
+No valid credential is available for this session.
+
+ Not logged in · Please run /login
+
+**What to do:**
+
+ * Run `/login` to authenticate with your Claude subscription or Console account
+ * If you expected an environment variable to authenticate you, confirm `ANTHROPIC_API_KEY` is set and exported in the shell where you launched `claude`
+ * For CI or automation where interactive login is not possible, configure an [`apiKeyHelper`](</docs/en/settings#available-settings>) script that fetches a key at startup
+ * See [Authentication precedence](</docs/en/authentication#authentication-precedence>) to understand which credential wins when several are present
+
+If you are prompted to log in repeatedly, see [Not logged in or token expired](</docs/en/troubleshooting#not-logged-in-or-token-expired>) for system clock and macOS Keychain fixes.
+
+###
+
+
+
+Invalid API key
+
+The `ANTHROPIC_API_KEY` environment variable or `apiKeyHelper` script returned a key the API rejected.
+
+ Invalid API key · Fix external API key
+
+**What to do:**
+
+ * Check for typos and confirm the key has not been revoked in the [Console](<https://platform.claude.com/settings/keys>)
+ * Run `env | grep ANTHROPIC` in the same shell. Tools like direnv, dotenv shell plugins, and IDE terminals can load a stale key from a `.env` file in your project without you setting it explicitly.
+ * Unset `ANTHROPIC_API_KEY` and run `/login` to use subscription auth instead
+ * If the key comes from an [`apiKeyHelper`](</docs/en/settings#available-settings>) script, run the script directly to confirm it prints a valid key on stdout
+ * Run `/status` to confirm which credential source Claude Code is actually using
+
+###
+
+
+
+This organization has been disabled
+
+A stale `ANTHROPIC_API_KEY` from a disabled Console organization is overriding your subscription login.
+
+ Your ANTHROPIC_API_KEY belongs to a disabled organization · Unset the environment variable to use your other credentials
+ API Error: 400 ... This organization has been disabled.
+
+Environment variables take precedence over `/login`, so a key exported in your shell profile or loaded from a `.env` file is used even when you have a working Pro or Max subscription. In non-interactive mode (`-p`), the key is always used when present. **What to do:**
+
+ * Unset `ANTHROPIC_API_KEY` in the current shell and remove it from your shell profile, then relaunch `claude`
+ * Run `/status` afterward to confirm the active credential is your subscription
+ * If no environment variable is set and the error persists, the disabled organization is the one tied to your `/login`. Contact support or sign in with a different account.
+
+###
+
+
+
+OAuth token revoked or expired
+
+Your saved login is no longer valid. A revoked token means you signed out everywhere or an admin removed access; an expired token means the automatic refresh failed mid-session.
+
+ OAuth token revoked · Please run /login
+ OAuth token has expired · Please run /login
+ API Error: 401 ... authentication_error
+
+**What to do:**
+
+ * Run `/login` to sign in again
+ * If the error returns within the same session after re-authenticating, run `/logout` first to fully clear the stored token, then `/login`
+ * For repeated prompts to log in across launches, see the system clock and macOS Keychain checks in [Troubleshooting](</docs/en/troubleshooting#not-logged-in-or-token-expired>)
+ * For other failures including `403 Forbidden` and OAuth browser issues, see [Permissions and authentication](</docs/en/troubleshooting#permissions-and-authentication>)
+
+###
+
+
+
+OAuth scope requirement
+
+The stored token predates a permission scope that a newer feature needs. You see this most often from `/usage` and the status line usage indicator:
+
+ OAuth token does not meet scope requirement: user:profile
+
+**What to do:**
+
+ * Run `/login` to mint a new token with the current scopes. You do not need to log out first.
+
+##
+
+
+
+Network and connection errors
+
+These errors mean Claude Code could not reach the API at all. They almost always originate in your local network, proxy, or firewall rather than Anthropic infrastructure.
+
+###
+
+
+
+Unable to connect to API
+
+The TCP connection to the API failed or never completed.
+
+ Unable to connect to API. Check your internet connection
+ Unable to connect to API (ECONNREFUSED)
+ Unable to connect to API (ECONNRESET)
+ Unable to connect to API (ETIMEDOUT)
+ fetch failed
+ Request timed out. Check your internet connection and proxy settings
+
+Common causes include no internet access, a VPN that blocks `api.anthropic.com`, or a required corporate proxy that is not configured. **What to do:**
+
+ * Confirm you can reach the API host from the same shell by running `curl -I https://api.anthropic.com`. On Windows PowerShell use `curl.exe -I https://api.anthropic.com` so the built-in `Invoke-WebRequest` alias is not used.
+ * If you are behind a corporate proxy, set `HTTPS_PROXY` before launching Claude Code and see [Network configuration](</docs/en/network-config>)
+ * If you route through an LLM gateway or relay, set [`ANTHROPIC_BASE_URL`](</docs/en/env-vars>) to its address. See [LLM gateway configuration](</docs/en/llm-gateway>) for setup.
+ * Ensure your firewall allows the hosts listed in [Network access requirements](</docs/en/network-config#network-access-requirements>)
+ * Intermittent failures are retried automatically; persistent failures point to a local network issue
+
+If `curl` succeeds but Claude Code still fails, the cause is usually something between Node.js and the network rather than the network itself:
+
+ * On Linux and WSL, check `/etc/resolv.conf` for an unreachable nameserver. WSL in particular can inherit a broken resolver from the host.
+ * On macOS, a VPN client that was disconnected or uninstalled can leave a tunnel interface or routing rule behind. Check `ifconfig` for stale `utun` interfaces and remove the VPN’s network extension in System Settings.
+ * Docker Desktop and similar container runtimes can intercept outbound traffic. Quit them and retry to rule this out.
+
+###
+
+
+
+SSL certificate errors
+
+A proxy or security appliance on your network is intercepting TLS traffic with its own certificate, and Node.js does not trust it.
+
+ Unable to connect to API: SSL certificate verification failed. Check your proxy or corporate SSL certificates
+ Unable to connect to API: Self-signed certificate detected
+
+**What to do:**
+
+ * Export your organization’s CA bundle and point Node at it with `NODE_EXTRA_CA_CERTS=/path/to/ca-bundle.pem`
+ * See [Network configuration](</docs/en/network-config#custom-ca-certificates>) for full setup instructions
+ * Do not set `NODE_TLS_REJECT_UNAUTHORIZED=0`, which disables certificate validation entirely
+
+##
+
+
+
+Request errors
+
+These errors mean the API received your request but rejected its content.
+
+###
+
+
+
+Prompt is too long
+
+The conversation plus attached files exceeds the model’s context window.
+
+ Prompt is too long
+
+**What to do:**
+
+ * Run `/compact` to summarize earlier turns and free space, or `/clear` to start fresh
+ * Run `/context` to see a breakdown of what is consuming the window: system prompt, tools, memory files, and messages
+ * Disable MCP servers you are not using with `/mcp disable <name>` to remove their tool definitions from context
+ * Trim large `CLAUDE.md` memory files or split them into [imports](</docs/en/memory>)
+ * Subagents inherit every MCP tool definition from the parent session, which can fill their context window before the first turn. Disable MCP servers you are not using before spawning subagents.
+ * Auto-compact is on by default and normally prevents this error. If you have set [`DISABLE_AUTO_COMPACT`](</docs/en/env-vars>), re-enable it or run `/compact` manually before the window fills.
+
+See [Explore the context window](</docs/en/context-window>) for an interactive view of how context fills up.
+
+###
+
+
+
+Error during compaction: Conversation too long
+
+`/compact` itself failed because there is not enough free context to hold the summary it produces.
+
+ Error during compaction: Conversation too long. Press esc twice to go up a few messages and try again.
+
+This can happen when the window is already full at the moment auto-compact triggers, or when you run `/compact` after seeing `Prompt is too long`. **What to do:**
+
+ * Press Esc twice to open the message list and step back several turns. This drops the most recent messages from context. Then run `/compact` again.
+ * If stepping back does not free enough space, run `/clear` to start a fresh session. Your previous conversation is preserved and can be reopened with `/resume`.
+
+###
+
+
+
+Request too large
+
+The raw request body exceeded the API’s byte limit before tokenization, usually because of a large pasted file or attachment.
+
+ Request too large (max 30 MB). Double press esc to go back and remove or shrink the attached content.
+
+This is a size limit on the HTTP request, separate from the context window limit. **What to do:**
+
+ * Press Esc twice and step back past the turn that added the oversized content
+ * Reference large files by path instead of pasting their contents, so Claude can read them in chunks
+ * For images, see Image was too large below
+
+###
+
+
+
+Image was too large
+
+A pasted or attached image exceeds the API’s size or dimension limits.
+
+ Image was too large. Double press esc to go back and try again with a smaller image.
+ API Error: 400 ... image dimensions exceed max allowed size
+
+The image stays in conversation history after the error, so every subsequent message fails with the same error until you remove it. **What to do:**
+
+ * Press Esc twice and step back past the turn where the image was added
+ * Resize the image before pasting. The API accepts images up to 8000 pixels on the longest edge for a single image, or 2000 pixels when many images are in context.
+ * Take a tighter screenshot of the relevant region instead of the full screen
+
+###
+
+
+
+PDF errors
+
+The PDF you attached could not be processed.
+
+ PDF too large (max 100 pages, 32 MB). Try splitting it or extracting text first.
+ PDF is password protected. Try removing protection or extracting text first.
+ The PDF file was not valid. Try converting to a different format first.
+
+**What to do:**
+
+ * For oversized PDFs, ask Claude to read a page range with the Read tool instead of attaching the whole file, or extract text with a tool like `pdftotext` and reference the output file by path
+ * For protected or invalid PDFs, remove the password or re-export the file from its source application, then try again
+
+###
+
+
+
+Extra inputs are not permitted
+
+A proxy or LLM gateway between Claude Code and the API stripped the `anthropic-beta` request header, so the API rejected fields that depend on it.
+
+ API Error: 400 ... Extra inputs are not permitted ... context_management
+ API Error: 400 ... Extra inputs are not permitted ... tools.0.custom.input_examples
+ API Error: 400 ... Unexpected value(s) for the `anthropic-beta` header
+
+Claude Code sends beta-only fields such as `context_management`, `effort`, and tool `input_examples` alongside an `anthropic-beta` header that enables them. When a gateway forwards the body but drops the header, the API sees fields it does not recognize. **What to do:**
+
+ * Configure your gateway to forward the `anthropic-beta` header. See [LLM gateway configuration](</docs/en/llm-gateway>).
+ * As a fallback, set [`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`](</docs/en/env-vars>) before launching. This disables features that require the beta header so requests succeed through a gateway that cannot forward it.
+
+###
+
+
+
+There’s an issue with the selected model
+
+The configured model name was not recognized or your account lacks access to it.
+
+ There's an issue with the selected model (claude-...). It may not exist or you may not have access to it. Run /model to select a different one.
+
+**What to do:**
+
+ * Run `/model` to pick from models available to your account
+ * Use an alias such as `sonnet` or `opus` instead of a full versioned ID. Aliases track the latest release so they do not go stale. See [Model configuration](</docs/en/model-config>).
+ * See [Model not found](</docs/en/troubleshooting#model-not-found-or-not-accessible>) to locate where a stale ID is set across `--model`, `ANTHROPIC_MODEL`, and settings files
+
+###
+
+
+
+Claude Opus is not available with the Claude Pro plan
+
+Your active subscription plan does not include the model you selected.
+
+ Claude Opus is not available with the Claude Pro plan · Select a different model in /model
+
+**What to do:**
+
+ * Run `/model` and select a model your plan includes
+ * If you upgraded your plan recently and still see this, run `/logout` then `/login`. The stored token reflects your plan at the time you signed in, so upgrading on the web does not take effect in an existing session until you re-authenticate.
+ * See [claude.com/pricing](<https://claude.com/pricing>) for which models each plan includes
+
+###
+
+
+
+thinking.type.enabled is not supported for this model
+
+Your Claude Code version is older than the minimum for Opus 4.7. The CLI sent a thinking configuration the model no longer accepts.
+
+ API Error: 400 ... "thinking.type.enabled" is not supported for this model. Use "thinking.type.adaptive" and "output_config.effort" to control thinking behavior.
+
+**What to do:**
+
+ * Run `claude update` to upgrade to v2.1.111 or later, then restart Claude Code
+ * If you cannot upgrade, run `/model` and select Opus 4.6 or Sonnet instead
+ * If you hit this in the Agent SDK, see [SDK troubleshooting](</docs/en/agent-sdk/quickstart#troubleshooting>)
+
+###
+
+
+
+Thinking budget exceeds output limit
+
+The configured extended thinking budget exceeds the maximum response length, so there is no room left for the actual answer.
+
+ API Error: 400 ... max_tokens must be greater than thinking.budget_tokens
+
+Claude Code adjusts these values automatically on the Anthropic API. You typically see this error on Amazon Bedrock or Google Vertex AI when [`MAX_THINKING_TOKENS`](</docs/en/env-vars>) is set higher than the provider’s output limit, or when plan mode raises the thinking budget. **What to do:**
+
+ * Lower `MAX_THINKING_TOKENS`, or raise [`CLAUDE_CODE_MAX_OUTPUT_TOKENS`](</docs/en/env-vars>) above the thinking budget
+ * See [Extended thinking](</docs/en/common-workflows#use-extended-thinking-thinking-mode>) for how the budget interacts with output length
+
+###
+
+
+
+Tool use or thinking block mismatch
+
+The conversation history reached the API in an inconsistent state, usually after a tool call was interrupted or a turn was edited mid-stream.
+
+ API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation.
+ API Error: 400 ... unexpected `tool_use_id` found in `tool_result` blocks
+ API Error: 400 ... thinking blocks ... cannot be modified
+
+All three variants mean the same thing: the sequence of `tool_use`, `tool_result`, and `thinking` blocks in history no longer matches what the API expects. **What to do:**
+
+ * Run `/rewind`, or press Esc twice, to step back to a checkpoint before the corrupted turn and continue from there. See [Checkpointing](</docs/en/checkpointing>) for how checkpoints are created and restored.
+
+##
+
+
+
+Responses seem lower quality than usual
+
+If Claude’s answers seem less capable than you expect but no error is shown, the cause is usually conversation state rather than the model itself. Claude Code does not silently change model versions. It can switch to a fallback model in specific cases such as an Opus quota being reached or a Bedrock or Vertex AI region lacking your model; the Model selection check below catches both, and [Model configuration](</docs/en/model-config>) explains when fallback applies. Check these first:
+
+ * **Model selection** : run `/model` to confirm you are on the model you expect. A previous `/model` choice or an `ANTHROPIC_MODEL` environment variable may have you on a smaller model than you intended.
+ * **Effort level** : run `/effort` to check the current reasoning level and raise it for hard debugging or design work. Defaults vary by model and plan, so check before assuming you are below the maximum. See [Adjust effort level](</docs/en/model-config#adjust-effort-level>) for per-model defaults and the `ultrathink` shortcut.
+ * **Context pressure** : run `/context` to see how full the window is. If it is near capacity, run `/compact` at a natural breakpoint or `/clear` to start fresh. See [Explore the context window](</docs/en/context-window>) for how auto-compact affects earlier turns.
+ * **Stale instructions** : large or outdated `CLAUDE.md` files and MCP tool definitions consume context and can steer responses. `/doctor` flags oversized memory files and subagent definitions; `/context` shows MCP tool token usage.
+
+When a response goes wrong, rewinding usually works better than replying with corrections. Press Esc twice or run `/rewind` to step back to before the bad turn, then rephrase the prompt with more specifics. Correcting in-thread keeps the wrong attempt in context, which can anchor later answers to it. See [Checkpointing](</docs/en/checkpointing>). If quality still seems off after checking the above, run `/feedback` and describe what you expected versus what you got. Feedback submitted this way includes the conversation transcript, which is the fastest way for Anthropic to diagnose a real regression. See Report an error if `/feedback` is unavailable on your provider.
+
+##
+
+
+
+Report an error
+
+This page covers errors from the Claude API. For errors from other Claude Code components, see the relevant guide:
+
+ * MCP server failed to connect or authenticate: [MCP](</docs/en/mcp>)
+ * Hook script failed or blocked a tool: [Debug hooks](</docs/en/hooks#debug-hooks>)
+ * Permission denied or filesystem errors during install: [Troubleshooting](</docs/en/troubleshooting>)
+
+If an error is not listed here or the suggested fix does not help:
+
+ * Run `/feedback` inside Claude Code to send the transcript and a description to Anthropic. The command also offers to open a prefilled GitHub issue. Feedback is unavailable on Bedrock, Vertex AI, and Foundry deployments.
+ * Run `/doctor` to check for local configuration problems
+ * Check [status.claude.com](<https://status.claude.com>) for active incidents
+ * Search [existing issues](<https://github.com/anthropics/claude-code/issues>) on GitHub
--- a/fast-mode.md
+++ b/fast-mode.md
@@ -1,6 +1,6 @@
Fast mode is in research preview. The feature, pricing, and availability may change based on feedback.
-Fast mode is a high-speed configuration for Claude Opus 4.6, making the model 2.5x faster at a higher cost per token. Toggle it on with `/fast` when you need speed for interactive work like rapid iteration or live debugging, and toggle it off when cost matters more than latency. Fast mode is not a different model. It uses the same Opus 4.6 with a different API configuration that prioritizes speed over cost efficiency. You get identical quality and capabilities, just faster responses.
+Fast mode is a high-speed configuration for Claude Opus 4.6, making the model 2.5x faster at a higher cost per token. Toggle it on with `/fast` when you need speed for interactive work like rapid iteration or live debugging, and toggle it off when cost matters more than latency. Fast mode is not a different model. It uses the same Opus 4.6 with a different API configuration that prioritizes speed over cost efficiency. You get identical quality and capabilities, just faster responses. Fast mode is not available on Opus 4.7 or other models.
Fast mode requires Claude Code v2.1.36 or later. Check your version with `claude --version`.
--- a/fullscreen.md
+++ b/fullscreen.md
@@ -1,4 +1,4 @@
-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 opt-in research preview and requires Claude Code v2.1.89 or later. Run `/tui fullscreen` to switch in your current conversation, or set `CLAUDE_CODE_NO_FLICKER=1` on versions before v2.1.110. 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.
@@ -10,13 +10,11 @@
Enable fullscreen rendering
-Set the `CLAUDE_CODE_NO_FLICKER` environment variable when starting Claude Code:
+Run `/tui fullscreen` inside any Claude Code conversation. The CLI saves the [`tui` setting](</docs/en/settings#available-settings>) and relaunches into fullscreen with your conversation intact, so you can switch mid-session without losing context. Run `/tui` with no argument to print which renderer is active. You can also set the `CLAUDE_CODE_NO_FLICKER` environment variable before starting Claude Code:
CLAUDE_CODE_NO_FLICKER=1 claude
-To enable it for every session, export the variable in your shell profile such as `~/.zshrc` or `~/.bashrc`:
-
- export CLAUDE_CODE_NO_FLICKER=1
+The `tui` setting and the environment variable are equivalent. The `/tui` command clears `CLAUDE_CODE_NO_FLICKER` from the relaunched process so the setting it writes takes effect.
##
@@ -28,7 +26,7 @@
Before| Now| Details
---|---|---
-`Cmd+f` or tmux search to find text| `Ctrl+o` once for transcript mode (then `/` to search or `[` to write to scrollback), or `Ctrl+o` twice for focus view (last prompt + tool summary + response)| Search and review the conversation
+`Cmd+f` or tmux search to find text| `Ctrl+o` for transcript mode, then `/` to search or `[` to write to scrollback| Search and review the conversation
Terminal’s native click-and-drag to select and copy| In-app selection, copies automatically on mouse release| Use the mouse
`Cmd`-click to open a URL| Click the URL| Use the mouse
@@ -65,15 +63,23 @@
`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 [Scroll actions](</docs/en/keybindings#scroll-actions>) for the full list of action names, including half-page and full-page variants that have no default binding. 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.
+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. These actions are rebindable. See [Scroll actions](</docs/en/keybindings#scroll-actions>) for the full list of action names, including half-page and full-page variants that have no default binding.
###
-Adjust wheel scroll speed
+Auto-follow
-If mouse wheel scrolling feels slow, your terminal may be sending one scroll event per physical notch with no multiplier. Some terminals, like Ghostty and iTerm2 with faster scrolling enabled, already amplify wheel events. Others, including the VS Code integrated terminal, send exactly one event per notch. Claude Code cannot detect which. Set `CLAUDE_CODE_SCROLL_SPEED` to multiply the base scroll distance:
+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. To turn auto-follow off entirely so the view stays where you leave it, open `/config` and set Auto-scroll to off. With auto-scroll disabled, the view never jumps to the bottom on its own. Permission prompts and other dialogs that need a response still scroll into view regardless of this setting.
+
+###
+
+
+
+Mouse wheel scrolling
+
+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. If mouse wheel scrolling feels slow, your terminal may be sending one scroll event per physical notch with no multiplier. Some terminals, like Ghostty and iTerm2 with faster scrolling enabled, already amplify wheel events. Others, including the VS Code integrated terminal, send exactly one event per notch. Claude Code cannot detect which. Set `CLAUDE_CODE_SCROLL_SPEED` to multiply the base scroll distance:
export CLAUDE_CODE_SCROLL_SPEED=3
@@ -85,7 +91,7 @@
Search and review the conversation
-In fullscreen rendering, `Ctrl+o` cycles through three states: normal prompt, transcript mode, and focus view. Press it once to enter transcript mode, press it again to return to a focus view showing just your last prompt, a one-line summary of tool calls with edit diffstats, and the final response. Press it a third time to return to the normal prompt screen. Transcript mode gains `less`-style navigation and search:
+`Ctrl+o` toggles between the normal prompt and transcript mode. For a quieter view that shows only your last prompt, a one-line summary of tool calls with edit diffstats, and the final response, run `/focus`. The setting persists across sessions. Run `/focus` again to turn it off. Transcript mode gains `less`-style navigation and search:
Key| Action
---|---
@@ -95,8 +101,7 @@
`g` / `G` or `Home` / `End`| Jump to top or bottom
`Ctrl+u` / `Ctrl+d`| Scroll half a page
`Ctrl+b` / `Ctrl+f` or `Space` / `b`| Scroll a full page
-`Ctrl+o`| Advance to focus view
-`Esc` or `q`| Exit transcript mode and return to the prompt
+`Ctrl+o`, `Esc`, or `q`| Exit transcript mode and return to the prompt
Your terminal’s `Cmd+f` and tmux search don’t see the conversation because it lives in the alternate screen buffer, not the native scrollback. To hand the content back to your terminal, press `Ctrl+o` to enter transcript mode first, then:
@@ -135,4 +140,4 @@
Research preview
-Fullscreen rendering is a research preview feature. It has been tested on common terminal emulators, but you may encounter rendering issues on less common terminals or unusual configurations. If you encounter a problem, run `/feedback` inside Claude Code to report it, or open an issue on the [claude-code GitHub repo](<https://github.com/anthropics/claude-code/issues>). Include your terminal emulator name and version. To turn fullscreen rendering off, unset the environment variable or set `CLAUDE_CODE_NO_FLICKER=0`.
+Fullscreen rendering is a research preview feature. It has been tested on common terminal emulators, but you may encounter rendering issues on less common terminals or unusual configurations. If you encounter a problem, run `/feedback` inside Claude Code to report it, or open an issue on the [claude-code GitHub repo](<https://github.com/anthropics/claude-code/issues>). Include your terminal emulator name and version. To turn fullscreen rendering off, run `/tui default`, or unset the environment variable if you enabled it that way.
--- a/github-actions.md
+++ b/github-actions.md
@@ -2,7 +2,7 @@
Claude Code GitHub Actions is built on top of the [Claude Agent SDK](</docs/en/agent-sdk/overview>), which enables programmatic integration of Claude Code into your applications. You can use the SDK to build custom automation workflows beyond GitHub Actions.
-**Claude Opus 4.6 is now available.** Claude Code GitHub Actions default to Sonnet. To use Opus 4.6, configure the model parameter to use `claude-opus-4-6`.
+**Claude Opus 4.7 is now available.** Claude Code GitHub Actions default to Sonnet. To use Opus 4.7, configure the model parameter to use `claude-opus-4-7`.
##
--- a/google-vertex-ai.md
+++ b/google-vertex-ai.md
@@ -132,9 +132,9 @@
Pin specific model versions when deploying to multiple users. Without pinning, model aliases such as `sonnet` and `opus` resolve to the latest version, which may not yet be enabled in your Vertex AI project when Anthropic releases an update. Claude Code falls back to the previous version at startup when the latest is unavailable, but pinning lets you control when your users move to a new model.
-Set these environment variables to specific Vertex AI model IDs:
-
- export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-6'
+Set these environment variables to specific Vertex AI model IDs. Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias on Vertex resolves to Opus 4.6. Set it to the Opus 4.7 ID to use the latest model:
+
+ export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-7'
export ANTHROPIC_DEFAULT_SONNET_MODEL='claude-sonnet-4-6'
export ANTHROPIC_DEFAULT_HAIKU_MODEL='claude-haiku-4-5@20251001'
@@ -147,7 +147,7 @@
To customize models further:
- export ANTHROPIC_MODEL='claude-opus-4-6'
+ export ANTHROPIC_MODEL='claude-opus-4-7'
export ANTHROPIC_DEFAULT_HAIKU_MODEL='claude-haiku-4-5@20251001'
##
@@ -178,7 +178,7 @@
1M token context window
-Claude Opus 4.6, Sonnet 4.6, Sonnet 4.5, and Sonnet 4 support the [1M token context window](<https://platform.claude.com/docs/en/build-with-claude/context-windows#1m-token-context-window>) on Vertex AI. 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.
+Claude Opus 4.7, 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 Vertex AI. Claude Code automatically enables the extended context window when you select a 1M model variant. The setup wizard offers a 1M context option when it pins models. To enable it for a manually pinned model instead, 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.
##
--- a/headless.md
+++ b/headless.md
@@ -118,6 +118,25 @@
`uuid`| string| unique event identifier
`session_id`| string| session the event belongs to
+The `system/init` event reports session metadata including the model, tools, MCP servers, and loaded plugins. It is the first event in the stream unless [`CLAUDE_CODE_SYNC_PLUGIN_INSTALL`](</docs/en/env-vars>) is set, in which case `plugin_install` events precede it. Use the plugin fields to fail CI when a plugin did not load:
+
+Field| Type| Description
+---|---|---
+`plugins`| array| plugins that loaded successfully, each with `name` and `path`
+`plugin_errors`| array| plugin load-time errors such as an unsatisfied dependency version, each with `plugin`, `type`, and `message`. Affected plugins are demoted and absent from `plugins`. The key is omitted when there are no errors
+
+When [`CLAUDE_CODE_SYNC_PLUGIN_INSTALL`](</docs/en/env-vars>) is set, Claude Code emits `system/plugin_install` events while marketplace plugins install before the first turn. Use these to surface install progress in your own UI.
+
+Field| Type| Description
+---|---|---
+`type`| `"system"`| message type
+`subtype`| `"plugin_install"`| identifies this as a plugin install event
+`status`| `"started"`, `"installed"`, `"failed"`, or `"completed"`| `started` and `completed` bracket the overall install; `installed` and `failed` report individual marketplaces
+`name`| string, optional| marketplace name, present on `installed` and `failed`
+`error`| string, optional| failure message, present on `failed`
+`uuid`| string| unique event identifier
+`session_id`| string| session the event belongs to
+
For programmatic streaming with callbacks and message objects, see [Stream responses in real-time](</docs/en/agent-sdk/streaming-output>) in the Agent SDK documentation.
###
@@ -131,7 +150,7 @@
claude -p "Run the test suite and fix any failures" \
--allowedTools "Bash,Read,Edit"
-To set a baseline for the whole session instead of listing individual tools, pass a [permission mode](</docs/en/permission-modes>). `dontAsk` denies anything not in your `permissions.allow` rules, which is useful for locked-down CI runs. `acceptEdits` lets Claude write files without prompting and also auto-approves common filesystem commands such as `mkdir`, `touch`, `mv`, and `cp`. Other shell commands and network requests still need an `--allowedTools` entry or a `permissions.allow` rule, otherwise the run aborts when one is attempted:
+To set a baseline for the whole session instead of listing individual tools, pass a [permission mode](</docs/en/permission-modes>). `dontAsk` denies anything not in your `permissions.allow` rules or the [read-only command set](</docs/en/permissions#read-only-commands>), which is useful for locked-down CI runs. `acceptEdits` lets Claude write files without prompting and also auto-approves common filesystem commands such as `mkdir`, `touch`, `mv`, and `cp`. Other shell commands and network requests still need an `--allowedTools` entry or a `permissions.allow` rule, otherwise the run aborts when one is attempted:
claude -p "Apply the lint fixes" --permission-mode acceptEdits
--- a/hooks.md
+++ b/hooks.md
@@ -1102,8 +1102,8 @@
Field| Description
---|---
-`behavior`| `"allow"` grants the permission, `"deny"` denies it
-`updatedInput`| For `"allow"` only: modifies the tool’s input parameters before execution. Replaces the entire input object, so include unchanged fields alongside modified ones
+`behavior`| `"allow"` grants the permission, `"deny"` denies it. [Deny and ask rules](</docs/en/permissions#manage-permissions>) are still evaluated, so a hook returning `"allow"` does not override a matching deny rule
+`updatedInput`| For `"allow"` only: modifies the tool’s input parameters before execution. Replaces the entire input object, so include unchanged fields alongside modified ones. The modified input is re-evaluated against deny and ask rules
`updatedPermissions`| For `"allow"` only: array of permission update entries to apply, such as adding an allow rule or changing the session permission mode
`message`| For `"deny"` only: tells Claude why the permission was denied
`interrupt`| For `"deny"` only: if `true`, stops Claude
@@ -1136,6 +1136,8 @@
`setMode`| `mode`, `destination`| Changes the permission mode. Valid modes are `default`, `acceptEdits`, `dontAsk`, `bypassPermissions`, and `plan`
`addDirectories`| `directories`, `destination`| Adds working directories. `directories` is an array of path strings
`removeDirectories`| `directories`, `destination`| Removes working directories
+
+`setMode` with `bypassPermissions` only takes effect if the session was launched with bypass mode already available: `--dangerously-skip-permissions`, `--permission-mode bypassPermissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in settings, and the mode is not disabled by [`permissions.disableBypassPermissionsMode`](</docs/en/permissions#managed-settings>). Otherwise the update is a no-op. `bypassPermissions` is never persisted as `defaultMode` regardless of `destination`.
The `destination` field on every entry determines whether the change stays in memory or persists to a settings file.
--- a/hooks-guide.md
+++ b/hooks-guide.md
@@ -359,7 +359,11 @@
}
}
-When the hook approves, Claude Code exits plan mode and restores whatever permission mode was active before you entered plan mode. The transcript shows “Allowed by PermissionRequest hook” where the dialog would have appeared. The hook path always keeps the current conversation: it cannot clear context and start a fresh implementation session the way the dialog can. To set a specific permission mode instead, your hook’s output can include an `updatedPermissions` array with a `setMode` entry. The `mode` value is any permission mode like `default`, `acceptEdits`, or `bypassPermissions`, and `destination: "session"` applies it for the current session only. To switch the session to `acceptEdits`, your hook writes this JSON to stdout:
+When the hook approves, Claude Code exits plan mode and restores whatever permission mode was active before you entered plan mode. The transcript shows “Allowed by PermissionRequest hook” where the dialog would have appeared. The hook path always keeps the current conversation: it cannot clear context and start a fresh implementation session the way the dialog can. To set a specific permission mode instead, your hook’s output can include an `updatedPermissions` array with a `setMode` entry. The `mode` value is any permission mode like `default`, `acceptEdits`, or `bypassPermissions`, and `destination: "session"` applies it for the current session only.
+
+`bypassPermissions` only applies if the session was launched with bypass mode already available: `--dangerously-skip-permissions`, `--permission-mode bypassPermissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in settings, and not disabled by [`permissions.disableBypassPermissionsMode`](</docs/en/permissions#managed-settings>). It is never persisted as `defaultMode`.
+
+To switch the session to `acceptEdits`, your hook writes this JSON to stdout:
{
"hookSpecificOutput": {
--- a/how-claude-code-works.md
+++ b/how-claude-code-works.md
@@ -104,7 +104,7 @@
Work across branches
-Each Claude Code conversation is a session tied to your current directory. When you resume, you only see sessions from that directory. Claude sees your current branch’s files. When you switch branches, Claude sees the new branch’s files, but your conversation history stays the same. Claude remembers what you discussed even after switching. Since sessions are tied to directories, you can run parallel Claude sessions by using [git worktrees](</docs/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees>), which create separate directories for individual branches.
+Each Claude Code conversation is a session tied to your current directory. The `/resume` picker shows sessions from the current worktree by default, with keyboard shortcuts to widen the list to other worktrees or projects. See [Resume previous conversations](</docs/en/common-workflows#resume-previous-conversations>) for the full list of picker shortcuts and how name resolution works. Claude sees your current branch’s files. When you switch branches, Claude sees the new branch’s files, but your conversation history stays the same. Claude remembers what you discussed even after switching. Since sessions are tied to directories, you can run parallel Claude sessions by using [git worktrees](</docs/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees>), which create separate directories for individual branches.
###
--- a/interactive-mode.md
+++ b/interactive-mode.md
@@ -23,9 +23,9 @@
`Ctrl+C`| Cancel current input or generation| Standard interrupt
`Ctrl+X Ctrl+K`| Kill all background agents. Press twice within 3 seconds to confirm| Background agent control
`Ctrl+D`| Exit Claude Code session| EOF signal
-`Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding
-`Ctrl+L`| Clear prompt input| Clears typed text, keeps conversation history
-`Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution. Also expands MCP calls, which collapse to a single line like “Called slack 3 times” by default. In [fullscreen rendering](</docs/en/fullscreen>), cycles through three states: normal prompt, transcript mode, and focus view (last prompt + tool summary + response)
+`Ctrl+G` or `Ctrl+X Ctrl+E`| Open in default text editor| Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding. Turn on Show last response in external editor in `/config` to prepend Claude’s previous reply as `#`-commented context above your prompt; the comment block is stripped when you save
+`Ctrl+L`| Clear prompt input and redraw screen| Clears typed text and forces a full terminal redraw. Conversation history is kept. Use this to recover if the display becomes garbled or partially blank
+`Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution. Also expands MCP calls, which collapse to a single line like “Called slack 3 times” by default
`Ctrl+R`| Reverse search command history| Search through previous commands interactively
`Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt
`Ctrl+B`| Background running tasks| Backgrounds bash commands and agents. Tmux users press twice
@@ -47,7 +47,7 @@
Shortcut| Description| Context
---|---|---
`Ctrl+K`| Delete to end of line| Stores deleted text for pasting
-`Ctrl+U`| Delete from cursor to line start| Stores deleted text for pasting. Repeat to clear across lines in multiline input
+`Ctrl+U`| Clear entire input buffer| Stores cleared text for pasting with `Ctrl+Y`. `Cmd+Backspace` deletes from cursor to line start
`Ctrl+Y`| Paste deleted text| Paste text deleted with `Ctrl+K` or `Ctrl+U`
`Alt+Y` (after `Ctrl+Y`)| Cycle paste history| After pasting, cycle through previously deleted text. Requires Option as Meta on macOS
`Alt+B`| Move cursor back one word| Word navigation. Requires Option as Meta on macOS
@@ -102,6 +102,8 @@
Shortcut| Description
---|---
`Ctrl+E`| Toggle show all content
+`[`| Write the full conversation to your terminal’s native scrollback so `Cmd+F`, tmux copy mode, and other native tools can search it. Requires [fullscreen rendering](</docs/en/fullscreen#search-and-review-the-conversation>)
+`v`| Write the conversation to a temporary file and open it in `$VISUAL` or `$EDITOR`. Requires [fullscreen rendering](</docs/en/fullscreen>)
`q`, `Ctrl+C`, `Esc`| Exit transcript view. All three can be rebound via [`transcript:exit`](</docs/en/keybindings>)
###
@@ -356,6 +358,14 @@
+Session recap
+
+When you return to the terminal after stepping away, Claude Code shows a one-line recap of what happened in the session so far. The recap generates in the background once at least three minutes have passed since the last completed turn and the terminal is unfocused, so it’s ready when you switch back. Recaps only appear once the session has at least three turns, and never twice in a row. Run `/recap` to generate a summary on demand. To turn automatic recaps off, open `/config` and disable **Session recap**. Session recap is on by default for every plan and provider. To override the `/config` toggle, set [`CLAUDE_CODE_ENABLE_AWAY_SUMMARY`](</docs/en/env-vars>) to `0` or `1`. The recap is always skipped in non-interactive mode.
+
+##
+
+
+
PR review status
When working on a branch with an open pull request, Claude Code displays a clickable PR link in the footer (for example, “PR #446”). The link has a colored underline indicating the review state:
--- a/keybindings.md
+++ b/keybindings.md
@@ -114,7 +114,7 @@
Action| Default| Description
---|---|---
`chat:cancel`| Escape| Cancel current input
-`chat:clearInput`| Ctrl+L| Clear prompt input
+`chat:clearInput`| Ctrl+L| Clear prompt input and force a full screen redraw
`chat:killAgents`| Ctrl+X Ctrl+K| Kill all background agents
`chat:cycleMode`| Shift+Tab*| Cycle permission modes
`chat:modelPicker`| Cmd+P / Meta+P| Open model picker
@@ -359,6 +359,7 @@
---|---|---
`plugin:toggle`| Space| Toggle plugin selection
`plugin:install`| I| Install selected plugins
+`plugin:favorite`| F| Favorite the selected plugin so it sorts near the top of the Installed tab
###
--- a/mcp.md
+++ b/mcp.md
@@ -120,6 +120,14 @@
Dynamic tool updates
Claude Code supports MCP `list_changed` notifications, allowing MCP servers to dynamically update their available tools, prompts, and resources without requiring you to disconnect and reconnect. When an MCP server sends a `list_changed` notification, Claude Code automatically refreshes the available capabilities from that server.
+
+###
+
+
+
+Automatic reconnection
+
+If an HTTP or SSE server disconnects mid-session, Claude Code automatically reconnects with exponential backoff: up to five attempts, starting at a one-second delay and doubling each time. The server appears as pending in `/mcp` while reconnection is in progress. After five failed attempts the server is marked as failed and you can retry manually from `/mcp`. Stdio servers are local processes and are not reconnected automatically.
###
@@ -519,7 +527,7 @@
Override OAuth metadata discovery
-If your MCP server’s standard OAuth metadata endpoints return errors but the server exposes a working OIDC endpoint, you can point Claude Code at a specific metadata URL to bypass the default discovery chain. By default, Claude Code first checks RFC 9728 Protected Resource Metadata at `/.well-known/oauth-protected-resource`, then falls back to RFC 8414 authorization server metadata at `/.well-known/oauth-authorization-server`. Set `authServerMetadataUrl` in the `oauth` object of your server’s config in `.mcp.json`:
+Point Claude Code at a specific OAuth authorization server metadata URL to bypass the default discovery chain. Set `authServerMetadataUrl` when the MCP server’s standard endpoints error, or when you want to route discovery through an internal proxy. By default, Claude Code first checks RFC 9728 Protected Resource Metadata at `/.well-known/oauth-protected-resource`, then falls back to RFC 8414 authorization server metadata at `/.well-known/oauth-authorization-server`. Set `authServerMetadataUrl` in the `oauth` object of your server’s config in `.mcp.json`:
{
"mcpServers": {
@@ -533,7 +541,29 @@
}
}
-The URL must use `https://`. This option requires Claude Code v2.1.64 or later.
+The URL must use `https://`. `authServerMetadataUrl` requires Claude Code v2.1.64 or later. The metadata URL’s `scopes_supported` overrides the scopes the upstream server advertises.
+
+###
+
+
+
+Restrict OAuth scopes
+
+Set `oauth.scopes` to pin the scopes Claude Code requests during the authorization flow. This is the supported way to restrict an MCP server to a security-team-approved subset when the upstream authorization server advertises more scopes than you want to grant. The value is a single space-separated string, matching the `scope` parameter format in RFC 6749 §3.3.
+
+ {
+ "mcpServers": {
+ "slack": {
+ "type": "http",
+ "url": "https://mcp.slack.com/mcp",
+ "oauth": {
+ "scopes": "channels:read chat:write search:read"
+ }
+ }
+ }
+ }
+
+`oauth.scopes` takes precedence over both `authServerMetadataUrl` and the scopes the server discovers at `/.well-known`. Leave it unset to let the MCP server determine the requested scope set. If the authorization server advertises `offline_access` in `scopes_supported`, Claude Code appends it to the pinned scopes so the access token can be refreshed without a new browser sign-in. If the server later returns a 403 `insufficient_scope` for a tool call, Claude Code re-authenticates with the same pinned scopes. Widen `oauth.scopes` when a tool you need requires a scope outside the pin.
###
--- a/microsoft-foundry.md
+++ b/microsoft-foundry.md
@@ -78,9 +78,9 @@
Pin specific model versions for every deployment. If you use model aliases (`sonnet`, `opus`, `haiku`) without pinning, Claude Code may attempt to use a newer model version that isn’t available in your Foundry account, breaking existing users when Anthropic releases updates. When you create Azure deployments, select a specific model version rather than “auto-update to latest.”
-Set the model variables to match the deployment names you created in step 1:
+Set the model variables to match the deployment names you created in step 1. Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias on Foundry resolves to Opus 4.6. Set it to the Opus 4.7 ID to use the latest model:
- export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-6'
+ export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-7'
export ANTHROPIC_DEFAULT_SONNET_MODEL='claude-sonnet-4-6'
export ANTHROPIC_DEFAULT_HAIKU_MODEL='claude-haiku-4-5'
--- a/migration-guide.md
+++ b/migration-guide.md
@@ -93,12 +93,12 @@
# Before
from claude_code_sdk import query, ClaudeCodeOptions
- options = ClaudeCodeOptions(model="claude-opus-4-6")
+ options = ClaudeCodeOptions(model="claude-opus-4-7")
# After
from claude_agent_sdk import query, ClaudeAgentOptions
- options = ClaudeAgentOptions(model="claude-opus-4-6")
+ options = ClaudeAgentOptions(model="claude-opus-4-7")
**5\. Reviewbreaking changes** Make any code changes needed to complete the migration.
@@ -121,12 +121,12 @@
# BEFORE (claude-code-sdk)
from claude_code_sdk import query, ClaudeCodeOptions
- options = ClaudeCodeOptions(model="claude-opus-4-6", permission_mode="acceptEdits")
+ options = ClaudeCodeOptions(model="claude-opus-4-7", permission_mode="acceptEdits")
# AFTER (claude-agent-sdk)
from claude_agent_sdk import query, ClaudeAgentOptions
- options = ClaudeAgentOptions(model="claude-opus-4-6", permission_mode="acceptEdits")
+ options = ClaudeAgentOptions(model="claude-opus-4-7", permission_mode="acceptEdits")
**Why this changed:** The type name now matches the “Claude Agent SDK” branding and provides consistency across the SDK’s naming conventions.
@@ -209,7 +209,7 @@
* **Testing** \- Isolated test environments
* **Multi-tenant systems** \- Prevent settings leakage between users
-**Backward compatibility:** If your application relied on filesystem settings (custom slash commands, CLAUDE.md instructions, etc.), add `settingSources: ['user', 'project', 'local']` to your options.
+Current SDK releases have reverted this default for `query()`: omitting the option once again loads user, project, and local settings, matching the CLI. Pass `settingSources: []` in TypeScript or `setting_sources=[]` in Python if your application depends on the isolated behavior described above. Python SDK 0.1.59 and earlier treated an empty list the same as omitting the option, so upgrade before relying on `setting_sources=[]`. See [What settingSources does not control](</docs/en/agent-sdk/claude-code-features#what-settingsources-does-not-control>) for inputs that are read even when `settingSources` is `[]`.
##
Show diff (196 lines)
--- a/model-config.md
+++ b/model-config.md
@@ -25,14 +25,16 @@
---|---
**`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
+**`sonnet`**| Uses the latest Sonnet model for daily coding tasks
+**`opus`**| Uses the latest Opus model for complex reasoning tasks
**`haiku`**| Uses the fast and efficient Haiku model for simple tasks
**`sonnet[1m]`**| Uses Sonnet with a [1 million token context window](<https://platform.claude.com/docs/en/build-with-claude/context-windows#1m-token-context-window>) for long sessions
**`opus[1m]`**| Uses Opus with a [1 million token context window](<https://platform.claude.com/docs/en/build-with-claude/context-windows#1m-token-context-window>) for long sessions
**`opusplan`**| Special mode that uses `opus` during plan mode, then switches to `sonnet` for execution
-Aliases always point to the latest version. To pin to a specific version, use the full model name (for example, `claude-opus-4-6`) or set the corresponding environment variable like `ANTHROPIC_DEFAULT_OPUS_MODEL`.
+On the Anthropic API, `opus` resolves to Opus 4.7 and `sonnet` resolves to Sonnet 4.6. On Bedrock, Vertex, and Foundry, `opus` resolves to Opus 4.6 and `sonnet` resolves to Sonnet 4.5; newer models are available on those providers by selecting the full model name explicitly or setting `ANTHROPIC_DEFAULT_OPUS_MODEL` or `ANTHROPIC_DEFAULT_SONNET_MODEL`. Aliases point to the recommended version for your provider and update over time. To pin to a specific version, use the full model name (for example, `claude-opus-4-7`) or set the corresponding environment variable like `ANTHROPIC_DEFAULT_OPUS_MODEL`.
+
+Opus 4.7 requires Claude Code v2.1.111 or later. Run `claude update` to upgrade.
###
@@ -42,7 +44,7 @@
You can configure your model in several ways, listed in order of priority:
- 1. **During session** \- Use `/model <alias|name>` to switch models mid-session
+ 1. **During session** \- Use `/model <alias|name>` to switch immediately, or run `/model` with no argument to open the picker. The picker asks for confirmation when the conversation has prior output, since the next response re-reads the full history without cached context
2. **At startup** \- Launch with `claude --model <alias|name>`
3. **Environment variable** \- Set `ANTHROPIC_MODEL=<alias|name>`
4. **Settings** \- Configure permanently in your settings file using the `model` field.
@@ -138,11 +140,13 @@
The behavior of `default` depends on your account type:
- * **Max and Team Premium** : defaults to Opus 4.6
- * **Pro and Team Standard** : defaults to Sonnet 4.6
- * **Enterprise** : Opus 4.6 is available but not the default
+ * **Max and Team Premium** : defaults to Opus 4.7
+ * **Pro, Team Standard, Enterprise, and Anthropic API** : defaults to Sonnet 4.6
+ * **Bedrock, Vertex, and Foundry** : defaults to Sonnet 4.5
Claude Code may automatically fall back to Sonnet if you hit a usage threshold with Opus.
+
+On April 23, 2026, the default model for Enterprise pay-as-you-go and Anthropic API users will change to Opus 4.7. To keep a different default, set `ANTHROPIC_MODEL` or the `model` field in [server-managed settings](</docs/en/server-managed-settings>).
###
@@ -163,16 +167,57 @@
Adjust effort level
-[Effort levels](<https://platform.claude.com/docs/en/build-with-claude/effort>) control adaptive reasoning, which dynamically allocates thinking based on task complexity. Lower effort is faster and cheaper for straightforward tasks, while higher effort provides deeper reasoning for complex problems. Three levels persist across sessions: **low** , **medium** , and **high**. A fourth level, **max** , provides the deepest reasoning with no constraint on token spending, so responses are slower and cost more than at `high`. `max` is available on Opus 4.6 only and does not persist across sessions except through the `CLAUDE_CODE_EFFORT_LEVEL` environment variable. The default effort level depends on your plan. Pro and Max subscribers default to medium effort. All other users default to high effort: API key, Team, Enterprise, and third-party provider (Bedrock, Vertex AI, Foundry) users. Your plan’s default suits most coding tasks. Raise effort for work that benefits from deeper reasoning, such as hard debugging problems or complex architectural decisions. Higher levels can cause the model to overthink routine work. For one-off deep reasoning without changing your session setting, include “ultrathink” in your prompt to trigger high effort for that turn. This has no effect if your session is already at high or max. **Setting effort:**
-
- * **`/effort`** : run `/effort low`, `/effort medium`, `/effort high`, or `/effort max` to change the level, or `/effort auto` to reset to the model default
+[Effort levels](<https://platform.claude.com/docs/en/build-with-claude/effort>) control adaptive reasoning, which lets the model decide whether and how much to think on each step based on task complexity. Lower effort is faster and cheaper for straightforward tasks, while higher effort provides deeper reasoning for complex problems. Effort is supported on Opus 4.7, Opus 4.6, and Sonnet 4.6. The available levels depend on the model:
+
+Model| Levels
+---|---
+Opus 4.7| `low`, `medium`, `high`, `xhigh`, `max`
+Opus 4.6 and Sonnet 4.6| `low`, `medium`, `high`, `max`
+
+If you set a level the active model does not support, Claude Code falls back to the highest supported level at or below the one you set. For example, `xhigh` runs as `high` on Opus 4.6. On Opus 4.7, the default effort is `xhigh` for all plans and providers. On Opus 4.6 and Sonnet 4.6, the default is `high`, or `medium` on Pro and Max. When you first run Opus 4.7, Claude Code applies `xhigh` even if you previously set a different effort level for Opus 4.6 or Sonnet 4.6. Run `/effort` again to choose a different level after switching. `low`, `medium`, `high`, and `xhigh` persist across sessions. `max` provides the deepest reasoning with no constraint on token spending and applies to the current session only, except when set through the `CLAUDE_CODE_EFFORT_LEVEL` environment variable.
+
+####
+
+
+
+Choose an effort level
+
+Each level trades token spend against capability. The default suits most coding tasks; adjust when you want a different balance.
+
+Level| When to use it
+---|---
+`low`| Reserve for short, scoped, latency-sensitive tasks that are not intelligence-sensitive
+`medium`| Reduces token usage for cost-sensitive work that can trade off some intelligence
+`high`| Balances token usage and intelligence. Use as a minimum for intelligence-sensitive work, or to reduce token spend relative to `xhigh`
+`xhigh`| Best results for most coding and agentic tasks. Recommended default on Opus 4.7
+`max`| Can improve performance on demanding tasks but may show diminishing returns and is prone to overthinking. Test before adopting broadly
+
+The effort scale is calibrated per model, so the same level name does not represent the same underlying value across models. For one-off deep reasoning without changing your session setting, include “ultrathink” in your prompt. This adds an in-context instruction telling the model to reason more on that turn; it does not change the effort level sent to the API.
+
+####
+
+
+
+Set the effort level
+
+You can change effort through any of the following:
+
+ * **`/effort`** : run `/effort` with no arguments to open an interactive slider, `/effort` followed by a level name to set it directly, or `/effort auto` to reset to the model default
* **In`/model`**: use left/right arrow keys to adjust the effort slider when selecting a model
- * **`--effort` flag**: pass `low`, `medium`, `high`, or `max` to set the level for a single session when launching Claude Code
- * **Environment variable** : set `CLAUDE_CODE_EFFORT_LEVEL` to `low`, `medium`, `high`, `max`, or `auto`
- * **Settings** : set `effortLevel` in your settings file to `"low"`, `"medium"`, or `"high"`
+ * **`--effort` flag**: pass a level name to set it for a single session when launching Claude Code
+ * **Environment variable** : set `CLAUDE_CODE_EFFORT_LEVEL` to a level name or `auto`
+ * **Settings** : set `effortLevel` in your settings file
* **Skill and subagent frontmatter** : set `effort` in a [skill](</docs/en/skills#frontmatter-reference>) or [subagent](</docs/en/sub-agents#supported-frontmatter-fields>) markdown file to override the effort level when that skill or subagent runs
-The environment variable takes precedence over all other methods, then your configured level, then the model default. Frontmatter effort applies when that skill or subagent is active, overriding the session level but not the environment variable. Effort is supported on Opus 4.6 and Sonnet 4.6. The effort slider appears in `/model` when a supported model is selected. The current effort level is also displayed next to the logo and spinner, for example “with low effort”, so you can confirm which setting is active without opening `/model`. To disable adaptive reasoning on Opus 4.6 and Sonnet 4.6 and revert to the previous fixed thinking budget, set `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1`. When disabled, these models use the fixed budget controlled by `MAX_THINKING_TOKENS`. See [environment variables](</docs/en/env-vars>).
+The environment variable takes precedence over all other methods, then your configured level, then the model default. Frontmatter effort applies when that skill or subagent is active, overriding the session level but not the environment variable. The effort slider appears in `/model` when a supported model is selected. The current effort level is also displayed next to the logo and spinner, for example “with low effort”, so you can confirm which setting is active without opening `/model`.
+
+####
+
+
+
+Adaptive reasoning and fixed thinking budgets
+
+Adaptive reasoning makes thinking optional on each step, so Claude can respond faster to routine prompts and reserve deeper thinking for steps that benefit from it. If you want Claude to think more or less often than the current level produces, you can say so directly in your prompt or in `CLAUDE.md`; the model responds to that guidance within its effort setting. Opus 4.7 always uses adaptive reasoning. The fixed thinking budget mode and `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` do not apply to it. On Opus 4.6 and Sonnet 4.6, you can set `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1` to revert to the previous fixed thinking budget controlled by `MAX_THINKING_TOKENS`. See [environment variables](</docs/en/env-vars>).
###
@@ -180,9 +225,9 @@
Extended context
-Opus 4.6 and Sonnet 4.6 support a [1 million token context window](<https://platform.claude.com/docs/en/build-with-claude/context-windows#1m-token-context-window>) for long sessions with large codebases. Availability varies by model and plan. On Max, Team, and Enterprise plans, Opus is automatically upgraded to 1M context with no additional configuration. This applies to both Team Standard and Team Premium seats.
-
-Plan| Opus 4.6 with 1M context| Sonnet 4.6 with 1M context
+Opus 4.7, Opus 4.6, and Sonnet 4.6 support a [1 million token context window](<https://platform.claude.com/docs/en/build-with-claude/context-windows#1m-token-context-window>) for long sessions with large codebases. Availability varies by model and plan. On Max, Team, and Enterprise plans, Opus is automatically upgraded to 1M context with no additional configuration. This applies to both Team Standard and Team Premium seats.
+
+Plan| Opus with 1M context| Sonnet with 1M context
---|---|---
Max, Team, and Enterprise| Included with subscription| Requires [extra usage](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>)
Pro| Requires [extra usage](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>)| Requires [extra usage](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>)
@@ -195,7 +240,7 @@
/model sonnet[1m]
# Or append [1m] to a full model name
- /model claude-opus-4-6[1m]
+ /model claude-opus-4-7[1m]
##
@@ -216,7 +261,7 @@
Use `ANTHROPIC_CUSTOM_MODEL_OPTION` to add a single custom entry to the `/model` picker without replacing the built-in aliases. This is useful for LLM gateway deployments or testing model IDs that Claude Code does not list by default. This example sets all three variables to make a gateway-routed Opus deployment selectable:
- export ANTHROPIC_CUSTOM_MODEL_OPTION="my-gateway/claude-opus-4-6"
+ export ANTHROPIC_CUSTOM_MODEL_OPTION="my-gateway/claude-opus-4-7"
export ANTHROPIC_CUSTOM_MODEL_OPTION_NAME="Opus via Gateway"
export ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION="Custom deployment routed through the internal LLM gateway"
@@ -253,15 +298,15 @@
Provider| Example
---|---
-Bedrock| `export ANTHROPIC_DEFAULT_OPUS_MODEL='us.anthropic.claude-opus-4-6-v1'`
-Vertex AI| `export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-6'`
-Foundry| `export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-6'`
+Bedrock| `export ANTHROPIC_DEFAULT_OPUS_MODEL='us.anthropic.claude-opus-4-7'`
+Vertex AI| `export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-7'`
+Foundry| `export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-7'`
Apply the same pattern for `ANTHROPIC_DEFAULT_SONNET_MODEL` and `ANTHROPIC_DEFAULT_HAIKU_MODEL`. For current and legacy model IDs across all providers, see [Models overview](<https://platform.claude.com/docs/en/about-claude/models/overview>). To upgrade users to a new model version, update these environment variables and redeploy. To enable extended context for a pinned model, append `[1m]` to the model ID in `ANTHROPIC_DEFAULT_OPUS_MODEL` or `ANTHROPIC_DEFAULT_SONNET_MODEL`:
- export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-6[1m]'
-
-The `[1m]` suffix applies the 1M context window to all usage of that alias, including `opusplan`. Claude Code strips the suffix before sending the model ID to your provider. Only append `[1m]` when the underlying model supports 1M context, such as Opus 4.6 or Sonnet 4.6.
+ export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-7[1m]'
+
+The `[1m]` suffix applies the 1M context window to all usage of that alias, including `opusplan`. Claude Code strips the suffix before sending the model ID to your provider. Only append `[1m]` when the underlying model supports 1M context, such as Opus 4.7 or Sonnet 4.6.
The `settings.availableModels` allowlist still applies when using third-party providers. Filtering matches on the model alias (`opus`, `sonnet`, `haiku`), not the provider-specific model ID.
@@ -284,6 +329,7 @@
Capability value| Enables
---|---
`effort`| Effort levels and the `/effort` command
+`xhigh_effort`| The `xhigh` effort level
`max_effort`| The `max` effort level
`thinking`| [Extended thinking](</docs/en/common-workflows#use-extended-thinking-thinking-mode>)
`adaptive_thinking`| Adaptive reasoning that dynamically allocates thinking based on task complexity
@@ -293,8 +339,8 @@
export ANTHROPIC_DEFAULT_OPUS_MODEL='arn:aws:bedrock:us-east-1:123456789012:custom-model/abc'
export ANTHROPIC_DEFAULT_OPUS_MODEL_NAME='Opus via Bedrock'
- export ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION='Opus 4.6 routed through a Bedrock custom endpoint'
- export ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES='effort,max_effort,thinking,adaptive_thinking,interleaved_thinking'
+ export ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION='Opus 4.7 routed through a Bedrock custom endpoint'
+ export ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES='effort,xhigh_effort,max_effort,thinking,adaptive_thinking,interleaved_thinking'
###
@@ -306,8 +352,8 @@
{
"modelOverrides": {
- "claude-opus-4-6": "arn:aws:bedrock:us-east-2:123456789012:application-inference-profile/opus-prod",
- "claude-opus-4-5-20251101": "arn:aws:bedrock:us-east-2:123456789012:application-inference-profile/opus-45-prod",
+ "claude-opus-4-7": "arn:aws:bedrock:us-east-2:123456789012:application-inference-profile/opus-prod",
+ "claude-opus-4-6": "arn:aws:bedrock:us-east-2:123456789012:application-inference-profile/opus-46-prod",
"claude-sonnet-4-6": "arn:aws:bedrock:us-east-2:123456789012:application-inference-profile/sonnet-prod"
}
}
--- a/modifying-system-prompts.md
+++ b/modifying-system-prompts.md
@@ -43,12 +43,7 @@
* **Project-level:** `CLAUDE.md` or `.claude/CLAUDE.md` in your working directory
* **User-level:** `~/.claude/CLAUDE.md` for global instructions across all projects
-**IMPORTANT:** The SDK only reads CLAUDE.md files when you explicitly configure `settingSources` (TypeScript) or `setting_sources` (Python):
-
- * Include `'project'` to load project-level CLAUDE.md
- * Include `'user'` to load user-level CLAUDE.md (`~/.claude/CLAUDE.md`)
-
-The `claude_code` system prompt preset does NOT automatically load CLAUDE.md - you must also specify setting sources. **Content format:** CLAUDE.md files use plain markdown and can contain:
+CLAUDE.md files are read when the corresponding setting source is enabled: `'project'` for project-level CLAUDE.md and `'user'` for `~/.claude/CLAUDE.md`. With default `query()` options both sources are enabled, so CLAUDE.md loads automatically. If you set `settingSources` (TypeScript) or `setting_sources` (Python) explicitly, include the sources you need. CLAUDE.md loading is controlled by setting sources, not by the `claude_code` preset. **Content format:** CLAUDE.md files use plain markdown and can contain:
* Coding guidelines and standards
* Project-specific context
@@ -94,8 +89,6 @@
import { query } from "@anthropic-ai/claude-agent-sdk";
- // IMPORTANT: You must specify settingSources to load CLAUDE.md
- // The claude_code preset alone does NOT load CLAUDE.md files
const messages = [];
for await (const message of query({
@@ -105,7 +98,7 @@
type: "preset",
preset: "claude_code" // Use Claude Code's system prompt
},
- settingSources: ["project"] // Required to load CLAUDE.md from project
+ settingSources: ["project"] // Loads CLAUDE.md from project
}
})) {
messages.push(message);
@@ -132,7 +125,7 @@
* ✅ Persistent across all sessions in a project
* ✅ Shared with team via git
* ✅ Automatic discovery (no code changes needed)
- * ⚠️ Requires loading settings via `settingSources`
+ * ⚠️ Not loaded if you pass `settingSources: []`
###
@@ -349,7 +342,7 @@
* “Run `npm run lint:fix` before committing”
* “Database migrations are in the `migrations/` directory”
-**Important:** To load CLAUDE.md files, you must explicitly set `settingSources: ['project']` (TypeScript) or `setting_sources=["project"]` (Python). The `claude_code` system prompt preset does NOT automatically load CLAUDE.md without this setting.
+CLAUDE.md files load when the `project` setting source is enabled, which it is for default `query()` options. If you set `settingSources` (TypeScript) or `setting_sources` (Python) explicitly, include `'project'` to keep loading project-level CLAUDE.md.
###
--- a/monitoring-usage.md
+++ b/monitoring-usage.md
@@ -85,6 +85,7 @@
`OTEL_LOG_USER_PROMPTS`| Enable logging of user prompt content (default: disabled)| `1` to enable
`OTEL_LOG_TOOL_DETAILS`| Enable logging of tool parameters and input arguments in tool events and trace span attributes: Bash commands, MCP server and tool names, skill names, and tool input (default: disabled)| `1` to enable
`OTEL_LOG_TOOL_CONTENT`| Enable logging of tool input and output content in span events (default: disabled). Requires tracing. Content is truncated at 60 KB| `1` to enable
+`OTEL_LOG_RAW_API_BODIES`| Emit the full Anthropic Messages API request and response JSON as `api_request_body` / `api_response_body` log events (default: disabled). Bodies include the entire conversation history and are truncated at 60 KB. Enabling this implies consent to everything `OTEL_LOG_USER_PROMPTS`, `OTEL_LOG_TOOL_DETAILS`, and `OTEL_LOG_TOOL_CONTENT` would reveal| `1` to enable
`OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE`| Metrics temporality preference (default: `delta`). Set to `cumulative` if your backend expects cumulative temporality| `delta`, `cumulative`
`CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS`| Interval for refreshing dynamic headers (default: 1740000ms / 29 minutes)| `900000`
@@ -120,7 +121,7 @@
`OTEL_EXPORTER_OTLP_TRACES_ENDPOINT`| OTLP traces endpoint, overrides `OTEL_EXPORTER_OTLP_ENDPOINT`| `http://localhost:4318/v1/traces`
`OTEL_TRACES_EXPORT_INTERVAL`| Span batch export interval in milliseconds (default: 5000)| `1000`, `10000`
-Spans redact user prompt text, tool input details, and tool content by default. Set `OTEL_LOG_USER_PROMPTS=1`, `OTEL_LOG_TOOL_DETAILS=1`, and `OTEL_LOG_TOOL_CONTENT=1` to include them. When tracing is active, Bash and PowerShell subprocesses automatically inherit a `TRACEPARENT` environment variable containing the W3C trace context of the active tool execution span. This lets any subprocess that reads `TRACEPARENT` parent its own spans under the same trace, enabling end-to-end distributed tracing through scripts and commands that Claude runs.
+Spans redact user prompt text, tool input details, and tool content by default. Set `OTEL_LOG_USER_PROMPTS=1`, `OTEL_LOG_TOOL_DETAILS=1`, and `OTEL_LOG_TOOL_CONTENT=1` to include them. When tracing is active, Bash and PowerShell subprocesses automatically inherit a `TRACEPARENT` environment variable containing the W3C trace context of the active tool execution span. This lets any subprocess that reads `TRACEPARENT` parent its own spans under the same trace, enabling end-to-end distributed tracing through scripts and commands that Claude runs. In Agent SDK and non-interactive sessions started with `-p`, Claude Code also reads `TRACEPARENT` and `TRACESTATE` from its own environment when starting each interaction span. This lets an embedding process pass its active W3C trace context into the subprocess so Claude Code’s spans appear as children of the caller’s distributed trace. Interactive sessions ignore inbound `TRACEPARENT` to avoid accidentally inheriting ambient values from CI or container environments.
###
@@ -480,6 +481,7 @@
* `output_tokens`: Number of output tokens
* `cache_read_tokens`: Number of tokens read from cache
* `cache_creation_tokens`: Number of tokens used for cache creation
+ * `request_id`: Anthropic API request ID from the response’s `request-id` header, such as `"req_011..."`. Present only when the API returns one.
* `speed`: `"fast"` or `"normal"`, indicating whether fast mode was active
####
@@ -499,7 +501,45 @@
* `status_code`: HTTP status code as a string, or `"undefined"` for non-HTTP errors
* `duration_ms`: Request duration in milliseconds
* `attempt`: Total number of attempts made, including the initial request (`1` means no retries occurred)
+ * `request_id`: Anthropic API request ID from the response’s `request-id` header, such as `"req_011..."`. Present only when the API returns one.
* `speed`: `"fast"` or `"normal"`, indicating whether fast mode was active
+
+####
+
+
+
+API request body event
+
+Logged for each API request attempt when `OTEL_LOG_RAW_API_BODIES=1`. One event is emitted per attempt, so retries with adjusted parameters each produce their own event. **Event Name** : `claude_code.api_request_body` **Attributes** :
+
+ * All standard attributes
+ * `event.name`: `"api_request_body"`
+ * `event.timestamp`: ISO 8601 timestamp
+ * `event.sequence`: monotonically increasing counter for ordering events within a session
+ * `body`: JSON-serialized Messages API request parameters (system prompt, messages, tools, etc.), truncated at 60 KB. Extended-thinking content in prior assistant turns is redacted.
+ * `body_length`: Original (pre-truncation) JSON length in characters
+ * `body_truncated`: `"true"` when truncation occurred (absent otherwise)
+ * `model`: Model identifier from the request parameters
+ * `query_source`: Subsystem that issued the request (for example, `"compact"`)
+
+####
+
+
+
+API response body event
+
+Logged for each successful API response when `OTEL_LOG_RAW_API_BODIES=1`. **Event Name** : `claude_code.api_response_body` **Attributes** :
+
+ * All standard attributes
+ * `event.name`: `"api_response_body"`
+ * `event.timestamp`: ISO 8601 timestamp
+ * `event.sequence`: monotonically increasing counter for ordering events within a session
+ * `body`: JSON-serialized Messages API response (id, content blocks, usage, stop reason), truncated at 60 KB. Extended-thinking content is redacted.
+ * `body_length`: Original (pre-truncation) JSON length in characters
+ * `body_truncated`: `"true"` when truncation occurred (absent otherwise)
+ * `model`: Model identifier
+ * `query_source`: Subsystem that issued the request
+ * `request_id`: Anthropic API request ID from the response’s `request-id` header, such as `"req_011..."`. Present only when the API returns one.
####
@@ -700,6 +740,7 @@
* User prompt content is not collected by default. Only prompt length is recorded. To include prompt content, set `OTEL_LOG_USER_PROMPTS=1`
* Tool input arguments and parameters are not logged by default. To include them, set `OTEL_LOG_TOOL_DETAILS=1`. When enabled, `tool_result` events include a `tool_parameters` attribute with Bash commands, MCP server and tool names, and skill names, plus a `tool_input` attribute with file paths, URLs, search patterns, and other arguments. Trace spans include the same `tool_input` attribute and input-derived attributes such as `file_path`. Individual values over 512 characters are truncated and the total is bounded to ~4 K characters, but the arguments may still contain sensitive values. Configure your telemetry backend to filter or redact these attributes as needed
* Tool input and output content is not logged in trace spans by default. To include it, set `OTEL_LOG_TOOL_CONTENT=1`. When enabled, span events include full tool input and output content truncated at 60 KB per span. This can include raw file contents from Read tool results and Bash command output. Configure your telemetry backend to filter or redact these attributes as needed
+ * Raw Anthropic Messages API request and response bodies are not logged by default. To include them, set `OTEL_LOG_RAW_API_BODIES=1`. When enabled, each API call emits `api_request_body` and `api_response_body` log events whose `body` attribute is the JSON-serialized payload, truncated at 60 KB. These bodies contain the full conversation history (system prompt, every prior user and assistant turn, tool results), so enabling this implies consent to everything the other `OTEL_LOG_*` content flags would reveal. Claude’s extended-thinking content is always redacted from these bodies regardless of other settings
##
--- a/observability.md
+++ b/observability.md
@@ -76,7 +76,7 @@
Flush telemetry from short-lived calls
-The CLI batches telemetry and exports on an interval. It flushes any pending data when the process exits cleanly, so a `query()` call that completes normally does not lose spans. However, if your process is killed before the CLI shuts down, anything still in the batch buffer is lost. Lowering the export intervals reduces that window. By default, metrics export every 60 seconds and traces and logs export every 5 seconds. The following example shortens all three intervals so that data reaches the collector while a short task is still running:
+The CLI batches telemetry and exports on an interval. On a clean process exit it attempts to flush pending data, but the flush is bounded by a short timeout, so spans can still be dropped if the collector is slow to respond. If your process is killed before the CLI shuts down, anything still in the batch buffer is lost. Lowering the export intervals reduces both windows. By default, metrics export every 60 seconds and traces and logs export every 5 seconds. The following example shortens all three intervals so that data reaches the collector while a short task is still running:
Python
@@ -102,7 +102,7 @@
* **`claude_code.tool`:** wraps each tool invocation, with child spans for the permission wait (`claude_code.tool.blocked_on_user`) and the execution itself (`claude_code.tool.execution`).
* **`claude_code.hook`:** wraps each [hook](</docs/en/agent-sdk/hooks>) execution.
-Every span carries a `session.id` attribute. When you make several `query()` calls against the same [session](</docs/en/agent-sdk/sessions>), filter on `session.id` in your backend to see them as one timeline.
+Spans carry a `session.id` attribute by default. When you make several `query()` calls against the same [session](</docs/en/agent-sdk/sessions>), filter on `session.id` in your backend to see them as one timeline. The attribute is omitted if `OTEL_METRICS_INCLUDE_SESSION_ID` is set to a falsy value.
Tracing is in beta. Span names and attributes may change between releases. See [Traces (beta)](</docs/en/monitoring-usage#traces-beta>) in the Monitoring reference for the trace exporter configuration variables.
@@ -132,7 +132,7 @@
Control sensitive data in exports
-Telemetry is structural by default. Token counts, durations, model names, and tool names are always recorded, but the content your agent reads and writes is not. Three opt-in variables add content to the exported data:
+Telemetry is structural by default. Durations, model names, and tool names are recorded on every span; token counts are recorded when the underlying API request returns usage data, so spans for failed or aborted requests may omit them. The content your agent reads and writes is not recorded by default. Three opt-in variables add content to the exported data:
Variable| Adds
---|---
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -39,7 +39,7 @@
**During a session** : press `Shift+Tab` to cycle `default` → `acceptEdits` → `plan`. The current mode appears in the status bar. Not every mode is in the default cycle:
- * `auto`: appears after you opt in with `--enable-auto-mode` or the persisted equivalent in settings
+ * `auto`: appears when your account meets the auto mode requirements
* `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, or `--allow-dangerously-skip-permissions`; the `--allow-` variant adds the mode to the cycle without activating it
* `dontAsk`: never appears in the cycle; set it with `--permission-mode dontAsk`
@@ -126,14 +126,12 @@
Auto mode is available only when your account meets all of these requirements:
- * **Plan** : Team, Enterprise, or API. Not available on Pro or Max.
+ * **Plan** : Max, Team, Enterprise, or API. Not available on Pro.
* **Admin** : on Team and Enterprise, an admin must enable it in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) before users can turn it on. Admins can also lock it off by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
- * **Model** : Claude Sonnet 4.6 or Opus 4.6. Not available on Haiku or claude-3 models.
+ * **Model** : Claude Sonnet 4.6, Opus 4.6, or Opus 4.7 on Team, Enterprise, and API plans; Claude Opus 4.7 only on Max plans. Other models, including Haiku and claude-3 models, are not supported.
* **Provider** : Anthropic API only. Not available on Bedrock, Vertex, or Foundry.
-If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. Once enabled, start with the flag and `auto` joins the `Shift+Tab` cycle:
-
- claude --enable-auto-mode
+If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action is a transient classifier outage; see the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>).
###
@@ -159,9 +157,16 @@
* Reading `.env` and sending credentials to their matching API
* Read-only HTTP requests
* Pushing to the branch you started on or one Claude created
- * Sandbox network access requests
-
-Run `claude auto-mode defaults` to see the full rule lists. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure the auto mode classifier](</docs/en/permissions#configure-the-auto-mode-classifier>).
+
+Sandbox network access requests are routed through the classifier rather than allowed by default. Run `claude auto-mode defaults` to see the full rule lists. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure the auto mode classifier](</docs/en/permissions#configure-the-auto-mode-classifier>).
+
+###
+
+
+
+Boundaries you state in conversation
+
+The classifier treats boundaries you state in the conversation as a block signal. If you tell Claude “don’t push” or “wait until I review before deploying”, the classifier blocks matching actions even when the default rules would allow them. A boundary stays in force until you lift it in a later message. Claude’s own judgment that a condition was met does not lift it. Boundaries are not stored as rules. The classifier re-reads them from the transcript on each check, so a boundary can be lost if [context compaction](</docs/en/costs#reduce-token-usage>) removes the message that stated it. For a hard guarantee, add a [deny rule](</docs/en/permissions#permission-rule-syntax>) instead.
###
@@ -199,7 +204,7 @@
Cost and latency
-The classifier currently runs on Claude Sonnet 4.6 regardless of your main session model. Classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations.
+The classifier runs on a server-configured model that is independent of your `/model` selection, so switching models does not change classifier availability. Classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations.
##
@@ -207,7 +212,7 @@
Allow only pre-approved tools with dontAsk mode
-`dontAsk` mode auto-denies every tool that is not explicitly allowed. Only actions matching your `permissions.allow` rules can execute; explicit `ask` rules are also denied rather than prompting. This makes the mode fully non-interactive for CI pipelines or restricted environments where you pre-define exactly what Claude may do. Set it at startup with the flag:
+`dontAsk` mode auto-denies every tool call that would otherwise prompt. Only actions matching your `permissions.allow` rules and [read-only Bash commands](</docs/en/permissions#read-only-commands>) can execute; explicit `ask` rules are denied rather than prompting. This makes the mode fully non-interactive for CI pipelines or restricted environments where you pre-define exactly what Claude may do. Set it at startup with the flag:
claude --permission-mode dontAsk
--- a/permissions.md
+++ b/permissions.md
@@ -110,7 +110,7 @@
}
}
-The space before `*` matters: `Bash(ls *)` matches `ls -la` but not `lsof`, while `Bash(ls*)` matches both. The `:*` suffix is an equivalent way to write a trailing wildcard, so `Bash(ls:*)` matches the same commands as `Bash(ls *)`. The permission dialog writes the `:*` form when you select “Yes, don’t ask again” for a command prefix. This form is only recognized at the end of a pattern. In a pattern like `Bash(git:* push)`, the colon is treated as a literal character and won’t match git commands.
+The space before `*` matters: `Bash(ls *)` matches `ls -la` but not `lsof`, while `Bash(ls*)` matches both. The `:*` suffix is an equivalent way to write a trailing wildcard, so `Bash(ls:*)` matches the same commands as `Bash(ls *)`. The permission dialog writes the space-separated form when you select “Yes, don’t ask again” for a command prefix. The `:*` form is only recognized at the end of a pattern. In a pattern like `Bash(git:* push)`, the colon is treated as a literal character and won’t match git commands.
##
@@ -151,6 +151,14 @@
Process wrappers
Before matching Bash rules, Claude Code strips a fixed set of process wrappers so a rule like `Bash(npm test *)` also matches `timeout 30 npm test`. The recognized wrappers are `timeout`, `time`, `nice`, `nohup`, and `stdbuf`. Bare `xargs` is also stripped, so `Bash(grep *)` matches `xargs grep pattern`. Stripping applies only when `xargs` has no flags: an invocation like `xargs -n1 grep pattern` is matched as an `xargs` command, so rules written for the inner command do not cover it. This wrapper list is built in and is not configurable. Development environment runners such as `direnv exec`, `devbox run`, `mise exec`, `npx`, and `docker exec` are not in the list. Because these tools execute their arguments as a command, a rule like `Bash(devbox run *)` matches whatever comes after `run`, including `devbox run rm -rf .`. To approve work inside an environment runner, write a specific rule that includes both the runner and the inner command, such as `Bash(devbox run npm test)`. Add one rule per inner command you want to allow.
+
+####
+
+
+
+Read-only commands
+
+Claude Code recognizes a built-in set of Bash commands as read-only and runs them without a permission prompt in every mode. These include `ls`, `cat`, `head`, `tail`, `grep`, `find`, `wc`, `diff`, `stat`, `du`, `cd`, and read-only forms of `git`. The set is not configurable; to require a prompt for one of these commands, add an `ask` or `deny` rule for it. Unquoted glob patterns are permitted for commands whose every flag is read-only, so `ls *.ts` and `wc -l src/*.py` run without a prompt. Commands with write-capable or exec-capable flags, such as `find`, `sort`, `sed`, and `git`, still prompt when an unquoted glob is present because the glob could expand to a flag like `-delete`. A `cd` into a path inside your working directory or an additional directory is also read-only. A compound command like `cd packages/api && ls` runs without a prompt when each part qualifies on its own. Combining `cd` with `git` in one compound command always prompts, regardless of the target directory.
Bash permission patterns that try to constrain command arguments are fragile. For example, `Bash(curl http://github.com/ *)` intends to restrict curl to GitHub URLs, but won’t match variations like:
@@ -197,6 +205,13 @@
* `Read(src/**)`: reads from `<current-directory>/src/`
In gitignore patterns, `*` matches files in a single directory while `**` matches recursively across directories. To allow all file access, use just the tool name without parentheses: `Read`, `Edit`, or `Write`.
+
+When Claude accesses a symlink, permission rules check two paths: the symlink itself and the file it resolves to. Allow and deny rules treat that pair differently: allow rules fall back to prompting you, while deny rules block outright.
+
+ * **Allow rules** : apply only when both the symlink path and its target match. A symlink inside an allowed directory that points outside it still prompts you.
+ * **Deny rules** : apply when either the symlink path or its target matches. A symlink that points to a denied file is itself denied.
+
+For example, with `Read(./project/**)` allowed and `Read(~/.ssh/**)` denied, a symlink at `./project/key` pointing to `~/.ssh/id_rsa` is blocked: the target fails the allow rule and matches the deny rule.
###
Show diff (101 lines)
--- a/plugin-dependencies.md
+++ b/plugin-dependencies.md
@@ -0,0 +1,98 @@
+A plugin can depend on other plugins by listing them in `plugin.json` or in its marketplace entry. By default, a dependency tracks the latest available version, so an upstream release can change the dependency under your plugin without warning. Version constraints let you hold a dependency at a tested version range until you choose to move. When you install a plugin that declares dependencies, Claude Code resolves and installs them automatically and lists which dependencies were added at the end of the install output. This guide is for plugin authors who declare dependencies in `plugin.json` and for marketplace maintainers who tag releases. To install plugins that have dependencies, see [Discover and install plugins](</docs/en/discover-plugins>). For the full manifest schema, see the [Plugins reference](</docs/en/plugins-reference>).
+
+Dependency version constraints require Claude Code v2.1.110 or later.
+
+##
+
+
+
+Why constrain dependency versions
+
+Consider an internal marketplace where two teams publish plugins. The platform team maintains `secrets-vault`, an MCP server that wraps a secrets backend. The deploy team maintains `deploy-kit`, which calls `secrets-vault` to fetch credentials during deploys. `deploy-kit` is tested against `secrets-vault` v2.1.0. Without a version constraint, the next time the platform team tags a release that renames an MCP tool, auto-update moves every engineer’s `secrets-vault` to the new version and `deploy-kit` breaks. With a version constraint, `deploy-kit` declares that it needs `secrets-vault` in the `~2.1.0` range. Engineers with `deploy-kit` installed stay on the highest matching `2.1.x` patch. The deploy team upgrades on their own schedule by publishing a new `deploy-kit` version with a wider constraint.
+
+##
+
+
+
+Declare a dependency with a version constraint
+
+List dependencies in the `dependencies` array of your plugin’s `.claude-plugin/plugin.json`. Each entry is either a plugin name or an object with a version constraint. The following manifest declares one unversioned dependency and one constrained dependency:
+
+.claude-plugin/plugin.json
+
+ {
+ "name": "deploy-kit",
+ "version": "3.1.0",
+ "dependencies": [
+ "audit-logger",
+ { "name": "secrets-vault", "version": "~2.1.0" }
+ ]
+ }
+
+An entry can be a bare string with only the plugin name, like `"audit-logger"` in the example above, which depends on whatever version that plugin’s marketplace provides. For more control, use an object with these fields:
+
+Field| Type| Description
+---|---|---
+`name`| string| Plugin name. Resolves within the same marketplace as the declaring plugin. Required.
+`version`| string| A [semver range](<https://github.com/npm/node-semver#ranges>) such as `~2.1.0`, `^2.0`, `>=1.4`, or `=2.1.0`. The dependency is fetched at the highest tagged version that satisfies this range.
+`marketplace`| string| A different marketplace to resolve `name` in. Cross-marketplace dependencies are blocked unless the target marketplace is allowlisted in the root marketplace’s `marketplace.json`.
+
+The `version` field accepts any expression supported by Node’s `semver` package, including caret, tilde, hyphen, and comparator ranges. Pre-release versions such as `2.0.0-beta.1` are excluded unless your range opts in with a pre-release suffix like `^2.0.0-0`.
+
+##
+
+
+
+Tag plugin releases for version resolution
+
+Version constraints resolve against git tags on the marketplace repository. For Claude Code to find a dependency’s available versions, the upstream plugin’s releases must be tagged using a specific naming convention. Tag each release as `{plugin-name}--v{version}`, where `{version}` matches the `version` field in that commit’s `plugin.json`.
+
+ git tag secrets-vault--v2.1.0
+ git push origin secrets-vault--v2.1.0
+
+The plugin name prefix lets one marketplace repository host multiple plugins with independent version lines. The `--v` separator is parsed as a prefix match on the full plugin name, so plugin names that contain hyphens are handled correctly. When you install a plugin that declares `{ "name": "secrets-vault", "version": "~2.1.0" }`, Claude Code lists the marketplace’s tags, filters to those starting with `secrets-vault--v`, and fetches the highest version satisfying `~2.1.0`. If no matching tag exists, the dependent plugin is disabled with an error listing the available versions.
+
+For `npm` marketplace sources, the constraint does not control which version is fetched, since tag-based resolution applies only to git-backed sources. The constraint is still checked at load time, and the dependent plugin is disabled with `dependency-version-unsatisfied` if the installed version does not satisfy it.
+
+##
+
+
+
+How constraints interact
+
+When several installed plugins constrain the same dependency, Claude Code intersects their ranges and resolves the dependency to the highest version that satisfies all of them. The table below shows how common combinations resolve.
+
+Plugin A requires| Plugin B requires| Result
+---|---|---
+`^2.0`| `>=2.1`| One install at the highest `2.x` tag at or above `2.1.0`. Both plugins load.
+`~2.1`| `~3.0`| Install of plugin B fails with `range-conflict`. Plugin A and the dependency stay as they were.
+`=2.1.0`| none| The dependency stays at `2.1.0`. Auto-update skips newer versions while plugin A is installed.
+
+Auto-update checks each constrained dependency against every installed plugin’s range before applying an update. If the marketplace moves a dependency to a version outside any range, the update is skipped and the skip message names the constraining plugin. When you uninstall the last plugin that constrains a dependency, the dependency is no longer held and resumes tracking its marketplace entry on the next update.
+
+##
+
+
+
+Resolve dependency errors
+
+Dependency problems surface in `claude plugin list`, in the `/plugin` interface, and in `/doctor`. The affected plugin is disabled until you resolve the error. The most common errors and their fixes are listed below.
+
+Error| Meaning| How to resolve
+---|---|---
+`range-conflict`| The version requirements for a dependency cannot be combined. The error message names the cause: no version satisfies all of the ranges, a range is not valid semver syntax, or the combined ranges are too complex to intersect.| Uninstall or update one of the conflicting plugins, fix any invalid `version` string, simplify long `||` chains, or ask the upstream author to widen its constraint.
+`dependency-version-unsatisfied`| The installed dependency’s version is outside this plugin’s declared range.| Run `claude plugin install <dependency>@<marketplace>` to re-resolve the dependency against all current constraints.
+`no-matching-tag`| The dependency’s repository has no `{name}--v*` tag satisfying the range.| Check that the upstream has tagged releases using the convention above, or relax your range.
+
+To check for these errors programmatically, run `claude plugin list --json` and read the `errors` field on each plugin.
+
+##
+
+
+
+See also
+
+ * [Create plugins](</docs/en/plugins>): build plugins with skills, agents, and hooks
+ * [Create and distribute a plugin marketplace](</docs/en/plugin-marketplaces>): host plugins for your team
+ * [Plugins reference](</docs/en/plugins-reference#plugin-manifest-schema>): the full `plugin.json` schema
+ * [Version management](</docs/en/plugins-reference#version-management>): semantic versioning guidance for plugin releases
--- a/plugin-marketplaces.md
+++ b/plugin-marketplaces.md
@@ -539,7 +539,7 @@
Private repositories
-Claude Code supports installing plugins from private repositories. For manual installation and updates, Claude Code uses your existing git credential helpers. If `git clone` works for a private repository in your terminal, it works in Claude Code too. Common credential helpers include `gh auth login` for GitHub, macOS Keychain, and `git-credential-store`. Background auto-updates run at startup without credential helpers, since interactive prompts would block Claude Code from starting. To enable auto-updates for private marketplaces, set the appropriate authentication token in your environment:
+Claude Code supports installing plugins from private repositories. For manual installation and updates, Claude Code uses your existing git credential helpers, so HTTPS access via `gh auth login`, macOS Keychain, or `git-credential-store` works the same as in your terminal. SSH access works as long as the host is already in your `known_hosts` file and the key is loaded in `ssh-agent`, since Claude Code suppresses interactive SSH prompts for the host fingerprint and key passphrase. Background auto-updates run at startup without credential helpers, since interactive prompts would block Claude Code from starting. To enable auto-updates for private marketplaces, set the appropriate authentication token in your environment:
Provider| Environment variables| Notes
---|---|---
--- a/plugins.md
+++ b/plugins.md
@@ -163,7 +163,7 @@
Plugin structure overview
-You’ve created a plugin with a skill, but plugins can include much more: custom agents, hooks, MCP servers, and LSP servers.
+You’ve created a plugin with a skill, but plugins can include much more: custom agents, hooks, MCP servers, LSP servers, and background monitors.
**Common mistake** : Don’t put `commands/`, `agents/`, `skills/`, or `hooks/` inside the `.claude-plugin/` directory. Only `plugin.json` goes inside `.claude-plugin/`. All other directories must be at the plugin root level.
@@ -176,6 +176,7 @@
`hooks/`| Plugin root| Event handlers in `hooks.json`
`.mcp.json`| Plugin root| MCP server configurations
`.lsp.json`| Plugin root| LSP server configurations for code intelligence
+`monitors/`| Plugin root| Background monitor configurations in `monitors.json`
`bin/`| Plugin root| Executables added to the Bash tool’s `PATH` while the plugin is enabled
`settings.json`| Plugin root| Default [settings](</docs/en/settings>) applied when the plugin is enabled
@@ -246,6 +247,26 @@
+Add background monitors to your plugin
+
+Background monitors let your plugin watch logs, files, or external status in the background and notify Claude as events arrive. Claude Code starts each monitor automatically when the plugin is active, so you don’t need to instruct Claude to start the watch. Add a `monitors/monitors.json` file at the plugin root with an array of monitor entries:
+
+monitors/monitors.json
+
+ [
+ {
+ "name": "error-log",
+ "command": "tail -F ./logs/error.log",
+ "description": "Application error log"
+ }
+ ]
+
+Each stdout line from `command` is delivered to Claude as a notification during the session. For the full schema, including the `when` trigger and variable substitution, see [Monitors](</docs/en/plugins-reference#monitors>).
+
+###
+
+
+
Ship default settings with your plugin
Plugins can include a `settings.json` file at the plugin root to apply default configuration when the plugin is enabled. Currently, only the `agent` and `subagentStatusLine` keys are supported. Setting `agent` activates one of the plugin’s [custom agents](</docs/en/sub-agents>) as the main thread, applying its system prompt, tool restrictions, and model. This lets a plugin change how Claude Code behaves by default when enabled.
@@ -323,6 +344,8 @@
* **Claude.ai** : [claude.ai/settings/plugins/submit](<https://claude.ai/settings/plugins/submit>)
* **Console** : [platform.claude.com/plugins/submit](<https://platform.claude.com/plugins/submit>)
+
+Once your plugin is listed, you can have your own CLI prompt Claude Code users to install it. See [Recommend your plugin from your CLI](</docs/en/plugin-hints>).
For complete technical specifications, debugging techniques, and distribution strategies, see [Plugins reference](</docs/en/plugins-reference>).
Show diff (129 lines)
--- a/plugins-reference.md
+++ b/plugins-reference.md
@@ -1,6 +1,6 @@
Looking to install plugins? See [Discover and install plugins](</docs/en/discover-plugins>). For creating plugins, see [Plugins](</docs/en/plugins>). For distributing plugins, see [Plugin marketplaces](</docs/en/plugin-marketplaces>).
-This reference provides complete technical specifications for the Claude Code plugin system, including component schemas, CLI commands, and development tools. A **plugin** is a self-contained directory of components that extends Claude Code with custom functionality. Plugin components include skills, agents, hooks, MCP servers, and LSP servers.
+This reference provides complete technical specifications for the Claude Code plugin system, including component schemas, CLI commands, and development tools. A **plugin** is a self-contained directory of components that extends Claude Code with custom functionality. Plugin components include skills, agents, hooks, MCP servers, LSP servers, and monitors.
##
@@ -229,6 +229,48 @@
Install the language server first, then install the plugin from the marketplace.
+###
+
+
+
+Monitors
+
+Plugins can declare background monitors that Claude Code starts automatically when the plugin is active. Each monitor runs a shell command for the lifetime of the session and delivers every stdout line to Claude as a notification, so Claude can react to log entries, status changes, or polled events without being asked to start the watch itself. Plugin monitors use the same mechanism as the [Monitor tool](</docs/en/tools-reference#monitor-tool>) and share its availability constraints. They run only in interactive CLI sessions, run unsandboxed at the same trust level as hooks, and are skipped on hosts where the Monitor tool is unavailable.
+
+Plugin monitors require Claude Code v2.1.105 or later.
+
+**Location** : `monitors/monitors.json` in the plugin root, or inline in `plugin.json` **Format** : JSON array of monitor entries The following `monitors/monitors.json` watches a deployment status endpoint and a local error log:
+
+ [
+ {
+ "name": "deploy-status",
+ "command": "${CLAUDE_PLUGIN_ROOT}/scripts/poll-deploy.sh ${user_config.api_endpoint}",
+ "description": "Deployment status changes"
+ },
+ {
+ "name": "error-log",
+ "command": "tail -F ./logs/error.log",
+ "description": "Application error log",
+ "when": "on-skill-invoke:debug"
+ }
+ ]
+
+To declare monitors inline, set the `monitors` key in `plugin.json` to the same array. To load from a non-default path, set `monitors` to a relative path string such as `"./config/monitors.json"`. **Required fields:**
+
+Field| Description
+---|---
+`name`| Identifier unique within the plugin. Prevents duplicate processes when the plugin reloads or a skill is invoked again
+`command`| Shell command run as a persistent background process in the session working directory
+`description`| Short summary of what is being watched. Shown in the task panel and in notification summaries
+
+**Optional fields:**
+
+Field| Description
+---|---
+`when`| Controls when the monitor starts. `"always"` starts it at session start and on plugin reload, and is the default. `"on-skill-invoke:<skill-name>"` starts it the first time the named skill in this plugin is dispatched
+
+The `command` value supports the same variable substitutions as MCP and LSP server configs: `${CLAUDE_PLUGIN_ROOT}`, `${CLAUDE_PLUGIN_DATA}`, `${user_config.*}`, and any `${ENV_VAR}` from the environment. Prefix the command with `cd "${CLAUDE_PLUGIN_ROOT}" && ` if the script needs to run from the plugin’s own directory. Disabling a plugin mid-session does not stop monitors that are already running. They stop when the session ends.
+
* * *
##
@@ -284,7 +326,11 @@
"mcpServers": "./mcp-config.json",
"outputStyles": "./styles/",
"lspServers": "./.lsp.json",
- "monitors": "./monitors.json"
+ "monitors": "./monitors.json",
+ "dependencies": [
+ "helper-lib",
+ { "name": "secrets-vault", "version": "~2.1.0" }
+ ]
}
###
@@ -332,9 +378,10 @@
`mcpServers`| string|array|object| MCP config paths or inline config| `"./my-extra-mcp-config.json"`
`outputStyles`| string|array| Custom output style files/directories (replaces default `output-styles/`)| `"./styles/"`
`lspServers`| string|array|object| [Language Server Protocol](<https://microsoft.github.io/language-server-protocol/>) configs for code intelligence (go to definition, find references, etc.)| `"./.lsp.json"`
-`monitors`| string|array|object| Background [Monitor](</docs/en/tools-reference#monitor-tool>) configurations that auto-arm when the plugin is enabled at session start or when a skill in this plugin is invoked| `"./monitors.json"`
+`monitors`| string|array| Background [Monitor](</docs/en/tools-reference#monitor-tool>) configurations that start automatically when the plugin is active. See Monitors| `"./monitors.json"`
`userConfig`| object| User-configurable values prompted at enable time. See User configuration| See below
`channels`| array| Channel declarations for message injection (Telegram, Slack, Discord style). See Channels| See below
+`dependencies`| array| Other plugins this plugin requires, optionally with semver version constraints. See [Constrain plugin dependency versions](</docs/en/plugin-dependencies>)| `[{ "name": "secrets-vault", "version": "~2.1.0" }]`
###
@@ -357,7 +404,7 @@
}
}
-Keys must be valid identifiers. Each value is available for substitution as `${user_config.KEY}` in MCP and LSP server configs, hook commands, and (for non-sensitive values only) skill and agent content. Values are also exported to plugin subprocesses as `CLAUDE_PLUGIN_OPTION_<KEY>` environment variables. Non-sensitive values are stored in `settings.json` under `pluginConfigs[<plugin-id>].options`. Sensitive values go to the system keychain (or `~/.claude/.credentials.json` where the keychain is unavailable). Keychain storage is shared with OAuth tokens and has an approximately 2 KB total limit, so keep sensitive values small.
+Keys must be valid identifiers. Each value is available for substitution as `${user_config.KEY}` in MCP and LSP server configs, hook commands, monitor commands, and (for non-sensitive values only) skill and agent content. Values are also exported to plugin subprocesses as `CLAUDE_PLUGIN_OPTION_<KEY>` environment variables. Non-sensitive values are stored in `settings.json` under `pluginConfigs[<plugin-id>].options`. Sensitive values go to the system keychain (or `~/.claude/.credentials.json` where the keychain is unavailable). Keychain storage is shared with OAuth tokens and has an approximately 2 KB total limit, so keep sensitive values small.
###
@@ -414,7 +461,7 @@
Environment variables
-Claude Code provides two variables for referencing plugin paths. Both are substituted inline anywhere they appear in skill content, agent content, hook commands, and MCP or LSP server configs. Both are also exported as environment variables to hook processes and MCP or LSP server subprocesses. **`${CLAUDE_PLUGIN_ROOT}`** : the absolute path to your plugin’s installation directory. Use this to reference scripts, binaries, and config files bundled with the plugin. This path changes when the plugin updates, so files you write here do not survive an update. **`${CLAUDE_PLUGIN_DATA}`** : a persistent directory for plugin state that survives updates. Use this for installed dependencies such as `node_modules` or Python virtual environments, generated code, caches, and any other files that should persist across plugin versions. The directory is created automatically the first time this variable is referenced.
+Claude Code provides two variables for referencing plugin paths. Both are substituted inline anywhere they appear in skill content, agent content, hook commands, monitor commands, and MCP or LSP server configs. Both are also exported as environment variables to hook processes and MCP or LSP server subprocesses. **`${CLAUDE_PLUGIN_ROOT}`** : the absolute path to your plugin’s installation directory. Use this to reference scripts, binaries, and config files bundled with the plugin. This path changes when the plugin updates, so files you write here do not survive an update. **`${CLAUDE_PLUGIN_DATA}`** : a persistent directory for plugin state that survives updates. Use this for installed dependencies such as `node_modules` or Python virtual environments, generated code, caches, and any other files that should persist across plugin versions. The directory is created automatically the first time this variable is referenced.
{
"hooks": {
@@ -709,6 +756,26 @@
* * *
+###
+
+
+
+plugin list
+
+List installed plugins with their version, source marketplace, and enable status.
+
+ claude plugin list [options]
+
+**Options:**
+
+Option| Description| Default
+---|---|---
+`--json`| Output as JSON|
+`--available`| Include available plugins from marketplaces. Requires `--json`|
+`-h, --help`| Display help for command|
+
+* * *
+
##
Show diff (119 lines)
--- a/python.md
+++ b/python.md
@@ -900,7 +900,7 @@
plugins: list[SdkPluginConfig] = field(default_factory=list)
max_thinking_tokens: int | None = None # Deprecated: use thinking instead
thinking: ThinkingConfig | None = None
- effort: Literal["low", "medium", "high", "max"] | None = None
+ effort: Literal["low", "medium", "high", "xhigh", "max"] | None = None
enable_file_checkpointing: bool = False
Property| Type| Default| Description
@@ -913,7 +913,7 @@
`continue_conversation`| `bool`| `False`| Continue the most recent conversation
`resume`| `str | None`| `None`| Session ID to resume
`max_turns`| `int | None`| `None`| Maximum agentic turns (tool-use round trips)
-`max_budget_usd`| `float | None`| `None`| Maximum budget in USD for the session
+`max_budget_usd`| `float | None`| `None`| Stop the query when the client-side cost estimate reaches this USD value. Compared against the same estimate as `total_cost_usd`; see [Track cost and usage](</docs/en/agent-sdk/cost-tracking>) for accuracy caveats
`disallowed_tools`| `list[str]`| `[]`| Tools to always deny. Deny rules are checked first and override `allowed_tools` and `permission_mode` (including `bypassPermissions`)
`enable_file_checkpointing`| `bool`| `False`| Enable file change tracking for rewinding. See [File checkpointing](</docs/en/agent-sdk/file-checkpointing>)
`model`| `str | None`| `None`| Claude model to use
@@ -938,10 +938,10 @@
`agents`| `dict[str, AgentDefinition] | None`| `None`| Programmatically defined subagents
`plugins`| `list[SdkPluginConfig]`| `[]`| Load custom plugins from local paths. See [Plugins](</docs/en/agent-sdk/plugins>) for details
`sandbox`| `SandboxSettings` ` | None`| `None`| Configure sandbox behavior programmatically. See Sandbox settings for details
-`setting_sources`| `list[SettingSource] | None`| `None` (no settings)| Control which filesystem settings to load. When omitted, no settings are loaded. **Note:** Must include `"project"` to load CLAUDE.md files
+`setting_sources`| `list[SettingSource] | None`| `None` (CLI defaults: all sources)| Control which filesystem settings to load. Pass `[]` to disable user, project, and local settings. Managed policy settings load regardless. See [Use Claude Code features](</docs/en/agent-sdk/claude-code-features#what-settingsources-does-not-control>)
`max_thinking_tokens`| `int | None`| `None`| _Deprecated_ \- Maximum tokens for thinking blocks. Use `thinking` instead
`thinking`| `ThinkingConfig` ` | None`| `None`| Controls extended thinking behavior. Takes precedence over `max_thinking_tokens`
-`effort`| `Literal["low", "medium", "high", "max"] | None`| `None`| Effort level for thinking depth
+`effort`| `Literal["low", "medium", "high", "xhigh", "max"] | None`| `None`| Effort level for thinking depth
###
@@ -1005,7 +1005,7 @@
Default behavior
-When `setting_sources` is **omitted** or **`None`** , the SDK does **not** load any filesystem settings. This provides isolation for SDK applications.
+When `setting_sources` is omitted or `None`, `query()` loads the same filesystem settings as the Claude Code CLI: user, project, and local. Managed policy settings are loaded in all cases. See [What settingSources does not control](</docs/en/agent-sdk/claude-code-features#what-settingsources-does-not-control>) for inputs that are read regardless of this option, and how to disable them.
####
@@ -1013,15 +1013,29 @@
Why use setting_sources
-**Load all filesystem settings (legacy behavior):**
-
- # Load all settings like SDK v0.0.x did
+**Disable filesystem settings:**
+
+ # Do not load user, project, or local settings from disk
from claude_agent_sdk import query, ClaudeAgentOptions
async for message in query(
prompt="Analyze this code",
options=ClaudeAgentOptions(
- setting_sources=["user", "project", "local"] # Load all settings
+ setting_sources=[]
+ ),
+ ):
+ print(message)
+
+In Python SDK 0.1.59 and earlier, an empty list was treated the same as omitting the option, so `setting_sources=[]` did not disable filesystem settings. Upgrade to a newer release if you need an empty list to take effect. The TypeScript SDK is not affected.
+
+**Load all filesystem settings explicitly:**
+
+ from claude_agent_sdk import query, ClaudeAgentOptions
+
+ async for message in query(
+ prompt="Analyze this code",
+ options=ClaudeAgentOptions(
+ setting_sources=["user", "project", "local"]
),
):
print(message)
@@ -1051,12 +1065,12 @@
**SDK-only applications:**
- # Define everything programmatically (default behavior)
- # No filesystem dependencies - setting_sources defaults to None
+ # Define everything programmatically.
+ # Pass [] to opt out of filesystem setting sources.
async for message in query(
prompt="Review this PR",
options=ClaudeAgentOptions(
- # setting_sources=None is the default, no need to specify
+ setting_sources=[],
agents={...},
mcp_servers={...},
allowed_tools=["Read", "Grep", "Glob"],
@@ -1074,7 +1088,7 @@
"type": "preset",
"preset": "claude_code", # Use Claude Code's system prompt
},
- setting_sources=["project"], # Required to load CLAUDE.md from project
+ setting_sources=["project"], # Loads CLAUDE.md from project
allowed_tools=["Read", "Write", "Edit"],
),
):
@@ -1092,7 +1106,7 @@
2. Project settings (`.claude/settings.json`)
3. User settings (`~/.claude/settings.json`)
-Programmatic options (like `agents`, `allowed_tools`) always override filesystem settings.
+Programmatic options such as `agents` and `allowed_tools` override user, project, and local filesystem settings. Managed policy settings take precedence over programmatic options.
###
@@ -1336,7 +1350,7 @@
Use with the `betas` field in `ClaudeAgentOptions` to enable beta features.
-The `context-1m-2025-08-07` beta is retired as of April 30, 2026. Passing this header with Claude Sonnet 4.5 or Sonnet 4 has no effect, and requests that exceed the standard 200k-token context window return an error. To use a 1M-token context window, migrate to [Claude Sonnet 4.6 or Claude Opus 4.6](<https://platform.claude.com/docs/en/about-claude/models/overview>), which include 1M context at standard pricing with no beta header required.
+The `context-1m-2025-08-07` beta is retired as of April 30, 2026. Passing this header with Claude Sonnet 4.5 or Sonnet 4 has no effect, and requests that exceed the standard 200k-token context window return an error. To use a 1M-token context window, migrate to [Claude Sonnet 4.6, Claude Opus 4.6, or Claude Opus 4.7](<https://platform.claude.com/docs/en/about-claude/models/overview>), which include 1M context at standard pricing with no beta header required.
###
--- a/remote-control.md
+++ b/remote-control.md
@@ -134,12 +134,55 @@
+Mobile push notifications
+
+When Remote Control is active, Claude can send push notifications to your phone. Claude decides when to push. It typically sends one when a long-running task finishes or when it needs a decision from you to continue. You can also request a push in your prompt, for example `notify me when the tests finish`. Beyond the on/off toggle below, there is no per-event configuration.
+
+Mobile push notifications require Claude Code v2.1.110 or later.
+
+To set up mobile push notifications:
+
+1
+
+Install the Claude mobile app
+
+Download the Claude app for [iOS](<https://apps.apple.com/us/app/claude-by-anthropic/id6473753684>) or [Android](<https://play.google.com/store/apps/details?id=com.anthropic.claude>).
+
+2
+
+Sign in with your Claude Code account
+
+Use the same account and organization you use for Claude Code in the terminal.
+
+3
+
+Allow notifications
+
+Accept the notification permission prompt from the operating system.
+
+4
+
+Enable push in Claude Code
+
+In your terminal, run `/config` and enable **Push when Claude decides**.
+
+If notifications don’t arrive:
+
+ * If `/config` shows **No mobile registered** , open the Claude app on your phone so it can refresh its push token. The warning clears the next time Remote Control connects.
+ * On iOS, Focus modes and notification summaries can suppress or delay pushes. Check Settings → Notifications → Claude.
+ * On Android, aggressive battery optimization can delay delivery. Exempt the Claude app from battery optimization in system settings.
+
+##
+
+
+
Limitations
* **One remote session per interactive process** : outside of server mode, each Claude Code instance supports one remote session at a time. Use server mode to run multiple concurrent sessions from a single process.
* **Local process must keep running** : Remote Control runs as a local process. If you close the terminal, quit VS Code, or otherwise stop the `claude` process, the session ends.
* **Extended network outage** : if your machine is awake but unable to reach the network for more than roughly 10 minutes, the session times out and the process exits. Run `claude remote-control` again to start a new session.
* **Ultraplan disconnects Remote Control** : starting an [ultraplan](</docs/en/ultraplan>) session disconnects any active Remote Control session because both features occupy the claude.ai/code interface and only one can be connected at a time.
+ * **Some commands are local-only** : commands that open an interactive picker in the terminal, such as `/mcp`, `/plugin`, or `/resume`, work only from the local CLI. Commands that produce text output, including `/compact`, `/clear`, `/context`, `/cost`, `/exit`, `/recap`, and `/reload-plugins`, work from mobile and web.
##
--- a/routines.md
+++ b/routines.md
@@ -56,7 +56,7 @@
* **Network access** : set the level of internet access available during each run
* **Environment variables** : provide API keys, tokens, or other secrets Claude can use
- * **Setup script** : run install commands before each session starts, like installing dependencies or configuring tools
+ * **Setup script** : install dependencies and tools the routine needs. The result is [cached](</docs/en/claude-code-on-the-web#environment-caching>), so the script doesn’t re-run on every session
A **Default** environment is provided. To use a custom environment, [create one](</docs/en/claude-code-on-the-web#the-cloud-environment>) before creating the routine.
--- a/scheduled-tasks.md
+++ b/scheduled-tasks.md
@@ -1,6 +1,6 @@
Scheduled tasks require Claude Code v2.1.72 or later. Check your version with `claude --version`.
-Scheduled tasks let Claude re-run a prompt automatically on an interval. Use them to poll a deployment, babysit a PR, check back on a long-running build, or remind yourself to do something later in the session. To react to events as they happen instead of polling, see [Channels](</docs/en/channels>): your CI can push the failure into the session directly. Tasks are session-scoped: they live in the current Claude Code process and are gone when you exit. For durable scheduling that survives restarts, use [Routines](</docs/en/routines>), [Desktop scheduled tasks](</docs/en/desktop-scheduled-tasks>), or [GitHub Actions](</docs/en/github-actions>).
+Scheduled tasks let Claude re-run a prompt automatically on an interval. Use them to poll a deployment, babysit a PR, check back on a long-running build, or remind yourself to do something later in the session. To react to events as they happen instead of polling, see [Channels](</docs/en/channels>): your CI can push the failure into the session directly. Tasks are session-scoped: they live in the current conversation and stop when you start a new one. Resuming with `--resume` or `--continue` brings back any task that hasn’t expired: a recurring task created within the last 7 days, or a one-shot whose scheduled time hasn’t passed yet. For scheduling that survives independently of any session, use [Routines](</docs/en/routines>), [Desktop scheduled tasks](</docs/en/desktop-scheduled-tasks>), or [GitHub Actions](</docs/en/github-actions>).
##
@@ -15,7 +15,7 @@
Runs on| Anthropic cloud| Your machine| Your machine
Requires machine on| No| Yes| Yes
Requires open session| No| No| Yes
-Persistent across restarts| Yes| Yes| No (session-scoped)
+Persistent across restarts| Yes| Yes| Restored on `--resume` if unexpired
Access to local files| No (fresh clone)| Yes| Yes
MCP servers| Connectors configured per task| [Config files](</docs/en/mcp>) and connectors| Inherits from session
Permission prompts| No (runs autonomously)| Configurable per task| Inherits from session
@@ -210,9 +210,9 @@
Session-scoped scheduling has inherent constraints:
- * Tasks only fire while Claude Code is running and idle. Closing the terminal or letting the session exit cancels everything.
+ * Tasks only fire while Claude Code is running and idle. Closing the terminal or letting the session exit stops them firing.
* No catch-up for missed fires. If a task’s scheduled time passes while Claude is busy on a long-running request, it fires once when Claude becomes idle, not once per missed interval.
- * No persistence across restarts. Restarting Claude Code clears all session-scoped tasks.
+ * Starting a fresh conversation clears all session-scoped tasks. Resuming with `claude --resume` or `claude --continue` restores tasks that have not expired: recurring tasks within seven days of creation, and one-shot tasks whose scheduled time has not yet passed. Background Bash and monitor tasks are never restored on resume.
For cron-driven automation that needs to run unattended:
--- a/secure-deployment.md
+++ b/secure-deployment.md
@@ -6,7 +6,7 @@
Threat model
-Agents can take unintended actions due to prompt injection (instructions embedded in content they process) or model error. Claude models are designed to resist this, and as analyzed in the [model card](<https://www.anthropic.com/claude-opus-4-6-system-card>), Claude Opus 4.6 is the most robust frontier model available. Defense in depth is still good practice though. For example, if an agent processes a malicious file that instructs it to send customer data to an external server, network controls can block that request entirely.
+Agents can take unintended actions due to prompt injection (instructions embedded in content they process) or model error. Claude models are designed to resist this; see the [model overview](<https://platform.claude.com/docs/en/about-claude/models/overview>) and the system card for the model you deploy for evaluation details. Defense in depth is still good practice though. For example, if an agent processes a malicious file that instructs it to send customer data to an external server, network controls can block that request entirely.
##
@@ -17,7 +17,7 @@
Claude Code includes several security features that address common concerns. See the [security documentation](</docs/en/security>) for full details.
* **Permissions system** : Every tool and bash command can be configured to allow, block, or prompt the user for approval. Use glob patterns to create rules like “allow all npm commands” or “block any command with sudo”. Organizations can set policies that apply across all users. See [permissions](</docs/en/permissions>).
- * **Static analysis** : Before executing bash commands, Claude Code runs static analysis to identify potentially risky operations. Commands that modify system files or access sensitive directories are flagged and require explicit user approval.
+ * **Command parsing for permissions** : Before executing bash commands, Claude Code parses them into an AST and matches the result against your permission rules. Commands that cannot be parsed cleanly, or that do not match an allow rule, require explicit approval. A small set of constructs such as `eval` always require approval regardless of allow rules. This is a permission gate, not a sandbox; it does not infer whether a command is dangerous from its target path or effects.
* **Web search summarization** : Search results are summarized rather than passing raw content directly into the context, reducing the risk of prompt injection from malicious web content.
* **Sandbox mode** : Bash commands can run in a sandboxed environment that restricts filesystem and network access. See the [sandboxing documentation](</docs/en/sandboxing>) for details.
--- a/settings.md
+++ b/settings.md
@@ -147,7 +147,7 @@
]
}
-The `$schema` line in the example above points to the [official JSON schema](<https://json.schemastore.org/claude-code-settings.json>) for Claude Code settings. Adding it to your `settings.json` enables autocomplete and inline validation in VS Code, Cursor, and any other editor that supports JSON schema validation.
+The `$schema` line in the example above points to the [official JSON schema](<https://json.schemastore.org/claude-code-settings.json>) for Claude Code settings. Adding it to your `settings.json` enables autocomplete and inline validation in VS Code, Cursor, and any other editor that supports JSON schema validation. The published schema is updated periodically and may not include settings added in the most recent CLI releases, so a validation warning on a recently documented field does not necessarily mean your configuration is invalid.
###
@@ -173,6 +173,7 @@
`autoMode`| Customize what the [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) classifier blocks and allows. Contains `environment`, `allow`, and `soft_deny` arrays of prose rules. See [Configure the auto mode classifier](</docs/en/permissions#configure-the-auto-mode-classifier>). Not read from shared project settings| `{"environment": ["Trusted repo: github.example.com/acme"]}`
`autoUpdatesChannel`| Release channel to follow for updates. Use `"stable"` for a version that is typically about one week old and skips versions with major regressions, or `"latest"` (default) for the most recent release| `"stable"`
`availableModels`| Restrict which models users can select via `/model`, `--model`, Config tool, or `ANTHROPIC_MODEL`. Does not affect the Default option. See [Restrict model selection](</docs/en/model-config#restrict-model-selection>)| `["sonnet", "haiku"]`
+`awaySummaryEnabled`| Show a one-line session recap when you return to the terminal after a few minutes away. Set to `false` or turn off Session recap in `/config` to disable. Same as [`CLAUDE_CODE_ENABLE_AWAY_SUMMARY`](</docs/en/env-vars>)| `true`
`awsAuthRefresh`| Custom script that modifies the `.aws` directory (see [advanced credential configuration](</docs/en/amazon-bedrock#advanced-credential-configuration>))| `aws sso login --profile myprofile`
`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" }]`
@@ -186,7 +187,7 @@
`disableDeepLinkRegistration`| Set to `"disable"` to prevent Claude Code from registering the `claude-cli://` protocol handler with the operating system on startup. Deep links let external tools open a Claude Code session with a pre-filled prompt via `claude-cli://open?q=...`. The `q` parameter supports multi-line prompts using URL-encoded newlines (`%0A`). Useful in environments where protocol handler registration is restricted or managed separately| `"disable"`
`disabledMcpjsonServers`| List of specific MCP servers from `.mcp.json` files to reject| `["filesystem"]`
`disableSkillShellExecution`| Disable inline shell execution for `!`...`` and ````!` blocks in [skills](</docs/en/skills>) and custom commands from user, project, plugin, or additional-directory sources. Commands are replaced with `[shell command execution disabled by policy]` instead of being run. Bundled and managed skills are not affected. Most useful in [managed settings](</docs/en/permissions#managed-settings>) where users cannot override it| `true`
-`effortLevel`| Persist the [effort level](</docs/en/model-config#adjust-effort-level>) across sessions. Accepts `"low"`, `"medium"`, or `"high"`. Written automatically when you run `/effort low`, `/effort medium`, or `/effort high`. Supported on Opus 4.6 and Sonnet 4.6| `"medium"`
+`effortLevel`| Persist the [effort level](</docs/en/model-config#adjust-effort-level>) across sessions. Accepts `"low"`, `"medium"`, `"high"`, or `"xhigh"`. Written automatically when you run `/effort` with one of those values. See [Adjust effort level](</docs/en/model-config#adjust-effort-level>) for supported models| `"xhigh"`
`enableAllProjectMcpServers`| Automatically approve all MCP servers defined in project `.mcp.json` files| `true`
`enabledMcpjsonServers`| List of specific MCP servers from `.mcp.json` files to approve| `["memory", "github"]`
`env`| Environment variables that will be applied to every session| `{"FOO": "bar"}`
@@ -201,7 +202,7 @@
`includeCoAuthoredBy`| **Deprecated** : Use `attribution` instead. Whether to include the `co-authored-by Claude` byline in git commits and pull requests (default: `true`)| `false`
`includeGitInstructions`| Include built-in commit and PR workflow instructions and the git status snapshot in Claude’s system prompt (default: `true`). Set to `false` to remove both, for example when using your own git workflow skills. The `CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS` environment variable takes precedence over this setting when set| `false`
`language`| Configure Claude’s preferred response language (e.g., `"japanese"`, `"spanish"`, `"french"`). Claude will respond in this language by default. Also sets the [voice dictation](</docs/en/voice-dictation#change-the-dictation-language>) language| `"japanese"`
-`minimumVersion`| Prevent the auto-updater from downgrading below a specific version. Automatically set when switching to the stable channel and choosing to stay on the current version until stable catches up. Used with `autoUpdatesChannel`| `"2.1.85"`
+`minimumVersion`| Floor that prevents background auto-updates and `claude update` from installing a version below this one. Switching from the `"latest"` channel to `"stable"` via `/config` prompts you to stay on the current version or allow the downgrade. Choosing to stay sets this value. Also useful in [managed settings](</docs/en/permissions#managed-settings>) to pin an organization-wide minimum| `"2.1.100"`
`model`| Override the default model to use for Claude Code| `"claude-sonnet-4-6"`
`modelOverrides`| Map Anthropic model IDs to provider-specific model IDs such as Bedrock inference profile ARNs. Each model picker entry uses its mapped value when calling the provider API. See [Override model IDs per version](</docs/en/model-config#override-model-ids-per-version>)| `{"claude-opus-4-6": "arn:aws:bedrock:..."}`
`otelHeadersHelper`| Script to generate dynamic OpenTelemetry headers. Runs at startup and periodically (see [Dynamic headers](</docs/en/monitoring-usage#dynamic-headers>))| `/bin/generate_otel_headers.sh`
@@ -218,8 +219,9 @@
`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"]}`
`statusLine`| Configure a custom status line to display context. See [`statusLine` documentation](</docs/en/statusline>)| `{"type": "command", "command": "~/.claude/statusline.sh"}`
`strictKnownMarketplaces`| (Managed settings only) Allowlist of plugin marketplaces users can add. Undefined = no restrictions, empty array = lockdown. Applies to marketplace additions only. See [Managed marketplace restrictions](</docs/en/plugin-marketplaces#managed-marketplace-restrictions>)| `[{ "source": "github", "repo": "acme-corp/plugins" }]`
+`tui`| Terminal UI renderer. Use `"fullscreen"` for the flicker-free [alt-screen renderer](</docs/en/fullscreen>) with virtualized scrollback. Use `"default"` for the classic main-screen renderer. Set via `/tui`| `"fullscreen"`
`useAutoModeDuringPlan`| Whether plan mode uses auto mode semantics when auto mode is available. Default: `true`. Not read from shared project settings. Appears in `/config` as “Use auto mode during plan”| `false`
-`viewMode`| Default transcript view mode on startup: `"default"`, `"verbose"`, or `"focus"`. Overrides the sticky Ctrl+O selection when set| `"verbose"`
+`viewMode`| Default transcript view mode on startup: `"default"`, `"verbose"`, or `"focus"`. Overrides the sticky `/focus` selection when set| `"verbose"`
`voiceEnabled`| Enable push-to-talk [voice dictation](</docs/en/voice-dictation>). Written automatically when you run `/voice`. Requires a Claude.ai account| `true`
###
@@ -234,7 +236,9 @@
---|---|---
`autoConnectIde`| Automatically connect to a running IDE when Claude Code starts from an external terminal. Default: `false`. Appears in `/config` as **Auto-connect to IDE (external terminal)** when running outside a VS Code or JetBrains terminal| `true`
`autoInstallIdeExtension`| Automatically install the Claude Code IDE extension when running from a VS Code terminal. Default: `true`. Appears in `/config` as **Auto-install IDE extension** when running inside a VS Code or JetBrains terminal. You can also set the [`CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL`](</docs/en/env-vars>) environment variable| `false`
+`autoScrollEnabled`| In [fullscreen rendering](</docs/en/fullscreen>), follow new output to the bottom of the conversation. Default: `true`. Appears in `/config` as **Auto-scroll**. Permission prompts still scroll into view when this is off| `false`
`editorMode`| Key binding mode for the input prompt: `"normal"` or `"vim"`. Default: `"normal"`. Appears in `/config` as **Editor mode**| `"vim"`
+`externalEditorContext`| Prepend Claude’s previous response as `#`-commented context when you open the external editor with `Ctrl+G`. Default: `false`. Appears in `/config` as **Show last response in external editor**| `true`
`showTurnDuration`| Show turn duration messages after responses, e.g. “Cooked for 1m 6s”. Default: `true`. Appears in `/config` as **Show turn duration**| `false`
`terminalProgressBarEnabled`| Show the terminal progress bar in supported terminals: ConEmu, Ghostty 1.2.0+, and iTerm2 3.6.6+. Default: `true`. Appears in `/config` as **Terminal progress bar**| `false`
`teammateMode`| How [agent team](</docs/en/agent-teams>) teammates display: `auto` (picks split panes in tmux or iTerm2, in-process otherwise), `in-process`, or `tmux`. See [choose a display mode](</docs/en/agent-teams#choose-a-display-mode>)| `"in-process"`
--- a/setup.md
+++ b/setup.md
@@ -97,7 +97,7 @@
}
}
-Claude Code can also run PowerShell natively on Windows as an opt-in preview. See [PowerShell tool](</docs/en/tools-reference#powershell-tool>) for setup and limitations. **Option 2: WSL** Open your WSL distribution and run the Linux installer from the install instructions above. You install and launch `claude` inside the WSL terminal, not from PowerShell or CMD.
+Claude Code can also run PowerShell natively on Windows. The PowerShell tool is rolling out progressively; set `CLAUDE_CODE_USE_POWERSHELL_TOOL=1` to opt in or `0` to opt out. See [PowerShell tool](</docs/en/tools-reference#powershell-tool>) for setup and limitations. **Option 2: WSL** Open your WSL distribution and run the Linux installer from the install instructions above. You install and launch `claude` inside the WSL terminal, not from PowerShell or CMD.
###
@@ -180,6 +180,21 @@
+Pin a minimum version
+
+The `minimumVersion` setting establishes a floor. Background auto-updates and `claude update` refuse to install any version below this value, so moving to the `"stable"` channel does not downgrade you if you are already on a newer `"latest"` build. Switching from `"latest"` to `"stable"` via `/config` prompts you to either stay on the current version or allow the downgrade. Choosing to stay sets `minimumVersion` to that version. Switching back to `"latest"` clears it. Add it to your [settings.json file](</docs/en/settings>) to pin a floor explicitly:
+
+ {
+ "autoUpdatesChannel": "stable",
+ "minimumVersion": "2.1.100"
+ }
+
+In [managed settings](</docs/en/permissions#managed-settings>), this enforces an organization-wide minimum that user and project settings cannot override.
+
+###
+
+
+
Disable auto-updates
Set `DISABLE_AUTOUPDATER` to `"1"` in the `env` key of your [`settings.json`](</docs/en/settings#available-settings>) file:
@@ -445,7 +460,7 @@
Removing configuration files will delete all your settings, allowed tools, MCP server configurations, and session history.
-To remove Claude Code settings and cached data:
+The VS Code extension, the JetBrains plugin, and the Desktop app also write to `~/.claude/`. If any of them is still installed, the directory is recreated the next time it runs. To remove Claude Code completely, uninstall the [VS Code extension](</docs/en/vs-code#uninstall-the-extension>), the JetBrains plugin, and the Desktop app before deleting these files. To remove Claude Code settings and cached data:
* macOS, Linux, WSL
--- a/skills.md
+++ b/skills.md
@@ -10,7 +10,7 @@
Bundled skills
-Claude Code includes a set of bundled skills that are available in every session, including `/simplify`, `/batch`, `/debug`, `/loop`, and `/claude-api`. Unlike built-in commands, which execute fixed logic directly, bundled skills are prompt-based: they give Claude a detailed playbook and let it orchestrate the work using its tools. You invoke them the same way as any other skill, by typing `/` followed by the skill name. Bundled skills are listed alongside built-in commands in the [commands reference](</docs/en/commands>), marked **Skill** in the Purpose column.
+Claude Code includes a set of bundled skills that are available in every session, including `/simplify`, `/batch`, `/debug`, `/loop`, and `/claude-api`. Unlike most built-in commands, which execute fixed logic directly, bundled skills are prompt-based: they give Claude a detailed playbook and let it orchestrate the work using its tools. You invoke them the same way as any other skill, by typing `/` followed by the skill name. Bundled skills are listed alongside built-in commands in the [commands reference](</docs/en/commands>), marked **Skill** in the Purpose column.
##
@@ -194,7 +194,7 @@
`user-invocable`| No| Set to `false` to hide from the `/` menu. Use for background knowledge users shouldn’t invoke directly. Default: `true`.
`allowed-tools`| No| Tools Claude can use without asking permission when this skill is active. Accepts a space-separated string or a YAML list.
`model`| No| Model to use when this skill is active.
-`effort`| No| [Effort level](</docs/en/model-config#adjust-effort-level>) when this skill is active. Overrides the session effort level. Default: inherits from session. Options: `low`, `medium`, `high`, `max` (Opus 4.6 only).
+`effort`| No| [Effort level](</docs/en/model-config#adjust-effort-level>) when this skill is active. Overrides the session effort level. Default: inherits from session. Options: `low`, `medium`, `high`, `xhigh`, `max`; available levels depend on the model.
`context`| No| Set to `fork` to run in a forked subagent context.
`agent`| No| Which subagent type to use when `context: fork` is set.
`hooks`| No| Hooks scoped to this skill’s lifecycle. See [Hooks in skills and agents](</docs/en/hooks#hooks-in-skills-and-agents>) for configuration format.
@@ -459,7 +459,7 @@
Restrict Claude’s skill access
-By default, Claude can invoke any skill that doesn’t have `disable-model-invocation: true` set. Skills that define `allowed-tools` grant Claude access to those tools without per-use approval when the skill is active. Your [permission settings](</docs/en/permissions>) still govern baseline approval behavior for all other tools. Built-in commands like `/compact` and `/init` are not available through the Skill tool. Three ways to control which skills Claude can invoke: **Disable all skills** by denying the Skill tool in `/permissions`:
+By default, Claude can invoke any skill that doesn’t have `disable-model-invocation: true` set. Skills that define `allowed-tools` grant Claude access to those tools without per-use approval when the skill is active. Your [permission settings](</docs/en/permissions>) still govern baseline approval behavior for all other tools. A few built-in commands are also available through the Skill tool, including `/init`, `/review`, and `/security-review`. Other built-in commands such as `/compact` are not. Three ways to control which skills Claude can invoke: **Disable all skills** by denying the Skill tool in `/permissions`:
# Add to deny rules:
Skill
--- a/slash-commands.md
+++ b/slash-commands.md
@@ -1,4 +1,4 @@
-Slash commands provide a way to control Claude Code sessions with special commands that start with `/`. These commands can be sent through the SDK to perform actions like clearing conversation history, compacting messages, or getting help.
+Slash commands provide a way to control Claude Code sessions with special commands that start with `/`. These commands can be sent through the SDK to perform actions like compacting context, listing context usage, or invoking custom commands. Only commands that work without an interactive terminal are dispatchable through the SDK; the `system/init` message lists the ones available in your session.
##
@@ -20,7 +20,7 @@
})) {
if (message.type === "system" && message.subtype === "init") {
console.log("Available slash commands:", message.slash_commands);
- // Example output: ["/compact", "/clear", "/help"]
+ // Example output: ["/compact", "/context", "/cost"]
}
}
@@ -83,26 +83,9 @@
-`/clear` \- Clear Conversation
-
-The `/clear` command starts a fresh conversation by clearing all previous history:
-
-TypeScript
-
-Python
-
- import { query } from "@anthropic-ai/claude-agent-sdk";
-
- // Clear conversation and start fresh
- for await (const message of query({
- prompt: "/clear",
- options: { maxTurns: 1 }
- })) {
- if (message.type === "system" && message.subtype === "init") {
- console.log("Conversation cleared, new session started");
- console.log("Session ID:", message.session_id);
- }
- }
+Clearing the conversation
+
+The interactive `/clear` command is not available in the SDK. Each `query()` call already starts a fresh conversation, so to clear context, end the current `query()` and start a new one. The previous conversation stays on disk and can be returned to by passing its session ID to the [`resume` option](</docs/en/agent-sdk/sessions#resume-by-id>).
##
@@ -161,7 +144,7 @@
---
allowed-tools: Read, Grep, Glob
description: Run security vulnerability scan
- model: claude-opus-4-6
+ model: claude-opus-4-7
---
Analyze the codebase for security vulnerabilities including:
@@ -202,7 +185,7 @@
if (message.type === "system" && message.subtype === "init") {
// Will include both built-in and custom commands
console.log("Available commands:", message.slash_commands);
- // Example: ["/compact", "/clear", "/help", "/refactor", "/security-check"]
+ // Example: ["/compact", "/context", "/cost", "/refactor", "/security-check"]
}
}
@@ -256,7 +239,7 @@
Custom commands can execute bash commands and include their output: Create `.claude/commands/git-commit.md`:
---
- allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*)
+ allowed-tools: Bash(git add *), Bash(git status *), Bash(git commit *)
description: Create a git commit
---
@@ -322,7 +305,7 @@
Create `.claude/commands/code-review.md`:
---
- allowed-tools: Read, Grep, Glob, Bash(git diff:*)
+ allowed-tools: Read, Grep, Glob, Bash(git diff *)
description: Comprehensive code review
---
--- a/statusline.md
+++ b/statusline.md
@@ -180,7 +180,7 @@
"session_name": "my-session",
"transcript_path": "/path/to/transcript.jsonl",
"model": {
- "id": "claude-opus-4-6",
+ "id": "claude-opus-4-7",
"display_name": "Opus"
},
"workspace": {
--- a/structured-outputs.md
+++ b/structured-outputs.md
@@ -1,4 +1,4 @@
-Structured outputs let you define the exact shape of data you want back from an agent. The agent can use any tools it needs to complete the task, and you still get validated JSON matching your schema at the end. Define a [JSON Schema](<https://json-schema.org/understanding-json-schema/about>) for the structure you need, and the SDK guarantees the output matches it. For full type safety, use Zod (TypeScript) or Pydantic (Python) to define your schema and get strongly-typed objects back.
+Structured outputs let you define the exact shape of data you want back from an agent. The agent can use any tools it needs to complete the task, and you still get validated JSON matching your schema at the end. Define a [JSON Schema](<https://json-schema.org/understanding-json-schema/about>) for the structure you need, and the SDK validates the output against it, re-prompting on mismatch. If validation does not succeed within the retry limit, the result is an error instead of structured data; see Error handling. For full type safety, use Zod (TypeScript) or Pydantic (Python) to define your schema and get strongly-typed objects back.
##
--- a/sub-agents.md
+++ b/sub-agents.md
@@ -226,7 +226,7 @@
`description`| Yes| When Claude should delegate to this subagent
`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`
+`model`| No| Model to use: `sonnet`, `opus`, `haiku`, a full model ID (for example, `claude-opus-4-7`), or `inherit`. Defaults to `inherit`
`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
@@ -234,7 +234,7 @@
`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)
+`effort`| No| Effort level when this subagent is active. Overrides the session effort level. Default: inherits from session. Options: `low`, `medium`, `high`, `xhigh`, `max`; available levels depend on the model
`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
@@ -248,7 +248,7 @@
The `model` field controls which [AI model](</docs/en/model-config>) the subagent uses:
* **Model alias** : Use one of the available aliases: `sonnet`, `opus`, or `haiku`
- * **Full model ID** : Use a full model ID such as `claude-opus-4-6` or `claude-sonnet-4-6`. Accepts the same values as the `--model` flag
+ * **Full model ID** : Use a full model ID such as `claude-opus-4-7` or `claude-sonnet-4-6`. Accepts the same values as the `--model` flag
* **inherit** : Use the same model as the main conversation
* **Omitted** : If not specified, defaults to `inherit` (uses the same model as the main conversation)
@@ -357,7 +357,7 @@
Use `bypassPermissions` with caution. It skips permission prompts, allowing the subagent to execute operations without approval. Writes to `.git`, `.claude`, `.vscode`, `.idea`, and `.husky` directories still prompt for confirmation, except for `.claude/commands`, `.claude/agents`, and `.claude/skills`. See [permission modes](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>) for details.
-If the parent uses `bypassPermissions`, this takes precedence and cannot be overridden. If the parent uses [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), the subagent inherits auto mode and any `permissionMode` in its frontmatter is ignored: the classifier evaluates the subagent’s tool calls with the same block and allow rules as the parent session.
+If the parent uses `bypassPermissions` or `acceptEdits`, this takes precedence and cannot be overridden. If the parent uses [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), the subagent inherits auto mode and any `permissionMode` in its frontmatter is ignored: the classifier evaluates the subagent’s tool calls with the same block and allow rules as the parent session.
####
--- a/terminal-config.md
+++ b/terminal-config.md
@@ -4,7 +4,7 @@
Themes and appearance
-Claude cannot control the theme of your terminal. That’s handled by your terminal application. You can match Claude Code’s theme to your terminal any time via the `/config` command. For additional customization of the Claude Code interface itself, you can configure a [custom status line](</docs/en/statusline>) to display contextual information like the current model, working directory, or git branch at the bottom of your terminal.
+Claude cannot control the theme of your terminal. That’s handled by your terminal application. You can match Claude Code’s theme to your terminal via the `/theme` command. Select `auto` in the theme picker to have Claude Code follow your terminal’s dark or light mode automatically. For additional customization of the Claude Code interface itself, you can configure a [custom status line](</docs/en/statusline>) to display contextual information like the current model, working directory, or git branch at the bottom of your terminal.
###
@@ -104,7 +104,7 @@
Reduce flicker and memory usage
-If you see flicker during long sessions, or your terminal scroll position jumps to the top while Claude is working, try [fullscreen rendering](</docs/en/fullscreen>). It uses an alternate rendering path that keeps memory flat and adds mouse support. Enable it with `CLAUDE_CODE_NO_FLICKER=1`.
+If you see flicker during long sessions, or your terminal scroll position jumps to the top while Claude is working, try [fullscreen rendering](</docs/en/fullscreen>). It uses an alternate rendering path that keeps memory flat and adds mouse support. Run `/tui fullscreen` to switch in your current conversation.
###
--- a/tools-reference.md
+++ b/tools-reference.md
@@ -5,21 +5,21 @@
`Agent`| Spawns a [subagent](</docs/en/sub-agents>) with its own context window to handle a task| No
`AskUserQuestion`| Asks multiple-choice questions to gather requirements or clarify ambiguity| No
`Bash`| Executes shell commands in your environment. See Bash tool behavior| Yes
-`CronCreate`| Schedules a recurring or one-shot prompt within the current session (gone when Claude exits). See [scheduled tasks](</docs/en/scheduled-tasks>)| No
+`CronCreate`| Schedules a recurring or one-shot prompt within the current session. Tasks are session-scoped and restored on `--resume` or `--continue` if unexpired. See [scheduled tasks](</docs/en/scheduled-tasks>)| No
`CronDelete`| Cancels a scheduled task by ID| No
`CronList`| Lists all scheduled tasks in the session| No
`Edit`| Makes targeted edits to specific files| Yes
`EnterPlanMode`| Switches to plan mode to design an approach before coding| No
-`EnterWorktree`| Creates an isolated [git worktree](</docs/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees>) and switches into it. Pass a `path` to switch into an existing worktree of the current repository instead of creating a new one| No
+`EnterWorktree`| Creates an isolated [git worktree](</docs/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees>) and switches into it. Pass a `path` to switch into an existing worktree of the current repository instead of creating a new one. Not available to subagents| No
`ExitPlanMode`| Presents a plan for approval and exits plan mode| Yes
-`ExitWorktree`| Exits a worktree session and returns to the original directory| No
+`ExitWorktree`| Exits a worktree session and returns to the original directory. Not available to subagents| No
`Glob`| Finds files based on pattern matching| No
`Grep`| Searches for patterns in file contents| No
`ListMcpResourcesTool`| Lists resources exposed by connected [MCP servers](</docs/en/mcp>)| No
`LSP`| Code intelligence via language servers: jump to definitions, find references, report type errors and warnings. See LSP tool behavior| No
`Monitor`| Runs a command in the background and feeds each output line back to Claude, so it can react to log entries, file changes, or polled status mid-conversation. See Monitor tool| Yes
`NotebookEdit`| Modifies Jupyter notebook cells| Yes
-`PowerShell`| Executes PowerShell commands on Windows. Opt-in preview. See PowerShell tool| Yes
+`PowerShell`| Executes PowerShell commands natively. See PowerShell tool for availability| 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` is set| No
@@ -87,7 +87,7 @@
* Watch a directory for file changes
* Track output from any long-running script you point it at
-Claude writes a small script for the watch, runs it in the background, and receives each output line as it arrives. You keep working in the same session and Claude interjects when an event lands. Stop a monitor by asking Claude to cancel it or by ending the session. Monitor uses the same [permission rules as Bash](</docs/en/permissions#tool-specific-permission-rules>), so `allow` and `deny` patterns you have set for Bash apply here too. It is not available on Amazon Bedrock, Google Vertex AI, or Microsoft Foundry. It is also not available when `DISABLE_TELEMETRY` or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set.
+Claude writes a small script for the watch, runs it in the background, and receives each output line as it arrives. You keep working in the same session and Claude interjects when an event lands. Stop a monitor by asking Claude to cancel it or by ending the session. Monitor uses the same [permission rules as Bash](</docs/en/permissions#tool-specific-permission-rules>), so `allow` and `deny` patterns you have set for Bash apply here too. It is not available on Amazon Bedrock, Google Vertex AI, or Microsoft Foundry. It is also not available when `DISABLE_TELEMETRY` or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set. Plugins can declare monitors that start automatically when the plugin is active, instead of asking Claude to start them. See [plugin monitors](</docs/en/plugins-reference#monitors>).
##
@@ -95,7 +95,7 @@
PowerShell tool
-On Windows, Claude Code can run PowerShell commands natively instead of routing through Git Bash. This is an opt-in preview.
+The PowerShell tool lets Claude run PowerShell commands natively. On Windows, this means commands run in PowerShell instead of routing through Git Bash. The tool is rolling out progressively on Windows and is opt-in on Linux, macOS, and WSL.
###
@@ -111,7 +111,7 @@
}
}
-Claude Code auto-detects `pwsh.exe` (PowerShell 7+) with a fallback to `powershell.exe` (PowerShell 5.1). The Bash tool remains registered alongside the PowerShell tool, so you may need to ask Claude to use PowerShell.
+On Windows, set the variable to `0` to opt out of the rollout. On Linux, macOS, and WSL, the tool requires PowerShell 7 or later: install `pwsh` and ensure it is on your `PATH`. On Windows, Claude Code auto-detects `pwsh.exe` for PowerShell 7+ with a fallback to `powershell.exe` for PowerShell 5.1. The Bash tool remains registered alongside the PowerShell tool, so you may need to ask Claude to use PowerShell.
###
@@ -137,9 +137,8 @@
* Auto mode does not work with the PowerShell tool yet
* PowerShell profiles are not loaded
- * Sandboxing is not supported
- * Only supported on native Windows, not WSL
- * Git Bash is still required to start Claude Code
+ * On Windows, sandboxing is not supported
+ * On Windows, Git Bash is still required to start Claude Code
##
--- a/troubleshooting.md
+++ b/troubleshooting.md
@@ -27,6 +27,7 @@
`App unavailable in region`| Claude Code is not available in your country. See [supported countries](<https://www.anthropic.com/supported-countries>).
`unable to get local issuer certificate`| Configure corporate CA certificates
`OAuth error` or `403 Forbidden`| Fix authentication
+`API Error: 500`, `529 Overloaded`, `429`, or other 4xx and 5xx errors not listed above| See the [Error reference](</docs/en/errors>)
If your issue isn’t listed, work through these diagnostic steps.
@@ -706,6 +707,8 @@
2. Close and restart Claude Code between major tasks
3. Consider adding large build directories to your `.gitignore` file
+If memory usage stays high after these steps, run `/heapdump` to write a JavaScript heap snapshot and a memory breakdown to `~/Desktop`. The breakdown shows resident set size, JS heap, array buffers, and unaccounted native memory, which helps identify whether the growth is in JavaScript objects or in native code. Open the `.heapsnapshot` file in Chrome DevTools under Memory → Load to inspect retainers. Attach both files when reporting a memory issue on [GitHub](<https://github.com/anthropics/claude-code/issues>).
+
###
@@ -916,14 +919,15 @@
If you’re experiencing issues not covered here:
- 1. Use the `/feedback` command within Claude Code to report problems directly to Anthropic
- 2. Check the [GitHub repository](<https://github.com/anthropics/claude-code>) for known issues
- 3. Run `/doctor` to diagnose issues. It checks:
+ 1. See the [Error reference](</docs/en/errors>) for `API Error: 5xx`, `529 Overloaded`, `429`, and request validation errors that appear during a session
+ 2. Use the `/feedback` command within Claude Code to report problems directly to Anthropic
+ 3. Check the [GitHub repository](<https://github.com/anthropics/claude-code>) for known issues
+ 4. Run `/doctor` to diagnose issues. It checks:
* Installation type, version, and search functionality
* Auto-update status and available versions
* Invalid settings files (malformed JSON, incorrect types)
- * MCP server configuration errors
+ * MCP server configuration errors, including the same server name defined in multiple scopes with different endpoints
* Keybinding configuration problems
* Context usage warnings (large CLAUDE.md files, high MCP token usage, unreachable permission rules)
* Plugin and agent loading errors
- 4. Ask Claude directly about its capabilities and features - Claude has built-in access to its documentation
+ 5. Ask Claude directly about its capabilities and features - Claude has built-in access to its documentation
Show diff (245 lines)
--- a/typescript.md
+++ b/typescript.md
@@ -48,6 +48,56 @@
Returns
Returns a `Query` object that extends `AsyncGenerator<``SDKMessage``, void>` with additional methods.
+
+###
+
+
+
+`startup()`
+
+Pre-warms the CLI subprocess by spawning it and completing the initialize handshake before a prompt is available. The returned `WarmQuery` handle accepts a prompt later and writes it to an already-ready process, so the first `query()` call resolves without paying subprocess spawn and initialization cost inline.
+
+ function startup(params?: {
+ options?: Options;
+ initializeTimeoutMs?: number;
+ }): Promise<WarmQuery>;
+
+####
+
+
+
+Parameters
+
+Parameter| Type| Description
+---|---|---
+`options`| `Options`| Optional configuration object. Same as the `options` parameter to `query()`
+`initializeTimeoutMs`| `number`| Maximum time in milliseconds to wait for subprocess initialization. Defaults to `60000`. If initialization does not complete in time, the promise rejects with a timeout error
+
+####
+
+
+
+Returns
+
+Returns a `Promise<``WarmQuery``>` that resolves once the subprocess has spawned and completed its initialize handshake.
+
+####
+
+
+
+Example
+
+Call `startup()` early, for example on application boot, then call `.query()` on the returned handle once a prompt is ready. This moves subprocess spawn and initialization out of the critical path.
+
+ import { startup } from "@anthropic-ai/claude-agent-sdk";
+
+ // Pay startup cost upfront
+ const warm = await startup({ options: { maxTurns: 3 } });
+
+ // Later, when a prompt is ready, this is immediate
+ for await (const message of warm.query("What files are here?")) {
+ console.log(message);
+ }
###
@@ -359,7 +409,7 @@
`debug`| `boolean`| `false`| Enable debug mode for the Claude Code process
`debugFile`| `string`| `undefined`| Write debug logs to a specific file path. Implicitly enables debug mode
`disallowedTools`| `string[]`| `[]`| Tools to always deny. Deny rules are checked first and override `allowedTools` and `permissionMode` (including `bypassPermissions`)
-`effort`| `'low' | 'medium' | 'high' | 'max'`| `'high'`| Controls how much effort Claude puts into its response. Works with adaptive thinking to guide thinking depth
+`effort`| `'low' | 'medium' | 'high' | 'xhigh' | 'max'`| `'high'`| Controls how much effort Claude puts into its response. Works with adaptive thinking to guide thinking depth
`enableFileCheckpointing`| `boolean`| `false`| Enable file change tracking for rewinding. See [File checkpointing](</docs/en/agent-sdk/file-checkpointing>)
`env`| `Record<string, string | undefined>`| `process.env`| Environment variables. Set `CLAUDE_AGENT_SDK_CLIENT_APP` to identify your app in the User-Agent header
`executable`| `'bun' | 'deno' | 'node'`| Auto-detected| JavaScript runtime to use
@@ -369,7 +419,7 @@
`forkSession`| `boolean`| `false`| When resuming with `resume`, fork to a new session ID instead of continuing the original session
`hooks`| `Partial<Record<``HookEvent``, ``HookCallbackMatcher``[]>>`| `{}`| Hook callbacks for events
`includePartialMessages`| `boolean`| `false`| Include partial message events
-`maxBudgetUsd`| `number`| `undefined`| Maximum budget in USD for the query
+`maxBudgetUsd`| `number`| `undefined`| Stop the query when the client-side cost estimate reaches this USD value. Compared against the same estimate as `total_cost_usd`; see [Track cost and usage](</docs/en/agent-sdk/cost-tracking>) for accuracy caveats
`maxThinkingTokens`| `number`| `undefined`| _Deprecated:_ Use `thinking` instead. Maximum tokens for thinking process
`maxTurns`| `number`| `undefined`| Maximum agentic turns (tool-use round trips)
`mcpServers`| `Record<string, [`McpServerConfig`](#mcp-server-config)>`| `{}`| MCP server configurations
@@ -385,7 +435,7 @@
`resumeSessionAt`| `string`| `undefined`| Resume session at a specific message UUID
`sandbox`| `SandboxSettings`| `undefined`| Configure sandbox behavior programmatically. See Sandbox settings for details
`sessionId`| `string`| Auto-generated| Use a specific UUID for the session instead of auto-generating one
-`settingSources`| `SettingSource``[]`| `[]` (no settings)| Control which filesystem settings to load. When omitted, no settings are loaded. **Note:** Must include `'project'` to load CLAUDE.md files
+`settingSources`| `SettingSource``[]`| CLI defaults (all sources)| Control which filesystem settings to load. Pass `[]` to disable user, project, and local settings. Managed policy settings load regardless. See [Use Claude Code features](</docs/en/agent-sdk/claude-code-features#what-settingsources-does-not-control>)
`spawnClaudeCodeProcess`| `(options: SpawnOptions) => SpawnedProcess`| `undefined`| Custom function to spawn the Claude Code process. Use to run Claude Code in VMs, containers, or remote environments
`stderr`| `(data: string) => void`| `undefined`| Callback for stderr output
`strictMcpConfig`| `boolean`| `false`| Enforce strict MCP validation
@@ -455,6 +505,32 @@
+`WarmQuery`
+
+Handle returned by `startup()`. The subprocess is already spawned and initialized, so calling `query()` on this handle writes the prompt directly to a ready process with no startup latency.
+
+ interface WarmQuery extends AsyncDisposable {
+ query(prompt: string | AsyncIterable<SDKUserMessage>): Query;
+ close(): void;
+ }
+
+####
+
+
+
+Methods
+
+Method| Description
+---|---
+`query(prompt)`| Send a prompt to the pre-warmed subprocess and return a `Query`. Can only be called once per `WarmQuery`
+`close()`| Close the subprocess without sending a prompt. Use this to discard a warm query that is no longer needed
+
+`WarmQuery` implements `AsyncDisposable`, so it can be used with `await using` for automatic cleanup.
+
+###
+
+
+
`SDKControlInitializeResponse`
Return type of `initializationResult()`. Contains session initialization data.
@@ -535,7 +611,7 @@
Default behavior
-When `settingSources` is **omitted** or **undefined** , the SDK does **not** load any filesystem settings. This provides isolation for SDK applications.
+When `settingSources` is omitted or `undefined`, `query()` loads the same filesystem settings as the Claude Code CLI: user, project, and local. Managed policy settings are loaded in all cases. See [What settingSources does not control](</docs/en/agent-sdk/claude-code-features#what-settingsources-does-not-control>) for inputs that are read regardless of this option, and how to disable them.
####
@@ -543,9 +619,16 @@
Why use settingSources
-**Load all filesystem settings (legacy behavior):**
-
- // Load all settings like SDK v0.0.x did
+**Disable filesystem settings:**
+
+ // Do not load user, project, or local settings from disk
+ const result = query({
+ prompt: "Analyze this code",
+ options: { settingSources: [] }
+ });
+
+**Load all filesystem settings explicitly:**
+
const result = query({
prompt: "Analyze this code",
options: {
@@ -576,12 +659,12 @@
**SDK-only applications:**
- // Define everything programmatically (default behavior)
- // No filesystem dependencies - settingSources defaults to []
+ // Define everything programmatically.
+ // Pass [] to opt out of filesystem setting sources.
const result = query({
prompt: "Review this PR",
options: {
- // settingSources: [] is the default, no need to specify
+ settingSources: [],
agents: {
/* ... */
},
@@ -600,7 +683,7 @@
options: {
systemPrompt: {
type: "preset",
- preset: "claude_code" // Required to use CLAUDE.md
+ preset: "claude_code" // Use Claude Code's system prompt
},
settingSources: ["project"], // Loads CLAUDE.md from project directory
allowedTools: ["Read", "Write", "Edit"]
@@ -619,7 +702,7 @@
2. Project settings (`.claude/settings.json`)
3. User settings (`~/.claude/settings.json`)
-Programmatic options (like `agents`, `allowedTools`) always override filesystem settings.
+Programmatic options such as `agents` and `allowedTools` override user, project, and local filesystem settings. Managed policy settings take precedence over programmatic options.
###
@@ -834,6 +917,7 @@
| SDKHookStartedMessage
| SDKHookProgressMessage
| SDKHookResponseMessage
+ | SDKPluginInstallMessage
| SDKToolProgressMessage
| SDKAuthStatusMessage
| SDKTaskNotificationMessage
@@ -878,8 +962,11 @@
message: MessageParam; // From Anthropic SDK
parent_tool_use_id: string | null;
isSynthetic?: boolean;
+ shouldQuery?: boolean;
tool_use_result?: unknown;
};
+
+Set `shouldQuery` to `false` to append the message to the transcript without triggering an assistant turn. The message is held and merged into the next user message that does trigger a turn. Use this to inject context, such as the output of a command you ran out of band, without spending a model call on it.
###
@@ -1011,6 +1098,24 @@
trigger: "manual" | "auto";
pre_tokens: number;
};
+ };
+
+###
+
+
+
+`SDKPluginInstallMessage`
+
+Plugin installation progress event. Emitted when [`CLAUDE_CODE_SYNC_PLUGIN_INSTALL`](</docs/en/env-vars>) is set, so your Agent SDK application can track marketplace plugin installation before the first turn. The `started` and `completed` statuses bracket the overall install. The `installed` and `failed` statuses report individual marketplaces and include `name`.
+
+ type SDKPluginInstallMessage = {
+ type: "system";
+ subtype: "plugin_install";
+ status: "started" | "installed" | "failed" | "completed";
+ name?: string;
+ error?: string;
+ uuid: UUID;
+ session_id: string;
};
###
@@ -2450,7 +2555,7 @@
type SdkBeta = "context-1m-2025-08-07";
-The `context-1m-2025-08-07` beta is retired as of April 30, 2026. Passing this value with Claude Sonnet 4.5 or Sonnet 4 has no effect, and requests that exceed the standard 200k-token context window return an error. To use a 1M-token context window, migrate to [Claude Sonnet 4.6 or Claude Opus 4.6](<https://platform.claude.com/docs/en/about-claude/models/overview>), which include 1M context at standard pricing with no beta header required.
+The `context-1m-2025-08-07` beta is retired as of April 30, 2026. Passing this value with Claude Sonnet 4.5 or Sonnet 4 has no effect, and requests that exceed the standard 200k-token context window return an error. To use a 1M-token context window, migrate to [Claude Sonnet 4.6, Claude Opus 4.6, or Claude Opus 4.7](<https://platform.claude.com/docs/en/about-claude/models/overview>), which include 1M context at standard pricing with no beta header required.
###
@@ -2479,7 +2584,7 @@
displayName: string;
description: string;
supportsEffort?: boolean;
- supportedEffortLevels?: ("low" | "medium" | "high" | "max")[];
+ supportedEffortLevels?: ("low" | "medium" | "high" | "xhigh" | "max")[];
supportsAdaptiveThinking?: boolean;
supportsFastMode?: boolean;
};
--- a/typescript-v2-preview.md
+++ b/typescript-v2-preview.md
@@ -33,7 +33,7 @@
import { unstable_v2_prompt } from "@anthropic-ai/claude-agent-sdk";
const result = await unstable_v2_prompt("What is 2 + 2?", {
- model: "claude-opus-4-6"
+ model: "claude-opus-4-7"
});
if (result.subtype === "success") {
console.log(result.result);
@@ -55,7 +55,7 @@
import { unstable_v2_createSession } from "@anthropic-ai/claude-agent-sdk";
await using session = unstable_v2_createSession({
- model: "claude-opus-4-6"
+ model: "claude-opus-4-7"
});
await session.send("Hello!");
@@ -81,7 +81,7 @@
import { unstable_v2_createSession } from "@anthropic-ai/claude-agent-sdk";
await using session = unstable_v2_createSession({
- model: "claude-opus-4-6"
+ model: "claude-opus-4-7"
});
// Turn 1
@@ -134,7 +134,7 @@
// Create initial session and have a conversation
const session = unstable_v2_createSession({
- model: "claude-opus-4-6"
+ model: "claude-opus-4-7"
});
await session.send("Remember this number: 42");
@@ -152,7 +152,7 @@
// Later: resume the session using the stored ID
await using resumedSession = unstable_v2_resumeSession(sessionId!, {
- model: "claude-opus-4-6"
+ model: "claude-opus-4-7"
});
await resumedSession.send("What number did I ask you to remember?");
@@ -172,7 +172,7 @@
import { unstable_v2_createSession } from "@anthropic-ai/claude-agent-sdk";
await using session = unstable_v2_createSession({
- model: "claude-opus-4-6"
+ model: "claude-opus-4-7"
});
// Session closes automatically when the block exits
@@ -181,7 +181,7 @@
import { unstable_v2_createSession } from "@anthropic-ai/claude-agent-sdk";
const session = unstable_v2_createSession({
- model: "claude-opus-4-6"
+ model: "claude-opus-4-7"
});
// ... use the session ...
session.close();
--- a/ultraplan.md
+++ b/ultraplan.md
@@ -86,4 +86,5 @@
* [Claude Code on the web](</docs/en/claude-code-on-the-web>): the cloud infrastructure ultraplan runs on
* [Plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>): how planning works in a local session
+ * [Find bugs with ultrareview](</docs/en/ultrareview>): the code review counterpart to ultraplan for catching issues before merge
* [Remote Control](</docs/en/remote-control>): use the claude.ai/code interface with a session running on your own machine
--- a/ultrareview.md
+++ b/ultrareview.md
@@ -0,0 +1,81 @@
+Ultrareview is a research preview feature available in Claude Code v2.1.86 and later. The feature, pricing, and availability may change based on feedback.
+
+Ultrareview is a deep code review that runs on Claude Code on the web infrastructure. When you run `/ultrareview`, Claude Code launches a fleet of reviewer agents in a remote sandbox to find bugs in your branch or pull request. Compared to a local `/review`, ultrareview offers:
+
+ * **Higher signal** : every reported finding is independently reproduced and verified, so the results focus on real bugs rather than style suggestions
+ * **Broader coverage** : many reviewer agents explore the change in parallel, which surfaces issues that a single-pass review can miss
+ * **No local resource use** : the review runs entirely in a remote sandbox, so your terminal stays free for other work while it runs
+
+Ultrareview requires authentication with a Claude.ai account because it runs on Claude Code on the web infrastructure. If you are signed in with an API key only, run `/login` and authenticate with Claude.ai first. Ultrareview is not available when using Claude Code with Amazon Bedrock, Google Cloud Vertex AI, or Microsoft Foundry, and it is not available to organizations that have enabled Zero Data Retention.
+
+##
+
+
+
+Run ultrareview from the CLI
+
+Start a review from any git repository in the Claude Code CLI.
+
+ /ultrareview
+
+Without arguments, ultrareview reviews the diff between your current branch and the default branch, including any uncommitted and staged changes in your working tree. Claude Code bundles the repository state and uploads it to a remote sandbox for the review. To review a GitHub pull request instead, pass the PR number.
+
+ /ultrareview 1234
+
+In PR mode, the remote sandbox clones the pull request directly from GitHub rather than bundling your local working tree. PR mode requires a `github.com` remote on the repository.
+
+If your repository is too large to bundle, Claude Code prompts you to use PR mode instead. Push your branch and open a draft PR, then run `/ultrareview <PR-number>`.
+
+Before launching, Claude Code shows a confirmation dialog with the review scope, your remaining free runs, and the estimated cost. After you confirm, the review continues in the background and you can keep using your session. The command runs only when you invoke it with `/ultrareview`; Claude does not start an ultrareview on its own.
+
+##
+
+
+
+Pricing and free runs
+
+Ultrareview is a premium feature that bills against extra usage rather than your plan’s included usage.
+
+Plan| Included free runs| After free runs
+---|---|---
+Pro| 3 free runs, one-time| billed as [extra usage](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>)
+Max| 3 free runs, one-time| billed as [extra usage](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>)
+Team and Enterprise| none| billed as [extra usage](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>)
+
+Pro and Max subscribers receive three free ultrareview runs to try the feature. These three runs are a one-time allotment per account and do not refresh. After you use them, each review is billed to extra usage and typically costs $5 to $20 depending on the size of the change. Because ultrareview always bills as extra usage outside the free runs, your account or organization must have extra usage enabled before you can launch a paid review. If extra usage is not enabled, Claude Code blocks the launch and links you to the billing settings where you can turn it on. You can also run `/extra-usage` to check or change your current setting.
+
+##
+
+
+
+Track a running review
+
+A review typically takes 5 to 10 minutes. The review runs as a background task, so you can keep working in your session, start other commands, or close the terminal entirely. Use `/tasks` to see running and completed reviews, open the detail view for a review, or stop a review that is in progress. Stopping a review archives the cloud session, and partial findings are not returned. When the review finishes, the verified findings appear as a notification in your session. Each finding includes the file location and an explanation of the issue so you can ask Claude to fix it directly.
+
+##
+
+
+
+How ultrareview compares to /review
+
+Both commands review code, but they target different stages of your workflow.
+
+| `/review`| `/ultrareview`
+---|---|---
+Runs| locally in your session| remotely in a cloud sandbox
+Depth| single-pass review| multi-agent fleet with independent verification
+Duration| seconds to a few minutes| roughly 5 to 10 minutes
+Cost| counts toward normal usage| free runs, then roughly $5 to $20 per review as extra usage
+Best for| quick feedback while iterating| pre-merge confidence on substantial changes
+
+Use `/review` for fast feedback as you work. Use `/ultrareview` before merging a substantial change when you want a deeper pass that catches issues a single review might miss.
+
+##
+
+
+
+Related resources
+
+ * [Claude Code on the web](</docs/en/claude-code-on-the-web>): learn how remote sessions and cloud sandboxes work
+ * [Plan complex changes with ultraplan](</docs/en/ultraplan>): the planning counterpart to ultrareview for upfront design work
+ * [Manage costs effectively](</docs/en/costs>): track usage and set spending limits
--- a/vs-code.md
+++ b/vs-code.md
@@ -68,7 +68,7 @@
Review changes
-When Claude wants to edit a file, it shows a side-by-side comparison of the original and proposed changes, then asks for permission. You can accept, reject, or tell Claude what to do instead.
+When Claude wants to edit a file, it shows a side-by-side comparison of the original and proposed changes, then asks for permission. You can accept, reject, or tell Claude what to do instead. If you edit the proposed content directly in the diff view before accepting, Claude is told that you modified it so it does not assume the file matches its original proposal.
For more ideas on what you can do with Claude Code, see [Common workflows](</docs/en/common-workflows>).
@@ -107,7 +107,7 @@
Resume past conversations
-Click the dropdown at the top of the Claude Code panel to access your conversation history. You can search by keyword or browse by time (Today, Yesterday, Last 7 days, etc.). Click any conversation to resume it with the full message history. New sessions receive AI-generated titles based on your first message. Hover over a session to reveal rename and remove actions: rename to give it a descriptive title, or remove to delete it from the list. For more on resuming sessions, see [Common workflows](</docs/en/common-workflows#resume-previous-conversations>).
+Click the **Session history** button at the top of the Claude Code panel to access your conversation history. You can search by keyword or browse by time (Today, Yesterday, Last 7 days, etc.). Click any conversation to resume it with the full message history. New sessions receive AI-generated titles based on your first message. Hover over a session to reveal rename and remove actions: rename to give it a descriptive title, or remove to delete it from the list. For more on resuming sessions, see [Common workflows](</docs/en/common-workflows#resume-previous-conversations>).
###
@@ -119,9 +119,9 @@
1
-Open Past Conversations
-
-Click the **Past Conversations** dropdown at the top of the Claude Code panel.
+Open session history
+
+Click the **Session history** button at the top of the Claude Code panel.
2
--- a/web-quickstart.md
+++ b/web-quickstart.md
@@ -73,7 +73,7 @@
* **Name** : a display label. Useful when you have multiple environments for different projects or access levels.
* **Network access** : controls what the session can reach on the internet. The default, `Trusted`, allows connections to [common package registries](</docs/en/claude-code-on-the-web#default-allowed-domains>) like npm, PyPI, and RubyGems while blocking general internet access.
* **Environment variables** : optional variables available in every session, in `.env` format. Don’t wrap values in quotes, since quotes are stored as part of the value. These are visible to anyone who can edit this environment.
- * **Setup script** : an optional Bash script that runs before Claude Code launches when a new session is created. Use it to install system tools the cloud VM doesn’t include, like `apt install -y gh`, or to start services your project needs. See [Setup scripts](</docs/en/claude-code-on-the-web#setup-scripts>) for examples and debugging tips.
+ * **Setup script** : an optional Bash script that runs before Claude Code launches. Use it to install system tools the cloud VM doesn’t include, like `apt install -y gh`. The result is [cached](</docs/en/claude-code-on-the-web#environment-caching>), so the script doesn’t re-run on every session. See [Setup scripts](</docs/en/claude-code-on-the-web#setup-scripts>) for examples and debugging tips.
For a first project, leave the defaults and click **Create environment**. You can [edit it later or create additional environments](</docs/en/claude-code-on-the-web#configure-your-environment>) for different projects.