modified Escalate hard decisions with the advisor tool View current →
--- a/advisor.md +++ b/advisor.md @@ -88,11 +88,11 @@ Sonnet 5| Fable, Opus 4.7 or later, Sonnet 5| A Sonnet 4.6 advisor is rejected, and the API refuses an Opus 4.6 advisor Opus 4.6| Fable, Opus, Sonnet 5| A Sonnet 4.6 advisor is rejected Opus 4.7 or Opus 4.8| Fable, and Opus 4.7 or later| An Opus 4.6 or Sonnet advisor is rejected -Opus 5| Fable, Opus 5| An Opus 4.6 or Sonnet advisor is rejected, and the API refuses an Opus 4.7 or Opus 4.8 advisor +Opus 5.5 or Opus 5| Fable, and Opus 5 or later| An Opus 4.6 or Sonnet advisor is rejected, and the API refuses an Opus 4.7 or Opus 4.8 advisor Fable 5| Fable 5.1 or Fable 5| An Opus or Sonnet advisor is rejected Fable 5.1| Fable 5.1| An Opus or Sonnet advisor is rejected, and the API refuses a Fable 5 advisor -Fable 5.1 requires Claude Code v2.1.257 or later. Both Fable models require [Fable access](</docs/en/model-config#work-with-fable>). Set the advisor as `fable`, `opus`, or `sonnet`. These aliases resolve to Claude Code’s built-in default version for each model family, which advances with new Claude Code releases. You can also pass a full model ID such as `claude-opus-5`. Subagents inherit the configured advisor and apply the same pairing check against their own model. Claude Code validates the pairing before sending a request, and the API validates it again: +Fable 5.1 requires Claude Code v2.1.257 or later. Both Fable models require [Fable access](</docs/en/model-config#work-with-fable>). Set the advisor as `fable`, `opus`, or `sonnet`. These aliases resolve to Claude Code’s built-in default version for each model family, which advances with new Claude Code releases. You can also pass a full model ID such as `claude-opus-5-5`. Subagents inherit the configured advisor and apply the same pairing check against their own model. Claude Code validates the pairing before sending a request, and the API validates it again: * For an advisor the table lists as rejected, Claude Code doesn’t attach it to the main model’s requests. The `/advisor` command output and a notification show this. Subagents whose own model satisfies the pairing may still use the advisor. * For an advisor the table lists as refused by the API, Claude Code attaches it and the API refuses it. Claude Code then resends that request without the advisor, and the rest of the conversation runs without one, so you see no error and get no advisor calls. Pick an accepted advisor with `/advisor`; the change takes effect after `/clear` or `/compact` and in new sessions. @@ -173,7 +173,7 @@ The advisor tool requires all of the following: - * **Anthropic API only** : the advisor is a server-executed tool. It is not available on Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, or Microsoft Foundry. Through an [LLM gateway](</docs/en/llm-gateway>) configured with `ANTHROPIC_BASE_URL`, availability depends on whether the gateway forwards the request intact to the Anthropic API. + * **Anthropic API only** : the advisor is a server-executed tool. It is not available on Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, or Microsoft Foundry. Through an [LLM gateway](</docs/en/llm-gateway>) configured with `ANTHROPIC_BASE_URL`, availability depends on whether the gateway forwards the request intact to the Anthropic API. If the gateway or its upstream doesn’t recognize the advisor tool, see [Automatic retry and error forwarding](</docs/en/llm-gateway-protocol#automatic-retry-and-error-forwarding>) for how Claude Code responds. * **Supported main model** : Fable, Opus 4.6 or later, Sonnet 4.6 or later, or Haiku 4.5. See Choose an advisor model for which advisors each accepts. * **Feature-flag fetching** : Claude Code turns the advisor on through a feature flag it fetches from Anthropic. In a session where a variable that turns flag fetching off is set, such as `DISABLE_TELEMETRY`, the advisor stays off. See [Features that need feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>).
modified Claude Code on Amazon Bedrock View current →
--- a/amazon-bedrock.md +++ b/amazon-bedrock.md @@ -181,7 +181,7 @@ Pin specific model versions when deploying to multiple users. Without pinning, model aliases such as `sonnet` and `opus` resolve to Claude Code’s built-in default for Amazon Bedrock, which can lag the newest release and may not yet be available in your account. Claude Code falls back to an earlier or lower-tier model at startup when the default is unavailable, but pinning lets you control when your users move to a new model. -Set these environment variables to specific Amazon Bedrock model IDs. Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias on Amazon Bedrock resolves to Opus 5, and without `ANTHROPIC_DEFAULT_SONNET_MODEL`, the `sonnet` alias resolves to Sonnet 4.5. This example pins each alias to a specific version: +Set these environment variables to specific Amazon Bedrock model IDs. Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias on Amazon Bedrock resolves to Opus 5.5, and without `ANTHROPIC_DEFAULT_SONNET_MODEL`, the `sonnet` alias resolves to Sonnet 4.5. This example pins each alias to a specific version: export ANTHROPIC_DEFAULT_OPUS_MODEL='us.anthropic.claude-opus-4-8' export ANTHROPIC_DEFAULT_SONNET_MODEL='us.anthropic.claude-sonnet-4-6' @@ -192,13 +192,13 @@ You set| The `opus` alias resolves to ---|--- `ANTHROPIC_DEFAULT_OPUS_MODEL='us.anthropic.claude-opus-4-8'`| `us.anthropic.claude-opus-4-8`, the exact ID you pinned -`ANTHROPIC_BEDROCK_REGION_PREFIX=eu`| `eu.anthropic.claude-opus-5`, the built-in default with your preferred prefix +`ANTHROPIC_BEDROCK_REGION_PREFIX=eu`| `eu.anthropic.claude-opus-5-5`, the built-in default with your preferred prefix For current and legacy model IDs, see [Models overview](<https://platform.claude.com/docs/en/about-claude/models/overview>). For the full list of pinning environment variables, see [Model configuration](</docs/en/model-config#pin-models-for-third-party-deployments>). Claude Code uses these default models when no pinning variables are set: Model type| Default model ---|--- -Primary model| Opus 5, for example `us.anthropic.claude-opus-5` in a `us-*` region +Primary model| Opus 5.5, for example `us.anthropic.claude-opus-5-5` in a `us-*` region Small/fast model| Sonnet 4.5, for example `us.anthropic.claude-sonnet-4-5-20250929-v1:0` in a `us-*` region Background tasks such as session title generation use the small/fast model, normally a Haiku-class model. On Amazon Bedrock, Claude Code uses the default Sonnet model for background tasks because Haiku may not be enabled in every account or region. Two selections change which model carries them: @@ -208,7 +208,7 @@ Opus models have a higher per-token price than Sonnet models, so a deployment that doesn’t pin a primary model is billed at the Opus rate once it updates to v2.1.207 or later. To keep Sonnet 4.5 as the primary model, set `ANTHROPIC_MODEL` to its full model ID. A deployment that steers the default with `ANTHROPIC_DEFAULT_SONNET_MODEL` and doesn’t set `ANTHROPIC_DEFAULT_OPUS_MODEL` keeps its steered Sonnet model as the default. -On v2.1.207 through v2.1.218, the primary model on Amazon Bedrock defaulted to Opus 4.8 and the `opus` alias resolved to Opus 4.8. Before v2.1.207, the primary model defaulted to Sonnet 4.5, the `opus` alias resolved to Opus 4.6, and background tasks always used the primary model. To customize models further, use one of these methods: +Before v2.1.280, the primary model on Amazon Bedrock defaulted to Opus 5 and the `opus` alias resolved to Opus 5 from v2.1.219. On v2.1.207 through v2.1.218, the primary model on Amazon Bedrock defaulted to Opus 4.8 and the `opus` alias resolved to Opus 4.8. Before v2.1.207, the primary model defaulted to Sonnet 4.5, the `opus` alias resolved to Opus 4.6, and background tasks always used the primary model. To customize models further, use one of these methods: # Using inference profile ID export ANTHROPIC_MODEL='us.anthropic.claude-sonnet-4-6' @@ -274,7 +274,7 @@ export ANTHROPIC_BEDROCK_REGION_PREFIX=global # In a us-* region, the primary model now resolves to - # global.anthropic.claude-opus-5 instead of us.anthropic.claude-opus-5 + # global.anthropic.claude-opus-5-5 instead of us.anthropic.claude-opus-5-5 The preferred prefix is a preference, not a guarantee, whether it comes from your region or from the variable. How Claude Code applies it depends on whether it can check profile availability in your account:
modified Share session output as artifacts View current →
--- a/artifacts.md +++ b/artifacts.md @@ -318,6 +318,8 @@ Organization policy| Customer-managed encryption keys (CMEK), HIPAA, and [Zero Data Retention](</docs/en/zero-data-retention>) are not enabled for the organization. Surface| Claude Code CLI, or the Claude desktop app version 1.13576.0 or later. [Claude Tag](<https://claude.com/docs/claude-tag/overview>) sessions can also publish artifacts when both Claude Tag and artifacts are enabled for the organization. Off by default in [Agent SDK](</docs/en/agent-sdk/overview>), GitHub Action, and MCP-server contexts, and when [`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`](</docs/en/env-vars>) is set. +Whether artifacts are allowed for your organization comes from your organization’s policy, which Claude Code loads from `api.anthropic.com`. When Claude Code can’t load the policy, artifacts are unavailable. When you ask for one, Claude says why. If a proxy, VPN, or web filter is involved, ask your IT admin to let `api.anthropic.com` through. Claude Code keeps retrying in the background, and artifacts become available once the policy loads and allows them. + ## ​
modified Claude Code changelog View current →
Show diff (128 lines)
--- a/changelog.md +++ b/changelog.md @@ -1,4 +1,125 @@ 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.280 + +September 22, 2026 + + * Added Claude Opus 5.5 (`claude-opus-5-5`), now the default Opus model — 1M context, 4/4/4/20 per Mtok with $0.20/Mtok cache reads + * Added mouse support to more lists in fullscreen mode: the wheel scrolls the `/skills` list, and a skill’s state options in `/plugin` can be clicked + * Added `CLAUDE_CODE_MAX_MCP_DESCRIPTION_LENGTH` to change the 2,048-character cap on MCP tool descriptions and server instructions for every MCP server in the session + * Added hook output sizes and the number of oversized outputs saved to a file to the `hook_execution_complete` OpenTelemetry event + * Fixed writes through a symlinked path being judged by their in-tree spelling: the prompt names where the write lands, and `acceptEdits`, allow rules and auto mode no longer approve one landing outside + * Fixed auto mode retrying an action over and over when a safety check declined to review it; the action is now denied once, noting that retrying won’t help + * Fixed auto mode denying actions over and over without pause when a safety check gave no answer; retries now back off, and the turn stops with a message after ten in a row + * Fixed Write calls failing validation when a model sends `path`, `file_text`, `file_content` or a stray `description` instead of `file_path` and `content` + * Fixed Ctrl+C or Ctrl+D pressed twice in most dialogs (`/model`, `/effort`, `/config`, `/status`, `/usage`, `/plugin`, `/sandbox`, `/permissions`, `/artifacts`, `/mobile`, `/login`, `/upgrade`, `/usage-credits`, `/install-github-app`, `/setup-bedrock`, `/setup-vertex`) quitting Claude Code instead of closing the dialog + * Fixed a click that only brought the terminal window to the front also triggering the item under the pointer — in search pickers, tab bars, agent/workflow rows, slash-command links and suggestion dropdowns + * Fixed a stray `n` closing dialogs and a stray `y` confirming them; Enter and Esc accept and cancel (bind `y`/`n` to `confirm:yes`/`confirm:no` in `keybindings.json` to restore) + * Fixed text fields in dialogs losing a typed letter, digit or Space to a keybinding on that key + * Fixed the prompt line staying scrambled on Windows terminals after invisible characters were removed on Enter; the screen is now repainted so you review the exact text that will be sent + * Fixed the invisible-character cleanup removing the zero-width non-joiner that Persian and Arabic text uses to attach a suffix to a Latin word or number, such as the plural of “PDF” + * Fixed voice dictation not stopping on Ctrl+C (the prompt cleared but the microphone kept recording), Esc not cancelling while a transcript was processing, and held Space starting dictation from the transcript view and vim NORMAL mode + * Fixed a model switch made from a host app (Claude Desktop, VS Code, SDK) while Claude is working causing a prompt-cache miss on the next prompt + * Fixed resumed fork subagents rebuilding their tool list instead of re-sending the one they first used, which broke prompt caching for that agent + * Fixed subagent hand-back messages showing an internal provenance preamble when expanded outside verbose mode + * Fixed `installed_plugins.json` keeping the install-time commit after updating a plugin from a GitHub repository or git URL that tracks a branch or tag + * Fixed skills in `~/.claude/skills/` being moved to `~/.claude/skills/.trash/` when a `manifest.json` in that folder listed their names + * Fixed the session feedback survey showing no hover highlight on light and ANSI themes + * Fixed `/workflows` briefly showing a one-row list before opening the only run + * Fixed the mouse wheel not scrolling selection lists with hidden options (such as `/model` and `/permissions`) in fullscreen mode + * Fixed a skill you switched off showing the same red ✘ as a plugin that failed to load in `/plugin` and `/skills`; off now shows a dim ◯ + * Fixed multi-select option descriptions being indented under the option number instead of under the label + * Fixed the search box in `/plugin`, `/skills` and `/mcp` losing its right border in fullscreen mode + * Fixed `/mcp` showing △ in the server list but ⚠ in the detail view for the same server; the list, detail views and `/plugin` now all show ⚠ + * Fixed Home and End doing nothing in the `/config` settings list and in selection lists such as `/model`, `/memory` and permission prompts + * Fixed PgUp/PgDn in the `/skills` menu wrapping past the first or last skill instead of stopping there + * Fixed Tab silently changing the selected setting’s value in the `/config` list; it now does nothing there + * Fixed conversations failing on every turn with a “role ‘system’ must precede an ‘assistant’ message” API error + * Fixed conversations with the advisor on failing every turn with API Error 400 “Input tag ‘advisor_20260301’” behind a proxy or gateway that doesn’t support it; the request now retries without it + * Fixed a session failing on every turn and `/compact` when its saved history held a malformed notice about MCP tools that could not be loaded + * Fixed a crash when resuming a session whose saved transcript holds a malformed system message or a memory-saved notice without its file list + * Fixed one cause of long-running fullscreen sessions exiting with “Claude Code exited after an unrecoverable interface error”: a damaged cached message list is now rebuilt + * Fixed Claude Code hanging when a settings file, or a file it re-reads after an edit, is replaced by a named pipe mid-read + * Fixed `/config` crashing and some on/off preferences being misread when a preference that has moved to `settings.json` still holds a value like `null` or `"false"` in `~/.claude.json` + * Fixed resuming a session with unfinished background agents, shells or workflows starting a model turn on its own before you typed anything + * Fixed messages sent to a background subagent being silently lost in headless and SDK sessions when the subagent was finishing its turn + * Fixed a finished subagent’s report being lost when the conversation that launched it was compacted before the report was read + * Fixed background subagents being unable to use the LSP tool when an LSP plugin is active + * Fixed background shell tasks reporting benign non-zero exits (e.g. grep with no matches) as failures + * Fixed background sessions (`claude --bg`) being unable to run git, hooks, plugins and other helper programs when an environment variable handed to the session contained a NUL character + * Fixed Ctrl+C needing three or four presses to exit while background subagents are running; two presses now exit + * Fixed IDE selection being dropped when a sent prompt comes back into the input, such as pressing Esc to edit it, rewinding to it, or pressing Esc while startup hooks run + * Fixed a `!` shell-mode prompt stashed with Ctrl+S coming back as a plain prompt when restored, and `/` listing file paths right after stashing one + * Fixed `claude agents` showing a blank, unresponsive screen instead of an error when the temp directory is full, not writable or owned by another user + * Fixed an MCP server re-added under the same name after `claude mcp remove` still showing as needing authentication instead of reconnecting + * Fixed background plugin marketplace auto-update ignoring git credential helpers, so private-repo marketplaces were re-cloned every run or never updated + * Fixed `claude plugin update` clearing a plugin’s recorded commit and moving it to version “unknown” when the official marketplace’s snapshot file is a link or too large + * Fixed the Artifact tool silently disappearing when your organization’s policy can’t be loaded (for example behind a web proxy); Claude now says what’s blocking it + * Fixed artifact republishes silently resetting stored database access rules or dropping the viewer profile scope when that capability was re-sent without them; they are now refused + * Fixed `/ultrareview` reporting a stopped cloud review as completed or as an error to retry, and waiting out the full timeout when its session was deleted or the signed-in account changed + * Fixed the Claude app showing a missing or stale context usage figure for Remote Control and cloud sessions right after /compact or /clear + * Fixed the Claude app’s diff view for Remote Control and cloud sessions dropping a branch’s committed files whenever there are also uncommitted changes + * Fixed cloud and self-hosted runner sessions failing with “Authentication failed” after waiting out a long overload during which the session’s access token was rotated + * Fixed memory write conflicts in Cowork sessions showing Claude only the start and end of a memory file over about 10,800 characters, so the retried write dropped the middle + * Self-hosted runner: Fixed lifecycle-hook commits failing to sign under `--configure-git` + * Windows: Fixed background cleanup deleting a directory symlink or junction used to relocate `~/.claude/session-env`, `image-cache` or another cleaned-up folder + * Self-hosted runner: Fixed a turn that ended right at a `--retire-at` release losing its finished signal; the runner now briefly waits for the turn to be reported before stopping the session + * Reverted `ctrl+l` / `cmd+k` in fullscreen mode clearing the transcript view (added in 2.1.260); they redraw the screen again + * Improved `/permissions`: focus returns to the rule list after viewing, adding or deleting a rule, and the delete-rule and remove-directory confirmations now default to No + * Improved `/permissions` tab navigation: ←/→ and Tab pressed in a rule list now switch tabs without moving focus to the tab bar + * Improved `/cost` cache-miss causes to name thinking mode and thinking display changes + * Improved the Artifact tool so that when Claude cannot read an artifact link it was given, it tells the user before continuing + * Improved `/install-github-app`: the GitHub CLI check and repository selection steps now show “Esc to cancel” + * Improved the `/artifacts` and `/workflows` lists: a scrollbar at the right edge shows how much of a long list is hidden and where you are in it + * Improved the workflow progress tree: running agents and phases now show a dim dot instead of ⟳ + * Improved `/plugin`’s Add Marketplace form in fullscreen: it no longer draws a box inside the pane, and its text and key hints line up with the rest of `/plugin` + * Improved the `/workflows` detail view in fullscreen: it no longer draws a second horizontal rule under the pane’s divider + * Improved code blocks that don’t name a language: they are now colored like inline code, so commands stand out from the surrounding text + * Improved `/btw` asked while a tool is still running: the side question now knows that call is in progress instead of reading it as a failed one + * Improved the UserPromptSubmit hook timeout notice and the debug log to name which hook command timed out + * Improved `@` file suggestions: a file whose name contains the query now ranks above one that only matches across its folder names + * Improved artifact pages: no Print buttons, confirm dialogs or device features the viewer blocks, email and phone details shown as text, and dark mode that reaches form controls and scrollbars + * Improved `/ultrareview` uploads: renamed copies of key files, such as `id_rsa copy` or `kubeconfig (1).yaml`, now also stay on your machine + * Improved the cross-session messaging startup warning to explain that `--debug-file` writes a debug log to a path you choose + * Changed the default model on Pro and Team Standard plans from Sonnet to Opus, matching Max, Team Premium, and Enterprise + * Changed an effort level saved before `/effort` became per-model to no longer apply to newly released models such as Opus 5.5; they start at their default until you pick a level + * Changed Opus 4.7, Opus 4.8 and Fable 5 to stop holding their launch-default effort over `/effort` in `-p` or the Agent SDK, a project, managed or `--settings` `effortLevel`, or a per-model level + * Changed `/autocompact`’s footer hint to name ←/→, the keys that adjust other ordered values + * Changed `/fast`’s footer to name Space as the toggle key + * Self-hosted runner: Changed git in lifecycle hooks to ignore hook folders and programs named in the runner’s shared git files; local-path and `git://` remotes there now need `GIT_ALLOW_PROTOCOL` + * Changed plugin marketplaces whose name imitates a reserved marketplace name to be refused when added, and to stop loading if one was already added + * Changed `PermissionRequest` hooks: an agent-type hook no longer runs there, since its answer could never allow or deny the request; it now shows an error pointing to command or http hooks + * [VSCode] Added a Status dialog, with a typed `/status`, showing the session’s version, account, model and server details + * [VSCode] Added a Sandbox dialog for the sandbox mode, the unsandboxed fallback and excluded commands, opened from the panel menu or by typing `/sandbox` + * [VSCode] Added a Claude in Chrome dialog (extension status, the install, reconnect and permissions pages, the enabled-by-default setting), opened from the panel menu or by typing `/chrome` + * [VSCode] Added Export conversation, with a typed `/export`, to copy or save the conversation as plain text + * [VSCode] Added each skill’s source, token estimate and on/off state to the Slash commands dialog, with a click to change the state, and a typed `/skills` that opens it + * [VSCode] Added a typed `/plan` that switches to plan mode, sends a first planning prompt, or shows the session’s plan + * [VSCode] Improved pasted-text handling in the chat box: a paste over 800 characters or over 2 line breaks is now marked so Claude can tell it from what you typed + * [VSCode] Improved prompt handling in the chat box: invisible Unicode formatting and tag characters are removed from pasted text with a notice, and from anything else before it is sent + * [VSCode] Changed “Open in New Tab” to open Claude beside the editor group you are working in rather than after the last group + * [VSCode] Fixed the effort chip showing a stale saved effort level instead of the level the session runs at + * [VSCode] Fixed Claude Code never starting when the Python extension hangs while activating; it now starts after 60 seconds without the Python environment + * [VSCode] Fixed the plan approval card never offering auto mode: when auto mode is available, its first option is now “Yes, and use auto mode”, as in the terminal + * [VSCode] Fixed arrow-key navigation in the session list stopping after archiving or unarchiving a session from the keyboard + * [VSCode] Fixed paste marker lines showing in your own messages after reopening a session + * [Claude Code on the web] Changed the admin Routines on/off setting to live under Admin settings → Capabilities → Remote sessions; the Claude Code admin page now links to it + * [Claude Code on the web] Fixed `gh` and GitHub API calls inside a cloud session on a GitHub Enterprise Server repository failing after about eight hours; the token now renews automatically + * [Claude Code on the web] Fixed a routine that resumes an existing session running with its old prompt and name when it was edited moments before the scheduled run started + * [Claude Code on the web] Fixed file links in a cloud session transcript that point outside the session’s working directory opening a file card that never loads; they’re now disabled and say why + * [Claude Code on the web] Fixed auto mode refusing to retry a tool call because an approval prompt that expired unanswered, or was superseded by a newer message, had been recorded as your rejection + * [Claude Code on the web] Improved cloud sessions viewed in the Claude app: Claude now saves files meant for you where the app can open them + * [Claude Code on the web] Removed the empty repository picker shown when starting a session on a self-hosted environment in an organization where an admin has turned GitHub off + * [Claude Tag] Added Slack’s native Working indicator, Stop button and thread title to Claude’s threads in channels; the indicator stays up until Claude finishes, and Stop interrupts the task + * [Claude Tag] Added a short notice in the Slack channel when a guest joining, or the last guest leaving, changes how Claude responds there under a Restrict or Channel only guest setting + * [Claude Tag] Fixed scheduled routines silently failing to run in Slack workspaces that were connected to Claude before the workspace joined its Enterprise Grid + * [Claude Tag] Fixed Claude asking you to re-upload a Slack file when a brief file-scanning outage, not the file, was the problem; it now retries the scan and is told when the scanner is down + * [Claude Tag] Fixed a bullet in Claude’s Slack reply whose text starts with +, - or * rendering as an empty bullet with a stray nested item; it now shows as one bullet with the character kept + * [Claude Tag] Fixed the Slack notice for a failed cloud environment setup script sometimes being a generic “mention me to retry”; it now names the setup script and says to fix it first + * [Claude Tag] Improved the GitHub banner in Claude Tag admin settings to say why GitHub isn’t connected: not signed in, app not linked or not installed, sign-in expired, or SSO not authorized + * [Code Review] Improved the Code Review check run to say when REVIEW.md instructions were cut or left out of a review for exceeding a size limit, naming the file and the limit ​
modified Use Claude Code with Chrome View current →
--- a/chrome.md +++ b/chrome.md @@ -31,7 +31,7 @@ Before using Claude Code with Chrome, you need: * [Google Chrome](<https://www.google.com/chrome/>), [Microsoft Edge](<https://www.microsoft.com/edge>), or another Chromium-based browser such as Brave, Arc, Vivaldi, or Opera - * [Claude in Chrome extension](<https://chromewebstore.google.com/detail/claude/fcoeoabgfenejglbffodgkkbkcdhcgfn>) version 1.0.36 or higher, available in the Chrome Web Store + * [Claude in Chrome extension](<https://chromewebstore.google.com/detail/claude/fcoeoabgfenejglbffodgkkbkcdhcgfn>) version 1.0.36 or later, available in the Chrome Web Store * [Claude Code](</docs/en/quickstart#step-1-install-claude-code>) * A direct Anthropic plan (Pro, Max, Team, or Enterprise)
modified Use Claude Code features in the SDK View current →
--- a/claude-code-features.md +++ b/claude-code-features.md @@ -279,7 +279,7 @@ The Agent SDK gives you access to several ways to extend your agent’s behavior. If you’re unsure which to use, this table maps common goals to the right approach. -You want to…| Use| SDK surface +What you want to do| Use| SDK surface ---|---|--- Set project conventions your agent always follows| [CLAUDE.md](</docs/en/memory>)| `settingSources: ["project"]` loads it automatically Give the agent reference material it loads when relevant| [Skills](</docs/en/agent-sdk/skills>)| `settingSources` \+ `skills` option
modified Use Claude Code in the cloud View current →
--- a/claude-code-on-the-web.md +++ b/claude-code-on-the-web.md @@ -212,7 +212,7 @@ Cloud sessions support [built-in commands](</docs/en/commands>) that produce text output. Commands that only run in the terminal interface, such as `/plugin` or `/resume`, aren’t available. Commands that open a picker or panel in the terminal behave differently in cloud sessions: - * **`/model`, `/effort`, `/color`, and `/rename`**: pass the value as an argument, for example `/model sonnet`, instead of opening the terminal picker or slider. The argument forms require Claude Code v2.1.205 or later in the session’s environment and follow each command’s [availability notes](</docs/en/commands#all-commands>): `/effort` reports `Not applied` while a model’s [launch-default effort hold](</docs/en/model-config#adjust-effort-level>) is in force. + * **`/model`, `/effort`, `/color`, and `/rename`**: pass the value as an argument, for example `/model sonnet`, instead of opening the terminal picker or slider. The argument forms require Claude Code v2.1.205 or later in the session’s environment and follow each command’s [availability notes](</docs/en/commands#all-commands>). * **`/fast`** : toggles [fast mode](</docs/en/fast-mode#use-fast-mode-in-cloud-sessions>) for the session when fast mode is [available on your account](</docs/en/fast-mode#requirements>). Requires Claude Code v2.1.271 or later in the session’s environment. * **`/config`** : in your browser at claude.ai/code, opens the Claude Code section of your settings instead of setting a value, and text after the command, including `key=value`, is ignored. To change a setting for a cloud session, set an [environment variable](</docs/en/cloud-environments#set-environment-variables>) on the environment, or in a session with one repository, commit the key to that repository’s `.claude/settings.json`. [Settings in cloud sessions](</docs/en/settings#settings-in-cloud-sessions>) lists what each session reads.
modified Explore the .claude directory View current →
--- a/claude-directory.md +++ b/claude-directory.md @@ -82,6 +82,24 @@ `projects/<project>/memory/`| Global only| | Auto memory: Claude’s notes to itself across sessions| [Auto memory](</docs/en/memory#auto-memory>) `keybindings.json`| Global only| | Custom keyboard shortcuts| [Keybindings](</docs/en/keybindings>) `themes/*.json`| Global only| | Custom color themes| [Custom themes](</docs/en/terminal-config#create-a-custom-theme>) + +## + +​ + +Frontmatter fields by file + +Skills, command files, subagents, output styles, and rules read their configuration from YAML [frontmatter](</docs/en/glossary#frontmatter>) at the top of the file, and each accepts its own set of fields. This table lists the field names for each file and links to the reference that describes them. + +File| Frontmatter fields| Reference +---|---|--- +`skills/<name>/SKILL.md`| `name`, `description`, `when_to_use`, `argument-hint`, `arguments`, `disable-model-invocation`, `user-invocable`, `allowed-tools`, `disallowed-tools`, `model`, `effort`, `context`, `agent`, `background`, `hooks`, `paths`, `shell`, `metadata`, `license`, `compatibility`| [Skill frontmatter](</docs/en/skills#frontmatter-reference>) +`commands/*.md`| The skill fields except `name` and `paths`| [Skill frontmatter](</docs/en/skills#frontmatter-reference>) +`agents/*.md`| `name`, `description`, `tools`, `disallowedTools`, `model`, `permissionMode`, `maxTurns`, `skills`, `mcpServers`, `hooks`, `memory`, `background`, `effort`, `isolation`, `color`, `initialPrompt`, `omitClaudeMd`, `experimental`| [Subagent frontmatter](</docs/en/sub-agents#supported-frontmatter-fields>) +`output-styles/*.md`| `name`, `description`, `keep-coding-instructions`, `force-for-plugin`| [Output style frontmatter](</docs/en/output-styles#frontmatter>) +`rules/*.md`| `paths`| [Rule frontmatter](</docs/en/memory#rules-frontmatter-reference>) + +Agents shipped in a [plugin](</docs/en/plugins-reference#plugin-agent-frontmatter>) honor a subset of the subagent fields. ##
modified Claude Code on Claude Platform on AWS View current →
--- a/claude-platform-on-aws.md +++ b/claude-platform-on-aws.md @@ -66,7 +66,7 @@ 3\. Pin model versions -Claude Platform on AWS uses the same model IDs as the direct Claude API. The default aliases `fable`, `opus`, `sonnet`, and `haiku` resolve to Claude Code’s built-in defaults for Claude Platform on AWS, which can lag the newest release. Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias resolves to Opus 5. Before v2.1.219, it resolved to Opus 4.8, and before v2.1.207 to Opus 4.7. If you deploy Claude Code to a team, pin the model IDs explicitly so a new release doesn’t move everyone at once: +Claude Platform on AWS uses the same model IDs as the direct Claude API. The default aliases `fable`, `opus`, `sonnet`, and `haiku` resolve to Claude Code’s built-in defaults for Claude Platform on AWS, which can lag the newest release. Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias resolves to Opus 5.5. Before v2.1.280, it resolved to Opus 5 from v2.1.219, to Opus 4.8 from v2.1.207, and to Opus 4.7 before that. If you deploy Claude Code to a team, pin the model IDs explicitly so a new release doesn’t move everyone at once: export ANTHROPIC_DEFAULT_FABLE_MODEL=claude-fable-5 export ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-4-8
modified Commands View current →
--- a/commands.md +++ b/commands.md @@ -59,7 +59,7 @@ `/desktop`| Continue the current session in the Claude Code Desktop app. Requires macOS or x64 Windows and a Claude subscription. Alias: `/app` `/diff`| Review the changes in your working tree, including the edits Claude has made so far. See [Review changes with /diff](</docs/en/interactive-mode#review-changes-with-%2Fdiff>) `/doctor`| **[Skill](</docs/en/skills#bundled-skills>).** Run a setup checkup that diagnoses issues and can fix them. Checks installation health, including duplicate or leftover installs, `PATH` problems, and unparseable settings files. Finds unused skills, MCP servers, and plugins versus their context cost, flags slow [hooks](</docs/en/hooks>), and checks for a newer version on your [release channel](</docs/en/setup#configure-release-channel>). Deduplicates local `CLAUDE.md` files against checked-in ones, trims checked-in [`CLAUDE.md`](</docs/en/memory#my-claude-md-is-too-large>) files by cutting content Claude could derive from the codebase, and migrates the always-loaded guidance that remains into [skills](</docs/en/skills>) and nested `CLAUDE.md` files that load on demand. Also offers to make [auto mode](</docs/en/permissions#permission-modes>) your default and to [pre-approve](</docs/en/permissions>) frequently denied read-only commands. Reports findings first and asks for confirmation before changing anything. From the terminal, `claude doctor` prints read-only installation diagnostics without starting a session. Alias: `/checkup`. The `CLAUDE.md` trim check requires Claude Code v2.1.206 or later. Before v2.1.205, `/doctor` opened a read-only diagnostics screen and pressing `f` sent the report to Claude -`/effort [level|auto|status]`| Set the [effort level](</docs/en/model-config#adjust-effort-level>): `low` to `xhigh`, `max`, [`ultracode`](</docs/en/workflows#let-claude-decide-with-ultracode>), or `auto`; `status` prints it. `max` and `ultracode` are session-only; the [`ultracode`](</docs/en/settings-reference#ultracode>) key persists. Run it while Claude is responding and, once you confirm the [cache warning](</docs/en/prompt-caching#changing-effort-level>), if Claude Code shows one, Claude Code applies the new level to the next request in that turn. Before v2.1.242, Claude Code decided from a feature flag it fetched from Anthropic whether to run the command mid-turn or queue it until the turn finished, and always queued it in a session that doesn’t [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), such as on a [third-party provider](</docs/en/third-party-integrations>). Works in `-p` outside the [effort hold](</docs/en/model-config#adjust-effort-level>) +`/effort [level|auto|status]`| Set the [effort level](</docs/en/model-config#adjust-effort-level>): `low` to `xhigh`, `max`, [`ultracode`](</docs/en/workflows#let-claude-decide-with-ultracode>), or `auto`; `status` prints it. `max` and `ultracode` are session-only; the [`ultracode`](</docs/en/settings-reference#ultracode>) key persists. Run it while Claude is responding and, once you confirm the [cache warning](</docs/en/prompt-caching#changing-effort-level>), if Claude Code shows one, Claude Code applies the new level to the next request in that turn. Before v2.1.242, Claude Code decided from a feature flag it fetched from Anthropic whether to run the command mid-turn or queue it until the turn finished, and always queued it in a session that doesn’t [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), such as on a [third-party provider](</docs/en/third-party-integrations>). Works in `-p` `/exit`| Exit the CLI. In an attached [background session](</docs/en/agent-view#attach-to-a-session>), this detaches and the session keeps running. 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 `/fast [on|off]`| Toggle [fast mode](</docs/en/fast-mode>) on or off. Run it while Claude is responding and Claude Code toggles fast mode without waiting for the turn to end, though the running turn finishes at its original speed. Before v2.1.242, Claude Code decided from a feature flag it fetched from Anthropic whether to run the command mid-turn or queue it until the turn finished, and always queued it in a session that doesn’t [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>). Availability in non-interactive mode with `-p` is limited; see [Toggle fast mode](</docs/en/fast-mode#toggle-fast-mode>). Requires Claude Code v2.1.205 or later
modified Common workflows View current →
--- a/common-workflows.md +++ b/common-workflows.md @@ -307,7 +307,7 @@ 1. Drag and drop an image into the Claude Code window 2. Copy an image and paste it into the CLI with `Ctrl+V`, or with [`Alt+V` on Windows and WSL](</docs/en/interactive-mode#general-controls>) - 3. Provide an image path to Claude. E.g., “Analyze this image: /path/to/your/image.png” + 3. Provide an image path to Claude, for example “Analyze this image: /path/to/your/image.png” 2
modified Communications kit View current →
--- a/communications-kit.md +++ b/communications-kit.md @@ -219,9 +219,9 @@ *Fable* is the most capable model for your hardest, longest-running tasks; it is not the default, so select it with `/model fable`, and note that cybersecurity and - biology content falls back to Opus automatically. Opus 5 runs its own - checks, so flagged cybersecurity content switches models and flagged - biology content is refused. + biology content falls back to Opus automatically. Opus 5.5 and Opus 5 run + their own checks too: flagged content switches to an earlier Opus, except + that flagged biology content on Opus 5 is refused. *Try it now:* type `/model` and pick Sonnet if you haven't already. It is the right default for most tasks. @@ -231,7 +231,7 @@ Model| Best for ---|--- Fable| The hardest, longest-running tasks. Opt-in only: select it with `/model fable`. Cybersecurity or biology content triggers [automatic model fallback to Opus](</docs/en/model-config#automatic-model-fallback>) -Opus| Large-scale refactors, complex debugging, architecture decisions, high-stakes changes. On Opus 5, cybersecurity or biology content triggers [automatic model fallback or a refusal](</docs/en/model-config#automatic-model-fallback>) +Opus| Large-scale refactors, complex debugging, architecture decisions, high-stakes changes. On Opus 5.5 and Opus 5, cybersecurity or biology content triggers [automatic model fallback or a refusal](</docs/en/model-config#automatic-model-fallback>) Sonnet| Everyday feature work, bug fixes, tests, documentation, code review. Recommended default. Haiku| Quick questions, formatting, mechanical edits, rapid iteration
modified Manage costs effectively View current →
--- a/costs.md +++ b/costs.md @@ -267,7 +267,7 @@ Choose the right model -Sonnet handles most coding tasks well and costs less than Opus. Reserve Opus for complex architectural decisions or multi-step reasoning. Use `/model` to switch models mid-session, or set a default in `/config`. For simple subagent tasks, specify `model: haiku` in your [subagent configuration](</docs/en/sub-agents#choose-a-model>). +Sonnet handles most coding tasks well and costs less than Opus. Reserve Opus for complex architectural decisions or multi-step reasoning. Use `/model` to switch models mid-session, or set a default in `/config`. A switch to Opus also applies to the [subagents that inherit your session’s model](</docs/en/model-config#setting-your-model>). For simple subagent tasks, specify `model: haiku` in your [subagent configuration](</docs/en/sub-agents#choose-a-model>). ### @@ -349,7 +349,7 @@ Adjust extended thinking -Extended thinking is enabled by default because it significantly improves performance on complex planning and reasoning tasks. Thinking tokens are billed as output tokens, and the default budget can be tens of thousands of tokens per request depending on the model. For simpler tasks where deep reasoning isn’t needed, you can reduce costs by lowering the [effort level](</docs/en/model-config#adjust-effort-level>) with `/effort` or in `/model`, or by disabling thinking in `/config`. You can’t turn off thinking on Fable models, which always use extended thinking. On models with a [fixed thinking budget](</docs/en/model-config#adaptive-reasoning-and-fixed-thinking-budgets>), you can also lower the budget by setting the `MAX_THINKING_TOKENS` [environment variable](</docs/en/env-vars>), for example `MAX_THINKING_TOKENS=8000`. Adaptive-reasoning models ignore nonzero budgets, so use effort levels there instead. +Extended thinking is enabled by default because it significantly improves performance on complex planning and reasoning tasks. Thinking tokens are billed as output tokens, and the default budget can be tens of thousands of tokens per request depending on the model. For simpler tasks where deep reasoning isn’t needed, you can reduce costs by lowering the [effort level](</docs/en/model-config#adjust-effort-level>) with `/effort` or in `/model`, or by disabling thinking in `/config`. You can’t turn off thinking on Opus 5.5 or the Fable models, which always use extended thinking. On models with a [fixed thinking budget](</docs/en/model-config#adaptive-reasoning-and-fixed-thinking-budgets>), you can also lower the budget by setting the `MAX_THINKING_TOKENS` [environment variable](</docs/en/env-vars>), for example `MAX_THINKING_TOKENS=8000`. Adaptive-reasoning models ignore nonzero budgets, so use effort levels there instead. ###
modified Give Claude custom tools View current →
--- a/custom-tools.md +++ b/custom-tools.md @@ -6,7 +6,7 @@ Quick reference -If you want to…| Do this +What you want to do| Do this ---|--- Define a tool| Use [`@tool`](</docs/en/agent-sdk/python#tool>) (Python) or [`tool()`](</docs/en/agent-sdk/typescript#tool>) (TypeScript) with a name, description, schema, and handler. See Create a custom tool. Register a tool with Claude| Wrap in `create_sdk_mcp_server` / `createSdkMcpServer` and pass to `mcpServers` in `query()`. See Call a custom tool.
modified Desktop application View current →
--- a/desktop.md +++ b/desktop.md @@ -661,7 +661,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/model-config#extended-thinking>) is enabled by default, which improves performance on complex reasoning tasks but uses additional tokens. On the Anthropic API, set `MAX_THINKING_TOKENS` to `0` in the local environment editor to turn thinking off; this has no effect on Fable models, which always use extended thinking. With thinking turned off on the Anthropic API, Claude Code sends effort `high` instead of a higher level to models it knows [don’t accept that combination](</docs/en/errors#effort-isnt-available-with-thinking-turned-off>), such as Opus 5. On models with [adaptive reasoning](</docs/en/model-config#adjust-effort-level>), `MAX_THINKING_TOKENS` values other than `0` are 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; Fable models, Sonnet 5, and Opus 4.7 and later always use adaptive reasoning and have no fixed-budget mode. +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/model-config#extended-thinking>) is enabled by default, which improves performance on complex reasoning tasks but uses additional tokens. On the Anthropic API, set `MAX_THINKING_TOKENS` to `0` in the local environment editor to turn thinking off; this has no effect on Opus 5.5 or the Fable models, which always use extended thinking. With thinking turned off on the Anthropic API, Claude Code sends effort `high` instead of a higher level to models it knows [don’t accept that combination](</docs/en/errors#effort-isnt-available-with-thinking-turned-off>), such as Opus 5. On models with [adaptive reasoning](</docs/en/model-config#adjust-effort-level>), `MAX_THINKING_TOKENS` values other than `0` are 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; Fable models, Sonnet 5, and Opus 4.7 and later always use adaptive reasoning and have no fixed-budget mode. ####
modified Discover and install prebuilt plugins through marketplaces View current →
--- a/discover-plugins.md +++ b/discover-plugins.md @@ -318,7 +318,7 @@ To install without an interactive step, use the [`claude plugin install`](</docs/en/plugins-reference#plugin-install>) shell command, which installs to user scope unless you pass `--scope`. For a plugin with a [`command` source](</docs/en/plugin-marketplaces#how-users-accept-the-command>), pass `--yes` to accept the command it displays. You may also see plugins with **managed** scope. These are installed by administrators via [managed settings](</docs/en/managed-settings>) and can’t be modified. Claude Code looks the plugin up in its local copy of the marketplace catalog. How you name the plugin controls whether Claude Code refreshes that copy first: * **With a marketplace name** : when you install `plugin-name@marketplace-name`, in a session or with `claude plugin install`, Claude Code refreshes that marketplace before the lookup. Claude Code runs the refresh even if you turned off auto-update for the marketplace or set `DISABLE_AUTOUPDATER`. Before v2.1.232, Claude Code didn’t refresh the marketplace before the lookup. Claude Code skips this refresh when: - * The marketplace wasn’t added from GitHub, another Git host, or a remote URL. + * The marketplace wasn’t added from GitHub, another Git host, a remote URL, or claude.ai. * A [seed directory](</docs/en/plugin-marketplaces#pre-populate-plugins-for-containers>) supplies the marketplace. * Claude Code refreshed the marketplace within the last 30 seconds. * You set [`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`](</docs/en/env-vars>).
modified Environment variables View current →
--- a/env-vars.md +++ b/env-vars.md @@ -242,7 +242,7 @@ `CLAUDE_CODE_DISABLE_PERMISSION_PROMPT_NOTIFY_HOOKS`| Set to `1` to stop Claude Code from running your [`Notification` hooks for unanswered permission requests](</docs/en/hooks#notification>) in sessions where Claude Code sends them to the Agent SDK’s `canUseTool` callback, which is how Claude Desktop and the VS Code extension host Claude Code. Has no effect in terminal sessions. Requires Claude Code v2.1.233 or later `CLAUDE_CODE_DISABLE_POLICY_SKILLS`| Set to `1` to skip loading skills from the system-wide managed skills directory. Useful for container or CI sessions that should not load operator-provisioned skills `CLAUDE_CODE_DISABLE_TERMINAL_TITLE`| Set to `1` to disable automatic terminal title updates based on conversation context. This also skips the background small/fast-model request that [generates a session title](</docs/en/sessions#name-your-sessions>) -`CLAUDE_CODE_DISABLE_THINKING`| Set to `1` to omit the `thinking` parameter from API requests entirely. This is a compatibility option for proxies and gateways that reject the parameter. On models that think by default, omitting the parameter means the model may still think. To explicitly disable [extended thinking](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking>) on the Anthropic API, use `MAX_THINKING_TOKENS=0` instead. Neither variable turns thinking off on Fable models, which can’t have thinking turned off. On [third-party providers](</docs/en/third-party-integrations>), `MAX_THINKING_TOKENS=0` likewise omits the parameter, so the two variables behave the same there +`CLAUDE_CODE_DISABLE_THINKING`| Set to `1` to omit the `thinking` parameter from API requests entirely. This is a compatibility option for proxies and gateways that reject the parameter. On models that think by default, omitting the parameter means the model may still think. To explicitly disable [extended thinking](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking>) on the Anthropic API, use `MAX_THINKING_TOKENS=0` instead. Neither variable turns thinking off on Opus 5.5 or the Fable models, which can’t have thinking turned off. On [third-party providers](</docs/en/third-party-integrations>), `MAX_THINKING_TOKENS=0` likewise omits the parameter, so the two variables behave the same there `CLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENT`| Set to `1` to skip proactive [auto-compaction](</docs/en/costs#reduce-token-usage>) when Claude Code doesn’t recognize the model ID, such as an [LLM gateway](</docs/en/llm-gateway>) alias. Without this variable, Claude Code compacts at the context window it assumes for the ID. `CLAUDE_CODE_MAX_CONTEXT_TOKENS` can correct the assumed window instead; see [Correct the window for a gateway or custom model ID](</docs/en/model-config#correct-the-window-for-a-gateway-or-custom-model-id>) for when each variable applies. Requires Claude Code v2.1.223 or later `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_DISABLE_WINDOWS_SHELL_LAUNCHER`| Set to `1` to start [PowerShell tool](</docs/en/tools-reference#powershell-tool>) commands on Windows directly instead of through the `cmd.exe` launcher. By default, the launcher lets a PowerShell command [running in the background](</docs/en/tools-reference#background-commands>) [carry over to the session’s next process](</docs/en/agent-view#the-supervisor-process>), such as when you [background the session](</docs/en/agent-view#from-inside-a-session>). If you set the variable, a backgrounded PowerShell command stops when the session’s process exits. Bash commands aren’t affected. Requires Claude Code v2.1.269 or later @@ -281,6 +281,7 @@ `CLAUDE_CODE_IDE_SKIP_VALID_CHECK`| Set to `1` to skip validation of IDE lockfile entries during connection. Use when auto-connect fails to find your IDE despite it running `CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS`| How many [subagents](</docs/en/sub-agents#concurrent-subagent-limit>) can be running in one session before the Agent tool refuses to spawn another (default: 20). Accepts a positive whole number in plain digits; anything else is ignored, so the variable can adjust the cap but can’t disable it. Requires Claude Code v2.1.217 or later `CLAUDE_CODE_MAX_CONTEXT_TOKENS`| Override the context window size Claude Code assumes for the active model. As of v2.1.193, how it applies depends on how Claude Code resolves the model ID; see [Correct the window for a gateway or custom model ID](</docs/en/model-config#correct-the-window-for-a-gateway-or-custom-model-id>). Use this when routing to a model through `ANTHROPIC_BASE_URL` whose context window does not match the built-in size for its name +`CLAUDE_CODE_MAX_MCP_DESCRIPTION_LENGTH`| Maximum length in characters of each MCP tool description and each MCP server’s instructions that Claude Code sends to the model (default: 2048). Claude Code [truncates longer text](</docs/en/mcp#for-mcp-server-authors>). Accepts a positive whole number in plain digits. Anything else is ignored and the default applies. Requires Claude Code v2.1.280 or later `CLAUDE_CODE_MAX_OUTPUT_TOKENS`| Set the maximum number of output tokens for most requests. Defaults and caps vary by model; see [max output tokens](<https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison>). Claude Code defaults to 32000 for model IDs it doesn’t recognize, such as gateway-specific names, and lowers values above a model’s cap to the cap. Increasing this value reduces the effective context window available before [auto-compaction](</docs/en/costs#reduce-token-usage>) triggers `CLAUDE_CODE_MAX_RETRIES`| Override the number of times to retry failed API requests (default: 10). Capped at 15 as of v2.1.186; as of v2.1.199, `CLAUDE_CODE_RETRY_WATCHDOG` raises the default and removes the cap. For unattended sessions that need to wait through longer outages, set `CLAUDE_CODE_RETRY_WATCHDOG` instead `CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION`| Removed in v2.1.224 and now a no-op. Previously capped the total number of [subagents](</docs/en/sub-agents>) Claude could spawn with the Agent tool in one session (default: 200); spawning past the cap failed with `Subagent spawn limit reached`. The [concurrent subagent limit](</docs/en/sub-agents#concurrent-subagent-limit>) and the [depth limit](</docs/en/sub-agents#let-subagents-spawn-their-own-subagents>) still apply @@ -310,6 +311,7 @@ `CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE`| Set to `1` to let Claude Code run your package manager’s upgrade command in the background when a new version is available. Applies to Homebrew and WinGet installations. Other package managers continue to show the upgrade command without running it. See [Auto updates](</docs/en/setup#auto-updates>) `CLAUDE_CODE_PERFORCE_MODE`| Set to `1` to enable Perforce-aware write protection. When set, Edit, Write, and NotebookEdit fail with a `p4 edit <file>` hint if the target file lacks the owner-write bit, which Perforce clears on synced files until `p4 edit` opens them. This prevents Claude Code from bypassing Perforce change tracking `CLAUDE_CODE_PLUGIN_CACHE_DIR`| Override the plugins root directory. Despite the name, this sets the parent directory, not the cache itself: marketplaces and the plugin cache live in subdirectories under this path. Defaults to `~/.claude/plugins` +`CLAUDE_CODE_PLUGIN_DIRS`| Plugin directories to load for the session, each loaded the way a [`--plugin-dir`](</docs/en/plugins#test-your-plugins-locally>) flag loads it. Separate multiple paths with `:` on Unix or `;` on Windows. Give each path as an absolute path or start it with `~`, because Claude Code skips relative paths. Requires Claude Code v2.1.280 or later `CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS`| Timeout in milliseconds for git operations when installing or updating plugins (default: 120000). Increase this value for large repositories or slow network connections. See [Git operations time out](</docs/en/plugin-marketplaces#git-operations-time-out>) `CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE`| Set to `1` to skip the re-clone attempt and keep using the existing marketplace checkout when a marketplace refresh can’t reach or authenticate to the remote. Useful in offline or airgapped environments where re-cloning would fail the same way. See [Marketplace updates fail in offline environments](</docs/en/plugin-marketplaces#marketplace-updates-fail-in-offline-environments>) `CLAUDE_CODE_PLUGIN_PREFER_HTTPS`| Set to `1` to clone GitHub `owner/repo` shorthand sources over HTTPS instead of SSH. Applies to plugin install and update, and to `/plugin marketplace add` and `update`. Useful in CI runners, containers, or any environment without a configured SSH key for `github.com` @@ -429,7 +431,7 @@ `IS_DEMO`| Set to any non-empty value, such as `1`, to enable demo mode: hides your email and organization name from the header and `/status` output, and skips onboarding. **Setting it to`0` or `false` still enables demo mode**, unlike most on/off variables; unset the variable to turn it off. Useful when streaming or recording a session `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 attempts Claude Code allows when the model’s response fails validation against the [`--json-schema`](</docs/en/cli-reference#cli-flags>) in non-interactive mode with the `-p` flag; after that many failed attempts with no valid output, the run fails. The same cap applies when a [workflow](</docs/en/workflows>) subagent’s structured output fails validation. Defaults to 5, a first attempt plus four retries -`MAX_THINKING_TOKENS`| Fixed token budget for [extended thinking](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking>). Claude Code caps it at one token below the request’s max output tokens and never below 1,024. See `CLAUDE_CODE_MAX_OUTPUT_TOKENS` for how that limit is set. When unset and thinking is enabled, models with [adaptive reasoning](</docs/en/model-config#adjust-effort-level>) choose their own thinking depth, and other models use the cap. Set to `0` to disable thinking on the Anthropic API, except on Fable models, which can’t have thinking turned off. On [third-party providers](</docs/en/third-party-integrations>), `0` omits the `thinking` parameter instead. With thinking turned off on the Anthropic API, Claude Code sends effort `high` instead of a higher level to models it knows [don’t accept that combination](</docs/en/errors#effort-isnt-available-with-thinking-turned-off>), such as Opus 5. Claude Code ignores nonzero values on adaptive reasoning models, except on the models where `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` turns adaptive reasoning off +`MAX_THINKING_TOKENS`| Fixed token budget for [extended thinking](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking>). Claude Code caps it at one token below the request’s max output tokens and never below 1,024. See `CLAUDE_CODE_MAX_OUTPUT_TOKENS` for how that limit is set. When unset and thinking is enabled, models with [adaptive reasoning](</docs/en/model-config#adjust-effort-level>) choose their own thinking depth, and other models use the cap. Set to `0` to disable thinking on the Anthropic API, except on Opus 5.5 and the Fable models, which can’t have thinking turned off. On [third-party providers](</docs/en/third-party-integrations>), `0` omits the `thinking` parameter instead. With thinking turned off on the Anthropic API, Claude Code sends effort `high` instead of a higher level to models it knows [don’t accept that combination](</docs/en/errors#effort-isnt-available-with-thinking-turned-off>), such as Opus 5. Claude Code ignores nonzero values on adaptive reasoning models, except on the models where `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` turns adaptive reasoning off `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`| Controls whether startup waits for MCP servers to connect before the first query. MCP startup is non-blocking by default: servers connect in the background and their tools become available as they finish. Set to `0` to make Claude Code wait for servers to connect before the first query. Servers configured with [`alwaysLoad: true`](</docs/en/mcp#exempt-a-server-from-deferral>) still make startup wait regardless, except when served from the [discovery cache](</docs/en/mcp#server-status-detail>), since their tools must be present when the first prompt is built. In non-interactive mode (`-p`) without `--input-format stream-json`, Claude Code also waits for still-pending servers before the first turn regardless of this variable. When you pass [`--mcp-config`](</docs/en/cli-reference#cli-flags>) explicitly, the wait has a longer deadline; see that flag’s entry for the cached-server exception `MCP_CONNECT_TIMEOUT_MS`| How long blocking MCP startup waits, in milliseconds, for the connection batch before snapshotting the tool list (default: 5000). Applies when `MCP_CONNECTION_NONBLOCKING=0` or for servers marked [`alwaysLoad: true`](</docs/en/mcp#exempt-a-server-from-deferral>). Servers still pending at the deadline keep connecting in the background. Distinct from `MCP_TIMEOUT`, which bounds an individual server’s connect attempt @@ -473,6 +475,7 @@ `VERTEX_REGION_CLAUDE_4_6_SONNET`| Override region for Claude Sonnet 4.6 when using Google Cloud’s Agent Platform `VERTEX_REGION_CLAUDE_4_7_OPUS`| Override region for Claude Opus 4.7 when using Google Cloud’s Agent Platform `VERTEX_REGION_CLAUDE_4_8_OPUS`| Override region for Claude Opus 4.8 when using Google Cloud’s Agent Platform +`VERTEX_REGION_CLAUDE_5_5_OPUS`| Override region for Claude Opus 5.5 when using Google Cloud’s Agent Platform. Added in v2.1.280 `VERTEX_REGION_CLAUDE_5_OPUS`| Override region for Claude Opus 5 when using Google Cloud’s Agent Platform. Added in v2.1.219 `VERTEX_REGION_CLAUDE_5_SONNET`| Override region for Claude Sonnet 5 when using Google Cloud’s Agent Platform. Added in v2.1.197 `VERTEX_REGION_CLAUDE_FABLE_5`| Override region for Claude Fable 5 when using Google Cloud’s Agent Platform. Added in v2.1.170
modified Error reference View current →
--- a/errors.md +++ b/errors.md @@ -148,6 +148,7 @@ `<model> can't help with this. Start a new session to continue`| Request errors `Claude Code is unable to respond to this request, which appears to violate our Usage Policy`| Request errors `<model>'s safeguards flagged this message`| Request errors +`Opus 5.5's safeguards flagged this session`| Request errors `<model> has safety measures that flagged this message for a cybersecurity topic`| Request errors `Installation was killed before it could finish (exit code 137)`| Installation errors `The connection dropped while downloading the update`| Installation errors @@ -2013,9 +2014,9 @@ **What to do:** - * Run `claude update` and restart Claude Code. Opus 4.7 needs v2.1.111 or later. Opus 4.8 needs v2.1.154 or later. Sonnet 5 needs v2.1.197 or later. Opus 5 needs v2.1.219 or later + * Run `claude update` and restart Claude Code. Opus 4.7 needs v2.1.111 or later. Opus 4.8 needs v2.1.154 or later. Sonnet 5 needs v2.1.197 or later. Opus 5 needs v2.1.219 or later. Opus 5.5 needs v2.1.280 or later * If you can’t upgrade, run `/model` and select Opus 4.6 or Sonnet 4.6 instead - * If you hit this in the [Agent SDK](</docs/en/agent-sdk/overview>), upgrade the SDK package instead. Opus 4.8 needs TypeScript SDK v0.3.154 or later and Python SDK v0.2.88 or later. Sonnet 5 needs TypeScript SDK v0.3.197 or later. Opus 5 needs TypeScript SDK v0.3.219 or later + * If you hit this in the [Agent SDK](</docs/en/agent-sdk/overview>), upgrade the SDK package instead. Opus 4.8 needs TypeScript SDK v0.3.154 or later and Python SDK v0.2.88 or later. Sonnet 5 needs TypeScript SDK v0.3.197 or later. Opus 5 needs TypeScript SDK v0.3.219 or later. Opus 5.5 needs TypeScript SDK v0.3.280 or later ### @@ -2111,7 +2112,7 @@ API Error: Opus 4.8's safeguards flagged this message. Our intentionally broad safeguards allow us to deliver more capabilities faster, but can sometimes flag legitimate cybersecurity work. Apply to the Cyber Verification Program to reduce these interruptions. Send feedback with /feedback or learn more: https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude -The message links to the [Cyber Verification Program](<https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude>), which grants access for legitimate cybersecurity work. On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), and [Microsoft Foundry](</docs/en/microsoft-foundry>), a cybersecurity flag produces the Usage Policy refusal message instead. The safeguard itself is server-side and predates v2.1.203; client releases since then have changed only the message’s wording. From v2.1.203 through v2.1.218, the message read `<model> has safety measures that flagged this message for a cybersecurity topic. To learn about the Cyber Verification Program and apply for access, visit our help center:` followed by the same help-center link, and interactive sessions appended `If you were not engaging in a cybersecurity topic, please send feedback via /feedback.` Before v2.1.203, it read `<model>'s safeguards flagged this message for a cybersecurity topic. If your work requires this access, you can apply for an exemption:` followed by an exemption form link. **What to do:** +The message links to the [Cyber Verification Program](<https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude>), which grants access for legitimate cybersecurity work. On Opus 5.5, which requires v2.1.280 or later, the message opens with `Opus 5.5's safeguards flagged this session` instead. When the flagged category has a fallback model available, Claude Code [switches models](</docs/en/model-config#automatic-model-fallback>) rather than showing this error. On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), and [Microsoft Foundry](</docs/en/microsoft-foundry>), a cybersecurity flag produces the Usage Policy refusal message instead. The safeguard itself is server-side and predates v2.1.203; client releases since then have changed only the message’s wording. From v2.1.203 through v2.1.218, the message read `<model> has safety measures that flagged this message for a cybersecurity topic. To learn about the Cyber Verification Program and apply for access, visit our help center:` followed by the same help-center link, and interactive sessions appended `If you were not engaging in a cybersecurity topic, please send feedback via /feedback.` Before v2.1.203, it read `<model>'s safeguards flagged this message for a cybersecurity topic. If your work requires this access, you can apply for an exemption:` followed by an exemption form link. **What to do:** * If your work requires this content, apply for access through the [Cyber Verification Program](<https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude>) * If your request wasn’t about a cybersecurity topic, run `/feedback` to report the false positive @@ -3050,6 +3051,7 @@ The plugin’s [marketplace entry](</docs/en/plugin-marketplaces#plugin-entries>) declares a source path that Claude Code can’t resolve to a location inside the marketplace’s own directory, so the plugin doesn’t install or load. The refusal covers: * An entry path that is absolute, climbs out of the marketplace with `..`, or is spelled like a network path + * On macOS and Linux, an entry path that contains a backslash anywhere after the leading `./` * An entry in a marketplace fetched from a remote source, such as git or a URL, that reaches its target through a symlink resolving outside the marketplace directory * A relative entry in a marketplace added from a direct URL to its `marketplace.json`: Claude Code downloads only that file, so no local plugin files exist for the path to name. See [Plugins with relative paths fail in URL-based marketplaces](</docs/en/plugin-marketplaces#plugins-with-relative-paths-fail-in-url-based-marketplaces>) @@ -3063,7 +3065,7 @@ **What to do:** - * If you maintain the marketplace, write the entry’s `source` as a plain relative path such as `./plugins/my-plugin`, and keep any symlink it crosses pointed inside the marketplace directory + * If you maintain the marketplace, write the entry’s `source` as a plain relative path with forward slashes, such as `./plugins/my-plugin`, and keep any symlink it crosses pointed inside the marketplace directory * If you added the marketplace from a direct URL, relative entries can’t resolve. Ask the marketplace author to use [another plugin source](</docs/en/plugin-marketplaces#plugin-sources>), or add the marketplace from its git repository instead ### @@ -3128,7 +3130,7 @@ * Correct each entry the error names against the [tools available to subagents](</docs/en/sub-agents#available-tools>) * Remove entries for tools the session doesn’t have, such as MCP tools from a server that isn’t connected - * For a tool that [background subagents drop](</docs/en/sub-agents#available-tools>), such as `LSP`, remove the entry. To keep the tool, [turn fork mode off](</docs/en/sub-agents#turn-fork-mode-on-or-off>) and ask Claude to run the subagent in the foreground + * For a tool that [background subagents drop](</docs/en/sub-agents#available-tools>), such as `CronCreate`, remove the entry. To keep the tool, [turn fork mode off](</docs/en/sub-agents#turn-fork-mode-on-or-off>) and ask Claude to run the subagent in the foreground * Delete the `tools` field instead of listing tools to give the subagent every [tool available to subagents](</docs/en/sub-agents#available-tools>) * For a `tools` list that contains only `Agent`, raise the [depth limit](</docs/en/sub-agents#let-subagents-spawn-their-own-subagents>) or give the agent at least one other tool: Claude Code withholds `Agent` at that limit, so a list with nothing else in it resolves to no tools @@ -4245,7 +4247,7 @@ * A configured [`--fallback-model`](</docs/en/cli-reference#cli-flags>) takes over after an availability error, for that turn only, with a notice in the transcript * An Amazon Bedrock or Google Cloud’s Agent Platform startup check finds your default model unavailable - * [Automatic model fallback](</docs/en/model-config#automatic-model-fallback>) on Fable 5.1, Fable 5, and Opus 5 moves the session to the flagged category’s fallback model, when that category has one, and shows a notice in the transcript + * [Automatic model fallback](</docs/en/model-config#automatic-model-fallback>) on Fable 5.1, Fable 5, Opus 5.5, and Opus 5 moves the session to the flagged category’s fallback model, when that category has one, and shows a notice in the transcript The Model selection check below catches the second and third cases; the first appears as a transcript notice rather than a `/model` change. [Model configuration](</docs/en/model-config>) explains when each fallback applies. Check these first:
modified Speed up responses with fast mode View current →
--- a/fast-mode.md +++ b/fast-mode.md @@ -1,9 +1,9 @@ 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, making the model up to 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 Claude Opus with a different API configuration that prioritizes speed over cost efficiency. You get identical quality and capabilities with faster responses. Fast mode is supported on Opus 5 and Opus 4.8. It is not available on Sonnet, Haiku, or other models. Opus 4.7 doesn’t support fast mode, so switching to it turns fast mode off. Fast mode for Opus 4.7 was deprecated on June 25, 2026, and removed on July 24, 2026. What to know: +Fast mode is a high-speed configuration for Claude Opus, making the model up to 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 Claude Opus with a different API configuration that prioritizes speed over cost efficiency. You get identical quality and capabilities with faster responses. Fast mode is supported on Opus 5.5, Opus 5, and Opus 4.8. It is not available on Sonnet, Haiku, or other models. Opus 4.7 doesn’t support fast mode, so switching to it turns fast mode off. Fast mode for Opus 4.7 was deprecated on June 25, 2026, and removed on July 24, 2026. What to know: * Use `/fast` to toggle on fast mode in the Claude Code CLI. The [VS Code extension](</docs/en/vs-code>) offers a **Toggle fast mode** command when the selected model supports fast mode. Claude Code saves that toggle to your `fastMode` setting. - * Fast mode pricing per MTok input/output is $10/$50 on Opus 5 and Opus 4.8. + * Fast mode pricing per MTok input/output is $8/$40 on Opus 5.5 and $10/$50 on Opus 5 and Opus 4.8. * Available to Claude Code users on subscription plans (Pro/Max/Team/Enterprise) and on Claude Console. Team and Enterprise organizations need an Owner to enable it first, and Console organizations need access provisioned first, both described under Requirements. * For Claude Code users on subscription plans (Pro/Max/Team/Enterprise), fast mode is available via usage credits only and not included in the subscription rate limits. @@ -15,7 +15,7 @@ In the CLI, toggle fast mode in either of these ways: - * Type `/fast` and press Tab to toggle on or off + * Run `/fast`, press Space to toggle on or off, then press Enter to confirm * Set `"fastMode": true` in your [user settings file](</docs/en/settings>) By default, fast mode you turn on in an interactive session persists across sessions. You can configure fast mode to reset each session. See require per-session opt-in for details. Outside a cloud session, in [non-interactive mode](</docs/en/headless>) with the `-p` flag, `/fast` works only in a session launched with fast mode in its [`--settings`](</docs/en/cli-reference#cli-flags>) value, for example `claude -p --settings '{"fastMode": true}'`; the toggle then applies to that session only and isn’t saved as your default. The `-p` form requires Claude Code v2.1.205 or later. Elsewhere in non-interactive mode, the command reports that fast mode isn’t available. You can run `/fast` while Claude is working, and Claude Code toggles fast mode without waiting for the turn to end. Claude Code finishes the running turn at its original speed, so the speed change takes effect from your next turn. If your current model doesn’t support fast mode, turning it on also switches your model, and Claude Code uses the new model from its next request in that turn. For the best cost efficiency, enable fast mode at the start of a session rather than switching mid-conversation. See understand the cost tradeoff for details. When you enable fast mode: @@ -25,7 +25,7 @@ * A small `↯` icon appears next to the prompt while fast mode is active * Run `/fast` again at any time to check whether fast mode is on or off -Opus 5 is the fast mode default in Claude Code v2.1.219 and later. Before v2.1.219, fast mode defaulted to Opus 4.8 on v2.1.154 through v2.1.218, and to Opus 4.7 on v2.1.142 through v2.1.153. When you disable fast mode with `/fast` again, you remain on Opus. To switch to a different model, use `/model`. +Opus 5.5 is the fast mode default in Claude Code v2.1.280 and later. Before v2.1.280, fast mode defaulted to Opus 5 from v2.1.219, to Opus 4.8 on v2.1.154 through v2.1.218, and to Opus 4.7 on v2.1.142 through v2.1.153. When you disable fast mode with `/fast` again, you remain on Opus. To switch to a different model, use `/model`. ### @@ -58,6 +58,7 @@ Model| Input (MTok)| Output (MTok) ---|---|--- +Opus 5.5| $8| $40 Opus 5| $10| $50 Opus 4.8| $10| $50
modified Extend Claude Code View current →
--- a/features-overview.md +++ b/features-overview.md @@ -13,6 +13,7 @@ Extensions plug into different parts of the agentic loop: * **[CLAUDE.md](</docs/en/memory>)** adds persistent context Claude sees every session + * **[Output styles](</docs/en/output-styles>)** set Claude’s role, tone, and response format for every response in a session * **[Skills](</docs/en/skills>)** add reusable knowledge and invocable workflows * **[Code intelligence](</docs/en/tools-reference#lsp-tool-behavior>)** connects Claude to a language server for symbol-level navigation and live type errors * **[MCP](</docs/en/mcp>)** connects Claude to external services and tools @@ -35,6 +36,7 @@ Feature| What it does| When to use it| Example ---|---|---|--- **CLAUDE.md**| Persistent context loaded every conversation| Project conventions, “always do X” rules| ”Use pnpm, not npm. Run tests before committing.” +**[Output style](</docs/en/output-styles>)**| Instructions that set Claude’s role, tone, and response format for a whole session| A voice, length, or format you want in every response, or Claude working as something other than a software engineer| The built-in Concise style for shorter responses; a custom style that answers every question with a diagram first **Skill**| Instructions, knowledge, and workflows Claude can use| Reusable content, reference docs, repeatable tasks| `/deploy` runs your deployment checklist; API docs skill with endpoint patterns **Subagent**| Isolated execution context that returns summarized results| Context isolation, parallel tasks, specialized workers| Research task that reads many files but returns only key findings **[Dynamic workflow](</docs/en/workflows>)**| Script Claude writes that runs many subagents in the background| Work that outgrows a handful of subagents, or findings you want cross-checked| Audit a whole codebase, with a second set of agents verifying each finding @@ -57,6 +59,7 @@ Trigger| Add ---|--- Claude gets a convention or command wrong twice| Add it to [CLAUDE.md](</docs/en/memory>) +You keep asking Claude to be shorter, explain more, or answer in the same format| Set an [output style](</docs/en/output-styles>) You keep typing the same prompt to start a task| Save it as a user-invocable [skill](</docs/en/skills>) You paste the same playbook or multi-step procedure into chat for the third time| Capture it as a [skill](</docs/en/skills>) You keep copying data from a browser tab Claude can’t see| Connect that system as an [MCP server](</docs/en/mcp>) @@ -79,6 +82,8 @@ * CLAUDE.md vs Skill + * CLAUDE.md vs Output style + * CLAUDE.md vs Rules vs Skills * Subagent vs Dynamic workflow @@ -111,6 +116,16 @@ **Best for**| ”Always do X” rules| Reference material, invocable workflows **Put it in CLAUDE.md** if Claude should always know it: coding conventions, build commands, project structure, “never do X” rules.**Put it in a skill** if it’s reference material Claude needs sometimes (API docs, style guides) or a workflow you trigger with `/<name>` (deploy, review, release).**Rule of thumb:** Keep CLAUDE.md under 200 lines. If it’s growing, move reference content to skills or split into [`.claude/rules/`](</docs/en/memory#organize-rules-with-claude/rules/>) files. + +Both give Claude standing instructions. CLAUDE.md carries what Claude should know, and an output style sets how Claude responds. + +Aspect| CLAUDE.md| Output style +---|---|--- +**Holds**| Facts and rules about your project| A role, tone, and response format +**Switching**| Always loaded| One active at a time; [switch styles](</docs/en/output-styles#change-your-output-style>) whenever you want +**Best for**| Build commands, conventions, “never do X” rules| Shorter responses, explanations alongside code, a non-engineering role + +**Put it in CLAUDE.md** if it’s true of the project whatever style you’re in: coding conventions, build commands, project structure.**Use an output style** if it’s about the response itself and you might want it off again: length, format, how much Claude explains, or a different role such as a writing assistant. Claude Code includes [built-in styles](</docs/en/output-styles#built-in-output-styles>), and you can write your own.**They combine.** CLAUDE.md stays loaded whichever style you pick. Claude follows both as instructions, so neither is enforced. For anything that has to happen every time, use a [hook](</docs/en/hooks-guide>). All three store instructions, but they load differently: @@ -198,6 +213,7 @@ Feature| When it loads| What loads| Context cost ---|---|---|--- **CLAUDE.md**| Session start| Full content| Every request +**Output styles**| Session start, and again when you switch styles| The active style’s full instructions; nothing for the Default style| Every request **Skills**| Session start + when used| Descriptions at start, full content when used| Low (descriptions every request)* **MCP servers**| Session start| Tool names; full schemas on demand| Low until a tool is used **Code intelligence**| After file edits and on demand| Diagnostics after edits; symbol locations on lookup| Low; reduces file reads elsewhere
modified Fullscreen rendering View current →
--- a/fullscreen.md +++ b/fullscreen.md @@ -192,7 +192,7 @@ Clear the conversation -Run `/clear` to start a new conversation. To clear the screen and keep the conversation, press `Ctrl+L`. The earlier messages scroll up out of view, and you can scroll back with `PgUp` or the mouse wheel to read them again. Before v2.1.260, `Ctrl+L` redrew the screen without clearing it. Before v2.1.238, pressing it twice within two seconds ran `/clear`. `Cmd+K` does the same as `Ctrl+L` when your terminal passes it through to Claude Code. iTerm2 and Terminal.app handle `Cmd+K` themselves, and Claude Code redraws the conversation instead of clearing it, so press `Ctrl+L` on those terminals. +Run `/clear` to start a new conversation. If the display looks garbled or partially blank, press `Ctrl+L` to redraw the screen. The redraw keeps the conversation and your input in place. `Cmd+K` does the same as `Ctrl+L` when your terminal passes it through to Claude Code. iTerm2 and Terminal.app handle `Cmd+K` themselves and clear their own screen, and Claude Code detects the cleared screen and repaints the conversation. Before v2.1.280, starting with v2.1.260, pressing `Ctrl+L`, or `Cmd+K` where it reaches Claude Code, cleared the screen in fullscreen rendering. Before v2.1.238, pressing `Ctrl+L` twice within two seconds ran `/clear`. ##
modified Claude Code GitHub Actions View current →
--- a/github-actions.md +++ b/github-actions.md @@ -283,7 +283,7 @@ anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} prompt: "Generate a summary of yesterday's commits and open issues" claude_args: | - --model claude-opus-4-8 + --model claude-opus-5-5 --allowedTools "mcp__github__list_commits,mcp__github__list_issues" ##
modified Glossary View current →
--- a/glossary.md +++ b/glossary.md @@ -205,6 +205,20 @@ Extended thinking Visible step-by-step reasoning the model performs before responding. You can adjust it with the effort level, or cap thinking tokens with `MAX_THINKING_TOKENS` on models with a fixed thinking budget. Thinking appears in gray italic text in the terminal. Learn more: [Use extended thinking](</docs/en/model-config#extended-thinking>) + +## + +​ + +F + +### + +​ + +Frontmatter + +A block of YAML settings at the very top of a Markdown file, between an opening `---` line and a closing `---` line. Skills, subagents, output styles, and rules each read their configuration from frontmatter, such as a skill’s `description` or a subagent’s `tools`, and treat everything after the closing `---` as the instructions. The opening `---` must be the file’s first line. Each file type accepts its own set of fields. Learn more: [Skill frontmatter](</docs/en/skills#frontmatter-reference>), [Subagent frontmatter](</docs/en/sub-agents#supported-frontmatter-fields>), [Output style frontmatter](</docs/en/output-styles#frontmatter>), [Rule frontmatter](</docs/en/memory#rules-frontmatter-reference>) ##
modified Claude Code on Google Cloud's Agent Platform View current →
--- a/google-vertex-ai.md +++ b/google-vertex-ai.md @@ -154,7 +154,7 @@ Pin specific model versions when deploying to multiple users. Without pinning, model aliases such as `sonnet` and `opus` resolve to Claude Code’s built-in default for Google Cloud’s Agent Platform, which can lag the newest release and may not yet be enabled in your project. Claude Code falls back to an earlier or lower-tier model at startup when the default is unavailable, but pinning lets you control when your users move to a new model. -Set these environment variables to specific Google Cloud’s Agent Platform model IDs. Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias on Google Cloud’s Agent Platform resolves to Opus 5, and without `ANTHROPIC_DEFAULT_SONNET_MODEL`, the `sonnet` alias resolves to Sonnet 4.5. This example pins each alias to a specific version: +Set these environment variables to specific Google Cloud’s Agent Platform model IDs. Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias on Google Cloud’s Agent Platform resolves to Opus 5.5, and without `ANTHROPIC_DEFAULT_SONNET_MODEL`, the `sonnet` alias resolves to Sonnet 4.5. This example pins each alias to a specific version: export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-8' export ANTHROPIC_DEFAULT_SONNET_MODEL='claude-sonnet-5' @@ -164,7 +164,7 @@ Model type| Default value ---|--- -Primary model| `claude-opus-5` +Primary model| `claude-opus-5-5` Small/fast model| `claude-sonnet-4-5@20250929` Background tasks such as session title generation use the small/fast model, normally a Haiku-class model. On Google Cloud’s Agent Platform, Claude Code uses the default Sonnet model for background tasks because Haiku may not be enabled in every project or region. Two selections change which model carries them: @@ -174,7 +174,7 @@ Opus models have a higher per-token price than Sonnet models, so a deployment that doesn’t pin a primary model is billed at the Opus rate once it updates to v2.1.207 or later. To keep Sonnet 4.5 as the primary model, set `ANTHROPIC_MODEL` to its full model ID. A deployment that steers the default with `ANTHROPIC_DEFAULT_SONNET_MODEL` and doesn’t set `ANTHROPIC_DEFAULT_OPUS_MODEL` keeps its steered Sonnet model as the default. -On v2.1.207 through v2.1.218, the primary model on Google Cloud’s Agent Platform defaulted to Opus 4.8 and the `opus` alias resolved to Opus 4.8. Before v2.1.207, the primary model defaulted to Sonnet 4.5, the `opus` alias resolved to Opus 4.6, and background tasks always used the primary model. To customize models further: +Before v2.1.280, the primary model on Google Cloud’s Agent Platform defaulted to Opus 5 and the `opus` alias resolved to Opus 5 from v2.1.219. On v2.1.207 through v2.1.218, the primary model on Google Cloud’s Agent Platform defaulted to Opus 4.8 and the `opus` alias resolved to Opus 4.8. Before v2.1.207, the primary model defaulted to Sonnet 4.5, the `opus` alias resolved to Opus 4.6, and background tasks always used the primary model. To customize models further: export ANTHROPIC_MODEL='claude-opus-4-8' export ANTHROPIC_DEFAULT_HAIKU_MODEL='claude-haiku-4-5@20251001'
modified Interactive mode View current →
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -18,7 +18,7 @@ `Ctrl+X Ctrl+K`| Stop all running [background subagents](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) in this session, and turn off [artifact auto-replies](</docs/en/artifacts#let-claude-reply-to-comments-on-its-own>) for the rest of it. Press twice within 3 seconds to confirm| Subagent control `Ctrl+D`| Exit Claude Code session| The first press shows a confirmation hint and a second press within 800ms exits. When the prompt has text, `Ctrl+D` deletes the character after the cursor instead `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; Claude Code strips the comment block when you save -`Ctrl+L`| Redraw or clear the screen| Forces a full terminal redraw, keeping input and conversation history. Use this to recover if the display becomes garbled or partially blank. In [fullscreen rendering](</docs/en/fullscreen#clear-the-conversation>), it also clears the screen, and you can scroll up to see the earlier messages +`Ctrl+L`| Redraw the screen| Forces a full terminal redraw, keeping input and conversation history. Use this to recover if the display becomes garbled or partially blank. See [Clear the conversation](</docs/en/fullscreen#clear-the-conversation>) for fullscreen rendering `Ctrl+O`| Toggle transcript viewer| Shows detailed tool usage and execution, with a timestamp and the model used on each assistant message. Also expands lines that collapse by default, such as MCP calls, shown as a single `Called slack 3 times` line, and [messages from your other sessions](</docs/en/cross-session-messaging#what-a-message-looks-like>), shown as a one-line `Message from @<sender>` preview `Ctrl+R`| Reverse search command history| Search through previous commands interactively `Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows and WSL)| Paste image from clipboard| Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt. On WSL, both `Ctrl+V` and `Alt+V` are bound; use `Alt+V` if your terminal intercepts `Ctrl+V` @@ -34,7 +34,7 @@ `Ctrl+Enter` or `Ctrl+X Ctrl+S`| Send queued messages now| Interrupts the current turn so your queued messages, and your draft with them, go out right away instead of when the turn ends. In shell mode, the key queues your command without interrupting. In terminals that don’t report extended keys, `Ctrl+Enter` arrives as plain `Enter`; `Ctrl+X Ctrl+S` works in any terminal. Requires Claude Code v2.1.275 or later `Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn’t enable VT input mode| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and, when available, `bypassPermissions` and then `auto`. From `auto`, the first press switches to `default`. See [permission modes](</docs/en/permission-modes>). On a file permission prompt, the same key closes an open [comment field](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>). With no field open, it selects the option that allows the action for the rest of the session, when the prompt offers that option `Option+P` (macOS) or `Alt+P` (Windows/Linux)| Switch model| Switch models without clearing your prompt -`Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Fable 5.1 or Fable 5, which always use extended thinking. Works on macOS without configuring Option as Meta +`Option+T` (macOS) or `Alt+T` (Windows/Linux)| Toggle extended thinking| Enable or disable extended thinking mode. Has no effect on Opus 5.5 or the Fable models, which always use extended thinking. Works on macOS without configuring Option as Meta `Option+O` (macOS) or `Alt+O` (Windows/Linux)| Toggle fast mode| Enable or disable [fast mode](</docs/en/fast-mode>) ###
modified Customize keyboard shortcuts View current →
--- a/keybindings.md +++ b/keybindings.md @@ -116,7 +116,7 @@ Action| Default| Description ---|---|--- `chat:cancel`| Escape| Cancel current input -`chat:clearInput`| Ctrl+L| Force a full screen redraw, preserving input and conversation. In [fullscreen rendering](</docs/en/fullscreen#clear-the-conversation>), also clear the screen +`chat:clearInput`| Ctrl+L| Force a full screen redraw, preserving input and conversation `chat:clearScreen`| Cmd+K| Same as `chat:clearInput`. See [Clear the conversation](</docs/en/fullscreen#clear-the-conversation>) for how Cmd+K behaves on iTerm2 and Terminal.app `chat:killAgents`| Ctrl+X Ctrl+K| Stop all running [background subagents](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) in this session and turn off [artifact auto-replies](</docs/en/artifacts#let-claude-reply-to-comments-on-its-own>) for the rest of it `chat:cycleMode`| Shift+Tab*| Cycle permission modes @@ -159,8 +159,8 @@ Action| Default| Description ---|---|--- -`confirm:yes`| Y, Enter| Confirm action -`confirm:no`| N, Escape| Decline action +`confirm:yes`| Enter| Confirm action +`confirm:no`| Escape| Decline action `confirm:previous`| Up| Previous option `confirm:next`| Down| Next option `confirm:nextField`| Tab| Next field @@ -168,7 +168,21 @@ `confirm:toggle`| Space| Toggle selection `confirm:cycleMode`| Shift+Tab*| Cycle permission modes. On a file permission prompt, closes an open [comment field](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>); with no field open, selects the option that allows the action for the rest of the session, when the prompt offers that option -*On Windows without VT mode (Node <24.2.0/<22.17.0, Bun <1.2.23), defaults to Meta+M. Before v2.1.257, a `confirm:toggleExplanation` action, bound to `Ctrl+E` by default, showed a model-generated explanation of the command on Bash and PowerShell permission prompts. +*On Windows without VT mode (Node <24.2.0/<22.17.0, Bun <1.2.23), defaults to Meta+M. Before v2.1.257, a `confirm:toggleExplanation` action, bound to `Ctrl+E` by default, showed a model-generated explanation of the command on Bash and PowerShell permission prompts. Dialogs use `confirm:yes` and `confirm:no` to accept and cancel even when they don’t ask a yes-or-no question. If you bind a bare letter such as `y` or `n` in this context, the letter also acts on dialogs that never show it as a key. A dialog that shows `y` and `n` as its keys reads those letters itself and needs no binding. This example binds `y` to `confirm:yes` and `n` to `confirm:no`: + + { + "bindings": [ + { + "context": "Confirmation", + "bindings": { + "y": "confirm:yes", + "n": "confirm:no" + } + } + ] + } + +Before v2.1.280, `y` was also bound to `confirm:yes` and `n` to `confirm:no` by default. If you created your `keybindings.json` with `/keybindings` before v2.1.280, the file lists both bindings and they stay in effect until you delete those two lines. ### @@ -406,7 +420,7 @@ `select:accept`| Enter| Accept selection `select:cancel`| Escape| Cancel selection -Claude Code applies your `select:pageUp`, `select:pageDown`, `select:first`, and `select:last` bindings in the `/skills` menu. In most other lists, such as the `/model` picker, Claude Code pages with PageUp and PageDown regardless of your bindings and ignores Home and End. +Claude Code applies your `select:pageUp`, `select:pageDown`, `select:first`, and `select:last` bindings in the `/skills` menu. In most other lists, such as the `/model` picker, your `select:first` and `select:last` bindings apply. PageUp and PageDown page through the options in those lists regardless of your bindings. Before v2.1.280, those other lists ignored Home, End, and your `select:first` and `select:last` bindings. ###
modified Claude Code gateway compatibility guide View current →
--- a/llm-gateway-protocol.md +++ b/llm-gateway-protocol.md @@ -242,6 +242,7 @@ * When the upstream rejects the `thinking` field, a mid-conversation system message, or the `cache_control` marker on such a message, Claude Code retries the request and disables the rejected capability for the rest of the conversation * When the upstream rejects a [thinking signature](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking>), including with a `400` whose message says the block is `bound to a different conversation`, Claude Code removes earlier thinking blocks from the request, retries, and keeps them out of every later request. New responses still include thinking + * When the gateway or its upstream rejects the [advisor tool](</docs/en/advisor>) entry in `tools` as an unrecognized tool type, Claude Code retries the request once without that entry and its `anthropic-beta` value. Later requests to that base URL leave the advisor out until Claude Code exits, and `/advisor` is unavailable to the developer for that time. Claude Code recognizes this rejection by a `400` or `422` response whose message names the tool type after `Input tag`, such as `Input tag 'advisor_20260301'`. Before v2.1.280, Claude Code didn’t retry this rejection * Claude Code doesn’t retry rejections of context management or tool schema fields, so those `400` errors reach the developer The `bound to a different conversation` rejection comes from the API’s [preserved thinking](<https://platform.claude.com/docs/en/build-with-claude/preserved-thinking>) check, which fails when `system`, `tools`, or earlier `messages` content differs from the request that produced the thinking. A gateway that rewrites any of that content can cause the rejection itself; [Libraries, proxies, and gateways](<https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#libraries-proxies-gateways>) covers what to pass through unchanged. The retry logic matches on the upstream’s error wording, so forward error response bodies unmodified. A gateway that wraps upstream errors in its own envelope breaks the recovery path, even when it preserves the status code, unless the envelope’s message carries a stable `capability_rejected:` token. [Claude apps gateway substitutes those tokens for cloud providers’ error wording](</docs/en/claude-apps-gateway-config#upstream-error-messages>), for example `capability_rejected: prompt_too_long`.
modified How Claude remembers your project View current →
--- a/memory.md +++ b/memory.md @@ -201,6 +201,20 @@ --- Each brace group multiplies the number of expanded patterns: `src/*.{ts,tsx}` expands to two patterns, and `{a,b}/{c,d}/*.{ts,tsx}` to eight. To keep expansion bounded, a rule’s whole `paths` list shares one budget of 1,000 expanded patterns and 4 MiB, and patterns without braces don’t count against it. Claude Code uses any pattern that would exceed the budget unexpanded, and its literal braces match no files. Before v2.1.217, a `paths` value with many brace groups stalled or crashed the CLI at startup. Glob syntax treats `[` as the start of a bracket expression such as `[abc]`. A pattern with a `[` that can’t be read as a bracket expression, such as `photos [2024/**`, is invalid: it matches nothing, and the rule’s other patterns keep working. To match a literal `[` in a file name, escape it as `photos \[2024/**`. Before v2.1.207, one invalid pattern made the Read tool fail for every file the rule was evaluated against, instead of matching nothing. + +#### + +​ + +Rule frontmatter reference + +Configure a rule with YAML [frontmatter](</docs/en/glossary#frontmatter>) between `---` markers at the top of the file. `paths` is the only field Claude Code reads from a rule; any other field is ignored without an error. Claude Code removes the frontmatter before loading the rule into context. + +Field| Required| Description +---|---|--- +`paths`| No| Glob patterns that scope the rule to matching files. Accepts a YAML list or a comma-separated string + +If the YAML between the markers doesn’t parse, Claude Code ignores the frontmatter and loads the rule as if it had no `paths`. Run `claude --debug` to see the parse error. #### @@ -372,7 +386,7 @@ * You’re on a Claude Code version before v2.1.277 * Your session doesn’t [fetch feature flags from Anthropic](</docs/en/env-vars#features-that-need-feature-flag-fetching>), for example because you use Amazon Bedrock or another third-party provider, or you disabled telemetry. The linked section has the full list * It’s your [first session after you install or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>) to a version with `AGENTS.md` support. Claude reads `AGENTS.md` from your next session on - * You or your organization set [`disableAllHooks`](</docs/en/settings-reference#disableallhooks>) or [`allowManagedHooksOnly`](</docs/en/settings-reference#allowmanagedhooksonly>), or you disabled the built-in `agents-md` plugin in `/plugin` + * You disabled the built-in `agents-md` plugin in `/plugin` To give Claude your `AGENTS.md` in these sessions, import it from a `CLAUDE.md`. @@ -386,7 +400,6 @@ | `CLAUDE.md`| `AGENTS.md` read through the setting ---|---|--- -`/memory` and the **Memory files** list in `/context`| Listed| Not listed. To confirm Claude read it, look for the `AGENTS.md loaded` line under the default value, or ask Claude what its project instructions say [`InstructionsLoaded` hooks](</docs/en/hooks#instructionsloaded>)| Fire| Don’t fire. They fire as usual for an `AGENTS.md` that a `CLAUDE.md` imports or symlinks to Directories you add with `--add-dir` while `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD` is set| Their `CLAUDE.md` loads| Their `AGENTS.md` doesn’t load An `@path` import of a file outside your working directory| Claude Code asks you to approve external imports| Loads only if you already approved external imports for this project, with no prompt @@ -536,7 +549,7 @@ CLAUDE.md content is delivered as a user message after the system prompt, not as part of the system prompt itself. Claude reads it and tries to follow it, but there’s no guarantee of strict compliance, especially for vague or conflicting instructions. To debug: - * Run `/context` and check the list under **Memory files** to verify your CLAUDE.md and CLAUDE.local.md files loaded. If a `CLAUDE.md` file is missing there, Claude can’t see it. An `AGENTS.md` appears there only when a `CLAUDE.md` imports it, not when Claude reads it directly. Use `/memory` to open and edit the files. + * Run `/context` and check the list under **Memory files** to verify your CLAUDE.md and CLAUDE.local.md files loaded. If a `CLAUDE.md` file is missing there, Claude can’t see it. Use `/memory` to open and edit the files. * Check that the relevant CLAUDE.md is in a location that gets loaded for your session (see Choose where to put CLAUDE.md files). * Make instructions more specific. “Use 2-space indentation” works better than “format code nicely.” * Look for conflicting instructions across CLAUDE.md files. If two files give different guidance for the same behavior, Claude may pick one arbitrarily. @@ -558,7 +571,7 @@ 3. Check whether your session is one that can’t load `AGENTS.md`, such as a session on a third-party provider or with telemetry disabled. 4. Type `/config` in your session to open the settings panel and confirm **Project instructions** isn’t set to `claude-md` or `managed-only`. If you don’t see the setting there at all, your session is one that can’t load `AGENTS.md`. -`AGENTS.md` doesn’t appear in `/memory` or `/context` when Claude reads it directly, so check for the `AGENTS.md loaded` line or ask Claude what its project instructions say instead. If you want to keep the `CLAUDE.md` you found, or your session can’t load `AGENTS.md`, add a `CLAUDE.md` next to your `AGENTS.md` that imports it. +To check whether Claude read your `AGENTS.md`, run `/memory` and look for its path in the list. Before v2.1.280, `/memory` and `/context` didn’t list an `AGENTS.md` that Claude read directly. On those versions, ask Claude what its project instructions say instead. If you want to keep the `CLAUDE.md` you found, or your session can’t load `AGENTS.md`, add a `CLAUDE.md` next to your `AGENTS.md` that imports it. ###
modified Model configuration View current →
Show diff (179 lines)
--- a/model-config.md +++ b/model-config.md @@ -41,14 +41,14 @@ Provider| `opus`| `sonnet` ---|---|--- -Anthropic API| Opus 5| Sonnet 5 -[Claude Platform on AWS](</docs/en/claude-platform-on-aws>)| Opus 5| Sonnet 4.6 -Amazon Bedrock, Google Cloud’s Agent Platform| Opus 5| Sonnet 4.5 +Anthropic API| Opus 5.5| Sonnet 5 +[Claude Platform on AWS](</docs/en/claude-platform-on-aws>)| Opus 5.5| Sonnet 4.6 +Amazon Bedrock, Google Cloud’s Agent Platform| Opus 5.5| Sonnet 4.5 Microsoft Foundry| Opus 4.6| Sonnet 4.5 -Unless you set `ANTHROPIC_DEFAULT_FABLE_MODEL`, the `fable` alias resolves to Fable 5.1, except in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, where `fable` and `best` resolve to Fable 5. Before v2.1.257, `fable` resolved to Fable 5 on every provider. A gateway that isn’t configured to serve `claude-fable-5-1` rejects requests for that model. To use Fable 5.1 through a gateway that serves it, select it with `/model claude-fable-5-1`. Where an alias resolves to an older model, newer models are available by selecting the full model name explicitly or setting `ANTHROPIC_DEFAULT_OPUS_MODEL` or `ANTHROPIC_DEFAULT_SONNET_MODEL`. Before v2.1.219, `opus` resolved to Opus 4.8 on the Anthropic API from v2.1.154, and on Claude Platform on AWS, Amazon Bedrock, and Google Cloud’s Agent Platform from v2.1.207. Before v2.1.207, `opus` resolved to Opus 4.7 on Claude Platform on AWS and to Opus 4.6 on Amazon Bedrock and Google Cloud’s Agent Platform. 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-5`, or set the corresponding environment variable like `ANTHROPIC_DEFAULT_OPUS_MODEL`. - -Opus 5 requires Claude Code v2.1.219 or later. Sonnet 5 requires v2.1.197 or later. Opus 4.8 requires v2.1.154 or later. Run `claude update` to upgrade. +Unless you set `ANTHROPIC_DEFAULT_FABLE_MODEL`, the `fable` alias resolves to Fable 5.1, except in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, where `fable` and `best` resolve to Fable 5. Before v2.1.257, `fable` resolved to Fable 5 on every provider. A gateway that isn’t configured to serve `claude-fable-5-1` rejects requests for that model. To use Fable 5.1 through a gateway that serves it, select it with `/model claude-fable-5-1`. Where an alias resolves to an older model, newer models are available by selecting the full model name explicitly or setting `ANTHROPIC_DEFAULT_OPUS_MODEL` or `ANTHROPIC_DEFAULT_SONNET_MODEL`. Before v2.1.280, `opus` resolved to Opus 5 on the Anthropic API, Claude Platform on AWS, Amazon Bedrock, and Google Cloud’s Agent Platform from v2.1.219. Before v2.1.219, `opus` resolved to Opus 4.8 on the Anthropic API from v2.1.154, and on Claude Platform on AWS, Amazon Bedrock, and Google Cloud’s Agent Platform from v2.1.207. Before v2.1.207, `opus` resolved to Opus 4.7 on Claude Platform on AWS and to Opus 4.6 on Amazon Bedrock and Google Cloud’s Agent Platform. 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-5-5`, or set the corresponding environment variable like `ANTHROPIC_DEFAULT_OPUS_MODEL`. + +Opus 5.5 requires Claude Code v2.1.280 or later. Opus 5 requires v2.1.219 or later. Sonnet 5 requires v2.1.197 or later. Run `claude update` to upgrade. ### @@ -110,7 +110,7 @@ * `Enter`: switch model and save as your default * `s`: switch model for this session only and leave your default unchanged. To use a different key, rebind [`modelPicker:thisSessionOnly`](</docs/en/keybindings#model-picker-actions>) -Typing `/model <name>` directly behaves like `Enter`. To switch for this session only, open the picker with `/model` and press `s` on the model’s row. If you set a model with `/model` in [non-interactive mode](</docs/en/headless>), with the `-p` flag, your choice applies to the current session only and isn’t saved as your default; `/model` in that mode requires Claude Code v2.1.205 or later. Project and managed settings still take precedence and reapply on the next launch. An organization default model that your admin has configured to override user selection also reapplies on the next launch. In v2.1.144 through v2.1.152, `/model` applied to the current session only and `d` in the picker saved a default. The `--model` flag and `ANTHROPIC_MODEL` environment variable apply only to the session you launch with them. To run different models in different terminals at the same time, launch each one with its own `--model` flag rather than switching with `/model`. Prices in the `/model` picker appear when Claude Code talks to the Anthropic API, directly or through an [LLM gateway](</docs/en/llm-gateway>) that proxies it, and the price on a row is the price of the model that row selects. On [third-party providers](</docs/en/third-party-integrations>) such as Amazon Bedrock and on the [Claude apps gateway](</docs/en/claude-apps-gateway>), your provider or gateway determines what you pay, so picker rows show no price. The price is a display label only; it doesn’t affect which model a row selects or what your provider bills. Before v2.1.206, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>) and gateway sessions showed Anthropic list prices, and a row could show the price of a different model than the one it selected. Resumed sessions started with `claude --resume`, `--continue`, or the `/resume` picker keep the model they were using when the transcript was saved, regardless of the current `model` setting. If the restored model has been retired or is excluded by `availableModels`, the session falls through to the normal precedence order. This prevents another session’s `/model` choice from changing the model on resume. On providers that use provider-specific deployment IDs rather than Anthropic model IDs, such as Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, the transcript model isn’t restored at all and the session resolves its model through the normal precedence order. A model you pick for the new launch with `--model` or `ANTHROPIC_MODEL` still takes precedence over the restored model. As of v2.1.195, so does an `ANTHROPIC_DEFAULT_OPUS_MODEL` family variable. `ANTHROPIC_DEFAULT_MODEL` can too, under the conditions listed in its section. When the active model at startup comes from project or managed settings rather than your own selection, the startup header shows which settings file set it. Run `/model` to override; the project or managed setting reapplies on the next launch. On platforms that embed Claude Code and set [`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`](</docs/en/env-vars>), the host’s model configuration takes precedence over managed model settings, while a managed `availableModels` allowlist stays in force unless the host supplies its own; [Exceptions to managed settings precedence](</docs/en/settings#exceptions-to-managed-settings-precedence>) says which keys and variables the host overrides. If you or your organization configure [PreModelSwitch hooks](</docs/en/hooks#premodelswitch>), they run before a requested switch applies and can block it or ask you to confirm. When Claude Code can’t tell which PreModelSwitch hooks your organization’s [managed plugins](</docs/en/settings-reference#enabledplugins>) deliver, for example because a managed plugin failed to load, it refuses the switch rather than apply it unchecked, and it checks again on each new attempt. See [Model switch was blocked by a PreModelSwitch hook](</docs/en/errors#model-switch-was-blocked-by-a-premodelswitch-hook>) for the message and recovery. When you switch models through the [Agent SDK](</docs/en/agent-sdk/overview>) `setModel()` method or from a device connected through [Remote Control](</docs/en/remote-control>), or an app such as the [Desktop app](</docs/en/desktop>) that runs the Claude Code CLI switches for you, Claude Code checks that the string is one it recognizes before saving it. This check requires Claude Code v2.1.200 or later. Checking a Remote Control pick requires Claude Code v2.1.260 or later on your machine. On the Anthropic API, Claude Code recognizes: +Typing `/model <name>` directly behaves like `Enter`. To switch for this session only, open the picker with `/model` and press `s` on the model’s row. If you switch models with `/model`, the switch also reaches [subagents that inherit the main conversation’s model](</docs/en/sub-agents#choose-a-model>), because Claude Code resolves their model from the one your session is using when Claude starts them. Switch to Opus before Claude delegates research or test runs to one of them, and that work runs on Opus too. To keep a custom subagent on a smaller model, set `model` in its definition. If you set a model with `/model` in [non-interactive mode](</docs/en/headless>), with the `-p` flag, your choice applies to the current session only and isn’t saved as your default; `/model` in that mode requires Claude Code v2.1.205 or later. Project and managed settings still take precedence and reapply on the next launch. An organization default model that your admin has configured to override user selection also reapplies on the next launch. In v2.1.144 through v2.1.152, `/model` applied to the current session only and `d` in the picker saved a default. The `--model` flag and `ANTHROPIC_MODEL` environment variable apply only to the session you launch with them. To run different models in different terminals at the same time, launch each one with its own `--model` flag rather than switching with `/model`. Prices in the `/model` picker appear when Claude Code talks to the Anthropic API, directly or through an [LLM gateway](</docs/en/llm-gateway>) that proxies it, and the price on a row is the price of the model that row selects. On [third-party providers](</docs/en/third-party-integrations>) such as Amazon Bedrock and on the [Claude apps gateway](</docs/en/claude-apps-gateway>), your provider or gateway determines what you pay, so picker rows show no price. The price is a display label only; it doesn’t affect which model a row selects or what your provider bills. Before v2.1.206, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>) and gateway sessions showed Anthropic list prices, and a row could show the price of a different model than the one it selected. Resumed sessions started with `claude --resume`, `--continue`, or the `/resume` picker keep the model they were using when the transcript was saved, regardless of the current `model` setting. If the restored model has been retired or is excluded by `availableModels`, the session falls through to the normal precedence order. This prevents another session’s `/model` choice from changing the model on resume. On providers that use provider-specific deployment IDs rather than Anthropic model IDs, such as Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, the transcript model isn’t restored at all and the session resolves its model through the normal precedence order. A model you pick for the new launch with `--model` or `ANTHROPIC_MODEL` still takes precedence over the restored model. As of v2.1.195, so does an `ANTHROPIC_DEFAULT_OPUS_MODEL` family variable. `ANTHROPIC_DEFAULT_MODEL` can too, under the conditions listed in its section. When the active model at startup comes from project or managed settings rather than your own selection, the startup header shows which settings file set it. Run `/model` to override; the project or managed setting reapplies on the next launch. On platforms that embed Claude Code and set [`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`](</docs/en/env-vars>), the host’s model configuration takes precedence over managed model settings, while a managed `availableModels` allowlist stays in force unless the host supplies its own; [Exceptions to managed settings precedence](</docs/en/settings#exceptions-to-managed-settings-precedence>) says which keys and variables the host overrides. If you or your organization configure [PreModelSwitch hooks](</docs/en/hooks#premodelswitch>), they run before a requested switch applies and can block it or ask you to confirm. When Claude Code can’t tell which PreModelSwitch hooks your organization’s [managed plugins](</docs/en/settings-reference#enabledplugins>) deliver, for example because a managed plugin failed to load, it refuses the switch rather than apply it unchecked, and it checks again on each new attempt. See [Model switch was blocked by a PreModelSwitch hook](</docs/en/errors#model-switch-was-blocked-by-a-premodelswitch-hook>) for the message and recovery. When you switch models through the [Agent SDK](</docs/en/agent-sdk/overview>) `setModel()` method or from a device connected through [Remote Control](</docs/en/remote-control>), or an app such as the [Desktop app](</docs/en/desktop>) that runs the Claude Code CLI switches for you, Claude Code checks that the string is one it recognizes before saving it. This check requires Claude Code v2.1.200 or later. Checking a Remote Control pick requires Claude Code v2.1.260 or later on your machine. On the Anthropic API, Claude Code recognizes: * a model alias * an entry from the `/model` picker @@ -349,12 +349,11 @@ The behavior of `default` depends on your account type: - * **Max, Team Premium, Enterprise, and Anthropic API** : defaults to Opus 5 - * **Claude Platform on AWS, Amazon Bedrock, and Google Cloud’s Agent Platform** : defaults to Opus 5 - * **Pro and Team Standard** : defaults to Sonnet 5 + * **Pro, Max, Team, Enterprise, and Anthropic API** : defaults to Opus 5.5 + * **Claude Platform on AWS, Amazon Bedrock, and Google Cloud’s Agent Platform** : defaults to Opus 5.5 * **Microsoft Foundry** : defaults to Sonnet 4.5 -Before v2.1.219, `default` resolved to Opus 4.8 on the Anthropic API, Max, Team Premium, and Enterprise pay-as-you-go from v2.1.154, and on Claude Platform on AWS, Amazon Bedrock, and Google Cloud’s Agent Platform from v2.1.207. Before v2.1.207, `default` resolved to Opus 4.7 on Claude Platform on AWS and to Sonnet 4.5 on Amazon Bedrock and Google Cloud’s Agent Platform. When an admin has set an organization default model, `default` resolves to that model instead of the account-type default above. Requires Claude Code v2.1.196 or later. `default` can also resolve to the model you set with `ANTHROPIC_DEFAULT_MODEL`, under the conditions listed in its section. When managed settings enforce the allowlist for the Default model and the account-type default is not in `availableModels`, `default` resolves to the enforced Default instead of the account-type default above. When both apply, the organization default replaces the account-type default first and enforcement then applies to it: an allowlisted organization default is kept, while one outside the list resolves to the enforced Default. Fable models are not the account-type default on any plan or provider. Choosing one with `/model` saves it as the selected model in your user settings, so later sessions start on it. For the one-time change Claude Code makes to a saved Fable 5 selection in v2.1.257, see Work with Fable. +Before v2.1.280, `default` resolved to Sonnet 5 on Pro and Team Standard, and to Opus 5 on Max, Team Premium, Enterprise, the Anthropic API, Claude Platform on AWS, Amazon Bedrock, and Google Cloud’s Agent Platform from v2.1.219. Before v2.1.219, `default` resolved to Opus 4.8 on the Anthropic API, Max, Team Premium, and Enterprise pay-as-you-go from v2.1.154, and on Claude Platform on AWS, Amazon Bedrock, and Google Cloud’s Agent Platform from v2.1.207. Before v2.1.207, `default` resolved to Opus 4.7 on Claude Platform on AWS and to Sonnet 4.5 on Amazon Bedrock and Google Cloud’s Agent Platform. When an admin has set an organization default model, `default` resolves to that model instead of the account-type default above. Requires Claude Code v2.1.196 or later. `default` can also resolve to the model you set with `ANTHROPIC_DEFAULT_MODEL`, under the conditions listed in its section. When managed settings enforce the allowlist for the Default model and the account-type default is not in `availableModels`, `default` resolves to the enforced Default instead of the account-type default above. When both apply, the organization default replaces the account-type default first and enforcement then applies to it: an allowlisted organization default is kept, while one outside the list resolves to the enforced Default. Fable models are not the account-type default on any plan or provider. Choosing one with `/model` saves it as the selected model in your user settings, so later sessions start on it. For the one-time change Claude Code makes to a saved Fable 5 selection in v2.1.257, see Work with Fable. ### @@ -398,9 +397,9 @@ Automatic model fallback -This section covers content-based fallback from Fable models and Opus 5. For availability-based fallback when a model is overloaded or unavailable, see Fallback model chains. Fable models and Opus 5 run with safety classifiers, which most often flag cybersecurity and biology content. When a classifier flags a request and the flagged category has a fallback model, Claude Code re-runs the request on that model and shows a notice in the transcript. For those two categories, the fallback model depends on which model refused: - - * **Fable 5.1 and Fable 5** : biology-flagged requests re-run on Opus 5, and cybersecurity-flagged requests re-run on Opus 4.8. +This section covers content-based fallback from Fable models, Opus 5.5, and Opus 5. For availability-based fallback when a model is overloaded or unavailable, see Fallback model chains. Fable models, Opus 5.5, and Opus 5 run with safety classifiers, which most often flag cybersecurity and biology content. When a classifier flags a request and the flagged category has a fallback model, Claude Code re-runs the request on that model and shows a notice in the transcript. For those two categories, the fallback model depends on which model refused: + + * **Fable 5.1, Fable 5, and Opus 5.5** : biology-flagged requests re-run on Opus 5, and cybersecurity-flagged requests re-run on Opus 4.8. * **Opus 5** : cybersecurity-flagged requests re-run on Opus 4.8. Biology-flagged requests end with a refusal instead, because Opus 5 runs its own biology classifiers with no fallback model. On Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, Claude Code resolves these targets through your deployment instead, and if you set `ANTHROPIC_DEFAULT_OPUS_MODEL`, categories that have a fallback re-run on the pinned model; see Enable fallback on Bedrock, Agent Platform, and Foundry. After a fallback, the session continues on the fallback model. To return to your original model, run `/model`. Category-based fallback requires Claude Code v2.1.219 or later. Before v2.1.219, every flagged Fable 5 request re-ran on your provider’s default Opus model, and Opus 5 was not a fallback source. The fallback model is checked against `availableModels`. When it is blocked, no fallback occurs. The refusal is shown as a normal error and the session’s model is unchanged. @@ -435,8 +434,8 @@ On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), and [Microsoft Foundry](</docs/en/microsoft-foundry>), model IDs are provider-specific, so automatic fallback only operates when Claude Code can identify both models involved: - * Claude Code must recognize the current model as a fallback source. Fable 5.1 and Fable 5 are recognized when the model ID contains `claude-fable-5`, matches the value of `ANTHROPIC_DEFAULT_FABLE_MODEL`, or is mapped with `modelOverrides`. Opus 5 is recognized by its provider model ID or a `modelOverrides` mapping. - * The fallback model must resolve in your deployment. If you set `ANTHROPIC_DEFAULT_OPUS_MODEL`, flagged requests re-run on that model for every category that has a fallback; a biology flag on Opus 5 still ends with a refusal. If you don’t set it, cybersecurity-flagged requests re-run on an Opus 4.8 entry in the provider’s model list, and biology-flagged requests from a Fable model on an Opus 5 entry. + * Claude Code must recognize the current model as a fallback source. Fable 5.1 and Fable 5 are recognized when the model ID contains `claude-fable-5`, matches the value of `ANTHROPIC_DEFAULT_FABLE_MODEL`, or is mapped with `modelOverrides`. Opus 5.5 and Opus 5 are recognized by their provider model ID or a `modelOverrides` mapping. + * The fallback model must resolve in your deployment. If you set `ANTHROPIC_DEFAULT_OPUS_MODEL`, flagged requests re-run on that model for every category that has a fallback; a biology flag on Opus 5 still ends with a refusal. If you don’t set it, cybersecurity-flagged requests re-run on an Opus 4.8 entry in the provider’s model list, and biology-flagged requests from a Fable model or Opus 5.5 on an Opus 5 entry. If either model can’t be identified, Claude Code does not switch automatically. The flagged request ends with a refusal message, and you can switch models with `/model` and retry. Setting `ANTHROPIC_DEFAULT_FABLE_MODEL` to your Fable model ID enables Fable recognition. Setting `ANTHROPIC_DEFAULT_OPUS_MODEL` to an Opus model ID gives the flagged categories a fallback target, unless the pin names a model outside the Opus family or the model that refused; then Claude Code doesn’t switch and the refusal stands. @@ -446,7 +445,7 @@ Security research and biology workloads -Workloads in offensive security or biology, including penetration testing, Capture the Flag (CTF) exercises, and biology-adjacent codebases, trigger fallback frequently, often on the first request. For substantive biology work on Fable 5.1 or Fable 5, Claude Code moves the session to Opus 5 at the first flagged request, and later biology-flagged requests end in refusals there, because Opus 5 has no biology fallback. On Opus 5, you get those refusals from the first flagged request. This is expected routing for these domains, not an account flag. If your organization needs Fable-class capability for this work, ask your Anthropic account team about trusted access programs. +Workloads in offensive security or biology, including penetration testing, Capture the Flag (CTF) exercises, and biology-adjacent codebases, trigger fallback frequently, often on the first request. For substantive biology work on Fable 5.1, Fable 5, or Opus 5.5, Claude Code moves the session to Opus 5 at the first flagged request, and later biology-flagged requests end in refusals there, because Opus 5 has no biology fallback. On Opus 5, you get those refusals from the first flagged request. This is expected routing for these domains, not an account flag. If your organization needs Fable-class capability for this work, ask your Anthropic account team about trusted access programs. ### @@ -459,19 +458,16 @@ Model| Levels ---|--- Fable 5.1 and Fable 5| `low`, `medium`, `high`, `xhigh`, `max` -Opus 5, Sonnet 5, Opus 4.8, and Opus 4.7| `low`, `medium`, `high`, `xhigh`, `max` +Opus 5.5, Opus 5, Sonnet 5, Opus 4.8, and 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. Your organization or your own settings can also cap the levels a model offers; see Organization effort limits. With the [`ultracode`](</docs/en/settings-reference#ultracode>) setting off, Claude Code resolves the session’s effort level in this order, taking the first that applies: 1. An explicit choice: the [`CLAUDE_CODE_EFFORT_LEVEL`](</docs/en/env-vars#variables>) environment variable, launching with `--effort`, or `/effort` in the session (a non-interactive `/effort` has narrower effect) - 2. The model’s default effort, on Fable 5, Opus 4.8, or Opus 4.7: from the first time you run one of these models, Claude Code holds that model’s default effort across sessions, even when your settings resolve a different level. Opus 5 and Fable 5.1 have no such hold. Whether a level you set ends the hold depends on how you set it, for example: - * **Ends the hold** : confirming a level interactively, with `Enter` in the `/effort` slider or the `/model` picker or with a level typed after `/effort`, or picking a level from a connected device’s [Remote Control](</docs/en/remote-control#what-connected-devices-see>) effort control - * **Leaves the hold in place for later sessions** : `--effort` at launch, or `s` in the `/effort` slider or the `/model` picker - 3. Your settings: the level you saved for the model or an [`effortLevel`](</docs/en/settings-reference#effortlevel>) key, with the precedence between them and across settings files stated at [`modelSettings`](</docs/en/settings-reference#modelsettings>) - 4. The model’s default effort: `high` on every model that supports effort, except that Opus 4.7 defaults to `xhigh` and, when your organization sets a default effort level for its organization default model, that level is the default when you run that model - -When you set `low`, `medium`, `high`, or `xhigh` in an interactive session on your machine, you choose how long it lasts by how you confirm it: + 2. Your settings: the level you saved for the model or an [`effortLevel`](</docs/en/settings-reference#effortlevel>) key, with the precedence between them and across settings files stated at [`modelSettings`](</docs/en/settings-reference#modelsettings>) + 3. The model’s default effort: `high` on every model that supports effort, except that Opus 5.5 defaults to `medium`, Opus 4.7 defaults to `xhigh`, and, when your organization sets a default effort level for its organization default model, that level is the default when you run that model + +Opus 5.5 starts at `medium` unless one of the sources above sets a level for it, and a top-level `effortLevel` in your user settings file doesn’t count for Opus 5.5. That key is the older form `/effort` wrote before Claude Code saved levels per model: it keeps applying where it applied before, on Opus 5, Fable 5.1, and earlier models, while Opus 5.5 and models released after it start at their own default until you choose a level for them with `/effort` or the `/model` picker. A top-level `effortLevel` in project, local, or managed settings, or one passed with `--settings`, applies to every model. When you set `low`, `medium`, `high`, or `xhigh` in an interactive session on your machine, you choose how long it lasts by how you confirm it: * `Enter` in the `/effort` slider or the `/model` picker, or a level typed after `/effort`: save the level as your default and apply it in later sessions * `s` in the `/effort` slider or the `/model` picker: apply the level to this session only. Requires Claude Code v2.1.257 or later @@ -480,7 +476,7 @@ A level you pick from the effort control on a phone or browser connected through [Remote Control](</docs/en/remote-control#what-connected-devices-see>) applies to that session only. -When you set a level with `/effort` in a [`-p` run](</docs/en/headless>), Claude Code applies it to that session only and doesn’t save it as your default. On Fable 5, Opus 4.8, and Opus 4.7, that level also neither ends the hold on the model’s default effort nor overrides it for the session. While that hold is in effect, a non-interactive `/effort` reports `Not applied`, so pass `--effort` at launch instead. The `/effort` menu also offers `ultracode`. Ultracode is a Claude Code setting rather than a model effort level: it sends `xhigh` to the model and additionally has Claude orchestrate [dynamic workflows](</docs/en/workflows>) for substantive tasks. For where it can be set persistently, see the [`ultracode`](</docs/en/settings-reference#ultracode>) setting. You can turn on ultracode through any of the following: +When you set a level with `/effort` in a [`-p` run](</docs/en/headless>), Claude Code applies it to that session only and doesn’t save it as your default. The `/effort` menu also offers `ultracode`. Ultracode is a Claude Code setting rather than a model effort level: it sends `xhigh` to the model and additionally has Claude orchestrate [dynamic workflows](</docs/en/workflows>) for substantive tasks. For where it can be set persistently, see the [`ultracode`](</docs/en/settings-reference#ultracode>) setting. You can turn on ultracode through any of the following: * **`/effort`** : run `/effort ultracode`, or select it from the menu * **`--effort` flag**: launch with `claude --effort ultracode`, which starts the session at `xhigh` effort with ultracode on @@ -506,8 +502,8 @@ 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. The default on every model except Opus 4.7 +`medium`| Reduces token usage for cost-sensitive work that can trade off some intelligence. The default on Opus 5.5 +`high`| Balances token usage and intelligence. The default on every model except Opus 5.5 and Opus 4.7 `xhigh`| Deeper reasoning at higher token spend. The 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 `ultracode`| A Claude Code setting that plans a [dynamic workflow](</docs/en/workflows>) for each substantive task with `xhigh` per-message reasoning @@ -535,10 +531,10 @@ * **`--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 a per-model level in [`modelSettings`](</docs/en/settings-reference#modelsettings>), or set [`effortLevel`](</docs/en/settings-reference#effortlevel>) to `low`, `medium`, `high`, or `xhigh` as the default for models without one. `max` isn’t accepted as a level in either key, and `ultracode` has its own [`ultracode`](</docs/en/settings-reference#ultracode>) key - * **From a connected device** : in a [Remote Control](</docs/en/remote-control#what-connected-devices-see>) session, pick a level from the effort control on your phone or in your browser. The level applies to the current session only, though it also ends the hold on the model’s default effort. Requires Claude Code v2.1.234 or later + * **From a connected device** : in a [Remote Control](</docs/en/remote-control#what-connected-devices-see>) session, pick a level from the effort control on your phone or in your browser. The level applies to the current session only. Requires Claude Code v2.1.234 or later * **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 -Frontmatter effort applies when that skill or subagent is active, overriding the session level but not the environment variable. A [`maxEffortLevel`](</docs/en/settings-reference#maxeffortlevel>) or organization effort cap still limits the level the skill or subagent runs at. On Fable 5, Opus 4.8, and Opus 4.7, frontmatter effort also applies while the hold on the model’s default effort is in effect. Before v2.1.267, the hold took precedence and Claude Code ignored the frontmatter level while the hold was active. If you set `effortLevel` in [managed settings](</docs/en/managed-settings>), Claude Code applies it at the settings step of the effort resolution order, and users can still change the level with `/effort` or `--effort`. To keep users at or below a level, set [`maxEffortLevel`](</docs/en/settings-reference#maxeffortlevel>). The effort slider appears in `/model` when a supported model is selected. The current effort level is also shown in the session header next to the model name, for example “with low effort”, so you can confirm which setting is active without opening `/model`. The footer also briefly shows the effort level at startup and when it changes. +Frontmatter effort applies when that skill or subagent is active, overriding the session level but not the environment variable. A [`maxEffortLevel`](</docs/en/settings-reference#maxeffortlevel>) or organization effort cap still limits the level the skill or subagent runs at. If you set `effortLevel` in [managed settings](</docs/en/managed-settings>), Claude Code applies it at the settings step of the effort resolution order, and users can still change the level with `/effort` or `--effort`. To keep users at or below a level, set [`maxEffortLevel`](</docs/en/settings-reference#maxeffortlevel>). The effort slider appears in `/model` when a supported model is selected. The current effort level is also shown in the session header next to the model name, for example “with low effort”, so you can confirm which setting is active without opening `/model`. The footer also briefly shows the effort level at startup and when it changes. #### @@ -560,9 +556,9 @@ ---|--- Toggle for the current session| Press `Option+T` on macOS or `Alt+T` on Windows and Linux Set the global default| Run `/config` and toggle thinking mode. Saved as `alwaysThinkingEnabled` in `~/.claude/settings.json` -Disable through an environment variable| Set [`MAX_THINKING_TOKENS=0`](</docs/en/env-vars>), which turns thinking off on the Anthropic API except on Fable models. On [third-party providers](</docs/en/third-party-integrations>), Claude Code omits the `thinking` parameter instead, and adaptive-reasoning models may still think. Other values apply only with a fixed thinking budget - -You can’t turn thinking off on Fable models. The session toggle, `alwaysThinkingEnabled`, and `MAX_THINKING_TOKENS=0` have no effect there, and a Fable model decides per step how much to think based on the effort level. Claude Code collapses thinking output by default. Press `Ctrl+O` to toggle verbose mode and see the reasoning as gray italic text. Interactive sessions on the Anthropic API receive redacted thinking blocks by default, so set `showThinkingSummaries: true` in [settings](</docs/en/settings>) if you want the full summaries available when you expand. You are charged for all thinking tokens generated, even when collapsed or redacted. +Disable through an environment variable| Set [`MAX_THINKING_TOKENS=0`](</docs/en/env-vars>), which turns thinking off on the Anthropic API except on Opus 5.5 and Fable models. On [third-party providers](</docs/en/third-party-integrations>), Claude Code omits the `thinking` parameter instead, and adaptive-reasoning models may still think. Other values apply only with a fixed thinking budget + +You can’t turn thinking off on Opus 5.5 or the Fable models. The session toggle, `alwaysThinkingEnabled`, and `MAX_THINKING_TOKENS=0` have no effect there, and the model decides per step how much to think based on the effort level. Claude Code collapses thinking output by default. Press `Ctrl+O` to toggle verbose mode and see the reasoning as gray italic text. Interactive sessions on the Anthropic API receive redacted thinking blocks by default, so set `showThinkingSummaries: true` in [settings](</docs/en/settings>) if you want the full summaries available when you expand. You are charged for all thinking tokens generated, even when collapsed or redacted. ### @@ -640,7 +636,7 @@ If you don’t set an auto-compact window, Claude Code compacts when the conversation reaches the model’s context limit, except in these sessions: * [Cloud sessions](</docs/en/claude-code-on-the-web>) compact as the conversation approaches the model’s limit - * Sonnet 4.6 and Opus 4.6 without extended context compact at the 200K boundary, and so do Opus 4.8 and Opus 5 when they run with a 200K context window, such as on Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry + * Sonnet 4.6 and Opus 4.6 without extended context compact at the 200K boundary, and so do Opus 4.8 and later when they run with a 200K context window, such as on Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry * When you set [`CLAUDE_CODE_DISABLE_1M_CONTEXT=1`](</docs/en/env-vars>), models with a native 1M window, such as Sonnet 5 and the Fable models, compact at the 200K boundary * Models running with a native 1M window, such as Sonnet 5, the Fable models, and Opus 4.7 and later on the Anthropic API, compact before the window fills, at about 967K tokens by default. On Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, Pin models for third-party deployments says which models run with that window; for the configurations that budget Sonnet 5 at 200K instead, see Sonnet 5 context window * Sessions on a model ID Claude Code doesn’t recognize, such as an [LLM gateway](</docs/en/llm-gateway>) alias, compact at the context window Claude Code assumes for the ID; see Correct the window for a gateway or custom model ID @@ -678,7 +674,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 testing model IDs that Claude Code does not list by default. For LLM gateway deployments, Claude Code can populate the picker from the gateway’s `/v1/models` endpoint when `CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1` is set, so this variable is needed only when discovery is disabled or does not return the model you want. See [gateway model discovery](</docs/en/llm-gateway-protocol#model-discovery>). To list several models instead, in your own order and under labels you choose, set [`modelPicker`](</docs/en/settings-reference#modelpicker>). Its entry says which rows the picker keeps when that lineup replaces the built-in one. This example sets all three variables to make a gateway-routed Opus deployment selectable. Claude Code reads environment variables at startup, so run the exports before launching `claude`, or restart an existing session to pick them up: - export ANTHROPIC_CUSTOM_MODEL_OPTION="my-gateway/claude-opus-5" + export ANTHROPIC_CUSTOM_MODEL_OPTION="my-gateway/claude-opus-5-5" export ANTHROPIC_CUSTOM_MODEL_OPTION_NAME="Opus via Gateway" export ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION="Custom deployment routed through the internal LLM gateway" @@ -687,7 +683,7 @@ * If you omit the name, the entry shows the model’s name when Claude Code recognizes the ID, and the model ID otherwise. * If you omit the description, Claude Code uses `Custom model (<model-id>)`. -Claude Code lists the custom entry after the built-in entries, and any [`modelPicker`](</docs/en/settings-reference#modelpicker>) rows you append come after it. Claude Code skips validation for the model ID set in `ANTHROPIC_CUSTOM_MODEL_OPTION`, so you can use any string your API endpoint accepts. When `availableModels` is set, include the custom model ID in the allowlist as well. Otherwise Claude Code filters the custom entry from the picker and rejects a `--model` selection of it like any other excluded model. A custom ID that embeds a family name, such as `my-gateway/claude-opus-5`, counts as a specific entry for that family and disables its wildcard, so also list the versions you intend to keep selectable. See Merge behavior. +Claude Code lists the custom entry after the built-in entries, and any [`modelPicker`](</docs/en/settings-reference#modelpicker>) rows you append come after it. Claude Code skips validation for the model ID set in `ANTHROPIC_CUSTOM_MODEL_OPTION`, so you can use any string your API endpoint accepts. When `availableModels` is set, include the custom model ID in the allowlist as well. Otherwise Claude Code filters the custom entry from the picker and rejects a `--model` selection of it like any other excluded model. A custom ID that embeds a family name, such as `my-gateway/claude-opus-5-5`, counts as a specific entry for that family and disables its wildcard, so also list the versions you intend to keep selectable. See Merge behavior. ##
modified Monitoring View current →
--- a/monitoring-usage.md +++ b/monitoring-usage.md @@ -1113,6 +1113,11 @@ * `num_non_blocking_error`: Count that failed without blocking * `num_cancelled`: Count cancelled before completion * `total_duration_ms`: Wall-clock duration of all matching hooks + * `stdout_chars`: Total characters of stdout across the matching hooks that succeeded. Requires Claude Code v2.1.280 or later + * `additional_context_chars`: Total characters of `additionalContext` returned by the matching hooks. Requires Claude Code v2.1.280 or later + * `system_message_chars`: Total characters of `systemMessage` returned by the matching hooks. Requires Claude Code v2.1.280 or later + * `initial_user_message_chars`: Total characters of `initialUserMessage` returned by the matching hooks. Requires Claude Code v2.1.280 or later + * `num_outputs_persisted`: Number of hook outputs over the [10,000-character cap](</docs/en/hooks#json-output>) that Claude Code saved to a file. Requires Claude Code v2.1.280 or later * `managed_only`: `"true"` when only managed-policy hooks are permitted * `hook_source`: `"policySettings"` or `"merged"` * `safe_mode`: `"true"` when the session was started with [`--safe-mode`](</docs/en/cli-reference>), `"false"` otherwise. Requires Claude Code v2.1.169 or later
modified Enterprise network configuration View current →
--- a/network-config.md +++ b/network-config.md @@ -203,6 +203,7 @@ `registry.npmjs.org`| Plugin installs (fetching npm-source plugin packages and installing plugins’ Node.js package dependencies), `npx`-launched MCP servers, and the package registry for npm and bun installs of Claude Code itself `bridge.claudeusercontent.com`| [Claude in Chrome](</docs/en/chrome>) extension WebSocket bridge `*.frame.claudeusercontent.com`| [Artifact](</docs/en/artifacts>) content reads. The CLI fetches an artifact’s files from this host when Claude opens one, and only when the Artifact tool is [available](</docs/en/artifacts#availability>) for your account. To turn the tool off and drop this requirement, set [`"enableArtifact": false`](</docs/en/settings-reference#enableartifact>) or [`CLAUDE_CODE_DISABLE_ARTIFACT=1`](</docs/en/env-vars>); Claude Code also honors the deprecated [`disableArtifact`](</docs/en/settings-reference#disableartifact>) setting. See [Disable artifacts](</docs/en/artifacts#disable-artifacts>) for how these settings interact +`github.com`| Cloning GitHub-hosted [plugin marketplaces](</docs/en/plugin-marketplaces>) and plugins, including the official Anthropic marketplace, over HTTPS or SSH. To clone GitHub `owner/repo` sources over HTTPS only, set [`CLAUDE_CODE_PLUGIN_PREFER_HTTPS=1`](</docs/en/env-vars>) `raw.githubusercontent.com`| Changelog feed for [`/release-notes`](</docs/en/commands>). In interactive sessions, Claude Code also fetches it in the background at startup when its cached changelog doesn’t yet cover the running version, such as the first start after an update; non-interactive and cloud sessions never fetch it `*-review.googlesource.com`| Gerrit change lookup on `googlesource.com` checkouts. When a Claude Desktop Code tab session starts or resumes on a [trusted](</docs/en/permissions#project-allow-rules-and-workspace-trust>) checkout whose `origin` is a `googlesource.com` host, Claude Code asks that host’s `-review` server anonymously for the open change matching HEAD’s `Change-Id`, once per start or resume. Other session types skip the lookup, and no other Gerrit host is contacted. Optional: disable with [`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`](</docs/en/env-vars>) `http-intake.logs.us5.datadoghq.com`| Operational telemetry events, sent only when the CLI uses the Anthropic API directly, never for Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. Optional: disable with [`DISABLE_TELEMETRY`](</docs/en/data-usage#telemetry-services>) or `DO_NOT_TRACK`
modified Output styles View current →
Show diff (194 lines)
--- a/output-styles.md +++ b/output-styles.md @@ -1,4 +1,13 @@ -Output styles change how Claude responds, not what Claude knows. They set Claude’s role, tone, and output format for every response. Use one when you keep re-prompting for the same voice or format every turn, or when you want Claude to act as something other than a software engineer. A custom output style gives Claude your own instructions and lets you choose whether to keep Claude Code’s built-in software engineering instructions. Keep them when you’re changing how Claude communicates but still coding, like always answering with a diagram. Leave them out when Claude isn’t doing software engineering at all, like a writing assistant or data analyst. For instructions about your project, conventions, or codebase, use [CLAUDE.md](</docs/en/memory>) instead. +An output style is a set of instructions that sets Claude’s role, tone, and response format for every response in a session. Claude Code includes four built-in styles besides its default, and you can write your own. Use an output style to change the way Claude responds and works with you for a whole session, so you don’t repeat the request in each prompt. For example, a built-in style can make responses shorter, add an explanation of each change, or have Claude start work without asking routine questions. A custom style can also turn Claude into something other than a software engineer, such as a writing assistant or a data analyst. + + * To use a built-in style, pick one from the built-in output styles and switch to it. + * To write your own instructions, create a custom output style. + +An output style gives Claude instructions to follow. It doesn’t guarantee that something always happens or never happens. Some needs fit a different feature: + + * For what Claude should know about your project, use [CLAUDE.md](</docs/en/memory>). + * For something that has to happen every time, such as formatting after each edit or blocking a command, use a [hook](</docs/en/hooks-guide>). + * For skills, subagents, and the other options, see Choose between an output style and other features. ## @@ -6,12 +15,72 @@ Built-in output styles -Claude Code’s **Default** output style is its standard set of instructions, designed to help you complete software engineering tasks efficiently. There are four additional built-in output styles: - - * **Proactive** : Claude executes immediately, makes reasonable assumptions instead of pausing for routine decisions, and prefers action over planning. This is stronger autonomous-execution guidance than [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) applies, and it works without changing your permission mode, so your permission mode still decides what runs without asking you. - * **Concise** : Claude leads with the result, skips preamble and narration, and keeps responses short by default, while doing the engineering work as thoroughly as in the Default style. When you ask for an explanation or more detail, Claude answers in full. Claude always keeps the complete content of error reports, security warnings, and confirmations for destructive actions. Requires Claude Code v2.1.237 or later. - * **Explanatory** : Provides educational “Insights” in between helping you complete software engineering tasks. Helps you understand implementation choices and codebase patterns. - * **Learning** : Collaborative, learn-by-doing mode where Claude will not only share “Insights” while coding, but also ask you to contribute small, strategic pieces of code yourself. Claude Code will add `TODO(human)` markers in your code for you to implement. +Claude Code starts in the **Default** style, its standard instructions for completing software engineering tasks. Each of the four other built-in styles keeps those instructions and adds its own. This table shows what each style changes about a session and when it fits: + +Style| What changes| Use it when +---|---|--- +Proactive| Claude starts work right away and makes reasonable assumptions rather than asking about routine decisions| You want Claude to keep working through routine decisions, and you’ll correct course if an assumption is wrong +Concise| Responses lead with the result and leave out preamble, narration, and recaps| Default responses are longer than you want +Explanatory| Claude adds short `Insight` blocks that explain the choices behind the code it writes| You’re getting to know a codebase or want the reasoning along with the change +Learning| Claude explains its choices and leaves small pieces of code for you to write yourself| You want hands-on coding practice while the task still gets done + +### + +​ + +Default + +Default means no output style is selected. Claude Code adds no style instructions, and Claude works from Claude Code’s standard system prompt, which is written for software engineering tasks. `default` appears in the `/output-style` list with the other styles, so you select it the same way. + +### + +​ + +Proactive + +In the Proactive style, Claude starts implementing as soon as you send a task. It makes reasonable assumptions about routine decisions rather than stopping to ask, and it doesn’t switch to plan mode unless you ask for a plan. You can redirect it at any point. The style’s instructions also tell Claude to check with you in the conversation before an action that deletes data or changes a shared or production system. That check is an instruction Claude follows and is separate from permission prompts. Switching to the Proactive style doesn’t change your [permission mode](</docs/en/permission-modes>). Your permission mode still decides which tool calls run without asking you, so permission prompts appear the same way they did before you switched. + +### + +​ + +Concise + +In the Concise style, the first sentence of a response states what happened or what the answer is. Claude leaves out the lead-in, the step-by-step narration, and the closing recap, and answers a simple question in one to three sentences. It does the engineering work as thoroughly as in the Default style. Requires Claude Code v2.1.237 or later. Claude still writes at full length in these cases: + + * **Anything you ask for** : when you ask for an explanation or more detail, Claude answers in full. + * **Anything you need in order to act safely** : error reports, failing test output, security warnings, and confirmations for destructive actions keep their complete content. + +### + +​ + +Explanatory + +In the Explanatory style, Claude does the task the way it does in the Default style and adds short explanations of why it made the choices it made. Each explanation appears in the conversation, before or after the code it’s about, in a block labeled `Insight`. The explanations aren’t written into your files as comments. An `Insight` block carries two or three points about your codebase or the code Claude wrote, such as this one after adding an API endpoint: + + ★ Insight ───────────────────────────────────── + - Every route in this repo goes through the withAuth wrapper, so the new endpoint gets session checks without its own middleware. + - Rate limits are set per route in limits.ts, which is why this change adds an entry there rather than a global default. + ───────────────────────────────────────────────── + +### + +​ + +Learning + +In the Learning style, Claude adds the same `Insight` blocks as the Explanatory style and also asks you to write some of the code. Claude handles routine implementation itself. When it reaches a piece with a real design decision, such as error handling, a data structure, or business logic with more than one valid approach, it leaves a few lines for you. Claude marks the spot with a `TODO(human)` comment in the file, then sends a request that says what’s already built, what to write, and what to weigh: + + ● Learn by Doing + + Context: The upload form is in place and calls validateFile() before accepting a file. Size and type checks work for images, but the switch statement has no handling for documents yet. + + Your Task: In upload.js, implement the case "document" branch inside validateFile(). Look for TODO(human). + + Guidance: Decide on a size limit for documents and whether the file extension has to match the MIME type. Return {valid: boolean, error?: string}. + +Claude then stops and waits. Write your code at the `TODO(human)` comment and tell Claude when you’re done. Claude responds with one `Insight` about your code and continues the task. ## @@ -19,11 +88,11 @@ Change your output style -Pick a style in one of these ways: - - * **`/output-style` command**: run `/output-style <style>` to switch, for example `/output-style concise`. With no argument, the command lists the styles you can pick and marks the current one. Claude Code saves your selection to `.claude/settings.local.json` at the [local project level](</docs/en/settings>). The command also works in [non-interactive mode](</docs/en/headless>) and Agent SDK sessions, and from the mobile app or web via [Remote Control](</docs/en/remote-control#limitations>), where you can list and select only built-in styles. Requires Claude Code v2.1.269 or later. - * **Terminal** : run `/config` and select **Output style** to pick a style from a menu. Claude Code saves your selection to `.claude/settings.local.json` at the [local project level](</docs/en/settings>). - * **VS Code extension** : open the [command menu](</docs/en/vs-code#use-the-prompt-box>) with `/` and select **Output styles** to pick a style, including your custom styles. Claude Code saves your selection to `.claude/settings.local.json`, the same file the terminal menu writes. Requires Claude Code v2.1.257 or later. +Pick a style with the command, a menu, or a settings file. The command and both menus save your choice to `.claude/settings.local.json` at the [local project level](</docs/en/settings>). + + * **`/output-style` command**: run `/output-style <style>` to switch, for example `/output-style concise`. With no argument, the command lists the styles you can pick and marks the current one. The command also works in [non-interactive mode](</docs/en/headless>) and Agent SDK sessions, and from the mobile app or web via [Remote Control](</docs/en/remote-control#limitations>), where you can list and select only built-in styles. Requires Claude Code v2.1.269 or later. + * **Terminal menu** : run `/config` and select **Output style** to pick a style from a menu. + * **VS Code extension** : open the [command menu](</docs/en/vs-code#use-the-prompt-box>) with `/` and select **Output styles** to pick a style, including your custom styles. Requires Claude Code v2.1.257 or later. * **Desktop app** : set the `outputStyle` field in a settings file, for example `.claude/settings.local.json`, the file the terminal menu writes. When you run `/config` there, Claude Code [opens **Settings > Claude Code**](</docs/en/desktop#what%E2%80%99s-not-available-in-desktop>) rather than a menu. To set a style without the menu, edit the `outputStyle` field directly in a settings file: @@ -32,7 +101,7 @@ "outputStyle": "Explanatory" } -When you switch styles mid-session, Claude uses the new style starting with your next message. For what that first message costs in prompt caching, see [Changing output style](</docs/en/prompt-caching#changing-output-style>). Before v2.1.251, the new style applied only after you ran `/clear` or started a new session. +The value is case-sensitive, so write the built-in names as `Proactive`, `Concise`, `Explanatory`, and `Learning`. A value that doesn’t match a style name exactly, such as `explanatory`, gives you the Default style. The `/output-style` command ignores case. To make a style your default across projects, set `outputStyle` in `~/.claude/settings.json`. A project’s own settings files [take precedence](</docs/en/settings#settings-precedence>) over that value. When you switch styles mid-session, Claude uses the new style starting with your next message. For what that first message costs in prompt caching, see [Changing output style](</docs/en/prompt-caching#changing-output-style>). Before v2.1.251, the new style applied only after you ran `/clear` or started a new session. ## @@ -84,16 +153,35 @@ ​ -Frontmatter - -Output style files support these frontmatter fields: - -Frontmatter| Purpose| Default +Frontmatter reference + +Configure an output style with YAML [frontmatter](</docs/en/glossary#frontmatter>) between `---` markers at the top of the file. All fields are optional, and field names use lowercase words separated by hyphens. A misspelled field is ignored without an error. If the YAML doesn’t parse, the style still loads under its file name with no fields set; run `claude --debug` to see the parse error. + +Field| Required| Description ---|---|--- -`name`| Name of the output style, if not the file name| Inherits from file name -`description`| Description of the output style, shown in the `/config` picker| None -`keep-coding-instructions`| Keep Claude Code’s built-in software engineering instructions| `false` -`force-for-plugin`| Plugin output styles only: apply this style automatically whenever the plugin is enabled, without requiring users to select it. Overrides the user’s `outputStyle` setting. If multiple enabled plugins set this, Claude Code uses the first one loaded.| `false` +`name`| No| Name of the output style, shown in the `/config` picker. Default: the file name +`description`| No| Description of the output style, shown in the `/config` picker +`keep-coding-instructions`| No| Set to `true` to keep Claude Code’s built-in software engineering instructions alongside your style. Default: `false` +`force-for-plugin`| No| Plugin output styles only. Set to `true` to apply this style automatically whenever the plugin is enabled, without requiring users to select it. Overrides the user’s `outputStyle` setting. If multiple enabled plugins set this, Claude Code uses the first one loaded. Default: `false` + +## + +​ + +Choose between an output style and other features + +An output style applies to every response in a session. It’s an instruction Claude follows, so nothing enforces it. When what you want is narrower than every response, or has to happen without fail, another feature fits better. This table matches what you want to the feature that does it: + +You want| Use| Why it fits +---|---|--- +Every response in a certain voice, length, or format, or Claude in a different role| An output style| It applies to the whole session, and you switch styles with one command +Claude to know your project’s conventions, commands, and structure| [CLAUDE.md](</docs/en/memory>)| It holds what Claude should know about the codebase, and it stays loaded whichever style you pick +Instructions for one kind of task, such as a release checklist or a review procedure| A [skill](</docs/en/skills>)| Claude loads it only when you invoke it or the task matches, so it doesn’t shape unrelated responses +Something to happen every time without exception, such as formatting after each edit or blocking a command| A [hook](</docs/en/hooks-guide>)| Claude Code runs a hook itself at a lifecycle event, so it doesn’t depend on Claude following an instruction +A helper with its own instructions, model, and tools for a focused task| A [subagent](</docs/en/sub-agents>)| It runs in a separate context with its own system prompt and returns a summary to your conversation +An addition to Claude’s instructions that you pass when you start Claude Code| [`--append-system-prompt`](</docs/en/cli-reference#system-prompt-flags>)| It appends to the system prompt without removing anything + +These features combine. For example, you can use CLAUDE.md for what Claude should know, an output style for how it responds, and a hook for anything that has to be guaranteed. [Extend Claude Code](</docs/en/features-overview>) compares the rest of the extension features. ## @@ -104,26 +192,9 @@ An output style changes the instructions Claude Code gives Claude. * Claude Code sends the active style’s instructions with every request. - * When you select a style other than Default, Claude Code also reminds Claude of the style during the conversation. * Custom output styles leave out Claude Code’s built-in software engineering instructions, such as how to scope changes, write comments, and verify work, unless `keep-coding-instructions` is set to `true`. Output styles apply to the main conversation and to a [fork](</docs/en/sub-agents#fork-the-current-conversation>), which inherits the parent’s full conversation and system prompt. Other [subagents run their own system prompt](</docs/en/sub-agents#what-loads-at-startup>), so styles don’t change how they respond. Token usage depends on the style. A style’s instructions add input tokens, though prompt caching reduces this cost after the first request in a session. The built-in Explanatory and Learning styles produce longer responses than Default by design, which increases output tokens. The Concise style does the opposite by instructing Claude to keep responses short by default. For custom styles, output token usage depends on what your instructions tell Claude to produce. - -## - -​ - -Comparisons to related features - -Several features customize how Claude Code behaves. Output styles change Claude Code’s default instructions and apply to every response. The others add instructions without changing the defaults, or scope them to a specific task. - -Feature| How it works| Use it when ----|---|--- -Output styles| Changes Claude Code’s default instructions| You want a different role, tone, or default response format every turn -[CLAUDE.md](</docs/en/memory>)| Adds a user message after the system prompt| Claude should always know your project conventions and codebase context -`--append-system-prompt`| Appends to the system prompt without removing anything| You want a one-off addition passed as a [CLI flag](</docs/en/cli-reference#system-prompt-flags>) at launch -[Agents](</docs/en/sub-agents>)| Runs a subagent with its own system prompt, model, and tools| You want a separately scoped helper for a focused task -[Skills](</docs/en/skills>)| Loads task-specific instructions when invoked or relevant| You have a reusable workflow ##
modified Create and distribute a plugin marketplace View current →
--- a/plugin-marketplaces.md +++ b/plugin-marketplaces.md @@ -274,7 +274,7 @@ Source| Type| Fields| Notes ---|---|---|--- -Relative path| `string` (e.g. `"./my-plugin"`)| none| Local directory within the marketplace repo. Must start with `./`, unless you write a bare name under `metadata.pluginRoot`. Claude Code resolves the path relative to the marketplace root, not the `.claude-plugin/` directory +Relative path| `string` (for example, `"./my-plugin"`)| none| Local directory within the marketplace repo. Must start with `./`, unless you write a bare name under `metadata.pluginRoot`. Claude Code resolves the path relative to the marketplace root, not the `.claude-plugin/` directory `github`| object| `repo`, `ref?`, `sha?`| `url`| object| `url`, `ref?`, `sha?`| Git URL source `git-subdir`| object| `url`, `path`, `ref?`, `sha?`| Subdirectory within a git repo. Clones sparsely to minimize bandwidth for monorepos @@ -805,26 +805,19 @@ Background auto-updates -By default, the background refresh disables git credential helpers when it checks the marketplace’s remote for new commits, so the check can’t authenticate to private repositories over HTTPS even when a helper is configured. SSH remotes aren’t affected: a key loaded in `ssh-agent` authenticates the background check the same way as the commands you run. When the check finds new commits, or fails because it can’t reach or authenticate to the remote, Claude Code clones the marketplace again and swaps the new clone in. If that clone fails, the existing checkout stays in place. The re-clone does use your stored git credentials, but it can time out on large repositories, so private-marketplace auto-updates may fail intermittently. Two settings make private marketplaces behave predictably: +The background refresh checks the marketplace’s remote for new commits with your configured git credential helpers, the same as the commands you run. For SSH remotes, a key loaded in `ssh-agent` authenticates the check. Claude Code runs the check non-interactively: it turns off git’s terminal prompts and askpass programs, and tells credential helpers not to prompt. Whether the check can authenticate to a private repository over HTTPS depends on your helper: + + * A helper that can supply a stored credential without prompting authenticates the check. Git Credential Manager, the macOS Keychain helper, and `git-credential-store` work this way once they hold a credential for the host. + * A helper that needs to prompt you can’t answer in the background. The update fails quietly and the existing checkout stays in place, so your plugins keep working from the last synced state. Run `/plugin marketplace update <name>` to refresh the marketplace with your credentials. + +When the check finds the checkout up to date, Claude Code leaves it as it is. When the check finds new commits, or fails because it can’t reach or authenticate to the remote, Claude Code clones the marketplace again and swaps the new clone in. If that clone fails, the existing checkout stays in place. The re-clone can time out on large repositories. Two settings make private marketplaces behave predictably: * Set `CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE=1` to keep the existing checkout without attempting the re-clone when the background check can’t reach or authenticate to the remote. Your plugins keep working from the last synced state, and manual updates with `/plugin marketplace update` still authenticate with your credentials. - * Configure a git credential helper, for example with `gh auth setup-git` for GitHub, so the re-clone can authenticate without prompting. - -Setting a provider token such as `GITHUB_TOKEN` in your environment doesn’t by itself enable background authentication. Tokens take effect only through a configured credential helper, for example the `gh` CLI’s helper, which reads `GH_TOKEN` and `GITHUB_TOKEN`. To make the background check itself authenticate over HTTPS, configure a global git URL rewrite. The rewrite embeds a token in the remote URL, so it takes effect even though the background check disables credential helpers. When the check finds the checkout up to date, Claude Code skips the re-clone. The following example rewrites the marketplace repository’s URL to include an access token: - - git config --global url."https://x-access-token:YOUR_TOKEN@github.com/acme-corp/plugins".insteadOf "https://github.com/acme-corp/plugins" - -Scope the rewrite to the marketplace repository or organization path. A rewrite whose base is only the host applies to every fetch and push to that host on the machine and overrides your normal credentials, including pushes to your own repositories. Each provider expects a different username in the rewritten URL, and the same path scoping applies to every provider. For self-hosted servers, replace the hostname with your server’s hostname: - -Provider| Rewritten URL form ----|--- -GitHub| `https://x-access-token:YOUR_TOKEN@github.com/acme-corp/plugins` -GitLab| `https://oauth2:YOUR_TOKEN@gitlab.com/acme-corp/plugins` -Bitbucket| `https://x-token-auth:YOUR_TOKEN@bitbucket.org/acme-corp/plugins` - -The rewrite stores the token in plaintext in your gitconfig, so use a token with read-only access to the marketplace repository. - -In CI/CD environments, configure a git credential helper before installing plugins from private repositories. On GitHub Actions, export a token with read access to the marketplace repository as `GH_TOKEN`, then run `gh auth setup-git`. The default workflow token can only access the workflow’s own repository, so a private marketplace in another repository needs a personal access token or app token.If you configure a global URL rewrite in the pipeline, the rewrite also authenticates the background check directly. + * Configure a git credential helper, for example with `gh auth setup-git` for GitHub, so the background check and the re-clone can authenticate without prompting. + +Setting a provider token such as `GITHUB_TOKEN` in your environment doesn’t by itself enable background authentication. Tokens take effect only through a configured credential helper, for example the `gh` CLI’s helper, which reads `GH_TOKEN` and `GITHUB_TOKEN`. + +In CI/CD environments, configure a git credential helper before installing plugins from private repositories. On GitHub Actions, export a token with read access to the marketplace repository as `GH_TOKEN`, then run `gh auth setup-git`. The default workflow token can only access the workflow’s own repository, so a private marketplace in another repository needs a personal access token or app token. ### @@ -1442,13 +1435,14 @@ For background auto-updates: - * By default, background refreshes disable git credential helpers when they check the remote for new commits, so the check can’t authenticate over HTTPS. SSH remotes with a key loaded in `ssh-agent` still authenticate - * When the check can’t authenticate, Claude Code re-clones the marketplace with your stored credentials, but the re-clone may time out on large repositories + * The background check uses your configured git credential helpers but never prompts, so your helper must be able to answer with a stored credential. SSH remotes with a key loaded in `ssh-agent` also authenticate + * If your helper needs to prompt you, the background update fails quietly and the existing checkout stays in place. Sign in to your helper first so it holds a credential for the host. For GitHub, run `gh auth login`, then `gh auth setup-git` + * When the check finds new commits, or can’t reach or authenticate to the remote, Claude Code re-clones the marketplace with the same credentials. The re-clone may time out on large repositories * Set `CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE=1` to keep the existing checkout without attempting the re-clone when the background check can’t reach or authenticate to the remote - * Configure a git credential helper, for example `gh auth setup-git`, so the re-clone can authenticate * If the re-clone times out on a large repository, increase the limit with `CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS` - * Configure a git URL rewrite scoped to the marketplace repository so the background check authenticates directly * Or update private marketplaces manually with `/plugin marketplace update <name>`, which uses your credentials + +Before v2.1.280, the background check ran without your credential helpers and couldn’t authenticate to private repositories over HTTPS. ###
modified Plugins reference View current →
--- a/plugins-reference.md +++ b/plugins-reference.md @@ -45,7 +45,19 @@ Detailed system prompt for the agent describing its role, expertise, and behavior. -Plugin agents support `name`, `description`, `model`, `effort`, `maxTurns`, `tools`, `disallowedTools`, `skills`, `memory`, `background`, [`omitClaudeMd`](</docs/en/sub-agents#supported-frontmatter-fields>), and `isolation` frontmatter fields. The only valid `isolation` value is `"worktree"`. For security reasons, plugin-shipped agents don’t support `hooks`, `mcpServers`, or `permissionMode`. You can put plugin agent files in subfolders of `agents/`. Claude Code [loads them recursively](</docs/en/sub-agents#choose-the-subagent-scope>) and joins the plugin name, each subfolder name, and the file name with colons to form the agent’s scoped name. For example, `agents/review/security.md` in a plugin named `my-plugin` loads as `my-plugin:review:security`. Two settings change that name: +#### + +​ + +Plugin agent frontmatter + +A plugin agent file uses the same [frontmatter fields as a subagent file](</docs/en/sub-agents#supported-frontmatter-fields>), except that Claude Code honors only some of them when the agent comes from a plugin: + + * **Supported** : `name`, `description`, `model`, `effort`, `maxTurns`, `tools`, `disallowedTools`, `skills`, `memory`, `background`, `omitClaudeMd`, `isolation`, `color`, and `experimental`. The only valid `isolation` value is `"worktree"`. + * **Not supported, for security reasons** : `hooks`, `mcpServers`, and `permissionMode`. Claude Code ignores these when loading an agent from a plugin. To use them, copy the agent file into `.claude/agents/` or `~/.claude/agents/`. + * **Not supported** : `initialPrompt`. + +You can put plugin agent files in subfolders of `agents/`. Claude Code [loads them recursively](</docs/en/sub-agents#choose-the-subagent-scope>) and joins the plugin name, each subfolder name, and the file name with colons to form the agent’s scoped name. For example, `agents/review/security.md` in a plugin named `my-plugin` loads as `my-plugin:review:security`. Two settings change that name: * Frontmatter `name`: it replaces only the file name, so `name: audit` in `agents/review/security.md` loads as `my-plugin:review:audit` * Manifest `agents` field: a file you list there loads without subfolder names, so `"agents": "./custom/review/security.md"` loads as `my-plugin:security` @@ -559,7 +571,7 @@ `sensitive`| No| If `true`, masks input and stores the value in secure storage instead of `settings.json` `required`| No| If `true`, validation fails when the field is empty `default`| No| Value used when the user provides nothing -`options`| No| For `string` type, the values the field accepts, shown in `/config` as a picker over them. Requires Claude Code v2.1.271 or later +`options`| No| For `string` type, the values the field accepts, shown in `/config` as a picker over them. See Limit a field to fixed options. Requires Claude Code v2.1.271 or later `multiple`| No| For `string` type, allow an array of strings `min` / `max`| No| Bounds for `number` type @@ -578,6 +590,39 @@ * **Managed settings** : [organization-controlled policy](</docs/en/permissions#managed-settings>) When more than one source sets the same key, managed settings take precedence, then `--settings`, then user settings. The only source you can remove from this list is user settings: pass [`--setting-sources`](</docs/en/cli-reference#cli-flags>) without `user` and Claude Code skips them. Managed settings and `--settings` stay whatever you pass. The SDK’s [`settingSources`](</docs/en/agent-sdk/claude-code-features#what-settingsources-does-not-control>) option sets the same list. Entries in a project’s `.claude/settings.json` or `.claude/settings.local.json` are ignored. Both files live in the workspace, so a cloned repository could supply values there, and those values would flow into plugin hook commands, MCP server configs, LSP commands, and monitor commands. Before v2.1.207, these entries were read. The restriction is specific to `pluginConfigs`: [`enabledPlugins`](</docs/en/settings-reference#enabledplugins>) still honors project and local settings. + +#### + +​ + +Limit a field to fixed options + +Set `options` on a `userConfig` field to make users pick its value from a fixed list. To limit a `tone` field to three options, list them in `options` and set `default` to one of them: + + { + "userConfig": { + "tone": { + "type": "string", + "title": "Tone", + "description": "Voice for generated replies", + "options": ["neutral", "warm", "formal"], + "default": "neutral" + } + } + } + +If you declare `options` on any field, users on Claude Code versions before v2.1.271 can’t load the plugin. When you set `options` on a field, follow these rules: + + * Set `type` to `string` + * Don’t set `multiple` or `sensitive` to `true` + * Set `default` to one of the options + * If you leave `default` unset, set `required` to `true` + * List at least one option, each 1 to 64 characters long + * Don’t start or end an option with a space + * Don’t use control characters, invisible characters, characters that change text direction, or spaces other than a regular space in an option + * Don’t list the same option twice, even in a different letter case + +If you break any of these rules, the plugin fails to load. Run `claude plugin validate` to see which field breaks which rule. ### @@ -1319,7 +1364,7 @@ Hooks not firing| Script not executable| Run `chmod +x script.sh` MCP server fails| Missing `${CLAUDE_PLUGIN_ROOT}`| Use variable for all plugin paths Path errors| Absolute paths used| Make paths relative, starting with `./`; see Path behavior rules, which cover the `skills` field’s `"."` exception -LSP `Executable not found in $PATH`| Language server not installed| Install the binary (e.g., `npm install -g typescript-language-server typescript`) +LSP `Executable not found in $PATH`| Language server not installed| Install the binary (for example, `npm install -g typescript-language-server typescript`) ###
modified How Claude Code uses prompt caching View current →
--- a/prompt-caching.md +++ b/prompt-caching.md @@ -17,7 +17,7 @@ A change to the conversation layer leaves the system prompt and project context cached. A change to the system prompt invalidates everything, because all later content now sits behind a different prefix. The third column gives common triggers rather than an exhaustive list, and the sections below cover the full set. The prefix-match rule explains most of the behaviors on this page. [Plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>) and [skill loading](</docs/en/skills>), for example, append their instructions as conversation messages, so the cached prefix stays intact. Two settings don’t appear in the layer table but still affect what stays cached: * **Model** : each model has its own cache. Switching models recomputes the entire request even when the content is identical. See Switching models below. - * **Effort level** : on most models, each effort level has its own cache, so changing effort mid-session recomputes the entire request. On Fable 5.1 with an API key or a Claude subscription, the cache stays intact by default. See Changing effort level below. + * **Effort level** : on most models, each effort level has its own cache, so changing effort mid-session recomputes the entire request. On Opus 5.5 and Fable 5.1 with an API key or a Claude subscription, the cache stays intact by default. See Changing effort level below. Pick your model and effort level at the top of a session, then save `/compact` for natural breaks between tasks. The fewer changes you make mid-task, the higher your cache hit rate. @@ -66,7 +66,7 @@ Switching models -Each model has its own cache. Switching with [`/model`](</docs/en/model-config#setting-your-model>) means the next request reads the entire conversation history with no cache hits, even though the content is identical. When you run `/model` at the terminal, Claude Code asks you to confirm the switch only while the cache is still warm and the new model isn’t the one that produced the last response. The cache stays warm for one cache TTL after Claude Code last sent a request in this conversation or Claude last responded. Once that time passes, the cache has expired, so Claude Code switches without asking. Before v2.1.238, Claude Code didn’t check the cache TTL and asked even after the cache had expired. You can also require this confirmation or skip it with a [PreModelSwitch hook](</docs/en/hooks#premodelswitch-decision-control>). The [`opusplan` model setting](</docs/en/model-config#opusplan-model-setting>) resolves to Opus during plan mode and Sonnet during execution, so each plan-mode toggle is a model switch and starts a fresh cache. [Automatic model fallback](</docs/en/model-config#automatic-model-fallback>) on Fable models and Opus 5 is also a model switch. When a safety classifier flags a request in a category that has a fallback model, Claude Code re-runs the request on that model and the session continues there. When a skill or command’s frontmatter names a [`model`](</docs/en/skills#frontmatter-reference>) other than the session’s current model, that turn is also a model switch: the next request reads the entire conversation history with no cache hits. The session model resumes on your next prompt. A `context: fork` skill sets the [forked subagent’s model](</docs/en/skills#run-skills-in-a-subagent>) instead. +Each model has its own cache. Switching with [`/model`](</docs/en/model-config#setting-your-model>) means the next request reads the entire conversation history with no cache hits, even though the content is identical. When you run `/model` at the terminal, Claude Code asks you to confirm the switch only while the cache is still warm and the new model isn’t the one that produced the last response. The cache stays warm for one cache TTL after Claude Code last sent a request in this conversation or Claude last responded. Once that time passes, the cache has expired, so Claude Code switches without asking. Before v2.1.238, Claude Code didn’t check the cache TTL and asked even after the cache had expired. You can also require this confirmation or skip it with a [PreModelSwitch hook](</docs/en/hooks#premodelswitch-decision-control>). The [`opusplan` model setting](</docs/en/model-config#opusplan-model-setting>) resolves to Opus during plan mode and Sonnet during execution, so each plan-mode toggle is a model switch and starts a fresh cache. [Automatic model fallback](</docs/en/model-config#automatic-model-fallback>) on Fable models, Opus 5.5, and Opus 5 is also a model switch. When a safety classifier flags a request in a category that has a fallback model, Claude Code re-runs the request on that model and the session continues there. When a skill or command’s frontmatter names a [`model`](</docs/en/skills#frontmatter-reference>) other than the session’s current model, that turn is also a model switch: the next request reads the entire conversation history with no cache hits. The session model resumes on your next prompt. A `context: fork` skill sets the [forked subagent’s model](</docs/en/skills#run-skills-in-a-subagent>) instead. ### @@ -74,7 +74,7 @@ Changing effort level -On most models, changing the [effort level](</docs/en/model-config#adjust-effort-level>) mid-session means the next request reads the entire conversation history with no cache hits. While the cache is still warm, Claude Code asks you to confirm the change first. On Fable 5.1 with an API key or a Claude subscription, changing effort keeps the cache, and Claude Code applies the new level without asking. This doesn’t apply on Amazon Bedrock, Google Cloud’s Agent Platform, or a [Claude apps gateway](</docs/en/claude-apps-gateway>), or when you set [`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS`](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) or your organization has a HIPAA configuration. Before v2.1.260, changing effort on Fable 5.1 with an API key or a Claude subscription also invalidated the cache. +On most models, changing the [effort level](</docs/en/model-config#adjust-effort-level>) mid-session means the next request reads the entire conversation history with no cache hits. While the cache is still warm, Claude Code asks you to confirm the change first. On Opus 5.5 and Fable 5.1 with an API key or a Claude subscription, changing effort keeps the cache, and Claude Code applies the new level without asking. This doesn’t apply on Amazon Bedrock, Google Cloud’s Agent Platform, or a [Claude apps gateway](</docs/en/claude-apps-gateway>), or when you set [`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS`](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) or your organization has a HIPAA configuration. Before v2.1.260, changing effort on Fable 5.1 with an API key or a Claude subscription also invalidated the cache. ### @@ -341,7 +341,7 @@ Field| Meaning ---|--- `cache_creation_input_tokens`| Tokens written to the cache on this turn, billed at the cache write rate -`cache_read_input_tokens`| Tokens served from cache on this turn, billed at roughly 10% of the standard input rate +`cache_read_input_tokens`| Tokens served from cache on this turn, billed at the model’s [cached token rate](<https://platform.claude.com/docs/en/about-claude/pricing>), below the standard input rate A high read-to-creation ratio means caching is working well. If creation stays high turn after turn, something is changing in your prefix. The actions that invalidate the cache section lists the usual causes. For a per-session summary, run `/usage`. After the main conversation’s first response, Claude Code adds a [`Prompt cache (main)` line](</docs/en/costs#prompt-cache-statistics>) to the Session block, showing the session’s hit ratio, miss count, and whether the cache is warm right now. A status line script can read the same numbers from the [`prompt_cache` object](</docs/en/statusline#prompt-cache-fields>). Both require Claude Code v2.1.251 or later. The `Prompt cache (main)` line also names the likely cause of the last miss when Claude Code can identify one, for example `likely cause: tool definitions changed`. The likely-cause text requires Claude Code v2.1.260 or later. For visibility across an organization, the OpenTelemetry exporter reports cache read and creation tokens per user and session. See [Monitor usage](</docs/en/monitoring-usage>) for the metric and event attribute reference.
modified Agent SDK reference - Python View current →
--- a/python.md +++ b/python.md @@ -1457,7 +1457,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 Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.6, Claude Opus 4.7, or Claude Opus 4.8](<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 Opus 5.5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.6, Claude Opus 4.7, or Claude Opus 4.8](<https://platform.claude.com/docs/en/about-claude/models/overview>), which include 1M context at standard pricing with no beta header required. ### @@ -1678,7 +1678,7 @@ `error`| `AssistantMessageError` ` | None`| Error type if the response encountered an error `usage`| `dict[str, Any] | None`| Per-message token usage (same keys as `ResultMessage.usage`) `message_id`| `str | None`| API message ID. Multiple messages from one turn share the same ID -`stop_reason`| `str | None`| Stop reason from the API (e.g. `end_turn`, `tool_use`) +`stop_reason`| `str | None`| Stop reason from the API (for example, `end_turn`, `tool_use`) `session_id`| `str | None`| ID of the session this message belongs to `uuid`| `str | None`| Unique message identifier within the session transcript @@ -3515,7 +3515,7 @@ `allowManagedDomainsOnly`| `bool`| `False`| Managed-settings only: when set in managed settings, ignore `allowedDomains` and `WebFetch(domain:...)` allow rules from non-managed settings sources. Has no effect when set via SDK options `allowUnixSockets`| `list[str]`| `[]`| macOS only: Unix socket paths that processes can access, such as the Docker socket. Ignored on Linux `allowAllUnixSockets`| `bool`| `False`| Allow access to all Unix sockets -`allowLocalBinding`| `bool`| `False`| Allow processes to bind to local ports (e.g., for dev servers) +`allowLocalBinding`| `bool`| `False`| Allow processes to bind to local ports (for example, for dev servers) `allowMachLookup`| `list[str]`| `[]`| macOS only: XPC/Mach service names to allow. Supports a trailing wildcard `httpProxyPort`| `int`| `None`| HTTP proxy port for network requests `socksProxyPort`| `int`| `None`| SOCKS proxy port for network requests
modified Quickstart View current →
--- a/quickstart.md +++ b/quickstart.md @@ -195,7 +195,7 @@ The `async for` loop keeps running as Claude thinks, calls tools, observes results, and decides what to do next. Each iteration yields a message: Claude’s reasoning, a tool call, a tool result, or the final outcome. The SDK handles the orchestration, tool execution, context management, and retries, so you consume the stream. The loop ends when Claude finishes the task or hits an error. The message handling inside the loop filters for human-readable output. Without filtering, you’d see raw message objects including system initialization and internal state, which is useful for debugging but noisy otherwise. -This example uses streaming to show progress in real-time. If you don’t need live output (e.g., for background jobs or CI pipelines), you can collect all messages at once. See [Streaming vs. single-turn mode](</docs/en/agent-sdk/streaming-vs-single-mode>) for details. +This example uses streaming to show progress in real-time. If you don’t need live output (for example, for background jobs or CI pipelines), you can collect all messages at once. See [Streaming vs. single-turn mode](</docs/en/agent-sdk/streaming-vs-single-mode>) for details. ###
modified Continue local sessions from any device with Remote Control View current →
--- a/remote-control.md +++ b/remote-control.md @@ -153,7 +153,7 @@ * **Pulling a session with`/teleport`**: when you pull a [cloud session](</docs/en/claude-code-on-the-web#from-cloud-to-terminal>) into your terminal with `/teleport`, the connected device doesn’t receive the pulled conversation’s earlier history. New messages in both directions go to and from the pulled conversation, which is now the one open in your terminal. * **Messages from your other sessions** : with [cross-session messaging](</docs/en/cross-session-messaging>), the same connection carries messages between your own sessions on different machines and from your [cloud sessions](</docs/en/claude-code-on-the-web>), through Anthropic servers like the rest of Remote Control traffic. [Message sessions on other machines](</docs/en/cross-session-messaging#message-sessions-on-other-machines>) covers the delivery rules and [Control inbound messages](</docs/en/cross-session-messaging#control-inbound-messages>) covers the inbound controls. Requires Claude Code v2.1.224 or later. * **Prompts you send mid-turn** : when you send a prompt from a connected device before the current turn ends, Claude Code queues it and keeps it in the device’s transcript after that turn finishes. - * **Diff of your changes** : when the session’s directory is in a git repository, a connected device’s diff pane shows the diff of your uncommitted changes. The device requests the diff over the connection, and Claude Code computes it on your machine. When your working tree is clean, Claude Code instead serves your branch’s changes since it diverged from the default branch. Before v2.1.247, Claude Code reported the diff to connected devices only in sessions served by `claude remote-control`. + * **Diff of your changes** : when the session’s directory is in a git repository, a connected device’s diff pane shows your changes. The device requests the diff over the connection, and Claude Code computes it on your machine. On a branch that has commits ahead of the repository’s default branch, the pane shows the changes since the branch split from it, including your uncommitted edits. On the default branch itself, or on a branch that isn’t ahead of it, the pane shows only your uncommitted changes. Before v2.1.247, Claude Code reported the diff to connected devices only in sessions served by `claude remote-control`. * **Model** : when you pick a [model](</docs/en/model-config>) from a connected device, Claude Code runs the session on that model. The terminal’s `/model` picker, `/status`, and `/config` show that model. Requires Claude Code v2.1.238 or later. * A model you pick from the device’s model control applies to the current session only. When you send `/model <name>` from the device to an interactive session, Claude Code also sets your default for new sessions. * If you send a name Claude Code doesn’t recognize, such as a display name where a model ID is expected, Claude Code [refuses the pick](</docs/en/errors#model-is-not-a-recognized-model-id>) and the session keeps its current model. Before v2.1.260, Claude Code saved an unrecognized pick from the device’s model control, and your next message failed.
modified Deploy self-hosted environments to production View current →
--- a/self-hosted-environments-deploy.md +++ b/self-hosted-environments-deploy.md @@ -121,7 +121,7 @@ * **Let the runner configure git** : start the runner with `--configure-git` to have it write the same identity and commit-signing config that Anthropic-hosted sessions use * **Ship git config in your image** : set identity and push credentials yourself, for example to commit under your own bot identity -Git version floors on the runner host: `--configure-git` SSH commit signing requires Git 2.34 or newer, `--use-anthropic-git-proxy` requires 2.32 or newer, and resuming sessions from branches pushed by [`--push-outcome-on-release`](</docs/en/self-hosted-environments-reference#runner-cli-flags>) requires 2.29 or newer. Git 2.24 is sufficient if you omit all three and manage git identity yourself. +Git version floors on the runner host: `--configure-git` SSH commit signing requires Git 2.34 or later, `--use-anthropic-git-proxy` requires 2.32 or later, and resuming sessions from branches pushed by [`--push-outcome-on-release`](</docs/en/self-hosted-environments-reference#runner-cli-flags>) requires 2.29 or later. Git 2.24 is sufficient if you omit all three and manage git identity yourself. ### @@ -136,7 +136,7 @@ * `push.negotiate = true`, so git asks your git host which commits it already has before packing a push. Requires Claude Code v2.1.257 or later. * `core.hooksPath` pointing at a runner-managed hooks directory. Its `commit-msg` and `prepare-commit-msg` hooks add a `Co-authored-by:` trailer for the session’s creator to each commit, built from the email in [`CCR_SESSION_ACCOUNT_EMAIL`](</docs/en/self-hosted-environments-configuration#wrapper-scripts>) and omitted when that variable is unset. If your image already sets `core.hooksPath`, the runner leaves your setting in place, skips installing these hooks, and prints a `[runner:git]` warning. -Commit signing requires git 2.34 or newer; the runner checks at startup and exits with an error if your git is older. This flag doesn’t configure push credentials, which you still provide in the image. +Commit signing requires git 2.34 or later; the runner checks at startup and exits with an error if your git is older. This flag doesn’t configure push credentials, which you still provide in the image. ### @@ -172,7 +172,7 @@ Use the Anthropic git proxy -Start the runner with `--use-anthropic-git-proxy`, or set `CLAUDE_RUNNER_USE_GIT_PROXY=1`, to have it clone through Anthropic’s git proxy, authenticated with the session’s own short-lived token. For ordinary user sessions, the proxy uses the GitHub or GitHub Enterprise OAuth token stored for the session creator; for bot and agent sessions, it uses your organization’s GitHub App installation token. Either way, the runner image needs no git credentials at all: no SSH keys, no credential helper, no `.netrc`. This is the same auth path Anthropic-hosted environments use. The proxy requires `--capacity 1` because the proxy URL is per-session, and git 2.32 or newer because older git ignores the configuration mechanism the proxy uses to isolate sessions from each other. The runner refuses to start if either requirement is unmet. Because the proxy fetches from Anthropic’s side, your git host must be reachable from Anthropic infrastructure, the same requirement Anthropic-hosted sessions have; for a git host that’s only routable inside your network, use a [`checkout` lifecycle hook](</docs/en/self-hosted-environments-configuration#checkout>) instead. Each runner process handles one session at a time, so run more replicas for parallelism. When the proxy is enabled, `--git-host-rewrite` and `--git-ssh-rewrite` have no effect: the proxy URL points at `api.anthropic.com`, not your git host. The runner also reports the opt-in to Anthropic when it registers, printing `Registering as opted in to Anthropic-managed git (--use-anthropic-git-proxy)` at startup. Reporting the opt-in requires Claude Code v2.1.267 or later, and earlier versions accept the flag without reporting it or printing that line. Each session on an opted-in runner then uses either Anthropic-managed git or the per-session proxy URL. When a session uses the per-session proxy URL, the runner logs one `[runner:warn]` line saying so. +Start the runner with `--use-anthropic-git-proxy`, or set `CLAUDE_RUNNER_USE_GIT_PROXY=1`, to have it clone through Anthropic’s git proxy, authenticated with the session’s own short-lived token. For ordinary user sessions, the proxy uses the GitHub or GitHub Enterprise OAuth token stored for the session creator; for bot and agent sessions, it uses your organization’s GitHub App installation token. Either way, the runner image needs no git credentials at all: no SSH keys, no credential helper, no `.netrc`. This is the same auth path Anthropic-hosted environments use. The proxy requires `--capacity 1` because the proxy URL is per-session, and git 2.32 or later because older git ignores the configuration mechanism the proxy uses to isolate sessions from each other. The runner refuses to start if either requirement is unmet. Because the proxy fetches from Anthropic’s side, your git host must be reachable from Anthropic infrastructure, the same requirement Anthropic-hosted sessions have; for a git host that’s only routable inside your network, use a [`checkout` lifecycle hook](</docs/en/self-hosted-environments-configuration#checkout>) instead. Each runner process handles one session at a time, so run more replicas for parallelism. When the proxy is enabled, `--git-host-rewrite` and `--git-ssh-rewrite` have no effect: the proxy URL points at `api.anthropic.com`, not your git host. The runner also reports the opt-in to Anthropic when it registers, printing `Registering as opted in to Anthropic-managed git (--use-anthropic-git-proxy)` at startup. Reporting the opt-in requires Claude Code v2.1.267 or later, and earlier versions accept the flag without reporting it or printing that line. Each session on an opted-in runner then uses either Anthropic-managed git or the per-session proxy URL. When a session uses the per-session proxy URL, the runner logs one `[runner:warn]` line saying so. ###
modified Self-hosted environments reference View current →
--- a/self-hosted-environments-reference.md +++ b/self-hosted-environments-reference.md @@ -45,7 +45,7 @@ `--session-stop-grace-sec <n>`| `SELF_HOSTED_RUNNER_SESSION_STOP_GRACE_MS`| `5`| How long to wait for the Claude process to exit cleanly after a session ends, before force-killing it. Raise the value if the child’s own `SessionEnd` hooks need more time. `--startup-timeout-min <n>`| `SELF_HOSTED_RUNNER_STARTUP_TIMEOUT_MS`| `15`| Release a session slot if the child hasn’t signaled that it initialized within N minutes of spawn. Cleared by the child’s init signal on the [activity channel](</docs/en/self-hosted-environments-configuration#keep-stdin-and-file-descriptor-3-attached>), not by ordinary output, after which `--release-idle-session-min` takes over. `0` disables. `--trust-workspace [bool]`| `SELF_HOSTED_RUNNER_TRUST_WORKSPACE`| on| Seed persisted trust for each session’s repository paths so repo-committed `permissions.allow` and `additionalDirectories` are honored. Set `false` to drop repo-committed permission grants and configure allow rules in the host config’s `settings.json` instead; repository-committed `sandbox.*` settings still apply either way, which is why the [repo-settings guard](</docs/en/self-hosted-environments-deploy#harden-your-deployment>) scans them regardless of this flag. -`--use-anthropic-git-proxy`| `CLAUDE_RUNNER_USE_GIT_PROXY=1`| off| Clone via the [Anthropic git proxy](</docs/en/self-hosted-environments-deploy#use-the-anthropic-git-proxy>) instead of customer-managed git auth. Requires `--capacity 1` and git 2.32 or newer; the runner refuses to start otherwise. Supersedes the rewrite flags. +`--use-anthropic-git-proxy`| `CLAUDE_RUNNER_USE_GIT_PROXY=1`| off| Clone via the [Anthropic git proxy](</docs/en/self-hosted-environments-deploy#use-the-anthropic-git-proxy>) instead of customer-managed git auth. Requires `--capacity 1` and git 2.32 or later; the runner refuses to start otherwise. Supersedes the rewrite flags. Most duration flags have a maximum, chosen to keep each timeout inside the runtime’s 32-bit timer ceiling of roughly 24.85 days. The `--*-min` flags cap at 10080 minutes, 7 days; `--drain-grace-sec` at 604800 seconds, also 7 days; and `--drain-wait-sec` at 86400 seconds, 24 hours. `--session-stop-grace-sec` and `--post-session-hook-timeout-sec` are uncapped. Overrunning a cap behaves differently per surface:
modified Settings files and precedence View current →
--- a/settings.md +++ b/settings.md @@ -66,7 +66,7 @@ Keep personal settings out of a repository -To change a setting for yourself in one project without changing it for your teammates, save it in `.claude/settings.local.json` inside the project. Claude Code applies that file over the committed `.claude/settings.json`, so if your team’s file sets `"model": "claude-sonnet-5"` and you want Opus, put `"model": "claude-opus-4-8"` in your local file and only your sessions change. Claude Code also writes to this file, keeps it out of your commits, and applies its allow rules without the trust step: +To change a setting for yourself in one project without changing it for your teammates, save it in `.claude/settings.local.json` inside the project. Claude Code applies that file over the committed `.claude/settings.json`, so if your team’s file sets `"model": "claude-sonnet-5"` and you want Opus, put `"model": "claude-opus-5-5"` in your local file and only your sessions change. Claude Code also writes to this file, keeps it out of your commits, and applies its allow rules without the trust step: * **Claude Code writes it too.** When Claude asks permission to run a Bash command and you choose “Yes, and don’t ask again”, Claude Code saves that [permission approval](</docs/en/permissions#permission-system>) here as an `allow` rule. * **You don’t need to gitignore it yourself, unless you created it by hand.** The first time Claude Code writes the file in a git repository that doesn’t already ignore it, it adds `**/.claude/settings.local.json` to your global git excludes file, so the file stays out of your commits in every repository. That file is `core.excludesFile` when your global git config sets it to an absolute or `~`-prefixed path; otherwise it’s `$XDG_CONFIG_HOME/git/ignore`, or `~/.config/git/ignore` when `XDG_CONFIG_HOME` is unset. If you created the file by hand and Claude Code hasn’t written to it yet, add it to `.gitignore` yourself. @@ -163,7 +163,7 @@ Each key’s entry on the [settings reference](</docs/en/settings-reference>) lists its per-session overrides and which one takes precedence, so check the entry for the key you want to change. Commands you run inside a session mostly save your choice: when you change a setting in `/config`, Claude Code writes it to your settings files, and `/model` saves the value as your default for new sessions. If you press `s` in the `/model` picker, Claude Code switches the model without saving it as your user default. [Adjust effort level](</docs/en/model-config#adjust-effort-level>) says which `/effort` picks Claude Code saves as your default for the model you’re using and which apply to the current session only. For example, to start one session on Opus without changing your default: - claude --settings '{"model": "claude-opus-4-8"}' + claude --settings '{"model": "claude-opus-5-5"}' ###
modified Example settings files View current →
--- a/settings-example.md +++ b/settings-example.md @@ -24,7 +24,9 @@ { "model": "claude-sonnet-5", - "effortLevel": "xhigh", + "modelSettings": { + "claude-sonnet-5": { "effortLevel": "xhigh" } + }, "editorMode": "vim", "theme": "light-daltonized", "statusLine": { @@ -51,8 +53,10 @@ { // Start every session on Sonnet 5 "model": "claude-sonnet-5", - // Reason more deeply than the default high level on models without a saved level; /effort saves a level per model, and --effort sets one for a single session - "effortLevel": "xhigh", + // Run Sonnet 5 above its default high level; /effort saves a level per model, and --effort sets one for a single session + "modelSettings": { + "claude-sonnet-5": { "effortLevel": "xhigh" } + }, // Vim keybindings in the prompt "editorMode": "vim", // The colorblind-friendly light theme
modified All settings View current →
--- a/settings-reference.md +++ b/settings-reference.md @@ -259,7 +259,7 @@ Pick which model answers when Claude calls the server-side [advisor tool](</docs/en/advisor>). Unset it to turn the advisor off. The advisor must be at least as capable as your main model. See [Choose an advisor model](</docs/en/advisor#choose-an-advisor-model>) for the accepted pairings and what happens when you pick one that isn’t accepted. You don’t usually edit this key by hand. Run `/advisor` to open a picker that shows the current choice, the models that can advise, and **No advisor**. Claude Code saves your pick to this key in `~/.claude/settings.json`. If you pick from a [Remote Control](</docs/en/remote-control>) client or in a session attached to a remote worker, the pick applies to that session only and doesn’t change this key. If your account requires the [usage-credits consent](</docs/en/advisor#fable-advisor-and-usage-credits>), accept it first by running `/model fable`. Until you do, picking Fable in `/advisor` saves nothing and Claude Code tells you to run `/model fable` first. * **Scope** : `Any file` - * **Type** : string, one of the aliases `"fable"`, `"opus"`, or `"sonnet"`, which resolve to Claude Code’s current default version of that model family, or a full model ID such as `"claude-opus-5"` + * **Type** : string, one of the aliases `"fable"`, `"opus"`, or `"sonnet"`, which resolve to Claude Code’s current default version of that model family, or a full model ID such as `"claude-opus-5-5"` * **Default** : unset, so the advisor is off * **Per-session overrides** : `--advisor` takes precedence over this key for one session. [`CLAUDE_CODE_DISABLE_ADVISOR_TOOL`](</docs/en/env-vars>) turns the advisor off, and this key can’t turn it back on @@ -277,7 +277,7 @@ `alwaysThinkingEnabled` -Turn [extended thinking](</docs/en/model-config#extended-thinking>) off for every session by setting this to `false`. Thinking is on by default, so `true` changes nothing. Most people set this through `/config` rather than by editing the file. On models that always think, such as the Fable models, `false` has no effect. On [third-party providers](</docs/en/third-party-integrations>) Claude Code omits the `thinking` parameter instead of turning thinking off, so adaptive-reasoning models may still think. With thinking turned off on the Anthropic API, Claude Code sends effort `high` instead of a higher level to models it knows [don’t accept that combination](</docs/en/errors#effort-isnt-available-with-thinking-turned-off>), such as Opus 5. +Turn [extended thinking](</docs/en/model-config#extended-thinking>) off for every session by setting this to `false`. Thinking is on by default, so `true` changes nothing. Most people set this through `/config` rather than by editing the file. On models that always think, such as Opus 5.5 and the Fable models, `false` has no effect. On [third-party providers](</docs/en/third-party-integrations>) Claude Code omits the `thinking` parameter instead of turning thinking off, so adaptive-reasoning models may still think. With thinking turned off on the Anthropic API, Claude Code sends effort `high` instead of a higher level to models it knows [don’t accept that combination](</docs/en/errors#effort-isnt-available-with-thinking-turned-off>), such as Opus 5. * **Scope** : `Any file` * **Type** : Boolean @@ -320,7 +320,7 @@ `effortLevel` -Set a default [effort level](</docs/en/model-config#adjust-effort-level>) for models you haven’t saved a level for. Lower levels are faster and cheaper on straightforward tasks, and higher levels reason more deeply on complex problems. When you run `/effort low`, `medium`, `high`, or `xhigh` in an interactive session on your machine, Claude Code saves the level for the active model under `modelSettings` rather than writing this key. Before v2.1.251, `/effort` wrote this key. Within the same settings file, Claude Code uses a model’s saved level rather than this key. `modelSettings` states the cross-file precedence. In a session attached to a remote worker, `/effort` applies to that session only. In a `-p` run or the Agent SDK it also applies to that session only, [unless a hold on the model’s default effort is in effect](</docs/en/model-config#non-interactive-effort>). [Adjust effort level](</docs/en/model-config#adjust-effort-level>) lists the interactive picks that also apply to that session only. The message that `/effort` prints says which happened. +Set a default [effort level](</docs/en/model-config#adjust-effort-level>) for models you haven’t saved a level for. Lower levels are faster and cheaper on straightforward tasks, and higher levels reason more deeply on complex problems. When you run `/effort low`, `medium`, `high`, or `xhigh` in an interactive session on your machine, Claude Code saves the level for the active model under `modelSettings` rather than writing this key. Before v2.1.251, `/effort` wrote this key. Within the same settings file, Claude Code uses a model’s saved level rather than this key. `modelSettings` states the cross-file precedence. In a session attached to a remote worker, in a `-p` run, and in the Agent SDK, `/effort` applies to that session only. [Adjust effort level](</docs/en/model-config#adjust-effort-level>) lists the interactive picks that also apply to that session only. The message that `/effort` prints says which happened. * **Scope** : `Any file` * **Type** : string, one of: @@ -337,7 +337,7 @@ "effortLevel": "xhigh" } -On Opus 4.7, Opus 4.8, and Fable 5, Claude Code holds that model’s default effort, organization-set or built-in; [Adjust effort level](</docs/en/model-config#adjust-effort-level>) states which ways of setting a level end the hold and which leave it in place. Once the hold ends, Claude Code resolves effort by the precedence stated at `modelSettings`. +In your user settings file, `~/.claude/settings.json`, this key is the older form `/effort` wrote before it saved levels per model, and it keeps applying where it applied before, on Opus 5, Fable 5.1, and earlier models. Opus 5.5 and models released after it ignore it and start at their own default until you save a level for them, which `/effort` writes under `modelSettings`. In project, local, and managed settings, and with `--settings`, this key applies to every model. ### @@ -393,7 +393,7 @@ `fastMode` -Turn [fast mode](</docs/en/fast-mode>) on for sessions where it’s available, for interactive work like rapid iteration or live debugging where you want speed at a higher cost per token. You don’t usually edit this key by hand: running `/fast` writes `fastMode: true` to `~/.claude/settings.json`, and running it again to turn fast mode off removes the key. Fast mode runs only on Opus 5 and Opus 4.8: turning it on from another model switches you to Opus, and switching to an unsupported model turns it off. See [Switch models while fast mode is on](</docs/en/fast-mode#switch-models-while-fast-mode-is-on>). +Turn [fast mode](</docs/en/fast-mode>) on for sessions where it’s available, for interactive work like rapid iteration or live debugging where you want speed at a higher cost per token. You don’t usually edit this key by hand: running `/fast` writes `fastMode: true` to `~/.claude/settings.json`, and running it again to turn fast mode off removes the key. Fast mode runs only on Opus 5.5, Opus 5, and Opus 4.8: turning it on from another model switches you to Opus, and switching to an unsupported model turns it off. See [Switch models while fast mode is on](</docs/en/fast-mode#switch-models-while-fast-mode-is-on>). * **Scope** : `Any file` * **Type** : Boolean @@ -436,7 +436,7 @@ `language` -Have Claude respond in a language other than English by default. There is no fixed list for responses: Claude Code adds the value verbatim to the system prompt as an instruction to always respond in that language, so any language name Claude can read works. Claude Code doesn’t check the value, so a misspelled name reaches Claude as written rather than producing an error. The same value sets the language for [voice dictation](</docs/en/voice-dictation#change-the-dictation-language>), which does have a fixed list of [supported dictation languages](</docs/en/voice-dictation#change-the-dictation-language>), and for auto-generated session titles. +Have Claude respond in a language other than English by default. There is no fixed list for responses: Claude Code passes the value verbatim to Claude as an instruction to always respond in that language, so any language name Claude can read works. Claude Code doesn’t check the value, so a misspelled name reaches Claude as written rather than producing an error. The same value sets the language for [voice dictation](</docs/en/voice-dictation#change-the-dictation-language>), which does have a fixed list of [supported dictation languages](</docs/en/voice-dictation#change-the-dictation-language>), and for auto-generated session titles. * **Scope** : `Any file` * **Type** : string, any language name, such as `"japanese"`, `"spanish"`, or `"french"`; Claude Code doesn’t validate it @@ -635,20 +635,20 @@ `modelSettings` -Save an [effort level](</docs/en/model-config#adjust-effort-level>) for each model you use. Requires Claude Code v2.1.251 or later. In an interactive session on your machine, when you save `low`, `medium`, `high`, or `xhigh` as your default with `/effort` or the `/model` picker’s effort slider, Claude Code writes that level here under the model you’re using, so you rarely edit this key yourself. When you pick one of those levels in the [VS Code extension’s model picker](</docs/en/vs-code#use-the-prompt-box>), Claude Code saves it here the same way. The `effortLevel` entry lists the sessions where `/effort` applies to that session only. Edit the key by hand to change or remove a level you saved. A model’s `effortLevel` here takes precedence over the top-level `effortLevel` in the same settings file. Across files, Claude Code resolves each model separately: the highest-precedence [settings file](</docs/en/settings#settings-precedence>) that sets either an `effortLevel` for that model or the top-level `effortLevel` decides, so an `effortLevel` in managed settings outranks a level you saved in user settings. [Adjust effort level](</docs/en/model-config#adjust-effort-level>) lists what else can override a saved level, such as `--effort` at launch. To cap one model’s effort rather than set its level, add a `maxEffortLevel` field to that model’s entry. The field requires Claude Code v2.1.267 or later. +Save an [effort level](</docs/en/model-config#adjust-effort-level>) for each model you use. Requires Claude Code v2.1.251 or later. In an interactive session on your machine, when you save `low`, `medium`, `high`, or `xhigh` as your default with `/effort` or the `/model` picker’s effort slider, Claude Code writes that level here under the model you’re using, so you rarely edit this key yourself. When you pick one of those levels in the [VS Code extension’s model picker](</docs/en/vs-code#use-the-prompt-box>), Claude Code saves it here the same way. The `effortLevel` entry lists the sessions where `/effort` applies to that session only. Edit the key by hand to change or remove a level you saved. A model’s `effortLevel` here takes precedence over the top-level `effortLevel` in the same settings file. Across files, Claude Code resolves each model separately: the highest-precedence [settings file](</docs/en/settings#settings-precedence>) that sets either an `effortLevel` for that model or a top-level `effortLevel` that applies to that model decides, so an `effortLevel` in managed settings outranks a level you saved in user settings. [Adjust effort level](</docs/en/model-config#adjust-effort-level>) lists what else can override a saved level, such as `--effort` at launch. To cap one model’s effort rather than set its level, add a `maxEffortLevel` field to that model’s entry. The field requires Claude Code v2.1.267 or later. * **Scope** : `Any file` * **Type** : object mapping a model name to an object with an `effortLevel` field, one of `"low"`, `"medium"`, `"high"`, or `"xhigh"`, a `maxEffortLevel` field, or both * **Default** : unset -Claude Code writes each entry under the model’s canonical name, such as `claude-opus-5`, and matches that model’s alias, date-suffixed, `[1m]`, and recognized provider-specific IDs to the same entry. This example keeps Opus 5 at `medium` while other models use their own saved or default levels: +Claude Code writes each entry under the model’s canonical name, such as `claude-opus-5-5`, and matches that model’s alias, date-suffixed, `[1m]`, and recognized provider-specific IDs to the same entry. This example keeps Opus 5.5 at `high` while other models use their own saved or default levels: settings.json { "modelSettings": { - "claude-opus-5": { - "effortLevel": "medium" + "claude-opus-5-5": { + "effortLevel": "high" } } } @@ -1370,7 +1370,7 @@ } } -Claude Code enforces these lists at the OS sandbox boundary, so they apply to every subprocess a sandboxed command starts, such as `kubectl`, `terraform`, or `npm`, not only to Claude’s file tools. Claude Code adds your [permission rules](</docs/en/sandboxing#permission-rules>) to the same lists: `Edit` allow and deny rules to `allowWrite` and `denyWrite`, `Read` deny rules to `denyRead`, and `WebFetch(domain:...)` allow and deny rules to the `network` domain lists. Unless a managed-only lock is set, Claude Code merges every list across the settings files the session loads. `allowManagedReadPathsOnly` limits `allowRead` to entries from managed settings, and `allowManagedDomainsOnly` does the same for allowed domains. [Configure sandboxing](</docs/en/sandboxing#configure-sandboxing>) covers sources you exclude with `--setting-sources`. When you edit a list during a session, Claude Code [applies the change to the running session](</docs/en/settings#when-edits-take-effect>). +Claude Code enforces these lists at the OS sandbox boundary, so they apply to every subprocess a sandboxed command starts, such as `kubectl`, `terraform`, or `npm`. Claude Code adds your [permission rules](</docs/en/sandboxing#permission-rules>) to the same lists: `Edit` allow and deny rules to `allowWrite` and `denyWrite`, `Read` deny rules to `denyRead`, and `WebFetch(domain:...)` allow and deny rules to the `network` domain lists. Unless a managed-only lock is set, Claude Code merges every list across the settings files the session loads. `allowManagedReadPathsOnly` limits `allowRead` to entries from managed settings, and `allowManagedDomainsOnly` does the same for allowed domains. [Configure sandboxing](</docs/en/sandboxing#configure-sandboxing>) covers sources you exclude with `--setting-sources`. When you edit a list during a session, Claude Code [applies the change to the running session](</docs/en/settings#when-edits-take-effect>). #### @@ -4238,7 +4238,6 @@ `github`| `{ "source": "github", "repo": "acme-corp/plugins", "ref": "main", "path": "marketplace" }`| `repo` required; `ref` is a branch or tag; `path` is a subdirectory `git`| `{ "source": "git", "url": "https://gitlab.example.com/tools/plugins.git", "ref": "production" }`| `url` required; `ref` and `path` as for `github` `url`| `{ "source": "url", "url": "https://plugins.example.com/marketplace.json", "headers": { "Authorization": "Bearer ${TOKEN}" } }`| `url` required; `headers` adds HTTP headers for authenticated access -`npm`| `{ "source": "npm", "package": "@acme-corp/claude-plugins" }`| `package` required, the npm package that contains `marketplace.json` `file`| `{ "source": "file", "path": "/opt/acme-corp/plugins/marketplace.json" }`| `path` required, the absolute path to a `marketplace.json` file `directory`| `{ "source": "directory", "path": "/opt/acme-corp/approved-marketplaces" }`| `path` required, the absolute path to a directory containing `.claude-plugin/marketplace.json` `hostPattern`| `{ "source": "hostPattern", "hostPattern": "^github\\.example\\.com$" }`| `hostPattern` required, a regex matched against the marketplace host
modified Claude Code in Slack View current →
--- a/slack.md +++ b/slack.md @@ -13,7 +13,7 @@ * **Bug investigation and fixes** : Ask Claude to investigate and fix bugs as soon as they’re reported in Slack channels. * **Quick code reviews and modifications** : Have Claude implement small features or refactor code based on team feedback. - * **Collaborative debugging** : When team discussions provide crucial context (e.g., error reproductions or user reports), Claude can use that information to inform its debugging approach. + * **Collaborative debugging** : When team discussions provide crucial context (for example, error reproductions or user reports), Claude can use that information to inform its debugging approach. * **Parallel task execution** : Kick off coding tasks in Slack while you continue other work, receiving notifications when complete. ##
modified Customize your status line View current →
--- a/statusline.md +++ b/statusline.md @@ -62,7 +62,7 @@ Disable the status line -Run `/statusline` and ask it to remove or clear your status line (e.g., `/statusline delete`, `/statusline clear`, `/statusline remove it`). You can also manually delete the `statusLine` field from your settings.json. +Run `/statusline` and ask it to remove or clear your status line (for example, `/statusline delete`, `/statusline clear`, `/statusline remove it`). You can also manually delete the `statusLine` field from your settings.json. ## @@ -206,7 +206,7 @@ "prompt_id": "550e8400-e29b-41d4-a716-446655440000", "transcript_path": "/path/to/transcript.jsonl", "model": { - "id": "claude-opus-5", + "id": "claude-opus-5-5", "display_name": "Opus" }, "workspace": {
modified Create custom subagents View current →
--- a/sub-agents.md +++ b/sub-agents.md @@ -180,7 +180,7 @@ } '@ -The `--agents` flag accepts JSON with a `prompt` field plus these frontmatter fields: `description`, `tools`, `disallowedTools`, `model`, `permissionMode`, `mcpServers`, `hooks`, `maxTurns`, `skills`, `initialPrompt`, `memory`, `effort`, `background`, `omitClaudeMd`, and `isolation`. Use `prompt` for the system prompt, equivalent to the markdown body in file-based subagents. Each top-level key in the JSON is the agent’s name. Don’t start a name with `-`. For what Claude Code does with a value it can’t load, and the flags and environment variable that skip that check, see [`Invalid --agents configuration`](</docs/en/errors#invalid-agents-configuration>). **Managed subagents** are deployed by organization administrators. Place markdown files in `.claude/agents/` inside the [managed settings directory](</docs/en/managed-settings#delivery-mechanisms>), using the same frontmatter format as project and user subagents. Managed definitions take precedence over project and user subagents with the same name. **Plugin subagents** come from [plugins](</docs/en/plugins>) you’ve installed. They load automatically alongside your custom subagents and appear in the @-mention typeahead under their scoped name. See the [plugin components reference](</docs/en/plugins-reference#agents>) for details on creating plugin subagents. +The `--agents` flag accepts JSON with a `prompt` field plus these frontmatter fields: `description`, `tools`, `disallowedTools`, `model`, `permissionMode`, `mcpServers`, `hooks`, `maxTurns`, `skills`, `initialPrompt`, `memory`, `effort`, `background`, `omitClaudeMd`, and `isolation`. Use `prompt` for the system prompt, equivalent to the markdown body in file-based subagents. `color` and `experimental` aren’t accepted here and are ignored rather than rejected. Each top-level key in the JSON is the agent’s name. Don’t start a name with `-`. For what Claude Code does with a value it can’t load, and the flags and environment variable that skip that check, see [`Invalid --agents configuration`](</docs/en/errors#invalid-agents-configuration>). **Managed subagents** are deployed by organization administrators. Place markdown files in `.claude/agents/` inside the [managed settings directory](</docs/en/managed-settings#delivery-mechanisms>), using the same frontmatter format as project and user subagents. Managed definitions take precedence over project and user subagents with the same name. **Plugin subagents** come from [plugins](</docs/en/plugins>) you’ve installed. They load automatically alongside your custom subagents and appear in the @-mention typeahead under their scoped name. See the [plugin components reference](</docs/en/plugins-reference#agents>) for details on creating plugin subagents. For security reasons, plugin subagents don’t support the `hooks`, `mcpServers`, or `permissionMode` frontmatter fields. These fields are ignored when loading agents from a plugin. If you need them, copy the agent file into `.claude/agents/` or `~/.claude/agents/`. You can also add rules to [`permissions.allow`](</docs/en/settings-reference#permissions-allow>) in `settings.json` or `settings.local.json`, but these rules apply to the entire session, not only the plugin subagent. @@ -219,21 +219,21 @@ The redirect vectors and the shape rules are listed under [How Claude Code enforces isolation](</docs/en/worktrees#how-claude-code-enforces-isolation>). PowerShell commands get only the working-directory check. [Monitor](</docs/en/tools-reference#monitor-tool>) commands go through the same working-directory and command-content checks as Bash commands. When the main conversation itself runs isolated in a worktree, Claude Code applies the same checks to the session and to every subagent it spawns, including subagents without `isolation: worktree`; see [How Claude Code enforces isolation](</docs/en/worktrees#how-claude-code-enforces-isolation>). -#### - -​ - -Supported frontmatter fields - -The following fields can be used in the YAML frontmatter. Only `name` and `description` are required. +### + +​ + +Frontmatter reference + +Configure a subagent with YAML [frontmatter](</docs/en/glossary#frontmatter>) between `---` markers at the top of its file, and write its system prompt as Markdown after the closing `---`. Only `name` and `description` are required. Multi-word field names use camelCase, such as `maxTurns` and `disallowedTools`, and must match the table exactly: Claude Code ignores a field it doesn’t recognize without reporting an error. To find out why a subagent file didn’t load, see Subagent files Claude Code skips. Field| Required| Description ---|---|--- -`name`| Yes| Unique identifier using lowercase letters and hyphens. [Hooks](</docs/en/hooks#subagentstart>) receive this value as `agent_type`. The filename doesn’t have to match. Names can’t contain `:`, which is reserved for [plugin-scoped identifiers](</docs/en/plugins>) such as `my-plugin:reviewer`. Claude Code doesn’t load a file whose name contains one and logs an error to the debug log. Before v2.1.218, such names were accepted +`name`| Yes| Unique identifier, such as `code-reviewer` or `reviewer-v2`. [Hooks](</docs/en/hooks#subagentstart>) receive this value as `agent_type`. The filename doesn’t have to match. Names can’t contain `:`, which is reserved for [plugin-scoped identifiers](</docs/en/plugins>) such as `my-plugin:reviewer`. Claude Code doesn’t load a file whose name contains one and logs an error to the debug log. Before v2.1.218, such names were accepted `description`| Yes| When Claude should delegate to this subagent `tools`| No| Tools the subagent can use, as a comma-separated string such as `Read, Grep, Bash` or a YAML list. Inherits every tool available to subagents if omitted. If no entry in the list resolves to a tool, the subagent usually [fails to launch](</docs/en/errors#agent-would-be-spawned-with-zero-tools>) with an error naming the entries. To preload Skills into context, use the `skills` field rather than listing `Skill` here `disallowedTools`| No| Tools to deny, removed from inherited or specified list. Same format as `tools`. An entry with a specifier, such as `Bash(git push *)`, still removes the whole tool -`model`| No| Model to use: `sonnet`, `opus`, `haiku`, `fable`, a full model ID such as `claude-opus-5`, or `inherit`. When you omit it, Claude Code picks the model in the subagent model order +`model`| No| Model to use: `sonnet`, `opus`, `haiku`, `fable`, a full model ID such as `claude-opus-5-5`, or `inherit`. When you omit it, Claude Code picks the model in the subagent model order `permissionMode`| No| Permission mode: `default`, `acceptEdits`, `auto`, `dontAsk`, `bypassPermissions`, `plan`, or `manual` as an alias for `default`. The `manual` alias requires Claude Code v2.1.200 or later. Ignored for plugin subagents `maxTurns`| No| Maximum number of agentic turns before the subagent stops. When the subagent reaches the limit, Claude Code returns its output marked as partial, and Claude can resume it to continue. The partial marking requires Claude Code v2.1.246 or later `skills`| No| [Skills](</docs/en/skills>) to preload into the subagent’s context at startup. The full skill content is injected, not only the description. Subagents can still invoke unlisted project, user, and plugin skills through the Skill tool @@ -245,7 +245,7 @@ `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/worktrees>), giving it an isolated copy of the repository branched by default from your [default branch](</docs/en/worktrees#choose-the-base-branch>) rather than the parent session’s `HEAD`. The worktree is automatically cleaned up if the subagent makes no changes `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 +`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. Ignored for plugin subagents `experimental`| No| Map of experimental options. Set its `cacheTtl` key to `5m` or `1h` to choose the [prompt cache lifetime](</docs/en/prompt-caching#choose-the-ttl-yourself>) for this subagent’s requests, at the frontmatter’s place in the [cache lifetime precedence](</docs/en/prompt-caching#choose-the-ttl-yourself>). Claude Code ignores any other value, ignores `1h` while your Claude subscription is using usage credits, and reads the field only from subagent files. Requires Claude Code v2.1.248 or later Write `cacheTtl` inside the `experimental` map, not at the top level of the frontmatter. @@ -286,7 +286,7 @@ The `model` field controls which model the subagent uses: * **Model alias** : use one of the available aliases: `sonnet`, `opus`, `haiku`, or `fable` - * **Full model ID** : use a full model ID such as `claude-opus-5` or `claude-sonnet-5`. Accepts the same values as the `--model` flag + * **Full model ID** : use a full model ID such as `claude-opus-5-5` or `claude-sonnet-5`. Accepts the same values as the `--model` flag * **inherit** : use the same model as the main conversation When Claude invokes a subagent, it can also pass a `model` parameter for that specific invocation. Claude Code resolves the subagent’s model in this order: @@ -360,7 +360,7 @@ * `WaitForMcpServers` * `Workflow` -The second filter applies to subagents running in the background. Apart from `Agent` and `ExitPlanMode`, which follow the first filter’s conditions wherever the subagent runs, a background subagent keeps every MCP tool but only these built-in tools: `Read`, `Grep`, `Glob`, `Bash`, `PowerShell`, `Edit`, `Write`, `NotebookEdit`, `WebFetch`, `WebSearch`, `TodoWrite`, `Skill`, `ToolSearch`, `EnterWorktree`, `ExitWorktree`, `Monitor`, `TaskStop`, `SendMessage`, and `Artifact`, plus [`SubagentHandback`](</docs/en/tools-reference>) for a subagent that reports through it. Claude Code removes every other built-in tool from a background subagent, whether inherited or listed in the `tools` field, so the same definition can resolve to different tools in the foreground and the background. The removal reports no error unless it leaves the `tools` list [resolving to nothing](</docs/en/errors#agent-would-be-spawned-with-zero-tools>). [`ListAgents`](</docs/en/cross-session-messaging>) follows these filters like any built-in tool: a foreground subagent inherits it in sessions where cross-session messaging is enabled, and a background subagent doesn’t keep it. Teammates in [agent teams](</docs/en/agent-teams>) additionally keep the task tools and cron tools: `TaskCreate`, `TaskGet`, `TaskList`, `TaskUpdate`, `CronCreate`, `CronDelete`, and `CronList`. In a [session without the Task tools](</docs/en/tools-reference#task-tool-availability>), Claude Code doesn’t provide the task tools to subagents either, even when the subagent runs a different model. An in-process teammate follows your session the same way, while a teammate in its own [split pane](</docs/en/agent-teams#choose-a-display-mode>) runs as a separate Claude Code process, so its own model decides. To restrict tools, use the `tools` field as an allowlist or the `disallowedTools` field as a denylist. This example uses `tools` to allow only Read, Grep, Glob, and Bash. The subagent can’t edit files, write files, or use any MCP tools: +The second filter applies to subagents running in the background. Apart from `Agent` and `ExitPlanMode`, which follow the first filter’s conditions wherever the subagent runs, a background subagent keeps every MCP tool but only these built-in tools: `Read`, `Grep`, `Glob`, `LSP`, `Bash`, `PowerShell`, `Edit`, `Write`, `NotebookEdit`, `WebFetch`, `WebSearch`, `TodoWrite`, `Skill`, `ToolSearch`, `EnterWorktree`, `ExitWorktree`, `Monitor`, `TaskStop`, `SendMessage`, and `Artifact`, plus [`SubagentHandback`](</docs/en/tools-reference>) for a subagent that reports through it. Claude Code removes every other built-in tool from a background subagent, whether inherited or listed in the `tools` field, so the same definition can resolve to different tools in the foreground and the background. The removal reports no error unless it leaves the `tools` list [resolving to nothing](</docs/en/errors#agent-would-be-spawned-with-zero-tools>). Before v2.1.280, background subagents couldn’t use `LSP`. [`ListAgents`](</docs/en/cross-session-messaging>) follows these filters like any built-in tool: a foreground subagent inherits it in sessions where cross-session messaging is enabled, and a background subagent doesn’t keep it. Teammates in [agent teams](</docs/en/agent-teams>) additionally keep the task tools and cron tools: `TaskCreate`, `TaskGet`, `TaskList`, `TaskUpdate`, `CronCreate`, `CronDelete`, and `CronList`. In a [session without the Task tools](</docs/en/tools-reference#task-tool-availability>), Claude Code doesn’t provide the task tools to subagents either, even when the subagent runs a different model. An in-process teammate follows your session the same way, while a teammate in its own [split pane](</docs/en/agent-teams#choose-a-display-mode>) runs as a separate Claude Code process, so its own model decides. To restrict tools, use the `tools` field as an allowlist or the `disallowedTools` field as a denylist. This example uses `tools` to allow only Read, Grep, Glob, and Bash. The subagent can’t edit files, write files, or use any MCP tools: --- name: safe-researcher
modified Subagents in the SDK View current →
--- a/subagents.md +++ b/subagents.md @@ -710,7 +710,7 @@ If Claude completes tasks directly instead of delegating to your subagent: - * **Use explicit prompting** : mention the subagent by name in your prompt, for example “Use the code-reviewer agent to…” + * **Use explicit prompting** : mention the subagent by name in your prompt, for example “Use the code-reviewer agent to check the authentication module” * **Write a clear description** : explain exactly when to use the subagent so Claude can match tasks appropriately ###
modified Agent SDK reference - TypeScript View current →
Show diff (170 lines)
--- a/typescript.md +++ b/typescript.md @@ -633,6 +633,7 @@ reconnectMcpServer(serverName: string): Promise<void>; toggleMcpServer(serverName: string, enabled: boolean): Promise<void>; setMcpServers(servers: Record<string, McpServerConfig>): Promise<McpSetServersResult>; + readMcpResource(serverName: string, uri: string): Promise<SDKControlMcpReadResourceResponse>; streamInput(stream: AsyncIterable<SDKUserMessage>): Promise<void>; stopTask(taskId: string): Promise<void>; close(): void; @@ -658,7 +659,7 @@ `supportedCommands()`| Returns available commands. From Agent SDK v0.3.216 the list reflects mid-session command changes; see `SDKCommandsChangedMessage` `supportedModels()`| Returns available models with display info `supportedAgents()`| Returns available subagents as `AgentInfo``[]` -`mcpServerStatus()`| Returns status of connected MCP servers +`mcpServerStatus()`| Returns the status of connected MCP servers as `McpServerStatus``[]` `getContextUsage(opts?)`| Returns an `SDKControlGetContextUsageResponse` breaking down the session’s context window usage by category, skill, and tool. With the default `detail`, it is the same data `/context` shows in an interactive session. The `detail` option requires Agent SDK v0.3.257 or later `readFile(path, options?)`| Reads a file from the session’s filesystem. Claude Code resolves the path against `cwd`; What `readFile()` can read lists the files it serves. Pass `{ maxBytes }` to change the read cap (default 1 MB, ceiling 10 MB) and `{ encoding: 'base64' }` for binary files such as images. Resolves with an `SDKControlReadFileResponse`, or `null` on permission denial, a missing file, or a transport error. Requires TypeScript SDK v0.2.121 or later `reloadSkills()`| Reloads skills from disk, so skills you add or edit mid-session become available to the running session. Resolves with an `SDKControlReloadSkillsResponse` listing the skills available after the reload. Requires Agent SDK v0.3.163 or later @@ -666,6 +667,7 @@ `reconnectMcpServer(serverName)`| Reconnect an MCP server by name. If the name also matches an entry in a settings file such as `.mcp.json` or `~/.claude.json`, Claude Code reconnects the server you configured through `mcpServers` or `setMcpServers()`, not the settings-file entry. That resolution order requires Claude Code v2.1.257 or later `toggleMcpServer(serverName, enabled)`| Enable or disable an MCP server by name, with the same name resolution as `reconnectMcpServer()`. Disabling disconnects the server `setMcpServers(servers)`| Dynamically replace the set of MCP servers for this session. Resolves with an `McpSetServersResult` naming which servers were added and removed, and any errors +`readMcpResource(serverName, uri)`| _Alpha._ Reads one MCP Apps `ui://` resource from a connected MCP server so your application can render a tool’s widget. Resolves with an `SDKControlMcpReadResourceResponse`. Requires TypeScript Agent SDK v0.3.280 or later `streamInput(stream)`| Stream input messages to the query for multi-turn conversations `stopTask(taskId)`| Stop a running background task by ID `close()`| Close the query and terminate the underlying process. Forcefully ends the query and cleans up all resources @@ -946,6 +948,26 @@ ​ +`SDKControlMcpReadResourceResponse` + +Return type of `readMcpResource()`, carrying the MCP server’s `resources/read` result. Requires TypeScript Agent SDK v0.3.280 or later. + + type SDKControlMcpReadResourceResponse = { + contents: { + uri: string; + mimeType?: string; + text?: string; + blob?: string; + _meta?: Record<string, unknown>; + }[]; + }; + +Pass `readMcpResource()` the server name as `mcpServerStatus()` reports it and a `ui://` URI, such as the `ui.resourceUri` a tool declares in its `_meta`. The call rejects for any other URI scheme, for an SDK MCP server your application hosts itself, and for a server that isn’t connected. It’s available when the init message’s `capabilities` include `mcp_read_resource_v1`. Each `contents` entry is one content item as the server sent it. `blob` holds base64 data for a binary item, and `_meta` is the item’s own `_meta`, where an MCP Apps server puts the resource’s `ui.csp` and `ui.permissions`. The contents are untrusted third-party HTML, so render them in a sandbox. + +### + +​ + `AgentDefinition` Configuration for a subagent defined programmatically. @@ -1363,9 +1385,10 @@ shouldQuery?: boolean; tool_use_result?: unknown; origin?: SDKMessageOrigin; - }; - -Set `pasted_content` to send content the user pasted into your prompt UI rather than typed, one entry per paste, each a string or an array of content blocks. Claude Code appends each entry’s text after the typed text, in order, and may wrap each paste in `<pasted_content>` tags. Blocks other than text are ignored, so send images and documents in `message.content`. Requires Agent SDK v0.3.277 or later. 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. On a message that carries a `tool_result` block, `tool_use_result` is the tool’s structured output object rather than the text sent to the model. Its shape depends on the tool named by the matching `tool_use` block, so the field is typed `unknown`; the built-in shapes are listed under Tool Output Types. For the `Agent` tool, `tool_use_result` is `AgentOutput`. On a `completed` result, `content` holds the subagent’s report without the agent ID and usage trailer that Claude Code appends to the `tool_result` text, so render from `tool_use_result` instead of parsing that text. For an MCP tool whose result contains `resource_link` blocks, `tool_use_result` is an object with a `resourceLinks` array of `SDKMcpResourceLink` entries. Claude receives each link as a line of text in the `tool_result` block, so read `resourceLinks` to render the files the server returned instead of parsing that text. Claude Code omits `resourceLinks` when the result has no links and on results from subagents, keeps at most 50 links per result, and stops adding links once the array reaches 64 KiB of serialized JSON. `resourceLinks` requires Agent SDK v0.3.257 or later. + inline_pastes?: string[]; + }; + +Set `pasted_content` to send content the user pasted into your prompt UI rather than typed, one entry per paste, each a string or an array of content blocks. Claude Code appends each entry’s text after the typed text, in order, and may wrap each paste in `<pasted_content>` tags. Blocks other than text are ignored, so send images and documents in `message.content`. Requires Agent SDK v0.3.277 or later. 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. On a message that carries a `tool_result` block, `tool_use_result` is the tool’s structured output object rather than the text sent to the model. Its shape depends on the tool named by the matching `tool_use` block, so the field is typed `unknown`; the built-in shapes are listed under Tool Output Types. For the `Agent` tool, `tool_use_result` is `AgentOutput`. On a `completed` result, `content` holds the subagent’s report without the agent ID and usage trailer that Claude Code appends to the `tool_result` text, so render from `tool_use_result` instead of parsing that text. For an MCP tool whose result contains `resource_link` blocks, `tool_use_result` is an object with a `resourceLinks` array of `SDKMcpResourceLink` entries. Claude receives each link as a line of text in the `tool_result` block, so read `resourceLinks` to render the files the server returned instead of parsing that text. Claude Code omits `resourceLinks` when the result has no links and on results from subagents, keeps at most 50 links per result, and stops adding links once the array reaches 64 KiB of serialized JSON. `resourceLinks` requires Agent SDK v0.3.257 or later. Set `inline_pastes` to tell Claude Code which parts of `message.content` the user pasted rather than typed, one string per paste. The prompt text stays where the user put it. Claude Code may wrap each listed paste in `<pasted_content>` tags where it stands, so Claude can tell pasted material from the user’s own words. Only pastes in the prompt’s last text block are wrapped. Requires TypeScript Agent SDK v0.3.280 or later. ### @@ -1494,7 +1517,7 @@ `sdk_opt_in_required`| The session hasn’t opted in to fast mode: pass `fastMode: true` in the `settings` option or through `applyFlagSettings()` `pending`| The availability check hasn’t completed yet -The same pair of fields appears on `SDKSystemMessage` and on the `SDKControlInitializeResponse`, so you can read the fast mode state before the first turn. The `origin` field forwards the `SDKMessageOrigin` of the user message that triggered this result. When the SDK injects a synthetic follow-up turn, such as for a finished background task, the resulting `SDKResultMessage` carries `origin: { kind: "task-notification" }`. Routines whose trigger fired and server-verified messages from your other sessions arrive with this kind too, each with the `subkind` described in Task-notification subkinds. Check `kind` to distinguish results that answer your prompt from injected follow-ups before routing or suppressing them. When several background-task completions are queued together, Claude Code can answer them in one turn rather than one turn each. Each completion still produces its own result with this origin. All but the last of the completions Claude Code answers together produce empty results with `num_turns: 0`, in order, and the last one’s result carries the turn that answers them all. The field is absent for results emitted before any user turn, such as startup errors. When a `PreToolUse` hook returns `permissionDecision: "defer"`, the result has `stop_reason: "tool_deferred"` and `deferred_tool_use` carries the pending tool’s `id`, `name`, and `input`. Read this field to surface the request in your own UI, then resume with the same `session_id` to continue. See [Defer a tool call for later](</docs/en/hooks#defer-a-tool-call-for-later>) for the full round trip. +The same pair of fields appears on `SDKSystemMessage` and on the `SDKControlInitializeResponse`, so you can read the fast mode state before the first turn. The `origin` field forwards the `SDKMessageOrigin` of the user message that triggered this result. When the SDK injects a synthetic follow-up turn, such as for a finished background task, the resulting `SDKResultMessage` carries `origin: { kind: "task-notification" }`. Routines whose trigger fired and server-verified messages from your other sessions arrive with this kind too, each with the `subkind` described in Task-notification subkinds. Check `kind` to distinguish results that answer your prompt from injected follow-ups before routing or suppressing them. If your application declares scheduled runs, their results carry `kind: "task-notification"` too, so don’t suppress on `kind` alone. When several background-task completions are queued together, Claude Code can answer them in one turn rather than one turn each. Each completion still produces its own result with this origin. All but the last of the completions Claude Code answers together produce empty results with `num_turns: 0`, in order, and the last one’s result carries the turn that answers them all. The field is absent for results emitted before any user turn, such as startup errors. When a `PreToolUse` hook returns `permissionDecision: "defer"`, the result has `stop_reason: "tool_deferred"` and `deferred_tool_use` carries the pending tool’s `id`, `name`, and `input`. Read this field to surface the request in your own UI, then resume with the same `session_id` to continue. See [Defer a tool call for later](</docs/en/hooks#defer-a-tool-call-for-later>) for the full round trip. #### @@ -1899,6 +1922,7 @@ | { kind: "task-notification"; subkind?: "scheduled-trigger" | "peer-send-message"; + fireReason?: string; } | { kind: "coordinator" } | { kind: "auto-continuation" } @@ -1909,7 +1933,7 @@ `human`| Direct input from the end user. If your application forwards what the user typed as a user message, set its `origin` to `{ kind: "human" }` explicitly: Claude Code treats a user message with no `origin` as unattributed, and checks that require a human-typed prompt, such as the [`ultracode` workflow keyword](</docs/en/workflows#ask-for-a-workflow-in-your-prompt>), don’t accept it. Before v2.1.210, Claude Code treated an absent `origin` on a user message as human input. `channel`| Message arriving on a [channel](</docs/en/channels>). `server` is the source MCP server name. `peer`| Message from another agent: an in-process [teammate](</docs/en/agent-teams>) or a [cross-session peer](</docs/en/cross-session-messaging>), another of your Claude Code sessions. See Peer origin fields for the per-field semantics and the trust model. -`task-notification`| Synthetic turn injected for a delivery that arrives without a fresh user prompt, such as a finished background task; see `SDKTaskNotificationMessage` for that arm. The optional `subkind` marks what raised the notification. See Task-notification subkinds. +`task-notification`| Synthetic turn injected for a delivery that arrives without a fresh user prompt, such as a finished background task; see `SDKTaskNotificationMessage` for that arm. A prompt your application declares as a scheduled run carries this kind too. The optional `subkind` marks what raised the notification. See Task-notification subkinds. `coordinator`| Message from a team coordinator in an [agent team](</docs/en/agent-teams>). `auto-continuation`| Synthetic turn injected when the session continues without fresh user input, such as a command result that triggers a follow-up prompt. `unclassified`| Injected turn whose origin couldn’t be determined. Requires Claude Code v2.1.223 or later. When Claude Code receives an `SDKUserMessage` with `isSynthetic: true` and can’t classify it as any other `kind`, it sets this kind as the message arrives and frames the turn to the model as a non-user source rather than treating it as human input. Your application shouldn’t set this value. @@ -1920,12 +1944,20 @@ Task-notification subkinds -When Claude Code delivers a task notification into a session, it sets `subkind` on the notification’s `origin` only if Anthropic servers verified where that notification came from. `subkind` requires Claude Code v2.1.213 or later, and it takes one of two values: - - * `scheduled-trigger`: the notification is a [routine](</docs/en/routines>)’s stored prompt, delivered because one of the routine’s triggers fired: its schedule, its [API trigger](</docs/en/routines#add-an-api-trigger>), its [GitHub trigger](</docs/en/routines#add-a-github-trigger>), or **Run now**. Claude Code frames these to the model as the session’s assigned task, with a different notice from the notice that other task notifications carry. +When Claude Code delivers a task notification into a session, it sets `subkind` on the notification’s `origin` if Anthropic servers verified where that notification came from. It also sets `subkind` when your application declares the message as a scheduled run itself, which requires TypeScript Agent SDK v0.3.280 or later. `subkind` requires Claude Code v2.1.213 or later, and it takes one of two values: + + * `scheduled-trigger`: the notification is a [routine](</docs/en/routines>)’s stored prompt, delivered because one of the routine’s triggers fired: its schedule, its [API trigger](</docs/en/routines#add-an-api-trigger>), its [GitHub trigger](</docs/en/routines#add-a-github-trigger>), or **Run now**. A prompt your application declares as a scheduled run carries this value too. Claude Code frames these to the model as the session’s assigned task, with a different notice from the notice that other task notifications carry. * `peer-send-message`: the notification is a message that another of your sessions sent with the server-side `send_message` tool that [cloud sessions](</docs/en/claude-code-on-the-web>) use to message each other, not the [cross-session `SendMessage` tool](</docs/en/cross-session-messaging>), and Anthropic servers verified that both sessions belong to the same private group of sessions. Requires Claude Code v2.1.224 or later. A `send_message` delivery the servers didn’t verify that way gets no subkind. -Every other task notification has no `subkind`. That includes [scheduled tasks](</docs/en/scheduled-tasks>) that fire on your own machine, [PR activity](</docs/en/claude-code-on-the-web#how-claude-responds-to-pr-activity>) delivered into a session, and background events such as a finished task. Messages from the [cross-session `SendMessage` tool](</docs/en/cross-session-messaging>) aren’t task notifications at all: whether they come from a session on the same machine or through Anthropic servers from another machine, Claude Code gives them `kind: "peer"` and the peer origin fields. +Every other task notification has no `subkind`. That includes [PR activity](</docs/en/claude-code-on-the-web#how-claude-responds-to-pr-activity>) delivered into a session and background events such as a finished task. Messages from the [cross-session `SendMessage` tool](</docs/en/cross-session-messaging>) aren’t task notifications at all: whether they come from a session on the same machine or through Anthropic servers from another machine, Claude Code gives them `kind: "peer"` and the peer origin fields. `fireReason` says why a `scheduled-trigger` notification fired, as a short lowercase token such as `scheduled`, `manual`, `retry`, `catch_up`, or `api`. Anthropic servers set it on a [routine](</docs/en/routines>)’s deliveries, and your application sets it when it declares a scheduled run. It’s absent when neither sent one. Requires TypeScript Agent SDK v0.3.280 or later. + +#### + +​ + +Declare a scheduled run + +If your application runs prompts on its own schedule, declare each run so Claude Code frames the turn to the model as a scheduled task rather than as live input from the user. Start the session with `CLAUDE_CODE_HOST_SCHEDULED_RUN` set to `1` in `env`, then send the run’s `SDKUserMessage` with `origin: { kind: "task-notification", subkind: "scheduled-trigger", fireReason: "scheduled" }` and without `isSynthetic`. Claude Code ignores the declaration in a process started without that variable. It also ignores it in a process whose environment carries [`CLAUDECODE`](</docs/en/env-vars>) or `CLAUDE_CODE_CHILD_SESSION`. Claude Code keeps `fireReason` only when the value is 1 to 32 lowercase letters or underscores. Requires TypeScript Agent SDK v0.3.280 or later. ### @@ -4742,7 +4774,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 Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.6, Claude Opus 4.7, or Claude Opus 4.8](<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 Opus 5.5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.6, Claude Opus 4.7, or Claude Opus 4.8](<https://platform.claude.com/docs/en/about-claude/models/overview>), which include 1M context at standard pricing with no beta header required. ### @@ -4810,7 +4842,7 @@ Field| Type| Description ---|---|--- -`name`| `string`| Agent type identifier (e.g., `"Explore"`, `"general-purpose"`) +`name`| `string`| Agent type identifier (for example, `"Explore"`, `"general-purpose"`) `description`| `string`| Description of when to use this agent `model`| `string | undefined`| Model this agent uses: an alias or model ID, or `'inherit'` for the parent’s model. When it’s `undefined`, Claude Code picks the model in the [subagent model order](</docs/en/sub-agents#choose-a-model>) @@ -4867,10 +4899,11 @@ destructive?: boolean; openWorld?: boolean; }; + _meta?: Record<string, unknown>; }[]; }; -`source` says where the server’s definition came from, with the same values and trust rule as `McpServerProvenance`’s `source`. The field requires Agent SDK v0.3.274 or later and is absent on earlier versions. +`source` says where the server’s definition came from, with the same values and trust rule as `McpServerProvenance`’s `source`. The field requires Agent SDK v0.3.274 or later and is absent on earlier versions. `_meta` on a `tools` entry carries the MCP Apps members of that tool’s `_meta`, so your application can find the `ui://` resource to render with `readMcpResource()`. Claude Code passes through the `ui` object and the deprecated flat `ui/resourceUri` string, and withholds every other key. Inside `ui`, `resourceUri` is a `ui://` string and `visibility` an array of `"model"` and `"app"` when the server sets them, and any other member passes through unchanged. Claude Code drops either key when the value is malformed, and omits `_meta` from a tool that declares neither. The field is present only when the init message’s `capabilities` include `mcp_tool_ui_meta_v1`, and requires TypeScript Agent SDK v0.3.280 or later. ### @@ -5142,7 +5175,7 @@ `SDKStatusMessage` -Status update message (e.g., compacting). +Status update message (for example, compacting). type SDKStatusMessage = { type: "system"; @@ -5647,8 +5680,8 @@ `deniedDomains`| `string[]`| `[]`| Domain names that sandboxed processes cannot access. Takes precedence over `allowedDomains` `strictAllowlist`| `boolean`| `false`| Deny sandboxed commands access to hosts outside the [network allowlist](</docs/en/sandboxing#network-isolation>) instead of prompting. Enforced for sandboxed commands only; in-process tools such as WebFetch aren’t gated by it. Only honored from user, managed, or CLI `--settings` settings; project settings are ignored. Requires Claude Code v2.1.219 or later `allowManagedDomainsOnly`| `boolean`| `false`| Managed-settings only. When set in [managed settings](</docs/en/managed-settings>), only `allowedDomains` entries and `WebFetch(domain:...)` allow rules from managed settings are honored, and allow entries from user, project, or local settings are ignored. Has no effect when set via SDK options -`allowLocalBinding`| `boolean`| `false`| Allow processes to bind to local ports (e.g., for dev servers) -`allowUnixSockets`| `string[]`| `[]`| Unix socket paths that processes can access (e.g., Docker socket) +`allowLocalBinding`| `boolean`| `false`| Allow processes to bind to local ports (for example, for dev servers) +`allowUnixSockets`| `string[]`| `[]`| Unix socket paths that processes can access (for example, Docker socket) `allowAllUnixSockets`| `boolean`| `false`| Allow access to all Unix sockets `httpProxyPort`| `number`| `undefined`| HTTP proxy port for network requests `socksProxyPort`| `number`| `undefined`| SOCKS proxy port for network requests
modified Find bugs with ultrareview View current →
--- a/ultrareview.md +++ b/ultrareview.md @@ -119,7 +119,13 @@ 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. If you chose to post the findings to the pull request, keep the session open until the review finishes; if the session ends first, Claude Code posts nothing. Use `/tasks` to see running and completed reviews, open the detail view for a review, or stop a review that is in progress. If you stop a review, Claude Code archives the cloud session and doesn’t return partial findings. When the review finishes, Claude Code shows the verified findings 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. +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. If you chose to post the findings to the pull request, keep the session open until the review finishes; if the session ends first, Claude Code posts nothing. Use `/tasks` to see running and completed reviews, open the detail view for a review, or stop a review that is in progress. If you stop a review, Claude Code archives the cloud session and doesn’t return partial findings. Claude can also tell you that a review was stopped or that its session wasn’t found: + + * If the review’s cloud session is stopped or [archived](</docs/en/claude-code-on-the-web#archive-sessions>) on claude.ai before the review finishes, Claude tells you it was stopped. + * If the review’s cloud session was deleted, or you’ve signed in to a different Claude account or organization since launching it, Claude tells you the session wasn’t found. + * If you switched accounts, the review may still finish under the account that started it. If the review is still running, sign back in as that account and resume the conversation with `claude --resume` to re-attach it. + +When the review finishes, Claude Code shows the verified findings 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. ## @@ -145,12 +151,12 @@ Running `claude ultrareview` requires the same authentication and usage-credits configuration as `/code-review ultra`. The subcommand exits with one of three codes: * **0** : the review completed, with or without findings - * **1** : the review failed to launch, the cloud session errored, or the timeout elapsed + * **1** : the review failed to launch or was stopped before it finished, the cloud session errored, or the timeout elapsed * **130** : you interrupted the subcommand with Ctrl-C If you interrupt the subcommand, the remote review keeps running; follow the session URL printed to stderr to watch it in the browser. With `--post`, the subcommand starts the post right after printing the findings, and prints the link to stderr. - * If the run fails, times out, or you interrupt it, the subcommand posts nothing. + * If the run fails, is stopped, or times out, or if you interrupt it, the subcommand posts nothing. * If the review completes but the comment isn’t posted, Claude Code prints the reason to stderr, and the findings stay on stdout so you can post them by hand. For automatic reviews on GitHub pull requests, [Code Review](</docs/en/code-review>) integrates with your repository directly and posts findings as inline PR comments without a CLI step.
modified Handle approvals and user input View current →
--- a/user-input.md +++ b/user-input.md @@ -46,7 +46,7 @@ Argument| Description ---|--- -`toolName`| The name of the tool Claude wants to use (e.g., `"Bash"`, `"Write"`, `"Edit"`) +`toolName`| The name of the tool Claude wants to use (for example, `"Bash"`, `"Write"`, `"Edit"`) `input`| The parameters Claude is passing to the tool. Contents vary by tool. `options` (TS) / `context` (Python)| Additional context including optional `suggestions` (proposed `PermissionUpdate` entries to avoid re-prompting) and a cancellation signal. In TypeScript, `signal` is an `AbortSignal`; in Python, the signal field is reserved for future use. See [`ToolPermissionContext`](</docs/en/agent-sdk/python#toolpermissioncontext>) for Python. @@ -189,7 +189,7 @@ When allowing, the tool runs with the input Claude requested unless you return a modified input, `updatedInput` in TypeScript or `updated_input` in Python. Before v2.1.207, Claude Code rejected an allow result that omitted `updatedInput` and denied the tool call with a validation error. When denying, provide a message explaining why. Claude sees this message and may adjust its approach. Beyond allowing or denying, you can modify the tool’s input or provide context that helps Claude adjust its approach: * **Approve** : let the tool execute as Claude requested - * **Approve with changes** : modify the input before execution (e.g., sanitize paths, add constraints) + * **Approve with changes** : modify the input before execution (for example, sanitize paths, add constraints) * **Approve and remember** : echo a suggested permission rule back so matching calls skip the prompt next time * **Reject** : block the tool and tell Claude why * **Suggest alternative** : block but guide Claude toward what the user wants instead @@ -469,8 +469,8 @@ From the question object| Use as ---|--- -`question` field (e.g., `"How should I format the output?"`)| Key -Selected option’s `label` field (e.g., `"Summary"`)| Value +`question` field (for example, `"How should I format the output?"`)| Key +Selected option’s `label` field (for example, `"Summary"`)| Value For multi-select questions, pass an array of labels or join them with `", "`. If you support free-text input, use the user’s custom text as the value. @@ -620,7 +620,7 @@ 1. **Route the request** : The `canUseTool` callback checks if the tool name is `"AskUserQuestion"` and routes to a dedicated handler 2. **Display questions** : The handler loops through the `questions` array and prints each question with numbered options - 3. **Collect input** : The user can enter a number to select an option, or type free text directly (e.g., “jquery”, “i don’t know”) + 3. **Collect input** : The user can enter a number to select an option, or type free text directly (for example, “jquery”, “i don’t know”) 4. **Map answers** : The code checks if input is numeric (uses the option’s label) or free text (uses the text directly) 5. **Return to Claude** : The response includes both the original `questions` array and the `answers` mapping
modified Voice dictation View current →
--- a/voice-dictation.md +++ b/voice-dictation.md @@ -51,7 +51,7 @@ Hold to record -Hold mode is push-to-talk: recording runs while you hold the key and stops when you release it. This is the default mode. Hold `Space` to start recording. Claude Code detects a held key by watching for rapid key-repeat events from your terminal, so there is a brief warmup before recording begins. The footer shows `keep holding…` during warmup, then `listening…` once recording is active. While recording, the prompt cursor becomes a bar that rises and falls with your microphone level, unless you have [`prefersReducedMotion`](</docs/en/settings-reference#prefersreducedmotion>) turned on. The first couple of key-repeat characters type into the input during warmup and are removed automatically when recording activates. A single `Space` tap still types a space, since hold detection only triggers on rapid repeat. +Hold mode is push-to-talk: recording runs while you hold the key and stops when you release it. This is the default mode. Hold `Space` to start recording. Claude Code detects a held key by watching for rapid key-repeat events from your terminal, so there is a brief warmup before recording begins. The footer shows `keep holding…` during warmup, then `listening…` once recording is active. While recording, the prompt cursor becomes a bar that rises and falls with your microphone level, unless you have [`prefersReducedMotion`](</docs/en/settings-reference#prefersreducedmotion>) turned on. The first couple of key-repeat characters type into the input during warmup and are removed automatically when recording activates. A single `Space` tap still types a space, since hold detection only triggers on rapid repeat. Holding or tapping `Space` starts dictation only where the keypress would otherwise type into the prompt. In the [transcript viewer](</docs/en/interactive-mode#transcript-viewer>), `Space` pages through the conversation, and in [vim mode](</docs/en/interactive-mode#vim-editor-mode>) outside INSERT it is a command. A rebound modifier combination like `meta+k` never types text, so it starts dictation from those places too. To skip the warmup, switch to tap mode with `/voice tap`, or rebind to a modifier combination like `meta+k`. Modifier combos start recording on the first keypress. @@ -70,6 +70,14 @@ Tap to record and send Tap mode toggles recording with a single keypress: tap once to start, speak, then tap again to send the prompt. There is no warmup, and you don’t need to keep the key held. Enable tap mode with `/voice tap`. With the prompt input empty, tap `Space` to start recording. The footer shows `● REC · tap to send` while recording. Tap `Space` again to stop. Claude Code inserts the transcript and submits the prompt automatically when the transcript is at least three words long. Shorter transcripts are inserted but not submitted, so an accidental tap does not send a stray word. The three-word threshold counts words for languages written without spaces. Japanese, Chinese, and Thai transcripts count individual words, so they auto-submit in tap mode and in hold mode with `autoSubmit`. The first tap only starts recording when the prompt input is empty, so you can still type spaces normally while composing a message. The second tap stops recording regardless of input contents. Recording also stops automatically after 15 seconds of silence or two minutes total. + +## + +​ + +Cancel a recording + +Press `Esc` or `Ctrl+C` to cancel a dictation instead of finalizing it. Claude Code stops the microphone, discards the transcript, and restores the prompt to what it held before the recording started. Both keys also cancel while a finished recording’s transcript is still processing. A prompt you edited or submitted during processing stays as you left it. Neither key does anything else in the press that cancels: `Esc` doesn’t interrupt Claude’s response, and `Ctrl+C` doesn’t clear the prompt or count as the first of the [two presses that exit Claude Code](</docs/en/interactive-mode#general-controls>). ##
modified Use Claude Code in VS Code View current →
--- a/vs-code.md +++ b/vs-code.md @@ -8,7 +8,7 @@ Before installing, make sure you have: - * VS Code 1.94.0 or higher + * VS Code 1.94.0 or later * An Anthropic account: any paid Claude subscription (Pro, Max, Team, or Enterprise) or a Claude Console account works, and no API key is required. You’ll [sign in](</docs/en/authentication#log-in-to-claude-code>) with this account when you first open the extension. If you access Claude through a third-party provider like Amazon Bedrock or Google Cloud’s Agent Platform, see Use third-party providers for setup instructions. The extension bundles its own copy of the CLI (command-line interface) for the chat panel. To run `claude` in VS Code’s integrated terminal, you also need the [standalone CLI install](</docs/en/setup>). See VS Code extension vs. Claude Code CLI for details. @@ -90,16 +90,23 @@ * **Permission modes** : click the mode indicator at the bottom of the prompt box to switch permission modes. On Pro, Max, and Team plans, Auto is the built-in starting permission mode. See [how the extension chooses the starting permission mode](</docs/en/permission-modes#switch-permission-modes>) for what changes that, and every permission mode the indicator offers. * **Auto** : a classifier reviews most actions instead of asking you. See [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) for what it reviews and blocks. * **Manual** : Claude asks permission before file edits and most shell commands. - * **Plan** : Claude describes what it will do and waits for approval before making changes. VS Code automatically opens the plan as a full Markdown document where you can add inline comments to give feedback before Claude begins. + * **Plan** : Claude describes what it will do and waits for approval before making changes. VS Code automatically opens the plan as a full Markdown document where you can add inline comments to give feedback before Claude begins. You can also type `/plan` in the prompt box. Requires Claude Code v2.1.280 or later. + * `/plan`: switches to plan mode. If you’re already in plan mode, shows the current plan instead. + * `/plan` with a task, such as `/plan fix the auth bug`: switches to plan mode and starts planning that task. + * `/plan open`: when you’re already in plan mode, opens the plan file in the editor. * **Edit automatically** : Claude makes edits without asking. * **Model** : select **Switch model…** from the command menu to change the model mid-session. You can also click the model name at the bottom of the prompt box to open the same picker. When the current model supports [effort levels](</docs/en/model-config#adjust-effort-level>), the picker also shows an **Effort** row and the model name button shows the selected level. When you pick a level other than `max`, Claude Code saves it for the current model as your default, under [`modelSettings`](</docs/en/settings-reference#modelsettings>) in your user settings; `max` applies to the current session only. The model name button and the **Effort** row require Claude Code v2.1.257 or later. - * **Command menu** : click `/` or type `/` to open the command menu. Options include attaching files, switching models, and toggling extended thinking. The Customize section provides access to MCP servers, commands, output styles, hooks, memory, instructions, permissions, and plugins. Items with a terminal icon open in the integrated terminal. - * To browse commands such as `/usage` or [`/remote-control`](</docs/en/remote-control>), select **Slash commands** in the Customize section. A dialog lists them with a filter box. Pick one to run it. Typing `/` in the prompt box still suggests commands inline. Requires Claude Code v2.1.257 or later. + * **Command menu** : click `/` or type `/` to open the command menu. Options include attaching files, switching models, and toggling extended thinking. The Customize section includes entries such as MCP servers, commands, output styles, hooks, memory, instructions, permissions, and plugins. Items with a terminal icon open in the integrated terminal. + * To browse commands such as `/usage` or [`/remote-control`](</docs/en/remote-control>), select **Slash commands** in the Customize section. A dialog lists them with a filter box. Pick one to run it. Typing `/` in the prompt box still suggests commands inline. Requires Claude Code v2.1.257 or later. Typing `/skills` also opens this dialog. Each [skill](</docs/en/skills>) row shows its [visibility](</docs/en/skills#override-skill-visibility-from-settings>), such as **On** or **Name only**. Click the visibility to change it, except on rows marked **locked** , such as plugin skills. The `/skills` shortcut and the visibility controls require Claude Code v2.1.280 or later. * Select **Output styles** in the Customize section to pick an [output style](</docs/en/output-styles>), including your custom styles. Requires Claude Code v2.1.257 or later. To create a custom style instead, select **Build a custom style** from the **Output styles** menu. Claude Code writes the [style file](</docs/en/output-styles#create-a-custom-output-style>) for you at the project or user level. Requires Claude Code v2.1.261 or later. * Select **Hooks** in the Customize section to view the [hooks](</docs/en/hooks>) loaded in the session, grouped by event. You can add, edit, or remove hooks saved in your user, project, and local settings files. Hooks from other sources, such as managed settings or plugins, are read-only. Requires Claude Code v2.1.269 or later. * Select **Permissions** in the Customize section to view the session’s [permission rules](</docs/en/permissions>), grouped into Allow, Ask, and Deny. You can add rules to your user, project, or local settings and remove rules saved there. Rules from other sources, such as managed settings or approvals made for this session only, are read-only. Requires Claude Code v2.1.269 or later. * Select **Memory** in the Customize section to turn [auto memory](</docs/en/memory#auto-memory>) on or off. While it’s on, you can also browse the memories Claude has saved and reveal the folders that store them in your file manager. Requires Claude Code v2.1.274 or later. Click a saved memory to read it in the dialog, where you can edit the text, delete the memory, or open its file in the editor. Viewing, editing, and deleting a memory in the dialog require Claude Code v2.1.275 or later. * Select **Instructions** in the Customize section to edit the [CLAUDE.md files](</docs/en/memory#claude-md-files>) Claude reads. Pick a file to open it in the editor. If the file doesn’t exist yet, Claude Code creates it first. Requires Claude Code v2.1.274 or later. + * Select **Status** in the Customize section, or type `/status`, to check the session’s Claude Code version, account, model, and MCP server details. Requires Claude Code v2.1.280 or later. + * Select **Sandbox** in the Customize section, or type `/sandbox`, to see whether Claude’s Bash commands run [sandboxed](</docs/en/sandboxing>). You can switch the sandbox mode and add [excluded commands](</docs/en/settings-reference#sandbox-excludedcommands>) there. Requires Claude Code v2.1.280 or later. + * Select **Claude in Chrome** in the Customize section, or type `/chrome`, to check and manage the [Claude in Chrome](</docs/en/chrome>) connection. Both require signing in with a claude.ai account. Requires Claude Code v2.1.280 or later. + * Select **Export conversation** in the Context section, or type `/export`, to copy the conversation as plain text or save it to a file. Add a file name, such as `/export notes.txt`, to skip the dialog and choose where to save the file. Requires Claude Code v2.1.280 or later. * The Settings section includes **Enable Remote Control for all sessions** , which sets [`remoteControlAtStartup`](</docs/en/settings-reference#remotecontrolatstartup>) to control whether [new interactive sessions connect to Remote Control automatically](</docs/en/remote-control#enable-remote-control-for-all-sessions>). Requires Claude Code v2.1.203 or later. When you turn the toggle on or off in a VS Code window, the change applies to the sessions already open in that VS Code window, not only to sessions you start afterwards. If you turn it off, the open sessions disconnect. With Claude Code v2.1.261 or later, the change also reaches sessions open in your other VS Code windows. * The Settings section also includes **Focus view** , which hides tool calls, tool results, and thinking behind expandable rows, leaving your prompts and Claude’s responses. Toggle it there, with `Ctrl+Option+F` (Mac) / `Ctrl+Alt+F` (Windows/Linux), or from the Command Palette with **Claude Code: Toggle Focus view**. The change applies to every open session and persists across sessions. Requires Claude Code v2.1.221 or later. Claude’s latest to-do list stays visible, and so does the text a pending question from Claude is asking about; this requires Claude Code v2.1.225 or later. While Claude runs [subagents](</docs/en/sub-agents>), live progress rows with their latest activity appear under the tool-call group that started them. This requires Claude Code v2.1.269 or later. * To sign out of your Anthropic account, select **Sign out** in the Settings section, or type `/logout`. On a third-party provider, the menu doesn’t offer either. Requires Claude Code v2.1.277 or later. @@ -136,6 +143,17 @@ ​ +Paste text + +Text you paste stays visible in the prompt box, rather than collapsing to a placeholder as it does [in the terminal](</docs/en/terminal-config#paste-large-content>). In sessions where Claude Code [marks pasted text](</docs/en/terminal-config#how-claude-treats-pasted-text>), Claude still sees a large paste as text you pasted rather than typed. Claude Code also removes [invisible Unicode characters](</docs/en/interactive-mode#invisible-characters-in-prompts>) from text you paste into the prompt box and from anything else you send: + + * If a notice such as `Removed 3 invisible characters from the pasted text` appears when you paste, the text went in without those characters. + * If a notice about removed characters appears when you send, nothing was sent. The cleaned text is back in the prompt box. Send again to send the text as shown. + +### + +​ + Resume past 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. Click any conversation to resume it with the full message history. If the conversation is already open in another tab of the current window, clicking it switches to that tab. For more on resuming sessions, see [Manage sessions](</docs/en/sessions>). @@ -326,7 +344,7 @@ Automate browser tasks with Chrome -Connect Claude to your Chrome browser to test web apps, debug with console logs, and automate browser workflows without leaving VS Code. This requires the [Claude in Chrome extension](<https://chromewebstore.google.com/detail/claude/fcoeoabgfenejglbffodgkkbkcdhcgfn>) version 1.0.36 or higher. Type `@browser` in the prompt box followed by what you want Claude to do: +Connect Claude to your Chrome browser to test web apps, debug with console logs, and automate browser workflows without leaving VS Code. This requires the [Claude in Chrome extension](<https://chromewebstore.google.com/detail/claude/fcoeoabgfenejglbffodgkkbkcdhcgfn>) version 1.0.36 or later. Type `@browser` in the prompt box followed by what you want Claude to do: @browser go to localhost:3000 and check the console for errors @@ -550,7 +568,7 @@ claude mcp add --transport http github https://api.githubcopilot.com/mcp/ \ --header "Authorization: Bearer YOUR_GITHUB_PAT" -Replace `YOUR_GITHUB_PAT` with your personal access token. The `claude mcp add` command saves the configuration without validating credentials, so a placeholder value is accepted here but the server fails to connect later. To verify the connection, start a new conversation, type `/mcp`, and check that the server shows **Connected**. A server with bad credentials shows **Failed**. Once configured, ask Claude to use the tools (e.g., “Review PR #456”). To find servers to connect, see [Find and build MCP servers](</docs/en/mcp#find-and-build-mcp-servers>). +Replace `YOUR_GITHUB_PAT` with your personal access token. The `claude mcp add` command saves the configuration without validating credentials, so a placeholder value is accepted here but the server fails to connect later. To verify the connection, start a new conversation, type `/mcp`, and check that the server shows **Connected**. A server with bad credentials shows **Failed**. Once configured, ask Claude to use the tools (for example, “Review PR #456”). To find servers to connect, see [Find and build MCP servers](</docs/en/mcp#find-and-build-mcp-servers>). ## @@ -656,7 +674,7 @@ The Spark icon appears in the **Editor Toolbar** (top-right of editor) when you have a file open. If you don’t see it: 1. **Open a file** : The icon requires a file to be open. Having just a folder open isn’t enough. - 2. **Check VS Code version** : Requires 1.94.0 or higher (Help → About) + 2. **Check VS Code version** : Requires 1.94.0 or later (Help → About) 3. **Restart VS Code** : Run “Developer: Reload Window” from the Command Palette 4. **Disable conflicting extensions** : Temporarily disable other AI extensions (Cline, Continue, etc.) 5. **Check workspace trust** : The extension doesn’t work in Restricted Mode