Changes on
43 changes detected
--- a/admin-setup.md
+++ b/admin-setup.md
@@ -79,7 +79,7 @@
Control| What it does| Key settings
---|---|---
[Permission rules](</docs/en/permissions>)| Allow, ask, or deny specific tools and commands| `permissions.allow`, `permissions.deny`
-[Permission lockdown](</docs/en/permissions#managed-only-settings>)| Only managed permission rules apply; disable `--dangerously-skip-permissions`| `allowManagedPermissionRulesOnly`, `permissions.disableBypassPermissionsMode`
+[Permission lockdown](</docs/en/permissions#managed-only-settings>)| Make managed settings the [only settings source of permission rules](</docs/en/settings-reference#allowmanagedpermissionrulesonly>). Disable `--dangerously-skip-permissions`| `allowManagedPermissionRulesOnly`, `permissions.disableBypassPermissionsMode`
[Starting permission mode](</docs/en/permission-modes#which-mode-a-session-starts-in>)| Choose the permission mode your developers’ terminal sessions start in instead of the built-in starting permission mode, or remove auto mode. The VS Code extension reads a `defaultMode` you set only on Pro, Max, and Team plans; [Switch permission modes](</docs/en/permission-modes#switch-permission-modes>) lists what the extension reads| `permissions.defaultMode`, `permissions.disableAutoMode`
[Sandboxing](</docs/en/sandboxing>)| OS-level filesystem and network isolation with domain allowlists| `sandbox.enabled`, `sandbox.network.allowedDomains`
[Managed policy CLAUDE.md](</docs/en/memory#deploy-organization-wide-claude-md>)| Org-wide instructions loaded in every session, can’t be excluded| File at the managed policy path
--- a/advisor.md
+++ b/advisor.md
@@ -22,7 +22,7 @@
* **`advisorModel` setting**: configure a persistent default in your [settings file](</docs/en/settings>)
* **`--advisor` flag**: set the advisor for a single session at launch
-Each of these enables the advisor for sessions whose main model supports it. After the session starts, Claude Code shows an `Advisor Tool (experimental) is on and may use more tokens · /advisor` notification. To stop using the advisor, see Turn the advisor off. On some plans, Fable as the advisor also needs your one-time [consent to bill Fable 5 usage to usage credits](</docs/en/model-config#fable-5-and-usage-credits>). For what happens before you have given that consent, see Fable advisor and usage credits.
+Each of these enables the advisor for sessions whose main model supports it. After the session starts, Claude Code shows an `Advisor Tool (experimental) is on and may use more tokens · /advisor` notification. To stop using the advisor, see Turn the advisor off. On some plans, Fable as the advisor also needs your one-time [consent to bill Fable usage to usage credits](</docs/en/model-config#fable-and-usage-credits>). For what happens before you have given that consent, see Fable advisor and usage credits.
###
@@ -34,7 +34,7 @@
/advisor opus
-The command confirms with `Advisor set to` followed by the advisor model name. Your selection is saved to `advisorModel` in your user settings and persists across sessions. Claude Code doesn’t invoke a saved advisor that your organization’s [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist excludes. To use the advisor, pick an allowed model with `/advisor`. Claude Code still saves an advisor that your current main model doesn’t support. That advisor activates after you switch to a compatible main model with [`/model`](</docs/en/model-config#setting-your-model>). On some plans, Fable as the advisor also needs your one-time [consent to bill Fable 5 usage to usage credits](</docs/en/model-config#fable-5-and-usage-credits>). For what `/advisor fable` does before you have given that consent, see Fable advisor and usage credits.
+The command confirms with `Advisor set to` followed by the advisor model name. Your selection is saved to `advisorModel` in your user settings and persists across sessions. Claude Code doesn’t invoke a saved advisor that your organization’s [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist excludes. To use the advisor, pick an allowed model with `/advisor`. Claude Code still saves an advisor that your current main model doesn’t support. That advisor activates after you switch to a compatible main model with [`/model`](</docs/en/model-config#setting-your-model>). On some plans, Fable as the advisor also needs your one-time [consent to bill Fable usage to usage credits](</docs/en/model-config#fable-and-usage-credits>). For what `/advisor fable` does before you have given that consent, see Fable advisor and usage credits.
###
@@ -82,9 +82,9 @@
Sonnet 5| Fable, Opus, Sonnet 5| A Sonnet 4.6 advisor is rejected
Opus 4.6| Fable, Opus, Sonnet 5| Sonnet 5 and Opus 4.6 are ranked as equally capable, so an Opus 4.6 main accepts a Sonnet 5 advisor
Opus 4.7 or later| Fable, and Opus 4.7 or later| Opus 4.7 and later Opus models are ranked as equally capable, so any of them accepts another as an advisor. An Opus 4.7 main with an Opus 4.6 or Sonnet 5 advisor is rejected
-Fable 5 (v2.1.170+)| Fable| An Opus or Sonnet advisor is rejected
-
-Fable 5 requires Claude Code v2.1.170 or later and [Fable 5 access](</docs/en/model-config#work-with-fable-5>), whether it acts as the main model or the advisor. 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:
+Fable 5.1 or Fable 5| Fable 5.1, or the same Fable version| An Opus or Sonnet advisor is rejected, and so is a Fable 5 advisor for a Fable 5.1 main model
+
+Fable 5.1 requires Claude Code v2.1.255 or later and Fable 5 requires v2.1.170 or later, plus [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:
* If the advisor is less capable than the main model, the advisor is not attached 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.
* If the main model or the advisor is a model Claude Code does not recognize, the advisor is not attached.
@@ -95,7 +95,7 @@
Fable advisor and usage credits
-On some plans, Fable 5 usage bills to usage credits, and Claude Code asks for your [one-time consent to bill Fable 5 usage to usage credits](</docs/en/model-config#fable-5-and-usage-credits>) when you select Fable 5 with `/model`. Fable as the advisor bills the same way, so on those plans Claude Code doesn’t apply Fable as the advisor until you have accepted that consent. Before you have accepted it, Claude Code doesn’t save Fable as the advisor when you type `/advisor fable` or pick Fable in the `/advisor` picker. It points you to `/model fable` instead. With `claude --advisor fable`, Claude Code exits at launch with a message that points to `/model fable`. In a background session, it starts the session without the advisor instead of exiting. With Fable already saved as your `advisorModel`, Claude Code sends requests without the advisor. In an interactive session whose main model supports the advisor, it also shows a notification that points to `/model fable`. To accept the consent, run `/model fable` and choose to continue on Fable 5. Claude Code records the consent and [saves Fable 5 as your selected model](</docs/en/model-config#default-model-setting>). Then select Fable as the advisor.
+On some plans, Fable usage bills to usage credits, and Fable as the advisor bills the same way. If your account requires the [one-time consent to bill Fable usage to usage credits](</docs/en/model-config#fable-and-usage-credits>), Claude Code asks for it when you select a Fable model with `/model` and doesn’t apply Fable as the advisor until you have accepted that consent. Before you have accepted it, Claude Code doesn’t save Fable as the advisor when you type `/advisor fable` or pick Fable in the `/advisor` picker. It points you to `/model fable` instead. With `claude --advisor fable`, Claude Code exits at launch with a message that points to `/model fable`. In a background session, it starts the session without the advisor instead of exiting. With Fable already saved as your `advisorModel`, Claude Code sends requests without the advisor. In an interactive session whose main model supports the advisor, it also shows a notification that points to `/model fable`. To accept the consent, run `/model fable` and choose to continue on Fable. Claude Code records the consent and [saves Fable as your selected model](</docs/en/model-config#default-model-setting>). Then select Fable as the advisor.
###
@@ -108,10 +108,10 @@
Pairing| When to use
---|---
Sonnet main + Opus advisor| Sonnet handles routine work and escalates planning, ambiguous failures, and completion checks to Opus
-Sonnet main + Fable advisor| Fable 5 guidance at decision points without running Fable 5 throughout. Requires v2.1.170 or later and Fable 5 access
+Sonnet main + Fable advisor| Fable guidance at decision points without running Fable throughout. Requires Fable access
Haiku main + Opus advisor| Lowest-cost main model with strong planning. Expect higher cost than Haiku alone but lower than switching the main model to Sonnet or Opus
Opus main + Opus advisor| A second Opus reviews the first. Useful for high-stakes tasks where an independent check matters more than cost
-Fable main + Fable advisor| Highest-capability pairing when Fable 5 is available (v2.1.170+). Fable is a higher tier than Opus and Sonnet, so it is the only accepted advisor for a Fable main model
+Fable main + Fable advisor| Highest-capability pairing when Fable is available. Claude Code doesn’t apply an Opus or Sonnet advisor to a Fable main model
Sonnet main + Sonnet advisor| A lower-cost second opinion for catching routine oversights
##
@@ -141,7 +141,7 @@
Cost
-When Claude calls the advisor, the advisor model reads the conversation, so each call consumes tokens at the advisor model’s rates in addition to your main model’s usage. With API billing, you pay the advisor model’s input and output rates for advisor tokens. On subscription plans, advisor usage counts toward your plan’s usage limits, except that a Fable 5 advisor bills to [usage credits](</docs/en/model-config#fable-5-and-usage-credits>) on plans where Fable 5 usage does. If your account requires the usage-credits consent, a Fable advisor bills nothing before you give it, because Claude Code doesn’t apply the selection until then. Claude calls the advisor at decision points rather than on every turn, so pairing a faster main model with a stronger advisor typically costs less than running the stronger model throughout. Advisor usage counts toward the session totals shown by [`/usage`](</docs/en/costs#track-your-costs>). For how advisor tokens are reported in API responses, see [Usage and billing](<https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#usage-and-billing>) in the Claude API documentation.
+When Claude calls the advisor, the advisor model reads the conversation, so each call consumes tokens at the advisor model’s rates in addition to your main model’s usage. With API billing, you pay the advisor model’s input and output rates for advisor tokens. On subscription plans, advisor usage counts toward your plan’s usage limits, except that a Fable advisor bills to [usage credits](</docs/en/model-config#fable-and-usage-credits>) on plans where Fable usage does. If your account requires the usage-credits consent, a Fable advisor bills nothing before you give it, because Claude Code doesn’t apply the selection until then. Claude calls the advisor at decision points rather than on every turn, so pairing a faster main model with a stronger advisor typically costs less than running the stronger model throughout. Advisor usage counts toward the session totals shown by [`/usage`](</docs/en/costs#track-your-costs>). For how advisor tokens are reported in API responses, see [Usage and billing](<https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#usage-and-billing>) in the Claude API documentation.
##
@@ -160,7 +160,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.
- * **Supported main model** : Opus 4.6 or later, Sonnet 4.6 or later, or Haiku 4.5. Fable 5 also qualifies on Claude Code v2.1.170 or later, and a Fable 5 main accepts only a Fable advisor.
+ * **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>).
##
--- a/agent-loop.md
+++ b/agent-loop.md
@@ -205,7 +205,7 @@
`"low"`| Minimal reasoning, fast responses| File lookups, listing directories
`"medium"`| Balanced reasoning| Routine edits, standard tasks
`"high"`| Thorough analysis| Refactors, debugging
-`"xhigh"`| Extended reasoning depth| Coding and agentic tasks; recommended on Fable 5, Opus 4.7+, and Sonnet 5
+`"xhigh"`| Extended reasoning depth| Coding and agentic tasks on the [models that support it](</docs/en/model-config#adjust-effort-level>)
`"max"`| Maximum reasoning depth| Multi-step problems requiring deep analysis
If you don’t set `effort`, both SDKs leave the parameter unset and defer to the model’s default behavior.
--- a/agent-teams.md
+++ b/agent-teams.md
@@ -131,7 +131,7 @@
3. [`CLAUDE_CODE_SUBAGENT_MODEL`](</docs/en/model-config#environment-variables>), when it’s set to anything other than `inherit`.
4. The lead’s current model.
-Before v2.1.251, `CLAUDE_CODE_SUBAGENT_MODEL` came first in this order.
+[`CLAUDE_CODE_SUBAGENT_MODEL_FORCE`](</docs/en/sub-agents#choose-a-model>) applies to teammates as well as to subagents. Before v2.1.251, `CLAUDE_CODE_SUBAGENT_MODEL` came first in this order.
`teammateDefaultModel` was removed in v2.1.234; Claude Code ignores a leftover value. Name the model in your prompt instead.
--- a/agent-view.md
+++ b/agent-view.md
@@ -464,7 +464,21 @@
Settings and provider
-A background session reads its [settings](</docs/en/settings>) from the directory it runs in, the same as if you had started `claude` there. This includes [`env` values](</docs/en/settings-reference#env>) in project settings, so an `ANTHROPIC_MODEL` or provider variable set there applies to background sessions in that directory. Cloud provider selection, such as `CLAUDE_CODE_USE_BEDROCK` or `CLAUDE_CODE_USE_VERTEX`, and `ANTHROPIC_DEFAULT_*_MODEL` aliases follow the shell that dispatched the session. If you export a [`CLAUDE_CODE_EXTRA_BODY`](</docs/en/env-vars>) request-body override in that shell, it reaches the session the same way. A gateway `ANTHROPIC_BASE_URL` exported in that shell can reach the session too; see the supervisor process for the conditions and for how background sessions source provider settings and credentials.
+A background session reads its [settings](</docs/en/settings>) from the directory it runs in, the same as if you had started `claude` there. This includes [`env` values](</docs/en/settings-reference#env>) in project settings, so an `ANTHROPIC_MODEL` or provider variable set there applies to every background session in that directory. A background session also runs with the `PATH` of the shell you dispatched it from, so the commands it runs find the same tools your terminal does. It keeps that shell’s cloud provider selection too, such as `CLAUDE_CODE_USE_BEDROCK` or `CLAUDE_CODE_USE_VERTEX`, along with its `ANTHROPIC_DEFAULT_*_MODEL` aliases and any [`CLAUDE_CODE_EXTRA_BODY`](</docs/en/env-vars>) override you exported there.
+
+####
+
+
+
+LLM gateway
+
+If you route Claude Code through an [LLM gateway](</docs/en/llm-gateway>), put the gateway variables in a settings file’s `env` block rather than exporting them in your shell, and background sessions read them with the rest of their settings. [Set in a settings file](</docs/en/llm-gateway-connect#set-in-a-settings-file>) shows the block and which settings file to use for the credential. If you export a gateway `ANTHROPIC_BASE_URL` only in your shell instead, it reaches a background session, together with the `ANTHROPIC_CUSTOM_HEADERS` and credential you exported with it, only when the supervisor was itself started from a shell that exported the same gateway, and only in these cases:
+
+ * You background your own session with `←` or `/background`
+ * You dispatch a session into the directory you’re in
+ * You wake a stopped session in the directory you’re in by attaching or replying to it
+
+Claude Code forwards a gateway in front of a cloud provider. If the shell you dispatch from selects the provider and exports its gateway endpoint with its auth-bypass flag, Claude Code forwards the endpoint-and-flag pair to the session under the conditions that apply to `ANTHROPIC_BASE_URL`, together with `ANTHROPIC_CUSTOM_HEADERS`. For example, export `CLAUDE_CODE_USE_VERTEX=1` with `ANTHROPIC_VERTEX_BASE_URL` and `CLAUDE_CODE_SKIP_VERTEX_AUTH=1`, and Claude Code forwards that endpoint and flag. Claude Code applies a forwarded gateway to that session’s running process only and never writes it to disk.
####
@@ -573,24 +587,14 @@
The supervisor process
-Background sessions are hosted by a per-user supervisor process, separate from your terminal and from agent view. The supervisor starts automatically the first time you background a session or open agent view, and you don’t manage it directly. When an update has replaced or removed the binary a running Claude Code process was launched from, that process starts the supervisor from another installed copy, such as the installed `claude` launcher or the newest version on disk. The supervisor keeps one pre-warmed worker process ready so a dispatch from agent view or `claude --bg` starts without the delay of a cold launch. When you dispatch, the supervisor assigns the pre-warmed worker to your session, applies that session’s directory, settings, and credentials to it, and then starts a replacement for the next dispatch. If no healthy pre-warmed worker is available, the supervisor launches a fresh process instead. The supervisor and its sessions authenticate with the same stored credentials as your interactive sessions and make no additional network connections beyond the model API. Provider selection variables such as `CLAUDE_CODE_USE_BEDROCK` and `ANTHROPIC_DEFAULT_*_MODEL` aliases are read from the shell that dispatched each session and are applied to its worker. The dispatching shell’s `PATH` is applied to the worker the same way, so shell commands the session runs find the same tools your terminal does. A background session doesn’t inherit gateway endpoint variables such as `ANTHROPIC_BASE_URL`, or a provider’s equivalent base URL variable, from the shell that started the supervisor. Without a gateway exported in the shell you dispatch from, the session uses your stored credentials and any `env` values in the project directory’s [settings](</docs/en/settings>). To point every session in a project at an [LLM gateway](</docs/en/llm-gateway>), set `ANTHROPIC_BASE_URL` in that project’s `.claude/settings.json` `env` block. If you export a gateway `ANTHROPIC_BASE_URL` in the shell you dispatch from, it reaches that session’s worker, along with `ANTHROPIC_CUSTOM_HEADERS` and the credential exported alongside them, when both conditions hold:
-
- * The supervisor was started from an environment with the same gateway. The supervisor captures its environment from the first shell that opens agent view or dispatches a background session, so starting from the gateway shell gives it that environment.
- * The session is dispatched into the directory you’re dispatching from, or is your own session backgrounded with `←` or `/background`. Dispatching into a different directory with `@repo` or `--cwd` doesn’t carry the shell’s gateway; that project’s `settings.json` `env` block supplies the endpoint instead.
-
-When the supervisor’s environment carries a different gateway or none, the worker keeps your stored credentials against the default endpoint instead of mixing one environment’s credential with another’s endpoint. The forwarded endpoint applies only to that live process and is never written to disk. Claude Code forwards a gateway in front of a cloud provider. If the shell you dispatch from selects the provider and exports its gateway endpoint with its auth-bypass flag, Claude Code forwards the endpoint-and-flag pair to the worker under the conditions that apply to `ANTHROPIC_BASE_URL`, together with `ANTHROPIC_CUSTOM_HEADERS`. For example, export `CLAUDE_CODE_USE_VERTEX=1` with `ANTHROPIC_VERTEX_BASE_URL` and `CLAUDE_CODE_SKIP_VERTEX_AUTH=1`, and Claude Code forwards that endpoint and flag. When the supervisor stops an idle session and you later wake it by attaching or replying, your environment’s gateway is forwarded again under the same conditions as a fresh dispatch. Waking a session from a shell without the gateway restarts it against your settings and stored credentials instead. Each background session is its own Claude Code process, managed by the supervisor rather than tied to your terminal. A session that’s actively working, waiting for your input, or has a terminal attached keeps its process running. The supervisor counts a running background shell command, subagent, dynamic workflow, or monitor as active work, so a long-running process such as a dev server keeps the session alive. Once a session finishes and sits unattached for about an hour, the supervisor stops its process to free resources. A session you have pinned with `Ctrl+T` is exempt and keeps its process running while idle. The transcript and state stay on disk either way, and the next time you attach or reply to a stopped session, the supervisor starts a fresh process from where it left off. When every session has finished and no terminal is connected, the supervisor itself exits and starts again the next time you need it. This also applies to a conversation you backgrounded with `←` or `/background` and then left idle with nothing running. The supervisor also restarts a session whose process exits unexpectedly, with three safeguards so a restart never overrides a stop or acts on stale input:
-
- * A session whose state on disk already shows it as done, failed, or stopped isn’t restarted, unless a reply you sent is still waiting to be delivered.
- * Ending the process of a session you backgrounded with `←` or `/background` yourself, for example with `kill`, marks the session stopped instead of restarting it. A session dispatched with a task, from the agent view input or `claude --bg`, is still restarted so the dispatched work completes.
- * A session the supervisor restarts is told it was restarted and that you haven’t sent a new message since, so it can re-verify time-sensitive context such as branch state before continuing. A restarted `←` or `/background` session also doesn’t resume an interrupted response older than about an hour; it waits for your next message instead.
-
-Background work the session itself started at the top level is handed off when its process is stopped, restarted, or updated, including on Windows. The next process started for that session picks the work back up:
-
- * A background shell command that finished in the meantime is reported as completed with its output
- * A dynamic workflow resumes the same way it does when you background the session: subagents that were still running start over
- * A [background subagent](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) resumes from its own transcript
-
-Work whose state lives only inside the process itself stops with it instead of being handed off. That’s shell commands a subagent started, which the resumed subagent can start again, and running [monitors](</docs/en/tools-reference#monitor-tool>), whose event stream can’t be moved to another process. Deleting the session stops everything it handed off. To stop all of the session’s background work with the process instead of handing it off, set the [`CLAUDE_CODE_DISABLE_BG_EXIT_HANDOFF`](</docs/en/env-vars#variables>) environment variable to `1`. A restarted process finds the conversation of a session that moved into a worktree mid-task: when the transcript isn’t where the session started, Claude Code also looks under the repository’s registered worktrees. When neither the session’s own directory nor those worktrees has the transcript, Claude Code scans all your saved session transcripts as a last resort and resumes from the one that matches the session. If a restarted session comes back showing only its original prompt because Claude Code misread its transcript as empty, the conversation transcript is renamed with an `.orphaned-` suffix instead of deleted, so it stays on your machine. An empty row left over from pressing `←` that was never given a prompt is removed entirely after about five minutes so the list clears on its own. Sessions started with `claude --bg` and sessions waiting on a setup prompt such as a trust dialog aren’t removed this way. When the host runs low on memory, the supervisor stops idle non-pinned sessions first and stops idle pinned ones only if that freed nothing. The supervisor watches the installed Claude Code binary on disk and restarts into the new version after the regular [auto-updater](</docs/en/setup#auto-updates>) replaces it. This is a local file watch, not a network check. Background sessions are detached processes, so they keep running through the restart and the new supervisor reconnects to them. An idle pinned session is also restarted in place onto the new version so it picks up the update without you reattaching. Once the new supervisor takes over, it also restarts the remaining idle sessions onto the new version, a few at a time in the background, after a short delay that lets terminals attached across the restart reconnect first. A session that is working, waiting on your input, or has a terminal attached isn’t interrupted; it moves to the new version the next time its process restarts. These restarts only ever move a session onto a newer version. A supervisor running an older Claude Code version than the one a session’s process was started with leaves that process alone; the session keeps running the newer version until a newer supervisor takes over. Running `claude attach` while the supervisor is restarting a session, whether for an update, a stall, or a migration, waits for the replacement process instead of failing. A status line such as `Agent is updating to the new Claude Code…` names what it’s waiting for and counts the elapsed seconds, and the command connects as soon as the session is ready. After about 60 seconds it stops waiting and reports an error. `claude attach` also waits while the background service itself is starting or reconnecting, and a session that finished during that wait is reported as exited rather than as an error. A terminal resize you make during a slow attach is applied when the attach completes.
+The supervisor is a background service that runs your background sessions so they keep working after you close agent view or your terminal. Claude Code starts it the first time you background a session or open agent view, and you don’t need to manage it yourself. Each session is its own Claude Code process under the supervisor, and what happens to that process depends on the session’s state:
+
+ * **Working, waiting on you, or attached** : the process keeps running. A running subagent, workflow, or monitor counts as working.
+ * **Finished and unattached for about an hour** : the supervisor stops the process to free resources. The conversation stays on disk, and the next time you attach or reply, the session resumes where it left off. Pin a session with `Ctrl+T` to keep its process running while idle.
+ * **Exited unexpectedly while the supervisor is running** : the supervisor restarts the process. Ending a session you backgrounded yourself with `←` or `/background`, for example with `kill`, marks it stopped instead of restarting it. For sessions that ended with a shutdown, see Sessions show as failed or stopped after shutdown.
+ * **After an auto-update** : the supervisor restarts itself onto the new version and moves idle sessions over in the background. Sessions that are working, waiting on you, or attached aren’t interrupted.
+
+When a session’s process stops or restarts, the background shell commands, dynamic workflows, and background subagents Claude started in it carry over to its next process; running monitors and shell commands a subagent started stop with the process. Deleting the session stops everything it carried over. To stop all of it with the process instead, set [`CLAUDE_CODE_DISABLE_BG_EXIT_HANDOFF`](</docs/en/env-vars#variables>) to `1`. The supervisor and its sessions authenticate with the same stored credentials as your interactive sessions. For which settings and shell variables reach a session, including `PATH`, see Settings and provider. For gateway endpoints, see LLM gateway.
###
@@ -731,7 +735,7 @@
A session fails before starting with a `possibly low memory` note
-When a background session’s process exits before it finishes starting and the host is low on memory, the row’s status names the exit and adds `possibly low memory — free some up and retry`. The note is a hypothesis, not a confirmed cause. Claude Code adds it only when the process exited silently, without writing an error and without being stopped by a signal, and the host reported low memory at that moment. When the process did write an error before exiting, the row shows that error instead. Free up memory on the machine, then attach or reply to the row and the supervisor starts a fresh process for the session. When memory stays low, the supervisor also stops idle sessions to free resources on its own.
+When a background session’s process exits before it finishes starting and the host is low on memory, the row’s status names the exit and adds `possibly low memory — free some up and retry`. The note is a hypothesis, not a confirmed cause. Claude Code adds it only when the process exited silently, without writing an error and without being stopped by a signal, and the host reported low memory at that moment. When the process did write an error before exiting, the row shows that error instead. Free up memory on the machine, then attach or reply to the row and the supervisor starts a fresh process for the session. When memory stays low, the supervisor also stops idle sessions to free resources on its own, and stops idle pinned sessions too if stopping the others freed nothing.
###
@@ -751,7 +755,7 @@
Dispatch fails with `Could not resolve authentication method`
-If a background dispatch fails with `Could not resolve authentication method` while interactive sessions authenticate normally, the worker that received the dispatch didn’t pick up credentials. The supervisor supplies a fresh credential snapshot when it assigns a pre-warmed worker, so this error means no stored credential was available to the supervisor process itself. Confirm you have run `/login` or configured an API key, then stop the supervisor:
+If a background dispatch fails with `Could not resolve authentication method` while interactive sessions authenticate normally, the worker that received the dispatch didn’t pick up credentials. Background sessions get their credentials from the supervisor, so this error means no stored credential was available to the supervisor process itself. Confirm you have run `/login` or configured an API key, then stop the supervisor:
claude daemon stop --any --keep-workers
Show diff (127 lines)
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,124 @@
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.258
+
+September 1, 2026
+
+ * Fixed Claude Code failing to launch on macOS 12 (Monterey), a regression introduced in 2.1.255
+ * Fixed remote and scheduled sessions failing with “user messages must have non-empty content” after a re-sent permission approval could not be applied
+
+
+
+2.1.257
+
+September 1, 2026
+
+ * Added Claude Fable 5.1 (`claude-fable-5-1`), now the default Fable model — 1M context, 10/10/10/50 per Mtok with $0.25/Mtok cache reads
+ * Added “Time format” (`timeFormat`) and `timeZone` settings: 12-hour, 24-hour, 24-hour UTC, or a strftime pattern for the turn-end clock and transcript-view timestamps
+ * Added a Containment Escape rule to auto mode so cloud metadata-credential fetches, egress evasion, and cross-tenant reach are no longer auto-approved unless your environment marks them expected
+ * Added `CLAUDE_CODE_SUBAGENT_MODEL_FORCE` to apply `CLAUDE_CODE_SUBAGENT_MODEL` (or the main model) to every subagent, ignoring per-spawn and agent-definition model overrides
+ * Added `s` in `/effort` to change effort for the current session only, matching `/model`
+ * Added a `/doctor` warning for stale sandbox mask files left by a killed session
+ * Added a one-time prompt in auto mode before the first file read outside the working directories, with the option to block such reads (`permissions.blockReadsOutsideWorkingDirectories`)
+ * Added support for a gateway-supplied `description` on discovered `/model` picker entries (`CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY`); entries without one still read “From gateway”
+ * Fixed settings in a `.claude/` folder created after startup not being picked up until restart
+ * Fixed sessions dispatched from an agent view opened with `←` always starting in the original session’s permission mode, overriding the target directory’s `defaultMode` and the agent’s `permissionMode`
+ * Fixed `keybindings.json` rebinds of Ctrl+G being ignored in `claude agents`; its Ctrl+S / Ctrl+T are now rebindable via the new `Agents` context
+ * Fixed background sessions failing to start on macOS npm installs during a self-update, and on Windows when a stale daemon lock file pointed at a reused process id
+ * Fixed the working spinner stopping while a response streams behind a slash-command panel
+ * Fixed a background session’s `state.json` `detail` repeating its own dispatch prompt after a scheduled wake-up
+ * Fixed `claude agents` keeping a background session you re-prompted buried in Completed after it finished again; Completed now orders by the latest finish
+ * Fixed `claude --bg` from a directory that was just deleted reporting “backgrounded” and leaving a crashed session row; it now prints the reason and exits 1
+ * Fixed Remote Control connecting mid-session re-sending the Bash tool definition, causing a prompt-cache miss
+ * Fixed a doubly-listed custom `Authorization` header overriding the configured credential on Bedrock, Mantle, Vertex, and WIF, and the Vertex setup wizard picking up a leftover Anthropic profile from `~/.config/anthropic`
+ * Fixed Claude apps gateway sending stray host `Authorization` or profile headers to Foundry, Vertex, and Bedrock, and Foundry Entra ID upstreams not starting when `ANTHROPIC_FOUNDRY_API_KEY` is set
+ * Fixed a leftover Anthropic API key or auth token being sent alongside your Foundry subscription key in API-key mode
+ * Fixed `/schedule` routines whose prompt was saved without a message role and then ran with nothing to do
+ * Fixed `claude agents` not saying that a background session is waiting for you to approve a message from another session, or who sent it
+ * Fixed a prompt stashed with Ctrl+S inside an opened background session being lost when the session went idle or was stopped and then reopened
+ * Fixed telemetry (OTEL) settings pushed through server-managed settings being ignored on warm starts, including desktop-app Code sessions
+ * Fixed a teammate permission request being answered twice when the leader’s mailbox write was briefly locked
+ * Fixed a phantom duplicate slash-command row rendering below the in-flight turn while a command’s auto-continued response streamed
+ * Fixed `policyHelper` `timeoutMs` and `refreshIntervalMs` values above the timer maximum (2147483647) causing failures or re-runs every millisecond; they are now clamped
+ * Fixed the token counter freezing or crawling after switching to another subagent’s transcript, and made background subagents’ and teammates’ counters update live while a response streams
+ * Fixed sandbox network hosts written with a trailing dot (`example.com.`): a `deniedDomains` entry didn’t block the host inside the sandbox, and “don’t ask again” for such a host kept prompting
+ * Fixed dismissing the Remote Control consent prompt (Esc, or `n` at `claude remote-control`) counting as consent, so the next request connected without asking
+ * Fixed `/mcp` reconnect and enable still connecting a settings-file MCP server that a managed MCP allow/deny list or `strictPluginOnlyCustomization` loaded after startup should block
+ * Fixed `claude mcp remove` leaving a remote server’s stored OAuth credentials behind when `strictPluginOnlyCustomization` locks MCP to plugin-only servers
+ * Fixed Remote Control (`claude remote-control`) sessions started from the Claude app ignoring the selected model and running on the machine’s default instead
+ * Fixed `--disallowedTools` and session deny rules being dropped after the first settings reload when `allowManagedPermissionRulesOnly` is enabled
+ * Fixed `--resume` listing a backgrounded conversation twice and `--continue` reopening its stalled pre-background copy; `--continue` now also opens finished background sessions
+ * Fixed fullscreen mode not letting you click `!` shell command output to expand it
+ * Fixed background sessions left running an older Claude Code binary piling up across auto-updates instead of being retired
+ * Fixed `claude agents --json` briefly switching the terminal to raw mode and undoing another program’s terminal settings on exit
+ * Fixed Proactive output style sessions busy-looping with filler messages and repeated log reads instead of idling while a background command or Monitor they started is still running
+ * Fixed subagents stopping when a response was cut off mid-stream by a computer sleep, dropped connection, or server error; they now automatically continue instead of ending with an incomplete response
+ * Fixed `←` doing nothing in the `/btw` panel inside a `claude agents` session: it now returns to the agents list (even mid-answer), and the panel comes back when you reopen the session
+ * Fixed sessions with an advisor model set missing the prompt cache on background requests (compaction, `/recap`, prompt suggestions) and re-sending the full conversation uncached each time
+ * Fixed `claude -p` exiting about 5 seconds after its final result while a Monitor the model armed was still running; it now waits for the watch to fire or time out
+ * Fixed a `permissions.ask` rule being skipped in auto mode when the matching command ran inside a compound command or subshell, letting it run without the confirmation prompt
+ * Fixed plugins being able to read files outside their own directory through a declared command, agent, skill, hooks or other component path that is a symlink; such paths are now refused with an error
+ * Fixed `/add-dir` rejecting a directory inside the current working directory; it now loads that directory’s skills, commands, and agents like `--add-dir` does at startup
+ * Fixed the main agent not being told when you resume a subagent you had stopped from its transcript view
+ * Fixed a crash when pasting ANSI-colored text (e.g. a CI log) into dialogs like `/feedback`
+ * Fixed `claude mcp add/remove` hanging or exhausting memory when the project’s `.mcp.json` is a FIFO or a device-file symlink; it now fails fast with an actionable message
+ * Fixed unbounded memory growth when non-JSONL data is piped into `claude -p --input-format stream-json`; it now fails fast with a clear error
+ * Fixed backgrounding a turn (`←` or Ctrl+B) while a subagent or other tool was running occasionally making the background session treat that tool as rejected instead of re-running it
+ * Fixed Bash `Read()`/`Edit()` deny rules not applying to `< file` redirects and reader commands like `tac` and `egrep`; a deny rule on any argument or redirect target now refuses the command
+ * Fixed resuming or messaging a subagent whose transcript had grown past 5 MB (for example after reading many images) failing with “No transcript found”
+ * Fixed worktree-isolated sessions refusing Bash loops, `$VAR` reads, `"$(…)"` and heredocs that never touch git as “too complex to verify that it stays inside the worktree”
+ * Fixed `/model` and `/effort` showing a prompt-cache warning after rewinding a conversation back to empty
+ * Fixed prompt-cache misses on every turn in long screenshot-heavy sessions once images exceeded the per-request size cap
+ * Fixed the Edit permission prompt’s diff view rendering emoji and multi-code-point characters with incorrect widths
+ * Fixed WebSocket MCP server connection failures being logged as “[object ErrorEvent]” instead of the underlying error
+ * Fixed background sessions failing to open with “Couldn’t start the background service” while another Claude Code process was downloading an npm update; the start now waits for it
+ * Fixed background commands that detach from their shell (for example under `timeout` or `setsid`) surviving a task stop or Claude Code exit
+ * Fixed Claude not being told when you stop a background command from the tasks panel or a connected client
+ * Fixed stopping a background subagent leaving its monitors running
+ * Fixed sandboxed git commands in a linked worktree losing write access to the repository’s common `.git` directory after `cd` into a subdirectory
+ * Fixed Bedrock and Bedrock Mantle requests going silent during long hidden-thinking phases on Opus 4.7 and later, which let idle timeouts cut the connection; the stream now carries progress events
+ * Fixed launching Claude Code after a Claude apps gateway expired or revoked your session: it now says the session ended and offers `/login` instead of reporting a network error
+ * Fixed cloud sessions losing git/GitHub credentials for the rest of the session when the session’s network proxy failed to start at launch; it now retries in the background and recovers
+ * Fixed leftover `cc-daemon-*` folders in the system temp directory after an interrupted background daemon start; the `cleanupPeriodDays` retention sweep now removes them
+ * Fixed Bash permission checks auto-approving certain `[[ ]]` conditionals that zsh parses differently from bash; these commands now prompt for approval
+ * Fixed the managed-settings approval prompt showing the generic warning instead of its telemetry wording when the settings also turn detailed tracing or raw API body logging off, or trace export on
+ * Fixed agent-team teammates in tmux/iTerm2 panes sometimes staying open after acknowledging a shutdown request
+ * Fixed the keyless Console sign-in (“Sign in with your Console account”) not applying your organization’s server-managed settings, and `/status` not showing the Organization for that sign-in
+ * Improved rendering performance: less re-render work per turn in long conversations, streaming no longer slows down as the reply grows, and background-agent updates no longer re-render the whole screen
+ * Improved prompt input responsiveness by reducing per-keystroke rendering work
+ * Improved policy helper diagnostics — refresh failures now show in `/status`, declining the managed-settings dialog prints why Claude Code exited, and helper timeouts are reported as timeouts
+ * Improved `/code-review --comment` to post findings on GitLab merge requests via `glab mr note` instead of reporting the target as unsupported
+ * Improved notifications: an MCP elicitation or permission ask queued under another dialog now sends its idle desktop notification at the same delay as a visible ask
+ * Improved verbose/transcript output: async hook completion notices that arrive together now appear on one line instead of one line per hook
+ * Improved `claude self-hosted-runner --configure-git` to also enable git push negotiation, so the first push of a new branch from a stale clone uploads only the new commits instead of the whole tree
+ * Improved liveness reporting to SDK hosts while a response is held open by gateway keep-alives, so long waits under a raised `CLAUDE_STREAM_IDLE_TIMEOUT_MS` are not mistaken for a hung session
+ * Improved MCP connection and OAuth debug/error logs so credentials carried in a server’s URL or request headers are redacted
+ * Improved `/fork` to keep the original conversation’s prompt cache in the new background session: its worktree briefing now arrives as a message instead of a system-prompt change
+ * Improved emoji autocomplete to accept the remaining GitHub/Slack shortcode aliases (`:satisfied:`, `:telephone:`, `:collision:`, …)
+ * Changed `--effort` to lift a new model’s default-effort hold for that session only rather than permanently; an effort picked on claude.ai for a Remote Control session now applies during the hold
+ * Changed a `policyHelper` in MDM or `managed-settings.json` shadowed at launch by cached server-managed settings to run (or exit) as soon as the fetch reports them removed, not at the next launch
+ * Changed `managedSourcesBehavior: "merge"` to take `sandbox.credentials.awsPairs` and `sandbox.ripgrep` whole from the highest managed source that sets them instead of combining the sources’ values
+ * Changed gateway model discovery (`CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1`) to run even when `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set, since it only queries your gateway
+ * Changed `claude --resume <session-id> --bg` to continue that session under its own ID when nothing is running it, instead of silently starting a copy; a copy is now announced
+ * Changed `/btw` history browsing from `←`/`→` to `Shift+←`/`Shift+→` (or `[`/`]`), stepping through your recent side questions and back to the live answer
+ * Changed `defaultMode: "bypassPermissions"` in `.claude/settings.json` or `.claude/settings.local.json` to be ignored, like `"auto"`; set it in user or managed settings, or pass `--permission-mode`
+ * Changed `fable` and `best` in Claude apps gateway sessions to keep resolving to Fable 5 for now, since gateways not yet configured for Fable 5.1 reject it; pick Fable 5.1 in `/model` to use it
+ * Changed `--add-dir`, `/add-dir`, and `additionalDirectories` to refuse network paths (UNC shares, `/net/<host>` automounts) with a message before touching them; on Windows use a mapped drive letter
+ * Changed Claude apps gateway sign-in and token refresh requests to verify the gateway’s pinned TLS certificate, as the managed settings fetch already does
+ * Changed Cowork and claude.ai cloud sessions: reading an artifact that isn’t yours now always asks you first, even in auto mode
+ * Removed the Ctrl+E command explanation on Bash and PowerShell permission prompts
+ * [VSCode] Added collapsible ACCOUNT & USAGE and SESSION MANAGER section headers to the session list panel, with the account email, the usage meter, and a View details link opening the usage dialog
+ * [VSCode] Added a model pill to the input footer that shows the current model and opens the model picker, with an Effort row and a “More models” page
+ * [VSCode] Added a collapse toggle to the Ungrouped section of the session list
+ * [VSCode] Added output style selection to the command menu, including custom styles
+ * [VSCode] Fixed third-party provider deployments (Bedrock, Vertex, and others) still showing claude.ai-only features (remote sessions, dictation, usage) and calling claude.ai with a leftover login
+ * [VSCode] Fixed the session list panel’s usage meter staying blank after the panel loads; it now shows the last known usage immediately
+ * [VSCode] Fixed the “Enable Remote Control for all sessions” toggle so turning it on or off applies to sessions that are already open, not only to new ones
+ * [VSCode] Fixed screen reader announcements: a control character before a fence or heading no longer drops visible lines from speech, and bold markers spanning a heading are no longer mis-paired
+ * [VSCode] Changed the action menu to list slash commands in a filterable “Slash commands” dialog instead of inline; picking one runs it; the MCP servers dialog gained the same filter box
+ * [VSCode] Changed “Delete session” to “Archive session”: archived sessions move to a collapsible “Archived sessions” group at the bottom of the list with an Unarchive action
--- a/claude-apps-gateway-config.md
+++ b/claude-apps-gateway-config.md
@@ -597,7 +597,7 @@
`availableModels`| Gateway + CLI| Model allowlist. Also checked at `/v1/messages`, so a patched client can’t bypass it.
`permissions.allow` / `.deny`| CLI| Tool and command rules. See [Permissions](</docs/en/permissions>).
`permissions.disableBypassPermissionsMode`| CLI| Set to `disable` to block [`bypassPermissions`](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>), the mode that skips permission prompts, and the `--dangerously-skip-permissions` flag
-`allowManagedPermissionRulesOnly`| CLI| When `true`, user and project permission rules are ignored; only rules from this document apply
+`allowManagedPermissionRulesOnly`| CLI| When `true`, managed settings become the only settings source of permission rules. The [`allowManagedPermissionRulesOnly`](</docs/en/settings-reference#allowmanagedpermissionrulesonly>) entry lists every source Claude Code then ignores.
`env`| CLI| Environment variables merged into the CLI process. Use for telemetry, auto-update, and model-name overrides.
`hooks`| CLI| Org-wide [hooks](</docs/en/hooks>)
--- a/claude-directory.md
+++ b/claude-directory.md
@@ -109,6 +109,7 @@
Path under `~/.claude/`| Contents
---|---
`projects/<project>/<session>.jsonl`| Full conversation transcript: every message, tool call, and tool result
+`projects/<project>/<session>.orphaned-<timestamp>-<suffix>.jsonl`, `projects/<project>/<session>.jsonl.superseded-<timestamp>`| A previous transcript for the session that Claude Code set aside instead of overwriting or deleting it. It doesn’t appear in the session picker
`projects/<project>/<session>/subagents/`| [Subagent](</docs/en/sub-agents>) conversation transcripts, removed with the parent session transcript when it ages out
`projects/<project>/<session>/tool-results/`| Large tool outputs spilled to separate files
`file-history/<session>/`| Pre-edit snapshots of files Claude changed, used for [checkpoint restore](</docs/en/checkpointing>). Holds snapshots for the 100 most recent checkpoints; snapshot files that no retained checkpoint references are deleted, except each file’s first snapshot
--- a/claude-security.md
+++ b/claude-security.md
@@ -164,7 +164,7 @@
Troubleshooting
-**The`/claude-security` menu opens with a Python warning.** The plugin needs `python3` 3.9 or later on your `PATH`. When it can’t find `python3` at all, the menu warns that Claude Security won’t work until one is installed; when the first `python3` on your `PATH` is older, the warning names the version it found. Install Python 3, or put a newer `python3` first on your `PATH`, then start a new session. **You may see “Fable 5’s safeguards flagged this message” when using Fable 5.** Due to Fable 5’s cybersecurity safety classifiers, certain model activities will be blocked and automatically downgraded to Opus. This is expected, and the scan should still complete successfully.
+**The`/claude-security` menu opens with a Python warning.** The plugin needs `python3` 3.9 or later on your `PATH`. When it can’t find `python3` at all, the menu warns that Claude Security won’t work until one is installed; when the first `python3` on your `PATH` is older, the warning names the version it found. Install Python 3, or put a newer `python3` first on your `PATH`, then start a new session. **You may see “Fable 5.1’s safeguards flagged this message” or “Fable 5’s safeguards flagged this message” when using a Fable model.** Due to Fable’s cybersecurity safety classifiers, certain model activities will be blocked and automatically downgraded to Opus. This is expected, and the scan should still complete successfully.
##
--- a/cli-reference.md
+++ b/cli-reference.md
@@ -56,7 +56,7 @@
Flag| Description| Example
---|---|---
`--add-dir`| Add additional working directories for Claude to read and edit files. Grants file access; most `.claude/` configuration is [not discovered](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) from these directories. Validates each path exists as a directory. To persist these directories across sessions, set [`permissions.additionalDirectories`](</docs/en/settings-reference#permissions-additionaldirectories>) in settings| `claude --add-dir ../apps ../lib`
-`--advisor <model>`| Enable the server-side [advisor tool](</docs/en/advisor>) for this session with a model alias, `fable`, `opus`, or `sonnet`, or a full model ID. Takes precedence over the `advisorModel` setting for the session. `fable` requires [Fable 5 access](</docs/en/advisor#choose-an-advisor-model>)| `claude --advisor opus`
+`--advisor <model>`| Enable the server-side [advisor tool](</docs/en/advisor>) for this session with a model alias, `fable`, `opus`, or `sonnet`, or a full model ID. Takes precedence over the `advisorModel` setting for the session. `fable` requires [Fable access](</docs/en/advisor#choose-an-advisor-model>)| `claude --advisor opus`
`--agent`| Specify an agent for the current session (overrides the `agent` setting)| `claude --agent my-custom-agent`
`--agents`| Define custom subagents dynamically via JSON. Accepts the [fields listed for CLI-defined subagents](</docs/en/sub-agents#choose-the-subagent-scope>). Claude Code validates the JSON at startup and exits on an invalid value; see [`Invalid --agents configuration`](</docs/en/errors#invalid-agents-configuration>) for the message and for the flags and environment variable that skip the validation. Validation requires Claude Code v2.1.242 or later| `claude --agents '{"reviewer":{"description":"Reviews code","prompt":"You are a code reviewer"}}'`
`--allow-dangerously-skip-permissions`| Add `bypassPermissions` to the `Shift+Tab` mode cycle without starting in it. Lets you begin in a different mode like `plan` and switch to `bypassPermissions` later. See [permission modes](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>)| `claude --permission-mode plan --allow-dangerously-skip-permissions`
@@ -99,7 +99,7 @@
`--max-budget-usd`| Maximum dollar amount to spend on API calls before stopping (print mode only). Spend from [subagents](</docs/en/sub-agents>) counts toward the cap. Once spend reaches the cap, spawning another subagent fails with `Budget limit reached`, and Claude Code stops background subagents that are still running; the cap-enforcement behaviors require Claude Code v2.1.217 or later| `claude -p --max-budget-usd 5.00 "query"`
`--max-turns`| Limit the number of agentic turns (print mode only). Exits with an error when the limit is reached. No limit by default. With `--input-format stream-json`, a message still queued when the limit ends a turn stays queued and starts a new turn with its own limit| `claude -p --max-turns 3 "query"`
`--mcp-config`| Load MCP servers from JSON files or strings (space-separated). When you pass this flag with `-p`, Claude Code waits for still-pending servers to connect before running the first turn, up to the [`MCP_TIMEOUT`](</docs/en/env-vars>) startup timeout, 30 seconds by default; a server with a [cached tool list](</docs/en/mcp#managing-your-servers>) skips the wait and connects on first use. The wait requires Claude Code v2.1.221 or later| `claude --mcp-config ./mcp.json`
-`--model`| Sets the model for the current session with an alias for the latest model (`sonnet`, `opus`, `haiku`, or `fable`) or a model’s full name. Overrides the [`model`](</docs/en/settings-reference#model>) setting and [`ANTHROPIC_MODEL`](</docs/en/model-config#environment-variables>)| `claude --model claude-sonnet-5`
+`--model`| Sets the model for the current session with a [model alias](</docs/en/model-config#model-aliases>) such as `sonnet`, `opus`, `haiku`, or `fable`, or a model’s full name. Overrides the [`model`](</docs/en/settings-reference#model>) setting and [`ANTHROPIC_MODEL`](</docs/en/model-config#environment-variables>)| `claude --model claude-sonnet-5`
`--name`, `-n`| Set a display name for the session, shown in `/resume` and the terminal title. You can resume a named session with `claude --resume <name>`. In an interactive session, if another live session on this machine already uses the name, Claude Code applies [a variant of it](</docs/en/sessions#name-your-sessions>) instead.
[`/rename`](</docs/en/commands>) changes the name mid-session and also shows it on the prompt bar| `claude -n "my-feature-work"`
--- a/commands.md
+++ b/commands.md
@@ -28,7 +28,7 @@
Command| Purpose
---|---
`/add-dir <path>`| Add a working directory for file access during the current session. Type a partial path to see matching directory suggestions; press `Tab` to accept one. Most `.claude/` configuration is [not discovered](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) from the added directory. A successful add runs your [`DirectoryAdded` hooks](</docs/en/hooks#directoryadded>). When you run it while Claude is responding, Claude Code asks you to confirm the directory right away, and once you confirm, Claude’s next tool call in the same turn can access it. Before v2.1.234, Claude Code queued the command until the turn finished
-`/advisor [model|off]`| Enable or disable the [advisor tool](</docs/en/advisor>), which consults a second model for guidance at key moments during a task. Accepts `fable`, `opus`, `sonnet`, or a full model ID. `fable` requires [Fable 5 access](</docs/en/advisor#choose-an-advisor-model>). Without an argument, opens a picker
+`/advisor [model|off]`| Enable or disable the [advisor tool](</docs/en/advisor>), which consults a second model for guidance at key moments during a task. Accepts `fable`, `opus`, `sonnet`, or a full model ID. `fable` requires [Fable access](</docs/en/advisor#choose-an-advisor-model>). Without an argument, opens a picker
`/agents`| As of v2.1.198, running `/agents` prints a reminder to ask Claude to create or manage [subagents](</docs/en/sub-agents>), or to edit `.claude/agents/` or `~/.claude/agents/` directly. On v2.1.197 and earlier, opens an interactive interface for creating and managing subagent configurations
`/artifacts`| List the [artifacts](</docs/en/artifacts#find-an-artifact-again>) you own or that are shared with you, then attach one to the session, open it in your browser, or copy its link. Available where [artifacts](</docs/en/artifacts#availability>) are. Requires Claude Code v2.1.208 or later; attaching with `Enter` requires v2.1.216
`/auto-mode-setup`| [Draft `autoMode.environment` entries](</docs/en/auto-mode-config#generate-environment-entries>) from your project and recent sessions, then review the draft and save it to your user settings. Requires a Pro, Max, or Team plan and Claude Code v2.1.228 or later. On native Windows, requires v2.1.233 or later
--- a/communications-kit.md
+++ b/communications-kit.md
@@ -214,7 +214,7 @@
mid-session. *Sonnet* is the workhorse default for everyday feature work,
bugs, tests, and reviews. Reach for *Opus* on large refactors, gnarly
debugging, or anything high-stakes. Drop to *Haiku* for quick questions,
- formatting, and mechanical edits where speed wins. *Fable 5* is the most
+ formatting, and mechanical edits where speed wins. *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
@@ -228,7 +228,7 @@
Model| Best for
---|---
-Fable 5| The hardest, longest-running tasks. Opt-in only: select it with `/model fable`. Cybersecurity or biology content [falls back to Opus](</docs/en/model-config#automatic-model-fallback>)
+Fable| The hardest, longest-running tasks. Opt-in only: select it with `/model fable`. Cybersecurity or biology content [falls back 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>)
Sonnet| Everyday feature work, bug fixes, tests, documentation, code review. Recommended default.
Haiku| Quick questions, formatting, mechanical edits, rapid iteration
--- a/context-window.md
+++ b/context-window.md
@@ -50,7 +50,7 @@
* **Clear between tasks** : run `/clear` when switching to unrelated work. Old conversation crowds out the files you need next and costs tokens on every message.
* **Delegate large reads** : send research to a [subagent](</docs/en/sub-agents>) so the file contents stay in its context window, not yours.
-If you need a larger window rather than a smaller conversation, Fable 5, Sonnet 5, Opus 4.6 and later, and Sonnet 4.6 support a 1 million token context window. See [Extended context](</docs/en/model-config#extended-context>) for availability by plan and how to select a `[1m]` model variant. Sonnet 5 runs at 1M with no `[1m]` variant to select; see [Sonnet 5 context window](</docs/en/model-config#sonnet-5-context-window>) for its auto-compaction thresholds and the LLM gateway exception. Compaction works the same way at the larger limit. The point where automatic compaction runs depends on your model and configuration. See [Default auto-compact thresholds](</docs/en/model-config#default-auto-compact-thresholds>) for the boundaries per model, and [Correct the window for a gateway or custom model ID](</docs/en/model-config#correct-the-window-for-a-gateway-or-custom-model-id>) if Claude Code assumes the wrong window for your model ID, such as an [LLM gateway](</docs/en/llm-gateway>) alias.
+If you need a larger window rather than a smaller conversation, Fable 5.1, Fable 5, Sonnet 5, Opus 4.6 and later, and Sonnet 4.6 support a 1 million token context window. See [Extended context](</docs/en/model-config#extended-context>) for availability by plan and how to select a `[1m]` model variant. Sonnet 5 runs at 1M with no `[1m]` variant to select; see [Sonnet 5 context window](</docs/en/model-config#sonnet-5-context-window>) for its auto-compaction thresholds and the LLM gateway exception. Compaction works the same way at the larger limit. The point where automatic compaction runs depends on your model and configuration. See [Default auto-compact thresholds](</docs/en/model-config#default-auto-compact-thresholds>) for the boundaries per model, and [Correct the window for a gateway or custom model ID](</docs/en/model-config#correct-the-window-for-a-gateway-or-custom-model-id>) if Claude Code assumes the wrong window for your model ID, such as an [LLM gateway](</docs/en/llm-gateway>) alias.
##
--- a/costs.md
+++ b/costs.md
@@ -348,7 +348,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`, disabling thinking in `/config`, or, on models with a [fixed thinking budget](</docs/en/model-config#adaptive-reasoning-and-fixed-thinking-budgets>), lowering 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. Disabling thinking is not available on Fable 5, which always uses 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`, disabling thinking in `/config`, or, on models with a [fixed thinking budget](</docs/en/model-config#adaptive-reasoning-and-fixed-thinking-budgets>), lowering 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. Disabling thinking is not available on Fable models, which always use extended thinking.
###
--- a/cross-session-messaging.md
+++ b/cross-session-messaging.md
@@ -120,7 +120,7 @@
* **Subagents** : agents running inside the current session.
* **Teammates** : this session’s own [agent team](</docs/en/agent-teams>) teammates. Before v2.1.239, teammates didn’t appear in the listing, though Claude could already message them by name.
- * **Your other local sessions** : Claude Code sessions running on the same machine, including [background sessions](</docs/en/agent-view>). A session appears only when it binds an inbox socket. The worker process that the [supervisor process](</docs/en/agent-view#the-supervisor-process>) keeps ready for your next background session appears once you dispatch work to it.
+ * **Your other local sessions** : Claude Code sessions running on the same machine, including [background sessions](</docs/en/agent-view>). A session appears only when it binds an inbox socket.
* **Your cloud sessions** : your [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions, shown while this session is connected to [Remote Control](</docs/en/remote-control>). Claude Code labels them `cloud` in the listing.
* **Your Remote Control sessions on other machines** : shown while this session is connected to [Remote Control](</docs/en/remote-control>), and labeled `Remote Control`. Claude Code shows `offline` as the status of a session whose Remote Control connection has dropped.
--- a/custom-tools.md
+++ b/custom-tools.md
@@ -446,7 +446,7 @@
Return images and resources
-The `content` array in a tool result accepts `text`, `image`, `audio`, `resource`, and `resource_link` blocks. You can mix them in the same response. In TypeScript, the SDK saves audio blocks to disk and Claude receives a text block with the saved file path; in Python, the SDK drops audio blocks from the tool result and logs a warning. The SDK converts resource link blocks to a text block containing the link’s name, URI, and description.
+The `content` array in a tool result accepts `text`, `image`, `audio`, `resource`, and `resource_link` blocks. You can mix them in the same response. In TypeScript, the SDK saves audio blocks to disk and Claude receives a text block with the saved file path; in Python, the SDK drops audio blocks from the tool result and logs a warning. Claude receives each resource link block as a text block containing the link’s name, URI, and description. In TypeScript, your application also receives the links themselves as [`resourceLinks`](</docs/en/agent-sdk/typescript#sdkmcpresourcelink>) on the user message’s `tool_use_result`; in Python, the SDK flattens them to text before the CLI sees the result, so the Python [`resourceLinks` key](</docs/en/agent-sdk/python#usermessage>) is never produced for in-process tools.
###
--- a/desktop.md
+++ b/desktop.md
@@ -84,7 +84,7 @@
**Auto**| `auto`| Claude executes all actions with background safety checks that verify alignment with your request. Reduces permission prompts while maintaining oversight. Appears when auto mode is available; there is no separate Settings toggle for it.
**Bypass permissions**| `bypassPermissions`| Claude runs without permission prompts, except for the [actions no mode auto-approves](</docs/en/permission-modes#actions-no-mode-auto-approves>), safety classifiers when Claude acts on external sites, or desktop actions where Claude always asks first, such as archiving a session. Equivalent to `--dangerously-skip-permissions` in the CLI. On Pro and Max plans, enable it in your Settings → Claude Code under “Allow bypass permissions mode”; on Team and Enterprise plans there is no Settings toggle, and organization policy controls it instead. Only use this in sandboxed containers or VMs.
-Earlier versions of the Code tab labeled these modes Ask permissions, Auto accept edits, and Plan mode. The `dontAsk` permission mode is available only in the [CLI](</docs/en/permission-modes#allow-only-pre-approved-tools-with-dontask-mode>). Auto mode is available to all users on the Anthropic API and requires Claude Opus 4.6 or later, Sonnet 4.6 or later, or Fable 5. Organization administrators can turn auto mode off with the `disableAutoMode` key in managed settings. In Enterprise deployments that route Desktop to Google Cloud’s Agent Platform, auto mode is also available by default; see [Auto mode on Bedrock, Agent Platform, or Foundry](</docs/en/permission-modes#enable-auto-mode-on-bedrock-agent-platform-or-foundry>) for the supported models.
+Earlier versions of the Code tab labeled these modes Ask permissions, Auto accept edits, and Plan mode. The `dontAsk` permission mode is available only in the [CLI](</docs/en/permission-modes#allow-only-pre-approved-tools-with-dontask-mode>). Auto mode is available to all users on the Anthropic API and requires Claude Opus 4.6 or later, Sonnet 4.6 or later, or a Fable model. Organization administrators can turn auto mode off with the `disableAutoMode` key in managed settings. In Enterprise deployments that route Desktop to Google Cloud’s Agent Platform, auto mode is also available by default; see [Auto mode on Bedrock, Agent Platform, or Foundry](</docs/en/permission-modes#enable-auto-mode-on-bedrock-agent-platform-or-foundry>) for the supported models.
Start complex tasks in Plan so Claude maps out an approach before making changes. Once you approve the plan, switch to Accept edits or Manual to execute it. See [explore first, then plan, then code](</docs/en/best-practices#explore-first-then-plan-then-code>) for more on this workflow.
@@ -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 5, which always uses 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 5, 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 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.
####
--- a/desktop-ios-simulator.md
+++ b/desktop-ios-simulator.md
@@ -1,4 +1,4 @@
-The iOS Simulator pane is in public beta in Claude Code Desktop on macOS. It’s available on Pro, Max, Team, and Enterprise plans, except in Enterprise organizations that have a HIPAA configuration or [Zero Data Retention (ZDR)](</docs/en/zero-data-retention>) enabled.
+The iOS Simulator pane is in public beta in Claude Code Desktop on macOS. It’s available on Pro, Max, Team, and Enterprise plans, except in Enterprise organizations that have a HIPAA configuration enabled.
The iOS Simulator pane shows your app running in Apple’s iOS Simulator next to your conversation in Claude Code Desktop. When Claude builds, installs, launches, or checks your app in a simulator, the pane opens automatically and streams the device screen live. Use it to watch Claude run and test your app, or to tap through the app yourself while Claude keeps working. The simulator pane drives the simulator directly, so it doesn’t need [computer use](</docs/en/desktop#let-claude-use-your-computer>) and never takes over your screen or hides your other windows. From the CLI, Claude reaches the iOS Simulator through [computer use](</docs/en/computer-use#test-a-simulator-flow>) instead, which controls the simulator on your screen the same way you would with a mouse.
@@ -139,7 +139,7 @@
* State the goal explicitly, for example “run the app in the iOS Simulator and tap through the signup flow”.
* Confirm Xcode and the iOS simulators are installed and that your Xcode version meets the requirements.
* If your organization manages Claude Code, the simulator tools may be disabled by policy.
- * If you’re in an Enterprise organization that has a HIPAA configuration or ZDR enabled, the simulator pane isn’t available to you.
+ * If you’re in an Enterprise organization that has a HIPAA configuration enabled, the simulator pane isn’t available to you.
* The simulator pane requires Claude Desktop v1.24012.0 or later. Open **Claude → Check for Updates** , then restart the app.
###
--- a/env-vars.md
+++ b/env-vars.md
@@ -129,7 +129,7 @@
`ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION`| Display description for the custom model entry in the `/model` picker. Defaults to `Custom model (<model-id>)` when not set
`ANTHROPIC_CUSTOM_MODEL_OPTION_NAME`| Display name for the custom model entry in the `/model` picker. Defaults to the model ID when not set
`ANTHROPIC_CUSTOM_MODEL_OPTION_SUPPORTED_CAPABILITIES`| Comma-separated list of [capabilities](</docs/en/model-config#customize-pinned-model-display-and-capabilities>) the custom model supports, for example `effort,thinking`. See [Model configuration](</docs/en/model-config#customize-pinned-model-display-and-capabilities>)
-`ANTHROPIC_DEFAULT_FABLE_MODEL`| Model ID that the `fable` alias resolves to, and the ID Claude Code recognizes as Fable 5 for [automatic model fallback](</docs/en/model-config#automatic-model-fallback>) on third-party providers. See [Model configuration](</docs/en/model-config#environment-variables>)
+`ANTHROPIC_DEFAULT_FABLE_MODEL`| Model ID that the `fable` alias resolves to, and the ID Claude Code recognizes as a Fable model for [automatic model fallback](</docs/en/model-config#automatic-model-fallback>) on third-party providers. See [Model configuration](</docs/en/model-config#environment-variables>)
`ANTHROPIC_DEFAULT_FABLE_MODEL_DESCRIPTION`| Display description for the pinned Fable model in the `/model` picker. Defaults to `Custom Fable model` when not set. See [Model configuration](</docs/en/model-config#customize-pinned-model-display-and-capabilities>)
`ANTHROPIC_DEFAULT_FABLE_MODEL_NAME`| Display name for the pinned Fable model in the `/model` picker. Defaults to the model ID when not set. See [Model configuration](</docs/en/model-config#customize-pinned-model-display-and-capabilities>)
`ANTHROPIC_DEFAULT_FABLE_MODEL_SUPPORTED_CAPABILITIES`| Comma-separated list of [capabilities](</docs/en/model-config#customize-pinned-model-display-and-capabilities>) the pinned Fable model supports, for example `effort,thinking`. See [Model configuration](</docs/en/model-config#customize-pinned-model-display-and-capabilities>)
@@ -172,7 +172,7 @@
`CLAUDE_AFK_TIMEOUT_MS`| How many milliseconds of idle time before an unanswered [`AskUserQuestion`](</docs/en/tools-reference>) dialog auto-continues without you. Auto-continue is off by default; opt in with the [`askUserQuestionTimeout`](</docs/en/settings-reference#askuserquestiontimeout>) setting. This variable is an override for demos and automated tests: when set, it takes precedence over that setting and turns auto-continue on even when the setting is unset or `never`. Setting `0` doesn’t turn the timeout off; it closes the dialog immediately. In v2.1.198 and v2.1.199, auto-continue was on by default with a `60000` (60 seconds) timeout. Requires Claude Code v2.1.198 or later
`CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS`| Set to `1` to disable all built-in [subagent](</docs/en/sub-agents>) types such as Explore and Plan. Only applies in non-interactive mode (the `-p` flag). Useful for SDK users who want a blank slate. This also removes `general-purpose`, the subagent Claude Code runs when an Agent tool call omits `subagent_type`. Such a call then fails with [`subagent_type is required`](</docs/en/errors#subagent-type-is-required>)
`CLAUDE_AGENT_SDK_MCP_NO_PREFIX`| Set to `1` to skip the `mcp__<server>__` prefix on tool names from SDK-created MCP servers. Tools use their original names. SDK usage only
-`CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS`| Stall timeout in milliseconds for background subagents. Default `600000` (10 minutes). The timer resets on each streaming progress event; if no progress arrives within the window, the subagent is aborted and the task is marked failed, surfacing any partial result to the parent
+`CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS`| Stall timeout in milliseconds for subagents. Default `600000` (10 minutes); if you raise `CLAUDE_STREAM_IDLE_TIMEOUT_MS` while the stream watchdog is on, the default rises with it, as [Handle slow or stalled API responses](</docs/en/agent-sdk/typescript#handle-slow-or-stalled-api-responses>) describes. The timer resets on each streaming progress event; if no progress arrives within the window, Claude Code aborts the subagent and reports the stall to the parent
`CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`| Set the percentage (1-100) of the auto-compact window at which auto-compaction triggers. Use lower values like `50` to compact earlier; the variable can’t raise the threshold, so values above the default percentage are ignored. It applies only in sessions that [compact before the model’s context limit](</docs/en/model-config#context-window-and-auto-compaction>). Applies to both main conversations and subagents
`CLAUDE_AUTO_BACKGROUND_TASKS`| Set to `1` to force-enable automatic backgrounding of long-running agent tasks. When enabled, subagents are moved to the background after running for approximately two minutes. Also enables [automatic backgrounding of long MCP tool calls](</docs/en/mcp#automatic-backgrounding-of-long-tool-calls>) in non-interactive mode on Claude Code v2.1.212 or later
`CLAUDE_AX_PREPARK_MS`| In [screen reader mode](</docs/en/accessibility#what-your-screen-reader-hears>), how many milliseconds Claude Code waits, with the cursor at the start of the line, before it writes a new or changed line. Default `50`. Set `0` to write immediately. Claude Code caps the wait at `5000`. Requires Claude Code v2.1.233 or later
@@ -204,8 +204,8 @@
`CLAUDE_CODE_CONNECT_TIMEOUT_MS`| Removed in v2.1.186 and now a no-op. Previously set a separate timeout for the connect, TLS, and response-header phase of a streaming API request. Use `API_TIMEOUT_MS` for the per-request timeout. For the response-header phase of a streaming request, see `CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS`
`CLAUDE_CODE_DEBUG_LOGS_DIR`| Override the debug log file path. Despite the name, this is a file path, not a directory. Requires debug mode to be enabled separately via `--debug`, `/debug`, or the `DEBUG` environment variable: setting this variable alone does not enable logging. The [`--debug-file`](</docs/en/cli-reference#cli-flags>) flag does both at once. Defaults to `~/.claude/debug/<session-id>.txt`
`CLAUDE_CODE_DEBUG_LOG_LEVEL`| Minimum log level written to the debug log file. Values: `verbose`, `debug` (default), `info`, `warn`, `error`. Set to `verbose` to include high-volume diagnostics like full status line command output, or raise to `error` to reduce noise
-`CLAUDE_CODE_DISABLE_1M_CONTEXT`| Set to `1` to disable [1M context window](</docs/en/model-config#extended-context>) support. When set, 1M model variants are unavailable in the model picker, and Claude Code holds sessions on models with a native 1M window, such as [Sonnet 5](</docs/en/model-config#sonnet-5-context-window>) and Fable 5, to a 200K window; see [Extended context](</docs/en/model-config#extended-context>) for how the hold is enforced. Useful for enterprise environments with compliance requirements. For its role in correcting the window for an unrecognized `[1m]` model ID, see [Correct the window for a gateway or custom model ID](</docs/en/model-config#correct-the-window-for-a-gateway-or-custom-model-id>)
-`CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING`| Set to `1` to disable [adaptive reasoning](</docs/en/model-config#adjust-effort-level>) on Opus 4.6 and Sonnet 4.6 and fall back to the fixed thinking budget controlled by `MAX_THINKING_TOKENS`. Has no effect on Fable 5, Sonnet 5, or Opus 4.7 and later, which always use adaptive reasoning
+`CLAUDE_CODE_DISABLE_1M_CONTEXT`| Set to `1` to disable [1M context window](</docs/en/model-config#extended-context>) support. When set, 1M model variants are unavailable in the model picker, and Claude Code holds sessions on models with a native 1M window, such as [Sonnet 5](</docs/en/model-config#sonnet-5-context-window>) and the Fable models, to a 200K window; see [Extended context](</docs/en/model-config#extended-context>) for how the hold is enforced. Useful for enterprise environments with compliance requirements. For its role in correcting the window for an unrecognized `[1m]` model ID, see [Correct the window for a gateway or custom model ID](</docs/en/model-config#correct-the-window-for-a-gateway-or-custom-model-id>)
+`CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING`| Set to `1` to disable [adaptive reasoning](</docs/en/model-config#adjust-effort-level>) on Opus 4.6 and Sonnet 4.6 and fall back to the fixed thinking budget controlled by `MAX_THINKING_TOKENS`. Has no effect on [Fable models](</docs/en/model-config#extended-thinking>), Sonnet 5, or Opus 4.7 and later, which always use adaptive reasoning
`CLAUDE_CODE_DISABLE_ADMIN_ENV_UNION`| Set to `1` to stop Claude Code from merging [managed settings](</docs/en/managed-settings#precedence-within-the-managed-tier>) `env` blocks per key across admin sources, so only the highest-priority source’s whole `env` block applies, as before v2.1.223. Set it in the environment that launches Claude Code, since Claude Code ignores a copy delivered through a settings `env` block. Requires Claude Code v2.1.223 or later
`CLAUDE_CODE_DISABLE_ADVISOR_TOOL`| Set to `1` to disable the [advisor tool](</docs/en/advisor>). The `/advisor` command becomes unavailable, any configured `advisorModel` is ignored, and the `--advisor` flag is accepted but has no effect, so existing scripts that pass it continue to work without errors
`CLAUDE_CODE_DISABLE_AGENT_VIEW`| Set to `1` to turn off [background agents and agent view](</docs/en/agent-view>): `claude agents`, `--bg`, `/background`, and the on-demand supervisor. Equivalent to the [`disableAgentView`](</docs/en/settings-reference#disableagentview>) setting
@@ -219,6 +219,7 @@
`CLAUDE_CODE_DISABLE_BG_EXIT_HANDOFF`| Set to `1` to stop a [background session’s](</docs/en/agent-view>) running background shell commands, dynamic workflows, and, as of v2.1.198, background subagents when the [supervisor](</docs/en/agent-view#the-supervisor-process>) stops, restarts, or updates that session’s process, instead of handing them to the session’s next process. Affects only that handoff: backgrounding a session with `←` or [`/background`](</docs/en/agent-view#from-inside-a-session>) still carries in-flight work over, and `CLAUDE_DISABLE_ADOPT` turns off both. Requires Claude Code v2.1.196 or later
`CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP`| Set to `1` to stop Claude Code from terminating [background shell commands](</docs/en/interactive-mode#background-bash-commands>) when the operating system reports memory pressure. By default, on macOS and Linux, Claude Code terminates a background shell started in the main session on a memory-pressure signal once the session has been idle for 30 minutes and no turn or subagent is running. Windows has no memory-pressure signal, so this variable has no effect there. Requires Claude Code v2.1.193 or later
`CLAUDE_CODE_DISABLE_BUNDLED_SKILLS`| Set to `1` to disable the [skills](</docs/en/skills>) and workflows included with Claude Code: bundled skills and workflows are removed entirely, while built-in commands like `/init` stay typable but are hidden from the model. `/doctor` stays typable like the built-in commands; hide it with `DISABLE_DOCTOR_COMMAND` instead. Skills from plugins, `.claude/skills/`, and `.claude/commands/` are unaffected. Equivalent to the [`disableBundledSkills`](</docs/en/settings-reference#disablebundledskills>) setting
+`CLAUDE_CODE_DISABLE_CFC_PROMPT`| Set to `1` to keep the [Claude in Chrome](</docs/en/chrome>) browser tools available while omitting the Chrome section of the system prompt and the `/claude-in-chrome` [bundled skill](</docs/en/skills#bundled-skills>). For hosts that embed Claude Code and supply their own browser guidance. Requires Claude Code v2.1.257 or later
`CLAUDE_CODE_DISABLE_CLAUDE_MDS`| Set to `1` to prevent loading any CLAUDE.md memory files into context, including user, project, and auto memory files
`CLAUDE_CODE_DISABLE_CRON`| Set to `1` to disable [scheduled tasks](</docs/en/scheduled-tasks>). The `/loop` skill and cron tools become unavailable and any already-scheduled tasks stop firing, including tasks that are already running mid-session
`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS`| Set to `1` to strip Anthropic-specific `anthropic-beta` request headers and beta tool-schema fields (such as `defer_loading` and `eager_input_streaming`) from API requests. Use this when a proxy gateway rejects requests with errors like “Unexpected value(s) for the `anthropic-beta` header” or “Extra inputs are not permitted”. Standard fields (`name`, `description`, `input_schema`, `cache_control`) are preserved. [MCP tool search](</docs/en/mcp#scale-with-mcp-tool-search>) is disabled and all MCP tools load upfront, even when you set `ENABLE_TOOL_SEARCH`. On Claude Code v2.1.227 or later, [managed settings](</docs/en/managed-settings>) can keep tool search on. [Disable pre-release capabilities](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) covers where the override applies
@@ -238,7 +239,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. In Agent SDK and `claude -p` sessions, this also skips the background small/fast-model request that generates the session title
-`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. The variable’s behavior is unchanged from earlier versions; on models that think by default, omitting the parameter means the model may still think. To explicitly disable [extended thinking](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking>) on the Anthropic API, use `MAX_THINKING_TOKENS=0` instead, which is also ineffective on Fable 5 since it cannot have thinking turned off. On [third-party providers](</docs/en/third-party-integrations>), `0` likewise omits the parameter, so the two variables behave the same there
+`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. The variable’s behavior is unchanged from earlier versions; on models that think by default, omitting the parameter means the model may still think. To explicitly disable [extended thinking](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking>) on the Anthropic API, use `MAX_THINKING_TOKENS=0` instead, which is also ineffective on [Fable models](</docs/en/model-config#extended-thinking>) since they can’t have thinking turned off. On [third-party providers](</docs/en/third-party-integrations>), `0` likewise omits the parameter, so the two variables behave the same there
`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_WORKFLOWS`| Set to `1` to disable [workflows](</docs/en/workflows#turn-workflows-off>). Equivalent to the [`disableWorkflows`](</docs/en/settings-reference#disableworkflows>) setting
@@ -341,9 +342,10 @@
`CLAUDE_CODE_SKIP_PROMPT_HISTORY`| Set to `1` to skip writing prompt history and session transcripts to disk. Sessions started with this variable set do not appear in `--resume`, `--continue`, or up-arrow history. Useful for ephemeral scripted sessions
`CLAUDE_CODE_SKIP_VERTEX_AUTH`| Skip Google authentication for Google Cloud’s Agent Platform (for example, when using an LLM gateway)
`CLAUDE_CODE_STOP_HOOK_BLOCK_CAP`| Maximum number of consecutive times a [Stop](</docs/en/hooks#stop>) or [SubagentStop](</docs/en/hooks#subagentstop>) hook may block the turn from ending before Claude Code overrides it and ends the turn anyway (default: 8). Set to `0` to disable the cap. Raise this if your hook legitimately needs more iterations to resolve
-`CLAUDE_CODE_SUBAGENT_MODEL`| The default model for [subagents](</docs/en/sub-agents#choose-a-model>), [agent team](</docs/en/agent-teams#specify-teammates-and-models>) teammates, and [workflow](</docs/en/workflows>) agents that aren’t assigned a model another way. Accepts an alias such as `haiku` or a full model name. Two sources take precedence over it: a model Claude passes when it spawns the agent, and a `model` field in the agent’s definition, including `inherit`. See [Choose a model](</docs/en/sub-agents#choose-a-model>) for the full order. Setting it to `inherit` is the same as leaving it unset. Before v2.1.251, this variable overrode both the per-invocation model and the definition’s `model` field
+`CLAUDE_CODE_SUBAGENT_MODEL`| The default model for [subagents](</docs/en/sub-agents#choose-a-model>), [agent team](</docs/en/agent-teams#specify-teammates-and-models>) teammates, and [workflow](</docs/en/workflows>) agents that aren’t assigned a model another way. Accepts an alias such as `haiku` or a full model name. Two sources take precedence over it: a model Claude passes when it spawns the agent, and a `model` field in the agent’s definition, including `inherit`. To change that, set [`CLAUDE_CODE_SUBAGENT_MODEL_FORCE`](</docs/en/sub-agents#choose-a-model>). See [Choose a model](</docs/en/sub-agents#choose-a-model>) for the full order. Setting it to `inherit` is the same as leaving it unset. Before v2.1.251, this variable overrode both the per-invocation model and the definition’s `model` field
+`CLAUDE_CODE_SUBAGENT_MODEL_FORCE`| Set to `1` to force one model onto subagents, teammates, and workflow agents. [Choose a model](</docs/en/sub-agents#choose-a-model>) says which model that is. Requires Claude Code v2.1.257 or later
`CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL`| Set `5m` or `1h`, the only values Claude Code accepts, to choose the [prompt cache TTL](</docs/en/prompt-caching#cache-lifetime>) for requests outside the main conversation, such as [subagents](</docs/en/sub-agents>), workflows, and background work. Takes precedence over the `subagentPromptCacheTtl` setting and over `ENABLE_PROMPT_CACHING_1H`, and `FORCE_PROMPT_CACHING_5M` overrides it. The API bills 1-hour cache writes at a higher rate. Requires Claude Code v2.1.242 or later
-`CLAUDE_CODE_SUBPROCESS_ENV_SCRUB`| Set to `1` to strip Anthropic and cloud provider credentials from subprocess environments (Bash tool, hooks, MCP stdio servers). The parent Claude process keeps these credentials for API calls, but child processes cannot read them, reducing exposure to prompt injection attacks that attempt to exfiltrate secrets via shell expansion. On Linux, this also runs Bash subprocesses in an isolated PID namespace so they cannot read host process environments via `/proc`; as a side effect, `ps`, `pgrep`, and `kill` cannot see or signal host processes. `claude-code-action` sets this automatically when `allowed_non_write_users` is configured
+`CLAUDE_CODE_SUBPROCESS_ENV_SCRUB`| Set to `1` to strip credentials from subprocess environments (Bash tool, hooks, MCP stdio servers): Anthropic and cloud provider credentials, any other variable that Claude Code recognizes as a credential, and credentials embedded in package registry URLs. The parent Claude process keeps these credentials for API calls, but child processes cannot read them, reducing exposure to prompt injection attacks that attempt to exfiltrate secrets via shell expansion. On Linux, this also runs Bash subprocesses in an isolated PID namespace so they cannot read host process environments via `/proc`; as a side effect, `ps`, `pgrep`, and `kill` cannot see or signal host processes. `claude-code-action` sets this automatically when `allowed_non_write_users` is configured
`CLAUDE_CODE_SYNC_PLUGIN_INSTALL`| Set to `1` in non-interactive mode (the `-p` flag) to wait for plugin installation to complete before the first query. Without this, plugins install in the background and may not be available on the first turn. Combine with `CLAUDE_CODE_SYNC_PLUGIN_INSTALL_TIMEOUT_MS` to bound the wait
`CLAUDE_CODE_SYNC_PLUGIN_INSTALL_TIMEOUT_MS`| Timeout in milliseconds for synchronous plugin installation. When exceeded, Claude Code proceeds without plugins and logs an error. No default: without this variable, synchronous installation waits until complete
`CLAUDE_CODE_SYNC_SKILLS`| Set to `1` to download your enabled claude.ai skills into `~/.claude/skills/synced/` and resync every 10 minutes. Before it runs the first query, Claude Code waits up to `CLAUDE_CODE_SYNC_SKILLS_WAIT_TIMEOUT_MS` for the list of your skills. The downloads themselves finish in the background, and Claude waits for a skill’s download when it invokes that skill. The `synced` folder name is [reserved for this download](</docs/en/skills#where-skills-live>). Before v2.1.227, the skills downloaded into `~/.claude/skills/` directly. Applies only in non-interactive mode with the `-p` flag. Requires claude.ai authentication. [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions receive your enabled claude.ai skills automatically; you don’t need to set this there. Claude Code applies [extra rules to the downloaded skills](</docs/en/skills#how-synced-skills-behave>), such as not running their `!` commands on your machine
@@ -356,7 +358,7 @@
`CLAUDE_CODE_TMUX_TRUECOLOR`| Set to any non-empty value, such as `1`, to allow 24-bit truecolor output inside tmux. **Setting it to`0` or `false` still allows truecolor**, unlike most on/off variables; unset the variable to restore the 256-color clamp. By default, Claude Code clamps to 256 colors when `$TMUX` is set because tmux does not pass through truecolor escape sequences unless configured to. Set this after adding `set -ga terminal-overrides ',*:Tc'` to your `~/.tmux.conf`. See [Terminal configuration](</docs/en/terminal-config>) for other tmux settings
`CLAUDE_CODE_TOOL_MEMORY_CGROUP_EXCLUDE`| On Linux and WSL, set to a comma-separated list of the kinds of processes Claude Code [excludes from the tool memory cap](</docs/en/tools-reference#memory-limit-on-linux-and-wsl>), such as `mcp` or `lsp`. Set `none` to cap every kind, or `all-new` to cap only Bash, PowerShell, and Monitor tool commands. Claude Code keeps Bash, PowerShell, and Monitor tool commands under the cap whatever you list. Requires Claude Code v2.1.246 or later
`CLAUDE_CODE_TOOL_MEMORY_LIMIT`| On Linux and WSL, set to a size such as `4G` to [cap the memory that Bash and PowerShell tool commands can use](</docs/en/tools-reference#memory-limit-on-linux-and-wsl>), and Monitor tool commands on v2.1.246 or later. Write the size in plain digits, alone for a number of bytes or with a `K`, `M`, `G`, or `T` suffix. Set `0` or `off` to turn the cap off. Once the first process Claude Code starts has turned the cap on or off, a changed value takes effect the next time you launch `claude`. Requires Claude Code v2.1.233 or later
-`CLAUDE_CODE_USER_DIALOG_TIMEOUT_MS`| Deadline in milliseconds for dialogs Claude Code forwards to a remote client, such as a [Remote Control](</docs/en/remote-control>) or SDK host, and for the approval dialog for a [held cross-session message](</docs/en/cross-session-messaging#control-inbound-messages>), before Claude Code cancels them; permission prompts and `AskUserQuestion` questions use their own flows and aren’t governed by it. Also bounds the mid-session [Fable 5 usage-credits consent prompt](</docs/en/model-config#fable-5-and-usage-credits>) in a session that may be running unattended. [Control inbound messages](</docs/en/cross-session-messaging#control-inbound-messages>) and [non-interactive sessions](</docs/en/cross-session-messaging#non-interactive-sessions>) cover the full held-message expiry rules, including the cases where the deadline doesn’t apply. Overrides the [`dialogExpiry`](</docs/en/settings-reference#dialogexpiry>) setting; `0` or a negative value disables the deadline
+`CLAUDE_CODE_USER_DIALOG_TIMEOUT_MS`| Deadline in milliseconds for dialogs Claude Code forwards to a remote client, such as a [Remote Control](</docs/en/remote-control>) or SDK host, and for the approval dialog for a [held cross-session message](</docs/en/cross-session-messaging#control-inbound-messages>), before Claude Code cancels them; permission prompts and `AskUserQuestion` questions use their own flows and aren’t governed by it. Also bounds the mid-session [Fable usage-credits consent prompt](</docs/en/model-config#fable-and-usage-credits>) in a session that may be running unattended. [Control inbound messages](</docs/en/cross-session-messaging#control-inbound-messages>) and [non-interactive sessions](</docs/en/cross-session-messaging#non-interactive-sessions>) cover the full held-message expiry rules, including the cases where the deadline doesn’t apply. Overrides the [`dialogExpiry`](</docs/en/settings-reference#dialogexpiry>) setting; `0` or a negative value disables the deadline
`CLAUDE_CODE_USE_ANTHROPIC_AWS`| Use [Claude Platform on AWS](</docs/en/claude-platform-on-aws>)
`CLAUDE_CODE_USE_BEDROCK`| Use [Amazon Bedrock](</docs/en/amazon-bedrock>)
`CLAUDE_CODE_USE_FOUNDRY`| Use [Microsoft Foundry](</docs/en/microsoft-foundry>)
@@ -407,7 +409,7 @@
`ENABLE_PROMPT_CACHING_1H`| Set to `1` to request a 1-hour [prompt cache TTL](</docs/en/prompt-caching#cache-lifetime>) instead of the default 5 minutes. Intended for API key, [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>) users. Subscription users within included usage receive the 1-hour TTL automatically on the [main conversation](</docs/en/prompt-caching#which-ttl-each-request-gets>). Subscription users drawing on [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>) can set it to keep the 1-hour TTL. 1-hour cache writes are billed at a higher rate. To choose the TTL per request bucket instead, use `CLAUDE_CODE_PROMPT_CACHE_TTL` and `CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL`, which take precedence over this variable
`ENABLE_PROMPT_CACHING_1H_BEDROCK`| Deprecated. Use `ENABLE_PROMPT_CACHING_1H` instead
`ENABLE_TOOL_SEARCH`| Controls [MCP tool search](</docs/en/mcp#scale-with-mcp-tool-search>). Unset, Claude Code defers all MCP tools by default. It still loads them upfront on Google Cloud’s Agent Platform models earlier than the Claude 4.5 generation, on a Microsoft Foundry deployment hosted on Azure, and when `ANTHROPIC_BASE_URL` points to a non-first-party host. `true` always defers and sends the beta header, except on those same Agent Platform models and Microsoft Foundry deployments; requests fail on proxies that don’t support `tool_reference`. `auto` loads upfront when tool definitions fit within 10% of context. `auto:N` sets a custom threshold, such as `auto:5` for 5%. `false` loads all tools upfront. A value you set yourself is ignored when `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` is set. Before v2.1.221, Claude Code disabled tool search for all models on Google Cloud’s Agent Platform unless you set this variable to `true`
-`FALLBACK_FOR_ALL_PRIMARY_MODELS`| Set to any non-empty value, such as `1`, to make every model stop retrying with a repeated-overload error when no fallback model is configured. **Setting it to`0` or `false` still enables this**, unlike most on/off variables; unset the variable to restore the default retry behavior. Without it, models Claude Code recognizes as Opus, Fable 5, or Mythos models stop retrying this way when you authenticate with an API key or a [third-party provider](</docs/en/third-party-integrations>) rather than a Claude subscription. As of v2.1.160, a configured [fallback model chain](</docs/en/model-config#fallback-model-chains>) triggers on repeated overload errors for any primary model, so this variable does not affect switching to a fallback model
+`FALLBACK_FOR_ALL_PRIMARY_MODELS`| Set to any non-empty value, such as `1`, to make every model stop retrying with a repeated-overload error when no fallback model is configured. **Setting it to`0` or `false` still enables this**, unlike most on/off variables; unset the variable to restore the default retry behavior. Without it, models Claude Code recognizes as Opus, Fable, or Mythos models stop retrying this way when you authenticate with an API key or a [third-party provider](</docs/en/third-party-integrations>) rather than a Claude subscription. As of v2.1.160, a configured [fallback model chain](</docs/en/model-config#fallback-model-chains>) triggers on repeated overload errors for any primary model, so this variable does not affect switching to a fallback model
`FORCE_AUTOUPDATE_PLUGINS`| Set to `1` to force plugin auto-updates even when the main auto-updater is disabled via `DISABLE_AUTOUPDATER`
`FORCE_HYPERLINK`| Set to `1` to enable clickable OSC 8 hyperlinks when your terminal supports them but isn’t auto-detected, or `0` to disable them. When unset, Claude Code enables hyperlinks only when it detects terminal support. Claude Code parses this value as a number, not a Boolean, so a value such as `false`, `no`, or `off` enables hyperlinks rather than disabling them. Claude Code renders the footer [PR or merge request badge](</docs/en/interactive-mode#pr-review-status>) as a hyperlink even when it can’t detect terminal support, such as over SSH. Set `0` to render the badge as plain text
`FORCE_PROMPT_CACHING_5M`| Set to `1` to force the 5-minute prompt cache TTL even when 1-hour TTL would otherwise apply. Overrides `CLAUDE_CODE_PROMPT_CACHE_TTL`, `CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL`, `ENABLE_PROMPT_CACHING_1H`, and the `promptCacheTtl` and `subagentPromptCacheTtl` settings
@@ -416,7 +418,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 times Claude Code retries when the model’s response fails validation against the [`--json-schema`](</docs/en/cli-reference#cli-flags>) in non-interactive mode with the `-p` flag. The same retry count applies when a [workflow](</docs/en/workflows>) subagent’s structured output fails validation. Defaults to 5
-`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 5, which cannot have thinking turned off; on [third-party providers](</docs/en/third-party-integrations>), `0` omits the `thinking` parameter instead. With thinking turned off on the Anthropic API, Claude Code sends effort `high` instead of a higher level to models it knows [don’t accept that combination](</docs/en/errors#effort-isnt-available-with-thinking-turned-off>), such as Opus 5. Nonzero values are ignored on adaptive reasoning models unless `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` is set
+`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](</docs/en/model-config#extended-thinking>), 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. Nonzero values are ignored on adaptive reasoning models unless `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` is set
`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`), Claude Code also waits for still-pending servers before the first turn regardless of this variable, with a longer deadline when you pass [`--mcp-config`](</docs/en/cli-reference#cli-flags>) explicitly; see that flag’s entry for the cached-server exception
`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
@@ -461,6 +463,7 @@
`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
+`VERTEX_REGION_CLAUDE_FABLE_5_1`| Override region for Claude Fable 5.1 when using Google Cloud’s Agent Platform. Added in v2.1.255
`VERTEX_REGION_CLAUDE_HAIKU_4_5`| Override region for Claude Haiku 4.5 when using Google Cloud’s Agent Platform
Standard OpenTelemetry exporter variables (`OTEL_METRICS_EXPORTER`, `OTEL_LOGS_EXPORTER`, `OTEL_EXPORTER_OTLP_ENDPOINT`, `OTEL_EXPORTER_OTLP_PROTOCOL`, `OTEL_EXPORTER_OTLP_HEADERS`, `OTEL_METRIC_EXPORT_INTERVAL`, `OTEL_RESOURCE_ATTRIBUTES`, and signal-specific variants) are also supported. See [Monitoring](</docs/en/monitoring-usage>) for configuration details.
--- a/errors.md
+++ b/errors.md
@@ -109,6 +109,7 @@
`There's an issue with the selected model`| Request errors
`Model ... is not a recognized model id`| Request errors
`Claude Opus is not available with the Claude Pro plan`| Request errors
+`Claude Code ... does not support this model; version ... or newer is required`| Request errors
`Model ... is restricted by your organization's settings`| Request errors
`thinking.type.enabled is not supported for this model`| Request errors
`Effort '<level>' isn't available with thinking turned off on this model`| Request errors
@@ -518,12 +519,12 @@
The prompt to confirm went unanswered
-On plans where Fable 5 usage [bills to usage credits](</docs/en/model-config#fable-5-and-usage-credits>), Claude Code asks you to confirm before a request bills them. When nobody answers that consent prompt in a session that may have no one at its terminal, Claude Code closes the prompt and ends the turn with one of these messages:
-
- Fable 5 limit reached · continuing on Fable 5 uses usage credits, and the prompt to confirm went unanswered — nothing was sent · answer it where this session is running, or /model to change
- Fable 5 now uses usage credits · the prompt to confirm went unanswered — nothing was sent · answer it where this session is running, or /model to change
-
-This happens in [Remote Control](</docs/en/remote-control>) sessions, [background sessions](</docs/en/agent-view>), and [agent team](</docs/en/agent-teams>) teammate sessions. Claude Code shows the consent prompt only in the session’s own interactive view: the terminal where it runs, or, for a background session, the [agents view](</docs/en/agent-view>) once you attach. A Remote Control client can’t display it. Claude Code closes the prompt at the [`dialogExpiry`](</docs/en/settings-reference#dialogexpiry>) deadline, five minutes by default, or as soon as a new prompt arrives while nobody has typed at that terminal, such as a prompt sent from a Remote Control client. Typing at the terminal where the session runs cancels the deadline, and Claude Code waits for your answer. In a background session’s attached view, typing doesn’t cancel the deadline, and a new prompt still closes the consent prompt, so answer before either happens. Claude Code sends nothing and keeps your model, so when you send your next prompt, Claude Code shows the consent prompt again. **What to do:**
+If your account requires the [Fable usage-credits consent](</docs/en/model-config#fable-and-usage-credits>), Claude Code asks you to confirm before a Fable request bills usage credits. When nobody answers that consent prompt in a session that may have no one at its terminal, Claude Code closes the prompt and ends the turn with one of these messages:
+
+ Fable limit reached · continuing on Fable 5.1 uses usage credits, and the prompt to confirm went unanswered — nothing was sent · answer it where this session is running, or /model to change
+ Fable 5.1 now uses usage credits · the prompt to confirm went unanswered — nothing was sent · answer it where this session is running, or /model to change
+
+The messages name the session’s Fable model, so on Fable 5 they read `continuing on Fable 5` and `Fable 5 now uses usage credits`. Before v2.1.255, the first message began `Fable 5 limit reached`. This happens in [Remote Control](</docs/en/remote-control>) sessions, [background sessions](</docs/en/agent-view>), and [agent team](</docs/en/agent-teams>) teammate sessions. Claude Code shows the consent prompt only in the session’s own interactive view: the terminal where it runs, or, for a background session, the [agents view](</docs/en/agent-view>) once you attach. A Remote Control client can’t display it. Claude Code closes the prompt at the [`dialogExpiry`](</docs/en/settings-reference#dialogexpiry>) deadline, five minutes by default, or as soon as a new prompt arrives while nobody has typed at that terminal, such as a prompt sent from a Remote Control client. Typing at the terminal where the session runs cancels the deadline, and Claude Code waits for your answer. In a background session’s attached view, typing doesn’t cancel the deadline, and a new prompt still closes the consent prompt, so answer before either happens. Claude Code sends nothing and keeps your model, so when you send your next prompt, Claude Code shows the consent prompt again. **What to do:**
* At the terminal where the session runs, send another prompt and answer the consent prompt when it reappears. For a background session, attach to it from the [agents view](</docs/en/agent-view>) first. Resending from a Remote Control client shows this message again, because the client can’t display the prompt.
* Run `/model` to switch to a model that doesn’t bill usage credits
@@ -1558,7 +1559,7 @@
The trailing hint names the closest matching alias or model ID. When nothing is close enough, it reads `Run /model to see available models.` instead. Claude Code produces this error locally at the moment the switch is requested, before any API request is made. It applies when a model is set through the [Agent SDK](</docs/en/agent-sdk/typescript>) `setModel()` method or by an app such as the [Desktop app](</docs/en/desktop>) that runs the Claude Code CLI for you. **What to do:**
* Run `/model` with no argument to open the picker and choose from the models available to your account, then pass the alias or ID shown there
- * If you used an alias that a newer Claude Code version supports, run `claude update`. A full ID that starts with `claude-` passes this check even when the model is newer than your Claude Code version, so upgrading isn’t needed for those.
+ * If you used an alias that a newer Claude Code version supports, run `claude update`. A full ID that starts with `claude-` passes this local check even when the model is newer than your Claude Code version. The server can still require a minimum version for that model; see Claude Code does not support this model.
* A model saved before v2.1.200 isn’t repaired by this check. If a stale value keeps coming back, remove it from the locations listed under [Setting your model](</docs/en/model-config#setting-your-model>).
* The check runs only on the Anthropic API. On any other provider or gateway, including a custom `ANTHROPIC_BASE_URL`, the provider defines the model names, so Claude Code accepts any string and passes it through. Claude Code can still write the unrecognized-model diagnostic line at request time, on every provider.
@@ -1577,6 +1578,21 @@
* Run `/model` and select a model your plan includes
* If you upgraded your plan recently and still see this, run `/logout` then `/login`. The stored token reflects your plan at the time you signed in, so upgrading on the web does not take effect in an existing session until you re-authenticate.
* See [claude.com/pricing](<https://claude.com/pricing>) for which models each plan includes
+
+###
+
+
+
+Claude Code does not support this model
+
+The model you selected requires a newer Claude Code version than the one making the request. The server checks this per model.
+
+ API Error: 400 Claude Code 2.1.219 does not support this model; version 2.1.255 or newer is required. Run 'claude update', or update the Claude desktop app, then try again.
+
+**What to do:**
+
+ * Run `claude update`, or update the Claude desktop app, then start a new session on the model
+ * To keep working in the current session, switch to another model with `/model`
###
@@ -3195,7 +3211,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 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, 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:
--- a/feature-availability.md
+++ b/feature-availability.md
@@ -89,7 +89,7 @@
[Server-managed settings](</docs/en/server-managed-settings>)| ✓ (Team and Enterprise)| ✓ (Team and Enterprise)| ✗| ✗| ✗| ✗
[Zero Data Retention](</docs/en/zero-data-retention>)| ✓ (qualified Enterprise accounts)| ✓ (qualified accounts)| See note 3| ✓ (qualified accounts)| See note 3| See note 3
1 On Google Cloud’s Agent Platform, web search is available for Claude 4 models and later.
-2 On these providers, auto mode supports only Claude Sonnet 5, Opus 4.7 or later, and Fable 5. See [Auto mode configuration](</docs/en/auto-mode-config>). The built-in starting permission mode on these providers is Manual. See [which mode a session starts in](</docs/en/permission-modes#which-mode-a-session-starts-in>). In v2.1.158 through v2.1.206, auto mode on these providers also required setting `CLAUDE_CODE_ENABLE_AUTO_MODE=1`; v2.1.207 removed the requirement.
+2 On these providers, auto mode supports only Claude Sonnet 5, Opus 4.7 or later, and the Fable models. See [Auto mode configuration](</docs/en/auto-mode-config>). The built-in starting permission mode on these providers is Manual. See [which mode a session starts in](</docs/en/permission-modes#which-mode-a-session-starts-in>). In v2.1.158 through v2.1.206, auto mode on these providers also required setting `CLAUDE_CODE_ENABLE_AUTO_MODE=1`; v2.1.207 removed the requirement.
3 Subject to your agreement with the cloud provider.
4 Dashboard and API only. [Contribution metrics](</docs/en/analytics#enable-contribution-metrics>) requires a claude.ai Team or Enterprise organization.
5 Requires Claude Code v2.1.224 or later on macOS and Linux, including Linux inside WSL 2. On native Windows, requires Claude Code v2.1.234 or later. With API key authentication, messaging is same-machine only. On Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, and Microsoft Foundry, messaging is same-machine only and requires Claude Code v2.1.248 or later. Claude can find your [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions and your sessions on other machines only from a session that is connected to [Remote Control](</docs/en/remote-control>). To connect, you need a claude.ai sign-in and the other [Remote Control requirements](</docs/en/remote-control#requirements>). See [Message sessions on other machines](</docs/en/cross-session-messaging#message-sessions-on-other-machines>).
@@ -117,7 +117,7 @@
**Not available:** all features that require a Claude subscription, plus [web search](</docs/en/tools-reference#websearch-tool-behavior>), [fast mode](</docs/en/fast-mode>), [Advisor](</docs/en/advisor>), [Channels](</docs/en/channels>), the [analytics dashboard](</docs/en/analytics>), [server-managed settings](</docs/en/server-managed-settings>), and the [`/design-sync` and `/import` commands](</docs/en/commands#all-commands>).**Partial support:**
* [Desktop](</docs/en/desktop>): only via [Claude Desktop on 3P](<https://claude.com/docs/third-party/claude-desktop/overview>)
- * [Auto mode](</docs/en/auto-mode-config>): Sonnet 5, Opus 4.7 or later, and Fable 5 only
+ * [Auto mode](</docs/en/auto-mode-config>): Sonnet 5, Opus 4.7 or later, and Fable models only
* [Cross-session messaging](</docs/en/cross-session-messaging>): between your sessions on this machine only 5
* [Zero Data Retention](</docs/en/zero-data-retention>): subject to your AWS agreement
@@ -133,7 +133,7 @@
* [Desktop](</docs/en/desktop>): via [managed settings](<https://claude.com/docs/third-party/claude-desktop/configuration>) or [Claude Desktop on 3P](<https://claude.com/docs/third-party/claude-desktop/overview>)
* [Web search](</docs/en/tools-reference#websearch-tool-behavior>): Claude 4 models and later
- * [Auto mode](</docs/en/auto-mode-config>): Sonnet 5, Opus 4.7 or later, and Fable 5 only
+ * [Auto mode](</docs/en/auto-mode-config>): Sonnet 5, Opus 4.7 or later, and Fable models only
* [Cross-session messaging](</docs/en/cross-session-messaging>): between your sessions on this machine only 5
* [Zero Data Retention](</docs/en/zero-data-retention>): subject to your Google Cloud agreement
@@ -143,7 +143,7 @@
* [Desktop](</docs/en/desktop>): only via [Claude Desktop on 3P](<https://claude.com/docs/third-party/claude-desktop/overview>)
* [Web search](</docs/en/tools-reference#websearch-tool-behavior>): [deployments hosted on Anthropic](<https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry#hosting-options>) only
- * [Auto mode](</docs/en/auto-mode-config>): Sonnet 5, Opus 4.7 or later, and Fable 5 only
+ * [Auto mode](</docs/en/auto-mode-config>): Sonnet 5, Opus 4.7 or later, and Fable models only
* [Cross-session messaging](</docs/en/cross-session-messaging>): between your sessions on this machine only 5
* [Zero Data Retention](</docs/en/zero-data-retention>): subject to your Azure agreement
--- a/glossary.md
+++ b/glossary.md
@@ -180,7 +180,7 @@
Effort level
-A setting that controls how much of the adaptive-reasoning thinking budget Claude uses on each turn. Higher effort means more thinking tokens and deeper reasoning; lower effort is faster and cheaper. Effort is supported on Fable 5, on Opus 4.6 and later, and on Sonnet 4.6 and later. Learn more: [Adjust effort level](</docs/en/model-config#adjust-effort-level>)
+A setting that controls how much of the adaptive-reasoning thinking budget Claude uses on each turn. Higher effort means more thinking tokens and deeper reasoning; lower effort is faster and cheaper. Effort is supported on Fable 5.1 and Fable 5, on Opus 4.6 and later, and on Sonnet 4.6 and later. Learn more: [Adjust effort level](</docs/en/model-config#adjust-effort-level>)
###
--- a/hooks-guide.md
+++ b/hooks-guide.md
@@ -405,7 +405,7 @@
When the hook approves, Claude Code exits plan mode and restores whatever permission mode was active before you entered plan mode. The transcript shows “Allowed by PermissionRequest hook” where the dialog would have appeared. The hook path always keeps the current conversation: it can’t clear context and start a fresh implementation session the way the dialog can. To set a specific permission mode instead, your hook’s output can include an `updatedPermissions` array with a `setMode` entry. The `mode` value is any permission mode like `default`, `acceptEdits`, or `bypassPermissions`, and `destination: "session"` applies it for the current session only.
-`bypassPermissions` only applies if the session was launched with bypass mode already available: `--dangerously-skip-permissions`, `--permission-mode bypassPermissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in settings, and not disabled by [`permissions.disableBypassPermissionsMode`](</docs/en/permissions#managed-settings>) or by starting the session in [restricted mode](</docs/en/cli-reference#cli-flags>). It is never persisted as `defaultMode`.
+`bypassPermissions` only applies if you started the session with bypass mode already available: `--dangerously-skip-permissions`, `--permission-mode bypassPermissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in [user, `--settings`, or managed settings](</docs/en/settings-reference#permissions-defaultmode>). It doesn’t apply if bypass mode is disabled by [`permissions.disableBypassPermissionsMode`](</docs/en/permissions#managed-settings>), or if you started the session in [restricted mode](</docs/en/cli-reference#cli-flags>).Claude Code never saves it as `defaultMode`.
To switch the session to `acceptEdits`, your hook writes this JSON to stdout:
--- a/hosting.md
+++ b/hosting.md
@@ -355,7 +355,7 @@
No top-level session timeout| A session does not time out on its own. Set `maxTurns` in TypeScript or `max_turns` in Python to bound how many tool-use round trips the agent takes before stopping.
Memory growth over long sessions| Cap session length or recycle subprocesses periodically. See Scaling and concurrency.
Large parallel-subagent fanouts can hit rate limits| Break work into smaller batches rather than issuing one wide dispatch.
-No per-subagent wall-clock deadline| Cap each [subagent](</docs/en/agent-sdk/subagents>) with `maxTurns` in its `AgentDefinition`. For background subagents only, `CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS` sets a stall watchdog that fires when a `run_in_background` subagent stops producing output; it is not a total-runtime deadline.
+No per-subagent wall-clock deadline| Cap each [subagent](</docs/en/agent-sdk/subagents>) with `maxTurns` in its `AgentDefinition`. `CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS` sets a stall watchdog that fires when a subagent stops producing output; it isn’t a total-runtime deadline.
##
--- a/interactive-mode.md
+++ b/interactive-mode.md
@@ -33,7 +33,7 @@
`Esc` \+ `Esc`| Clear input draft, or rewind| When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point
`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, which always uses 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 Fable 5.1 or Fable 5, 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>)
###
--- a/keybindings.md
+++ b/keybindings.md
@@ -163,9 +163,8 @@
`confirm:previousField`| (unbound)| Previous field
`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
-`confirm:toggleExplanation`| Ctrl+E| Toggle a model-generated [explanation of the command](</docs/en/permissions#permission-system>) 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.
+
+*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.
###
--- a/llm-gateway-connect.md
+++ b/llm-gateway-connect.md
@@ -95,7 +95,7 @@
$env:ANTHROPIC_BASE_URL = "https://llm-gateway.example.com"
$env:ANTHROPIC_AUTH_TOKEN = "sk-gateway-key"
-Shell exports apply only to that terminal session and programs started from it. An editor launched from the dock or Start menu won’t see them. To make the values persist across new terminals, add the same lines to your shell profile, such as `~/.zshrc`, `~/.bashrc`, or your PowerShell `$PROFILE`. If you export the gateway only in your shell, it doesn’t reliably reach background agents hosted by the [supervisor](</docs/en/agent-view#how-background-sessions-are-hosted>); see [how each background session sources its gateway](</docs/en/agent-view#the-supervisor-process>). Use a settings file for any gateway that background agents must always route through.
+Shell exports apply only to that terminal session and programs started from it. An editor launched from the dock or Start menu won’t see them. To make the values persist across new terminals, add the same lines to your shell profile, such as `~/.zshrc`, `~/.bashrc`, or your PowerShell `$PROFILE`. If you export the gateway only in your shell, it doesn’t reliably reach background agents hosted by the [supervisor](</docs/en/agent-view#how-background-sessions-are-hosted>); see [how each background session sources its gateway](</docs/en/agent-view#llm-gateway>). Use a settings file for any gateway that background agents must always route through.
####
--- a/llm-gateway-protocol.md
+++ b/llm-gateway-protocol.md
@@ -207,7 +207,7 @@
Picker entries and caching
-The picker is the interactive model list that opens when a developer runs `/model` in Claude Code. Each discovered entry is labeled “From gateway” and uses `display_name` when provided. The [`availableModels` managed setting](</docs/en/settings-reference#availablemodels>) bounds what discovery can add. A discovered ID is skipped when it exactly matches a row already in the picker, or when both the discovered and existing IDs resolve to [Fable](</docs/en/model-config#work-with-fable-5>). A discovered explicit ID is also folded into a built-in entry when both resolve to the same model. Built-in rows are keyed on aliases such as `sonnet`, so a discovered explicit ID of the model the alias currently resolves to, such as `claude-sonnet-5`, collapses into the `sonnet` row, while an ID the alias doesn’t resolve to, such as `claude-sonnet-4-6`, still adds its own “From gateway” row alongside the built-in entry. Before v2.1.197, Claude Code didn’t fold explicit IDs into built-in entries, so a discovered ID such as `claude-sonnet-5` added its own “From gateway” row alongside the `sonnet` row. Results are cached to `~/.claude/cache/gateway-models.json`, or `%USERPROFILE%\.claude\cache\gateway-models.json` on Windows, and refreshed on each startup. If you set [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>), the cache lives under that directory instead. If the request fails or the gateway doesn’t implement `/v1/models`, the picker falls back to the cached list from the previous startup or to the built-in model list. If your gateway serves Claude models under aliases that don’t match the discovery filter, developers can add those aliases manually with the [model configuration](</docs/en/model-config>) variables.
+The picker is the interactive model list that opens when a developer runs `/model` in Claude Code. Each discovered entry is labeled “From gateway” and uses `display_name` when provided. The [`availableModels` managed setting](</docs/en/settings-reference#availablemodels>) bounds what discovery can add. A discovered ID is skipped when it exactly matches a row already in the picker, or when the discovered and existing IDs are spellings of the same [Fable](</docs/en/model-config#work-with-fable>) version. A discovered explicit ID is also folded into a built-in entry when both resolve to the same model. Built-in rows are keyed on aliases such as `sonnet`, so a discovered explicit ID of the model the alias currently resolves to, such as `claude-sonnet-5`, collapses into the `sonnet` row, while an ID the alias doesn’t resolve to, such as `claude-sonnet-4-6`, still adds its own “From gateway” row alongside the built-in entry. Before v2.1.197, Claude Code didn’t fold explicit IDs into built-in entries, so a discovered ID such as `claude-sonnet-5` added its own “From gateway” row alongside the `sonnet` row. Results are cached to `~/.claude/cache/gateway-models.json`, or `%USERPROFILE%\.claude\cache\gateway-models.json` on Windows, and refreshed on each startup. If you set [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>), the cache lives under that directory instead. If the request fails or the gateway doesn’t implement `/v1/models`, the picker falls back to the cached list from the previous startup or to the built-in model list. If your gateway serves Claude models under aliases that don’t match the discovery filter, developers can add those aliases manually with the [model configuration](</docs/en/model-config>) variables.
##
--- a/managed-settings.md
+++ b/managed-settings.md
@@ -314,7 +314,7 @@
[`allowedChannelPlugins`](</docs/en/settings-reference#allowedchannelplugins>)| Allowlist of channel plugins that may push messages. Replaces the default Anthropic allowlist when set. Requires `channelsEnabled: true`. See [Restrict which channel plugins can run](</docs/en/channels#restrict-which-channel-plugins-can-run>)
[`allowManagedHooksOnly`](</docs/en/settings-reference#allowmanagedhooksonly>)| When `true`, restricts which hooks run; see [what runs under `allowManagedHooksOnly`](</docs/en/settings-reference#what-runs-under-allowmanagedhooksonly>) for the full effect list
[`allowManagedMcpServersOnly`](</docs/en/settings-reference#allowmanagedmcpserversonly>)| When `true`, only `allowedMcpServers` from managed settings are respected. `deniedMcpServers` still merges from all sources. See [Managed MCP configuration](</docs/en/managed-mcp>)
-[`allowManagedPermissionRulesOnly`](</docs/en/settings-reference#allowmanagedpermissionrulesonly>)| Only managed permission rules apply; the entry lists every source it ignores
+[`allowManagedPermissionRulesOnly`](</docs/en/settings-reference#allowmanagedpermissionrulesonly>)| Makes managed settings the only settings source of permission rules. The entry lists every source it ignores
[`blockedMarketplaces`](</docs/en/settings-reference#blockedmarketplaces>)| Blocklist of marketplace sources. Blocked sources are checked before downloading, so they never touch the filesystem. See [managed marketplace restrictions](</docs/en/plugin-marketplaces#managed-marketplace-restrictions>)
[`channelsEnabled`](</docs/en/settings-reference#channelsenabled>)| Allow [channels](</docs/en/channels>) for the organization. See [enterprise controls](</docs/en/channels#enterprise-controls>) for the default on each plan
[`disableCommandPluginSources`](</docs/en/settings-reference#disablecommandpluginsources>)| When `true`, blocks [`command` plugin sources](</docs/en/plugin-marketplaces#command-sources>) entirely, so the marketplace-declared command never runs. Also blocks marketplace [`headersHelper` commands](</docs/en/plugin-marketplaces#authenticate-archive-downloads>), except for a marketplace that managed settings themselves declare. When unset, follows `allowManagedHooksOnly`. Requires Claude Code v2.1.229 or later, and the `headersHelper` block requires v2.1.238 or later
Show diff (252 lines)
--- a/model-config.md
+++ b/model-config.md
@@ -28,8 +28,8 @@
Model alias| Behavior
---|---
**`default`**| Special value that clears any model override and reverts to the runtime default for your account. Not itself a model alias
-**`best`**| Uses Fable 5 where your organization has access to it, otherwise the latest Opus model
-**`fable`**| Uses Claude Fable 5 for your hardest and longest-running tasks
+**`best`**| Uses the latest Fable model where it’s available to you, otherwise the same model as `opus`
+**`fable`**| Uses the latest Fable model for your hardest and longest-running tasks
**`sonnet`**| Uses the latest Sonnet model for daily coding tasks
**`opus`**| Uses the latest Opus model for complex reasoning tasks
**`haiku`**| Uses the fast and efficient Haiku model for simple tasks
@@ -46,7 +46,7 @@
Amazon Bedrock, Google Cloud’s Agent Platform| Opus 5| Sonnet 4.5
Microsoft Foundry| Opus 4.6| Sonnet 4.5
-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`.
+Unless you set `ANTHROPIC_DEFAULT_FABLE_MODEL`, the `fable` alias resolves to Fable 5.1. Before v2.1.255, it resolved to Fable 5. 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.
@@ -54,37 +54,42 @@
-Work with Fable 5
-
-[Claude Fable 5](<https://platform.claude.com/docs/en/about-claude/models/introducing-claude-fable-5-and-claude-mythos-5>) is the most capable model in Claude Code, suited to tasks larger than a single sitting. It sustains long autonomous sessions, investigates before acting, and verifies its work more often than smaller models. Fable 5 is not the default model. Select it with `/model fable`. Requests that its safety classifiers flag, most often in cybersecurity and biology domains, trigger automatic model fallback. To get the most from Fable 5:
+Work with Fable
+
+[Claude Fable 5.1](<https://platform.claude.com/docs/en/about-claude/models/overview>) and Claude Fable 5 are the most capable models in Claude Code, suited to tasks larger than a single sitting. They sustain long autonomous sessions, investigate before acting, and verify their work more often than smaller models. Fable 5.1 is the newer release. Neither Fable model is the account-type default on any plan or provider. Select one explicitly:
+
+ * **Fable 5.1** : run `/model fable`, or launch with `claude --model fable`.
+ * **Fable 5** : select it by model ID. On the Anthropic API, run `/model claude-fable-5` or launch with `claude --model claude-fable-5`. On other providers, use your provider’s Fable 5 model ID or pin it with `ANTHROPIC_DEFAULT_FABLE_MODEL`.
+
+If your user settings hold `claude-fable-5` or `claude-fable-5[1m]` as the model, for example because you selected Fable in the `/model` picker before v2.1.255, and you connect to the Anthropic API directly, Claude Code changes that saved value to the `fable` or `fable[1m]` alias the first time you run v2.1.255 or later, and the startup model line shows `(auto-updated)` once. A `claude-fable-5` value in project, local, or managed settings is left as it is. Requests that a Fable model’s safety classifiers flag, most often in cybersecurity and biology domains, trigger automatic model fallback. To get the most from Fable:
* **Describe the outcome, not the steps** : hand it the result you want and let it plan the path. To keep it working toward that outcome, [set a goal](</docs/en/goal>).
* **Hand it ambiguous problems** : root-cause investigations, outage debugging, and architecture decisions are where the extra investigation and verification pay off.
* **Skip the verification reminders** : it verifies its own work with less prompting, so reminders to test or check are usually unnecessary.
* **Size up larger tasks** : give it work you would normally break into pieces. It holds long sessions without losing the thread.
-Fable 5 requires Claude Code v2.1.170 or later. Older versions do not show Fable 5 in the model picker and cannot select it. Run `claude update` to upgrade. Fable 5 is not available under [zero data retention](</docs/en/zero-data-retention>), where the `/model` picker either omits it or shows it disabled.
-
-On the Anthropic API, the `/model` picker lists Fable 5 only after the server reports it available for your organization. When you type `/model fable`, Claude Code checks availability with the server directly, so the selection can succeed before the picker lists the entry.
-
-####
-
-
-
-Fable 5 and usage credits
-
-Depending on your plan and seat tier, Fable 5 usage can bill to [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>) instead of drawing on your plan’s included limits. When it does, the `/model` picker shows “Requires usage credits” on the Fable 5 row. To manage usage credits, see [Add usage credits to your subscription](</docs/en/costs#add-usage-credits-to-your-subscription>). In interactive sessions, Claude Code shows a consent prompt before a Fable 5 request bills usage credits. Members of Enterprise plans with organization billing don’t see the prompt. You can continue on Fable 5 using usage credits or switch to your default model. You can also dismiss the prompt:
+Fable 5.1 requires Claude Code v2.1.255 or later. If a request for it from an older version fails, see [Claude Code does not support this model](</docs/en/errors#claude-code-does-not-support-this-model>). Fable 5 requires v2.1.170 or later. Run `claude update` to upgrade. For availability under zero data retention, see [Model availability under ZDR](</docs/en/zero-data-retention#model-availability-under-zdr>).
+
+On the Anthropic API, the `/model` picker lists a Fable model only after the server reports it available for your organization. When you type `/model fable` or a Fable model ID, Claude Code checks availability with the server directly, so the selection can succeed before the picker lists the entry.
+
+####
+
+
+
+Fable and usage credits
+
+Depending on your plan and seat tier, Fable usage can bill to [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>) instead of drawing on your plan’s included limits. When it does, the `/model` picker shows “Requires usage credits” on the Fable row. To manage usage credits, see [Add usage credits to your subscription](</docs/en/costs#add-usage-credits-to-your-subscription>). In interactive sessions, Claude Code shows a consent prompt before a Fable request bills usage credits. Members of Enterprise plans with organization billing don’t see the prompt. You can continue on Fable using usage credits or switch to your default model. You can also dismiss the prompt:
* In the `/model` picker, you keep your current model.
* Mid-session, Claude Code continues the turn on your default model.
-After you choose to continue on Fable 5 using usage credits, Claude Code doesn’t show the prompt again. In a session with [Remote Control](</docs/en/remote-control>) connected, a [background session](</docs/en/agent-view>), or an [agent team](</docs/en/agent-teams>) teammate’s session, nobody may be at the terminal, so Claude Code holds the mid-session consent prompt for the [`dialogExpiry`](</docs/en/settings-reference#dialogexpiry>) deadline, five minutes by default. If nobody has answered by the deadline, Claude Code ends the turn without sending the request and adds a notice to the transcript, which the Remote Control client also shows. Your model selection is unchanged, and Claude Code asks for consent again on your next message. What you can do while the prompt is waiting depends on the session:
+After you choose to continue on Fable using usage credits, Claude Code doesn’t show the prompt again. In a session with [Remote Control](</docs/en/remote-control>) connected, a [background session](</docs/en/agent-view>), or an [agent team](</docs/en/agent-teams>) teammate’s session, nobody may be at the terminal, so Claude Code holds the mid-session consent prompt for the [`dialogExpiry`](</docs/en/settings-reference#dialogexpiry>) deadline, five minutes by default. If nobody has answered by the deadline, Claude Code ends the turn without sending the request and adds a notice to the transcript, which the Remote Control client also shows. Your model selection is unchanged, and Claude Code asks for consent again on your next message. What you can do while the prompt is waiting depends on the session:
* With Remote Control connected or in a teammate’s session, press any key at the terminal to cancel the deadline, and Claude Code waits for your answer.
* In a background session, answer before the deadline.
* If you send a new message from the remote client before anyone has typed at the terminal, Claude Code ends the turn the same way, and your new message starts the next turn. After someone types at the terminal, Claude Code keeps waiting for the answer and queues your new message behind it.
-In [non-interactive mode](</docs/en/headless>) with the `-p` flag and through the Agent SDK, Claude Code never shows the consent prompt. When a Fable 5 request there would bill to usage credits, Claude Code bills it without asking.
+In [non-interactive mode](</docs/en/headless>) with the `-p` flag and through the Agent SDK, Claude Code never shows the consent prompt. When a Fable request there would bill to usage credits, Claude Code bills it without asking.
###
@@ -157,7 +162,7 @@
Restrict model selection
-Enterprise administrators can use `availableModels` in [managed or policy settings](</docs/en/managed-settings>) to restrict which models users can select. Entries match a model family such as `sonnet`, a version prefix such as `claude-sonnet-4-5`, or a full model ID such as `claude-sonnet-4-5-20250929`. 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. When `availableModels` is set, the allowlist applies everywhere a user can specify a model:
+Enterprise administrators can use `availableModels` in [managed or policy settings](</docs/en/managed-settings>) to restrict which models users can select. Entries match a model family such as `sonnet`, a version prefix such as `claude-sonnet-4-5`, or a full model ID such as `claude-sonnet-4-5-20250929`. A version prefix also matches later model IDs that extend it with another segment, so `claude-fable-5` permits both Fable 5 and Fable 5.1, while `claude-fable-5-1` permits Fable 5.1 only. 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. When `availableModels` is set, the allowlist applies everywhere a user can specify a model:
* **Main session model** : `/model`, the `--model` flag, the `ANTHROPIC_MODEL` environment variable, the `model` setting, `ANTHROPIC_DEFAULT_MODEL`, and the model restored when resuming a session
* **Alias resolution** : the `ANTHROPIC_DEFAULT_OPUS_MODEL`, `ANTHROPIC_DEFAULT_SONNET_MODEL`, `ANTHROPIC_DEFAULT_HAIKU_MODEL`, and `ANTHROPIC_DEFAULT_FABLE_MODEL` environment variables cannot redirect an allowed alias to a model outside the list
@@ -167,7 +172,7 @@
* **Advisor model** : the configured [`advisorModel`](</docs/en/advisor>) setting and the `--advisor` flag
* **Background agent model** : the model selected in the [dispatch picker](</docs/en/agent-view>)
-On the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), a model family alias, `opus`, `sonnet`, `haiku`, or `fable`, resolves to the newest version of its family that the allowlist permits. When the allowlist pins specific versions, for example `["sonnet", "claude-opus-4-6"]`, both `/model opus` and `--model opus` select Claude Opus 4.6, the newest permitted Opus, and show a notice naming both the requested and substituted models. Before v2.1.205, an alias whose newest released version was outside the list was rejected or replaced like any other blocked selection, even when the list permitted an older version. The substitution needs a permitted version to land on: when the allowlist permits no version of the alias’s family, the alias follows the rejection and replacement behavior below like any other blocked value. Claude Code handles any other blocked selection according to where the model was set:
+On the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), a model family alias, `opus`, `sonnet`, `haiku`, or `fable`, resolves to its usual model when the allowlist permits that model. When the allowlist blocks that model, Claude Code substitutes the newest version of the family that the allowlist permits and shows a notice naming both the requested and substituted models. With `["sonnet", "claude-opus-4-6"]`, for example, both `/model opus` and `--model opus` select Claude Opus 4.6, the newest permitted Opus. Before v2.1.205, an alias whose newest released version was outside the list was rejected or replaced like any other blocked selection, even when the list permitted an older version. The substitution needs a permitted version to land on: when the allowlist permits no version of the alias’s family, the alias follows the rejection and replacement behavior below like any other blocked value. Claude Code handles any other blocked selection according to where the model was set:
* **`/model`** : Claude Code rejects the switch with an error
* **`--model` flag, `ANTHROPIC_MODEL`, or the `model` setting**: Claude Code replaces the value at startup with a warning naming both the requested and substituted models, and the session starts on the default model
@@ -182,7 +187,7 @@
* **Fallback model chains** : entries outside the allowlist are dropped
* **Plan-mode upgrades** : on the Anthropic API and Claude Platform on AWS, an upgrade such as `opusplan` to an excluded model uses the newest permitted version of the upgrade family. On providers with provider-specific model IDs, and when no version is permitted, the upgrade is skipped and planning continues on the session’s model
* **Automatic model fallback** : a fallback whose target is excluded does not run, so the flagged request ends with a refusal instead
- * **[Auto mode classifier](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>)** : the classifier’s Claude Sonnet 5 default applies only when the allowlist permits Sonnet 5. When it’s excluded, the classifier runs on the session’s model, which the allowlist already governs, or on an Opus model when the session runs on Fable 5. On providers other than the Anthropic API, that Opus fallback runs on the provider’s default Opus model without consulting the allowlist. Requires Claude Code v2.1.210 or later
+ * **[Auto mode classifier](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>)** : the classifier’s Claude Sonnet 5 default applies only when the allowlist permits Sonnet 5. When it’s excluded, the classifier runs on the session’s model, which the allowlist already governs, or on an Opus model when the session runs on a Fable model. On providers other than the Anthropic API, that Opus fallback runs on the provider’s default Opus model without consulting the allowlist. Requires Claude Code v2.1.210 or later
* **[Fast mode](</docs/en/fast-mode>)** : enabling fast mode is refused when the model the session would run on afterward is outside the allowlist
{
@@ -280,7 +285,7 @@
Organization model restrictions
-Organization admins on Claude Enterprise plans restrict which models members can run by disabling individual models in the claude.ai admin console. This restriction is delivered with the account’s entitlements when Claude Code authenticates, separate from any `availableModels` list in settings, and the server enforces the same restriction independently when a session is created. Requires Claude Code v2.1.187 or later. The restriction applies when a member signs in or uses their own API key. Organization-scoped credentials, such as organization service keys, are not tied to a user, so the restriction does not apply to them. The Claude Console has no model restriction control. Organizations without a Claude Enterprise plan, including those whose members authenticate through the Anthropic API, restrict models with `availableModels` in [managed settings](</docs/en/managed-settings>) instead, adding `enforceAvailableModels` to cover the Default option. These settings are enforced by Claude Code itself, not by the server. A restricted model is hidden from the `/model` picker. Selecting it by name with `--model`, the `ANTHROPIC_MODEL` environment variable, or the `model` setting shows the notice `Model "<name>" is restricted by your organization's settings. Using <model> instead.` and the session starts on an allowed model. Typing `/model <name>` for a restricted model is rejected with `Model '<name>' is restricted by your organization's settings. Run /model to choose a different model.` and the session keeps its current model. A model family alias such as `opus` resolves to the newest version of its family that the organization permits, with the same substitution notice. `/model <alias>` is rejected only when every version of its family is restricted; an alias set with `--model`, `ANTHROPIC_MODEL`, or the `model` setting is still replaced at startup in that case. Before v2.1.205, a family alias was substituted or rejected based on its newest released version alone, even when an older version was allowed. Restrictions apply org-wide or per role:
+Organization admins on Claude Enterprise plans restrict which models members can run by disabling individual models in the claude.ai admin console. This restriction is delivered with the account’s entitlements when Claude Code authenticates, separate from any `availableModels` list in settings, and the server enforces the same restriction independently when a session is created. Requires Claude Code v2.1.187 or later. The restriction applies when a member signs in or uses their own API key. Organization-scoped credentials, such as organization service keys, are not tied to a user, so the restriction does not apply to them. The Claude Console has no model restriction control. Organizations without a Claude Enterprise plan, including those whose members authenticate through the Anthropic API, restrict models with `availableModels` in [managed settings](</docs/en/managed-settings>) instead, adding `enforceAvailableModels` to cover the Default option. These settings are enforced by Claude Code itself, not by the server. A restricted model is hidden from the `/model` picker. Selecting it by name with `--model`, the `ANTHROPIC_MODEL` environment variable, or the `model` setting shows the notice `Model "<name>" is restricted by your organization's settings. Using <model> instead.` and the session starts on an allowed model. Typing `/model <name>` for a restricted model is rejected with `Model '<name>' is restricted by your organization's settings. Run /model to choose a different model.` and the session keeps its current model. A model family alias such as `opus` resolves to its usual model when the organization permits it. When the organization restricts that model, Claude Code substitutes the newest version of the family that the organization permits, with the same substitution notice. `/model <alias>` is rejected only when every version of its family is restricted; an alias set with `--model`, `ANTHROPIC_MODEL`, or the `model` setting is still replaced at startup in that case. Before v2.1.205, a family alias was substituted or rejected based on its newest released version alone, even when an older version was allowed. Restrictions apply org-wide or per role:
* Disabling a model at the organization level removes it for every member.
* Role-level access grants different models to different custom roles, and a member who holds several roles can use any model that one of their roles grants.
@@ -305,7 +310,7 @@
* `availableModels` on its own doesn’t apply to the organization default, so an organization default outside the allowlist still applies. When `enforceAvailableModels` is also set, an organization default outside the allowlist is remapped to the first allowlist entry, like any other Default
* an organization default that organization model restrictions deny for your account is replaced by the newest allowed model in its family, or a lower-cost family when every version of it is restricted
- * an organization default that isn’t available to your account at all, such as Fable 5 under [zero data retention](</docs/en/zero-data-retention>), is skipped, and the Default option resolves as it would without an organization default
+ * an organization default that isn’t available to your account at all is skipped, and the Default option resolves as it would without an organization default
As of v2.1.199, when the organization default is a different model family from your account type’s usual default, the `/model` picker keeps a separate row for that usual family, so you can still switch to it for a session. In v2.1.196 through v2.1.198 that row is missing from the picker. The organization default reaches only sessions authenticated with the Anthropic API. To set a default anywhere else, including [LLM gateway](</docs/en/llm-gateway>) deployments, use the `model` key in [managed settings](</docs/en/managed-settings>) instead.
@@ -336,7 +341,7 @@
* **Pro and Team Standard** : defaults to Sonnet 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 5 is not the default model on any account type. Sessions use Fable 5 only after you choose it, for example with `/model fable`, a `model` setting, or the `best` alias where Fable 5 is available. Choosing it with `/model` saves it as the selected model in your user settings, so later sessions start on Fable 5 until you change models.
+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.255, see Work with Fable.
###
@@ -380,9 +385,9 @@
Automatic model fallback
-This section covers content-based fallback from Fable 5 and Opus 5. For availability-based fallback when a model is overloaded or unavailable, see Fallback model chains. Fable 5 and Opus 5 run with safety classifiers for 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. The fallback model depends on which model refused and which category was flagged:
-
- * **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 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.
* **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.
@@ -417,10 +422,10 @@
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 is 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 Fable 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 5 model ID enables Fable 5 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.
+ * 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.
+
+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.
####
@@ -428,7 +433,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, 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 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.
###
@@ -440,14 +445,14 @@
Model| Levels
---|---
-Fable 5| `low`, `medium`, `high`, `xhigh`, `max`
+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 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 can also cap which levels are available for a model; 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, until you change effort once, for example with an interactive `/effort`, the `/model` picker’s effort slider, or `--effort` at launch. Opus 5 has no such hold
+ 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, until you change effort once, for example with an interactive `/effort`, the `/model` picker’s effort slider, or `--effort` at launch. Opus 5 and Fable 5.1 have no such hold
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
@@ -515,7 +520,7 @@
Adaptive reasoning and fixed thinking budgets
-Adaptive reasoning makes thinking optional on each step, so Claude can respond faster to routine prompts and reserve deeper thinking for steps that benefit from it. If you want Claude to think more or less often than the current level produces, you can say so directly in your prompt or in `CLAUDE.md`; the model responds to that guidance within its effort setting. Fable 5, Sonnet 5, and Opus 4.7 and later always use adaptive reasoning. The fixed thinking budget mode and `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` do not apply to them. On Opus 4.6 and Sonnet 4.6, you can set `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1` to revert to the previous fixed thinking budget controlled by `MAX_THINKING_TOKENS`. See [environment variables](</docs/en/env-vars>).
+Adaptive reasoning makes thinking optional on each step, so Claude can respond faster to routine prompts and reserve deeper thinking for steps that benefit from it. If you want Claude to think more or less often than the current level produces, you can say so directly in your prompt or in `CLAUDE.md`; the model responds to that guidance within its effort setting. Fable 5.1, Fable 5, Sonnet 5, and Opus 4.7 and later always use adaptive reasoning. The fixed thinking budget mode and `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` do not apply to them. On Opus 4.6 and Sonnet 4.6, you can set `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1` to revert to the previous fixed thinking budget controlled by `MAX_THINKING_TOKENS`. See [environment variables](</docs/en/env-vars>).
###
@@ -529,9 +534,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 5. On [third-party providers](</docs/en/third-party-integrations>) this omits the `thinking` parameter instead, and adaptive-reasoning models may still think. Other values apply only with a fixed thinking budget
-
-Thinking cannot be turned off on Fable 5. The session toggle, `alwaysThinkingEnabled`, and `MAX_THINKING_TOKENS=0` have no effect there, and Fable 5 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 Fable 5.1 and Fable 5. On [third-party providers](</docs/en/third-party-integrations>) this omits the `thinking` parameter instead, and adaptive-reasoning models may still think. Other values apply only with a fixed thinking budget
+
+Thinking cannot be turned off on Fable 5.1 or Fable 5. 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.
###
@@ -539,7 +544,7 @@
Extended context
-Fable 5, Sonnet 5, Opus 4.6 and later, and Sonnet 4.6 support a [1 million token context window](<https://platform.claude.com/docs/en/build-with-claude/context-windows#context-window-sizes-by-model>) for long sessions with large codebases. Availability varies by model and plan. On the Anthropic API, Fable 5, Sonnet 5, and Opus 4.7 and later always run with the 1M window. On Max, Team, and Enterprise plans, including both Team Standard and Team Premium seats, Opus is automatically upgraded to 1M context with no additional configuration. Sonnet 4.6 with 1M context is not part of the automatic upgrade and requires [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>) on every subscription plan, including Max.
+Fable 5.1, Fable 5, Sonnet 5, Opus 4.6 and later, and Sonnet 4.6 support a [1 million token context window](<https://platform.claude.com/docs/en/build-with-claude/context-windows#context-window-sizes-by-model>) for long sessions with large codebases. Availability varies by model and plan. On the Anthropic API, Fable 5.1, Fable 5, Sonnet 5, and Opus 4.7 and later run with the 1M window by default. On Max, Team, and Enterprise plans, including both Team Standard and Team Premium seats, Opus is automatically upgraded to 1M context with no additional configuration. Sonnet 4.6 with 1M context is not part of the automatic upgrade and requires [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>) on every subscription plan, including Max.
Plan| Opus with 1M context| Sonnet 4.6 with 1M context
---|---|---
@@ -547,7 +552,7 @@
Pro| Requires [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>)| Requires [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>)
API and pay-as-you-go| Full access| Full access
-Claude Code checks these plan requirements only when it connects to the Anthropic API directly. If you point `ANTHROPIC_BASE_URL` at an [LLM gateway](</docs/en/llm-gateway#subscriptions-and-gateways>) and your saved claude.ai login stays the active credential, Claude Code doesn’t check your plan’s usage credits. The `[1m]` options stay available in `/model`, and the gateway decides whether the request succeeds. Before v2.1.229, Claude Code rejected `/model sonnet[1m]` in that configuration when it couldn’t confirm usage credits on the account. To turn off 1M context, set `CLAUDE_CODE_DISABLE_1M_CONTEXT=1`. Claude Code removes 1M model variants from the model picker. On models with a native 1M window, such as Sonnet 5 and Fable 5, it also treats the model as having a 200K context window:
+Claude Code checks these plan requirements only when it connects to the Anthropic API directly. If you point `ANTHROPIC_BASE_URL` at an [LLM gateway](</docs/en/llm-gateway#subscriptions-and-gateways>) and your saved claude.ai login stays the active credential, Claude Code doesn’t check your plan’s usage credits. The `[1m]` options stay available in `/model`, and the gateway decides whether the request succeeds. Before v2.1.229, Claude Code rejected `/model sonnet[1m]` in that configuration when it couldn’t confirm usage credits on the account. To turn off 1M context, set `CLAUDE_CODE_DISABLE_1M_CONTEXT=1`. Claude Code removes 1M model variants from the model picker. On models with a native 1M window, such as Sonnet 5 and the Fable models, it also treats the model as having a 200K context window:
* With auto-compaction on, sessions compact at the 200K boundary through auto-compaction. Setting the auto-compact window above 200K doesn’t lift the hold, because Claude Code caps that window at the model’s context window.
* With auto-compaction off, sessions stop at the 200K boundary with the [context-limit error](</docs/en/errors#prompt-is-too-long>) instead of compacting.
@@ -610,7 +615,7 @@
* [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
- * When you set [`CLAUDE_CODE_DISABLE_1M_CONTEXT=1`](</docs/en/env-vars>), models with a native 1M window, such as Sonnet 5 and Fable 5, compact at the 200K boundary
+ * 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
* Sonnet 5 compacts at the threshold for its configuration
* 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
@@ -663,11 +668,11 @@
Environment variable| Description
---|---
-`ANTHROPIC_DEFAULT_FABLE_MODEL`| The model to use for `fable`, and the model ID Claude Code recognizes as Fable 5 for automatic model fallback on third-party providers
+`ANTHROPIC_DEFAULT_FABLE_MODEL`| The model to use for `fable`, and the model ID Claude Code recognizes as a Fable model for automatic model fallback on third-party providers
`ANTHROPIC_DEFAULT_OPUS_MODEL`| The model to use for `opus`, or for `opusplan` when Plan Mode is active.
`ANTHROPIC_DEFAULT_SONNET_MODEL`| The model to use for `sonnet`, or for `opusplan` when Plan Mode is not active.
`ANTHROPIC_DEFAULT_HAIKU_MODEL`| The model to use for `haiku`, or [background functionality](</docs/en/costs#background-token-usage>)
-`CLAUDE_CODE_SUBAGENT_MODEL`| The default model for [subagents](</docs/en/sub-agents#choose-a-model>), [agent team](</docs/en/agent-teams#specify-teammates-and-models>) teammates, and [workflow](</docs/en/workflows>) agents that aren’t assigned a model another way. Accepts an alias such as `haiku` or a full model name. A per-invocation model or a definition’s `model` field, including `inherit`, takes precedence
+`CLAUDE_CODE_SUBAGENT_MODEL`| The default model for [subagents](</docs/en/sub-agents#choose-a-model>), [agent team](</docs/en/agent-teams#specify-teammates-and-models>) teammates, and [workflow](</docs/en/workflows>) agents that aren’t assigned a model another way. Accepts an alias such as `haiku` or a full model name. A per-invocation model or a definition’s `model` field, including `inherit`, takes precedence. To change that, set [`CLAUDE_CODE_SUBAGENT_MODEL_FORCE`](</docs/en/sub-agents#choose-a-model>)
Note: `ANTHROPIC_SMALL_FAST_MODEL` is deprecated in favor of `ANTHROPIC_DEFAULT_HAIKU_MODEL`.
--- a/output-styles.md
+++ b/output-styles.md
@@ -22,6 +22,7 @@
Pick a style in one of these ways:
* **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.
* **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.
The standalone `/output-style` command was deprecated in v2.1.73 and removed in v2.1.91. Use `/config` or edit the `outputStyle` setting directly.
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -61,7 +61,7 @@
When you start a new session in a terminal, Claude Code takes the permission mode from the first of these that applies:
1. The `--permission-mode` flag, or `--dangerously-skip-permissions`
- 2. `permissions.defaultMode` in a [settings file](</docs/en/settings#where-settings-live>). An `"auto"` value in `.claude/settings.json` or `.claude/settings.local.json` doesn’t take effect, and Claude Code then uses the built-in default rather than a `defaultMode` from `~/.claude/settings.json`. The other values apply from any settings file
+ 2. `permissions.defaultMode` in a [settings file](</docs/en/settings#where-settings-live>) If you set `"auto"` in `.claude/settings.json` or `.claude/settings.local.json`, the value doesn’t take effect, and Claude Code then uses the built-in default rather than a `defaultMode` from `~/.claude/settings.json`. If you set `"bypassPermissions"` in those two files, it doesn’t take effect either, and the session starts in Manual mode. The other values apply from any settings file.
3. The built-in default
Conversations the VS Code extension starts follow the extension’s own list in Switch permission modes. For the permission mode Claude Code starts a resumed session in, see [permission mode on resume](</docs/en/sessions#permission-mode-on-resume>). The built-in `auto` default requires Claude Code v2.1.228 or later on macOS, Linux, and WSL, and v2.1.233 or later on native Windows. On earlier versions, the built-in default is Manual. The built-in default depends on how you run Claude Code, on your plan, and on whether Claude Code could fetch its feature flags. The first row that matches your session applies. The table covers sessions you start in a terminal or through the VS Code extension; for the desktop app and claude.ai, see the Desktop and Web tabs in Switch permission modes.
@@ -95,7 +95,7 @@
---|---
One session you’re about to start| Pass the permission mode as a flag, for example `claude --permission-mode default`
Every terminal session you start on this machine| Set `permissions.defaultMode` in `~/.claude/settings.json`. For what the VS Code extension reads, see Switch permission modes
-Every terminal session you start in one project| Set `permissions.defaultMode` in the project’s `.claude/settings.json`. Sessions you start in a terminal honor every value except `auto`; sessions the VS Code extension starts don’t read project settings for the starting permission mode
+Every terminal session you start in one project| Set `permissions.defaultMode` in the project’s `.claude/settings.json`. Sessions you start in a terminal honor every value except `auto` and `bypassPermissions`; sessions the VS Code extension starts don’t read project settings for the starting permission mode
Every terminal session in your organization| Set `permissions.defaultMode` in [managed settings](</docs/en/managed-settings>). Terminal sessions start in that mode and people can still switch to auto mode; for what the VS Code extension reads, see Switch permission modes. To remove auto mode so nobody can select it, set `permissions.disableAutoMode` to `"disable"` instead
This example makes every terminal session on your machine start in Manual mode, whose config value is `default`. Save it in `~/.claude/settings.json`:
@@ -129,7 +129,7 @@
**During a session** : press `Shift+Tab` to cycle permission modes. From `auto`, the first press switches to `default`, and the cycle then runs `default` → `acceptEdits` → `plan` → back to `default`. Optional modes, described below, slot in after `plan`. The status bar shows the active mode as a gray `⏸ manual mode on` for `default`, or as `⏵⏵ accept edits on`, `⏸ plan mode on`, `⏵⏵ auto mode on`, `⏵⏵ don't ask on`, or `⏵⏵ bypass permissions on`.Not every mode is in the default cycle:
* `auto`: appears when auto mode is available; cycling to it switches permission modes without a confirmation prompt
- * `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings-reference#permission-settings>); the `--allow-` variant adds the permission mode to the cycle without activating it
+ * `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in [user, `--settings`, or managed settings](</docs/en/settings-reference#permissions-defaultmode>). The `--allow-` variant adds the permission mode to the cycle without activating it
* `dontAsk`: never appears in the cycle; set it with `--permission-mode dontAsk`
Enabled optional modes slot in after `plan`, with `bypassPermissions` first and `auto` last. If you have both enabled, you will cycle through `bypassPermissions` on the way to `auto`.**From a Bash permission prompt** : in the Manual and `acceptEdits` permission modes, when auto mode is available, Claude Code adds **Yes, and switch to auto mode** to a Bash command’s permission prompt. Select it to approve the command and switch the session to auto mode. [PowerShell tool](</docs/en/tools-reference#powershell-tool>) prompts don’t offer the option. Requires Claude Code v2.1.247 or later.Claude Code doesn’t add the option to prompts forced by one of your [`ask` rules](</docs/en/permissions#manage-permissions>) or by a [hook](</docs/en/hooks#pretooluse-decision-control>), because auto mode still shows you those prompts, so switching wouldn’t remove them.**At startup** : pass the permission mode as a flag.
@@ -236,7 +236,7 @@
* **Plan** : All plans.
* **Organization** : on Team and Enterprise, auto mode is available by default. Administrators can turn it off for the organization by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>).
- * **Model** : on the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Claude Opus 4.6 or later, Sonnet 4.6 or later, or [Fable 5](</docs/en/model-config#work-with-fable-5>). On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7 or later, and Fable 5. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
+ * **Model** : on the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Claude Opus 4.6 or later, Sonnet 4.6 or later, or a [Fable model](</docs/en/model-config#work-with-fable>). On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7 or later, and the Fable models. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
* **Provider** : available by default on the Anthropic API, Claude Platform on AWS, Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in Claude apps gateway sessions.
If Claude Code reports auto mode as unavailable, first check these requirements and whether any settings file sets [`disableAutoMode`](</docs/en/settings-reference#disableautomode>). Anthropic may also have turned auto mode off server-side, or the server may have rejected auto mode for your account. A session that received either answer keeps auto mode off until the session ends, so start a new session later. A separate message that names a model and says auto mode “cannot determine the safety” of an action means a classifier request failed. That failure is usually transient, but on Amazon Bedrock it can repeat until your account can invoke the named model. See the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the causes and what to do. If you set `defaultMode: "auto"` in [settings](</docs/en/settings-reference#all-settings>) and a terminal session starts in Manual mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. `auto` doesn’t take effect from those files. Move it to `~/.claude/settings.json`. For a conversation the VS Code extension started, check the extension’s own list in Switch permission modes instead.
@@ -247,7 +247,7 @@
Auto mode on Bedrock, Agent Platform, or Foundry
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the permission mode a session starts in: on these providers, terminal sessions start in your [`defaultMode`](</docs/en/settings-reference#permissions-defaultmode>), which is Manual unless you change it, and conversations in the [VS Code extension](</docs/en/vs-code>) start in Manual unless `claudeCode.initialPermissionMode` or a mode you picked in the extension sets one. Only Claude Sonnet 5, Opus 4.7 or later, and Fable 5 are supported on these providers. To make auto mode the default starting permission mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. In sessions the VS Code extension starts, select **Auto** from the mode indicator instead. Switch permission modes covers what outranks that pick. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the permission mode a session starts in: on these providers, terminal sessions start in your [`defaultMode`](</docs/en/settings-reference#permissions-defaultmode>), which is Manual unless you change it, and conversations in the [VS Code extension](</docs/en/vs-code>) start in Manual unless `claudeCode.initialPermissionMode` or a mode you picked in the extension sets one. Only Claude Sonnet 5, Opus 4.7 or later, and the Fable models are supported on these providers. To make auto mode the default starting permission mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. In sessions the VS Code extension starts, select **Auto** from the mode indicator instead. Switch permission modes covers what outranks that pick. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
###
@@ -392,7 +392,7 @@
Cost and latency
-The classifier runs on Claude Sonnet 5 by default rather than on your `/model` selection. A classifier model that Anthropic configures server-side takes precedence over that default. When your session’s model is Claude Sonnet 4.6, or when [`availableModels`](</docs/en/model-config#restrict-model-selection>) excludes Sonnet 5, the classifier runs on the session’s model instead, or on an Opus model when the session runs on [Fable 5](</docs/en/model-config#work-with-fable-5>); on providers other than the Anthropic API, that Opus fallback is the provider’s default Opus model.The session’s first auto-mode request validates the Sonnet 5 default: if the request succeeds, Sonnet 5 stays the session’s classifier model, and if it fails because the model isn’t available, the session uses the fallback instead. After that validation settles, the classifier’s model doesn’t change for the session.On Enterprise plans and on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations.The classifier reuses a sandbox network verdict for a host and port, so repeated connections to the same host don’t each add a check. What the classifier blocks by default describes how long an allow and a deny last.
+The classifier runs on Claude Sonnet 5 by default rather than on your `/model` selection. A classifier model that Anthropic configures server-side takes precedence over that default. When your session’s model is Claude Sonnet 4.6, or when [`availableModels`](</docs/en/model-config#restrict-model-selection>) excludes Sonnet 5, the classifier runs on the session’s model instead, or on an Opus model when the session runs on a [Fable model](</docs/en/model-config#work-with-fable>); on providers other than the Anthropic API, that Opus fallback is the provider’s default Opus model.The session’s first auto-mode request validates the Sonnet 5 default: if the request succeeds, Sonnet 5 stays the session’s classifier model, and if it fails because the model isn’t available, the session uses the fallback instead. After that validation settles, the classifier’s model doesn’t change for the session.On Enterprise plans and on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations.The classifier reuses a sandbox network verdict for a host and port, so repeated connections to the same host don’t each add a check. What the classifier blocks by default describes how long an allow and a deny last.
##
@@ -419,7 +419,7 @@
Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system.
-You can’t enter `bypassPermissions` from a session that was started without it enabled. Enable it at launch with `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings-reference#permission-settings>) or with an enabling flag:
+You can’t enter `bypassPermissions` from a session you started without it enabled. Enable it at launch with [`permissions.defaultMode: "bypassPermissions"`](</docs/en/settings-reference#permissions-defaultmode>) or with an enabling flag:
claude --permission-mode bypassPermissions
--- a/prompt-caching.md
+++ b/prompt-caching.md
@@ -65,7 +65,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. 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 5 and Opus 5 is also a model switch. When a safety classifier flags a request and the flagged category has a fallback model, Claude Code re-runs the request on that model and the session continues there.
+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. 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 5.1, Fable 5, and Opus 5 is also a model switch. When a safety classifier flags a request and the flagged category has a fallback model, Claude Code re-runs the request on that model and the session continues there.
###
--- a/python.md
+++ b/python.md
@@ -961,8 +961,8 @@
* `API_TIMEOUT_MS`: per-request timeout on the Anthropic client, in milliseconds. Default `600000`. Applies to the main loop and all subagents.
* `CLAUDE_CODE_MAX_RETRIES`: maximum API retries. Default `10`, capped at `15`. Each retry gets its own `API_TIMEOUT_MS` window, so worst-case wall time is roughly `API_TIMEOUT_MS × (CLAUDE_CODE_MAX_RETRIES + 1)` plus backoff. For unattended runs that need to wait through longer outages, set [`CLAUDE_CODE_RETRY_WATCHDOG=1`](</docs/en/errors#tune-retry-behavior>): it retries transient capacity errors indefinitely and, on Claude Code v2.1.199 or later, raises the default for other transient errors to `300` and removes the cap on this variable.
- * `CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS`: stall watchdog for subagents launched with `run_in_background`. Default `600000`. Resets on each stream event; on stall it aborts the subagent, marks the task failed, and surfaces the error to the parent with any partial result. Does not apply to synchronous subagents.
- * `CLAUDE_ENABLE_STREAM_WATCHDOG` with `CLAUDE_STREAM_IDLE_TIMEOUT_MS`: aborts the request when headers have arrived but the response body stops streaming. The watchdog is on by default for all providers; set `CLAUDE_ENABLE_STREAM_WATCHDOG=0` to disable it. `CLAUDE_STREAM_IDLE_TIMEOUT_MS` defaults to `300000` and is clamped to that minimum. After the abort, [Automatic retries](</docs/en/errors#automatic-retries>) covers what Claude Code does, based on how far the response had progressed.
+ * `CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS`: stall watchdog for subagents. While the stream watchdog is on, the default is `CLAUDE_STREAM_IDLE_TIMEOUT_MS` plus 5 minutes, which comes to `600000` unless you raise that variable. With the stream watchdog off, the default is `600000`. Before v2.1.257, the default was always `600000`. The timer resets on each stream event. On a stall, Claude Code aborts the subagent and reports the stall to the parent. For a background subagent, it also marks the task failed and attaches any partial result.
+ * `CLAUDE_ENABLE_STREAM_WATCHDOG` with `CLAUDE_STREAM_IDLE_TIMEOUT_MS`: stream watchdog that aborts the request when headers have arrived but the response body stops streaming. The watchdog is on by default for all providers; set `CLAUDE_ENABLE_STREAM_WATCHDOG=0` to disable it. `CLAUDE_STREAM_IDLE_TIMEOUT_MS` defaults to `300000` and is clamped to that minimum. After the abort, [Automatic retries](</docs/en/errors#automatic-retries>) covers what Claude Code does, based on how far the response had progressed. While the watchdog waits out a response that a gateway behind `ANTHROPIC_BASE_URL` holds open with keep-alive pings, a host that sets `include_partial_messages` keeps receiving `ping` `StreamEvent` messages. Read those frames as liveness rather than timing the session out on silence. Before v2.1.257, the frames stopped 5 minutes after the last real stream event.
###
@@ -1626,6 +1626,8 @@
`parent_tool_use_id`| `str | None`| Tool use ID if this message is a tool result response
`tool_use_result`| `dict[str, Any] | None`| Tool result data if applicable
`origin`| `MessageOrigin | None`| Provenance of this message, populated on injected turns such as task notifications and peer messages. `None` when the CLI didn’t attribute it. Requires Python Agent SDK 0.2.137 or later
+
+The SDK passes `tool_use_result` through from the CLI unmodified. For a tool on an external MCP server whose result contains `resource_link` blocks, the dict has a `resourceLinks` key holding a list of dicts with the keys of the TypeScript [`SDKMcpResourceLink`](</docs/en/agent-sdk/typescript#sdkmcpresourcelink>) type. Claude receives each link as a line of text in the tool result. To render the files the server returned, read `resourceLinks` instead of parsing that text. The `resourceLinks` key requires Python Agent SDK 0.2.150 or later and Claude Code v2.1.257 or later; the CLI bundled with that SDK version satisfies the Claude Code requirement. The CLI omits the key when the result has no links and on results from subagents. The CLI keeps at most 50 links per result and stops adding links once the list reaches 64 KiB of serialized JSON. A tool you define in-process with `tool()` never produces the key, because the SDK flattens its `resource_link` blocks to text before the CLI sees the result.
###
@@ -1748,6 +1750,7 @@
`cacheReadInputTokens`| `int`| Cache read tokens for this model.
`cacheCreationInputTokens`| `int`| Cache creation tokens for this model.
`webSearchRequests`| `int`| Web search requests made by this model.
+`thinkingTokens`| `int`| Thinking tokens generated by this model, already counted in `outputTokens`. Absent until a turn runs on a Claude Code version that records it, and not declared on the TypedDict, so read it with `.get()`. Requires Python Agent SDK 0.2.150 or later, whose bundled CLI records it.
`costUSD`| `float`| Estimated cost in USD for this model, computed client-side. See [Track cost and usage](</docs/en/agent-sdk/cost-tracking>) for billing caveats.
`contextWindow`| `int`| Context window size for this model.
`maxOutputTokens`| `int`| Maximum output token limit for this model.
@@ -1947,6 +1950,8 @@
`session_id`| `str`| Session identifier
`tool_use_id`| `str | None`| Associated tool use ID
`usage`| `TaskUsage | None`| Final token usage for the task
+
+When the CLI [moves a long MCP tool call to the background](</docs/en/mcp#automatic-backgrounding-of-long-tool-calls>), the tool result for that call holds only a placeholder and the call’s real result arrives in this message. On a `"completed"` notification for such a call, the CLI adds a `resource_links` key listing the files the tool returned by reference, with the same entries and limits as the `resourceLinks` key on `UserMessage.tool_use_result`. The `resource_links` key requires Python Agent SDK 0.2.150 or later and Claude Code v2.1.257 or later; the CLI bundled with that SDK version satisfies the Claude Code requirement. The dataclass has no field for `resource_links`. Read it from the `data` dict the message inherits from `SystemMessage`: `message.data.get("resource_links")`. Match the notification to the call with `tool_use_id`. The CLI omits the key when the result had no links and on notifications for tasks that aren’t MCP tool calls.
##
--- a/remote-control.md
+++ b/remote-control.md
@@ -88,7 +88,7 @@
This starts a Remote Control session that carries over your current conversation history.The `--verbose`, `--sandbox`, and `--no-sandbox` flags are not available with this command.
-In the [Claude Code VS Code extension](</docs/en/vs-code>), type `/remote-control` or `/rc` in the prompt box, or open the command menu with `/` and select it.
+In the [Claude Code VS Code extension](</docs/en/vs-code>), type `/remote-control` or `/rc` in the prompt box.
/remote-control
@@ -323,7 +323,7 @@
* **Server mode** : Claude Code gives up after roughly 10 minutes and the `claude remote-control` process exits. Run `claude remote-control` again to start a new session.
* **Interactive session** : keep working locally. Claude Code retries for as long as the outage lasts and reconnects on its own when the network returns.
* **Presence heartbeats failing** : if an interactive session disconnects with `could not reach the Remote Control server for about 30 minutes`, run `/remote-control` to reconnect. Claude Code shows this message only when the session’s presence heartbeats have been failing while the rest of the connection stayed up; it re-registers the session for about 30 minutes before disconnecting.
- * **Forwarded dialogs expire** : Claude Code keeps permission prompts and `AskUserQuestion` questions open until you answer them. When Claude Code forwards another kind of dialog to the remote session, such as the model-choice prompt shown after a safety refusal, it waits five minutes by default, then closes the dialog and continues with the dialog’s no-action default. The mid-session [Fable 5 usage-credits consent prompt](</docs/en/model-config#fable-5-and-usage-credits>) follows the same deadline but isn’t forwarded: Claude Code shows it only in the terminal where the session runs, and if nobody has answered there by the deadline, it ends the turn without sending the request. Your model selection is unchanged, and Claude Code asks again on your next message. Set [`dialogExpiry`](</docs/en/settings-reference#dialogexpiry>) to adjust or disable the deadline. Requires Claude Code v2.1.224 or later. Claude Code applies the same deadline to the approval dialog for a held cross-session message. [The held-message expiry rules](</docs/en/cross-session-messaging#control-inbound-messages>) cover the cases where Claude Code keeps the dialog open past it.
+ * **Forwarded dialogs expire** : Claude Code keeps permission prompts and `AskUserQuestion` questions open until you answer them. When Claude Code forwards another kind of dialog to the remote session, such as the model-choice prompt shown after a safety refusal, it waits five minutes by default, then closes the dialog and continues with the dialog’s no-action default. The mid-session [Fable usage-credits consent prompt](</docs/en/model-config#fable-and-usage-credits>) follows the same deadline but isn’t forwarded: Claude Code shows it only in the terminal where the session runs, and if nobody has answered there by the deadline, it ends the turn without sending the request. Your model selection is unchanged, and Claude Code asks again on your next message. Set [`dialogExpiry`](</docs/en/settings-reference#dialogexpiry>) to adjust or disable the deadline. Requires Claude Code v2.1.224 or later. Claude Code applies the same deadline to the approval dialog for a held cross-session message. [The held-message expiry rules](</docs/en/cross-session-messaging#control-inbound-messages>) cover the cases where Claude Code keeps the dialog open past it.
* **Some commands are local-only** : commands that only run in the terminal interface, such as `/plugin` or `/resume`, work only from the local CLI, whether or not you pass an argument. The following work from mobile and web:
* Text-output commands: `/compact`, `/clear`, `/context`, `/usage`, `/exit`, `/usage-credits` (prints the billing URL instead of opening a browser), `/recap`, `/reload-plugins`
* `/model`, `/effort`, `/fast`, `/color`, and `/rename`: pass the value as an argument, for example `/model sonnet` or `/effort high`. From mobile and web, `/model` and `/effort` take the argument in place of the terminal picker or slider.
--- a/sandboxing.md
+++ b/sandboxing.md
@@ -276,7 +276,7 @@
* **Project or local settings** : Claude Code applies none of their `credentials` entries. Requires Claude Code v2.1.246 or later.
* **User settings** : Claude Code still applies the `deny` entries in `~/.claude/settings.json` and keeps its file `mask` entries as restrictions, but drops its environment variable `mask` entries.
-There is no built-in credential deny list, so only the files and variables you list are restricted. The setting affects sandboxed Bash commands only. To strip Anthropic and cloud provider credentials from all subprocesses regardless of sandboxing, set [`CLAUDE_CODE_SUBPROCESS_ENV_SCRUB`](</docs/en/env-vars>).
+There is no built-in credential deny list, so only the files and variables you list are restricted. `sandbox.credentials` affects sandboxed Bash commands only. To strip credentials from all subprocesses regardless of sandboxing, set [`CLAUDE_CODE_SUBPROCESS_ENV_SCRUB`](</docs/en/env-vars>).
###
@@ -664,7 +664,7 @@
* **Built-in file tools** : Read, Edit, and Write use the permission system directly rather than running through the sandbox. See [permissions](</docs/en/permissions>).
* **Computer use** : when Claude opens apps and controls your screen, it runs on your actual desktop rather than in an isolated environment. Per-app permission prompts gate each application. See [computer use in the CLI](</docs/en/computer-use>) or [computer use in Desktop](</docs/en/desktop#let-claude-use-your-computer>).
- * **Environment variables** : sandboxed Bash commands inherit the parent process environment by default, including any credentials set there. Use `sandbox.credentials` to unset or mask specific variables for sandboxed commands, or set [`CLAUDE_CODE_SUBPROCESS_ENV_SCRUB`](</docs/en/env-vars>) to strip Anthropic and cloud provider credentials from all subprocesses.
+ * **Environment variables** : sandboxed Bash commands inherit the parent process environment by default, including any credentials set there. Use `sandbox.credentials` to unset or mask specific variables for sandboxed commands, or set [`CLAUDE_CODE_SUBPROCESS_ENV_SCRUB`](</docs/en/env-vars>) to strip credentials from all subprocesses.
* **Subagents** : [subagents](</docs/en/sub-agents>) run in the same process as the parent session and use the same sandbox configuration. Bash commands inside a subagent are sandboxed when sandboxing is enabled in the parent session.
Effective sandboxing requires both filesystem and network isolation. Without network isolation, a compromised agent could exfiltrate sensitive files like SSH keys. Without filesystem isolation, whether from a permissive policy or from disabling the filesystem layer, a compromised agent could backdoor system resources to gain network access. When you widen the defaults, check that an `allowWrite` path, a broad `allowedDomains` entry, or an `excludedCommands` exception does not undo a restriction on the other side.
--- a/settings.md
+++ b/settings.md
@@ -279,10 +279,11 @@
A value you set is ignored
-Something else is setting the same key, or the file didn’t load:
+Something else is setting the same key, the file can’t set that value, or the file didn’t load:
* **A higher level sets it.** Another settings file, a `--settings` flag, or a managed source sets the key above yours; the stack says which. A flag or environment variable can also override the key on its own, decided key by key; the key’s entry on the [settings reference](</docs/en/settings-reference>) says which one Claude Code uses, and the [`env` entry](</docs/en/settings-reference#env>) covers a managed `env` value versus a shell export.
* **A security key keeps its strict value.** For a few keys Claude Code honors the restrictive value from any file, so a project `true` for [`disableClaudeAiConnectors`](</docs/en/settings-reference#disableclaudeaiconnectors>) stays on; see Exceptions to managed settings precedence.
+ * **The file can’t set that value.** [`permissions.defaultMode`](</docs/en/settings-reference#permissions-defaultmode>) values `auto` and `bypassPermissions` don’t take effect from project or local settings; set them in user or managed settings instead, or pass `--permission-mode` for one session. Before v2.1.257, `bypassPermissions` took effect from any file.
* **The file is broken.** Invalid JSON or a rejected value makes Claude Code skip the file or the entry; see Fix a broken settings file.
####
--- a/settings-example.md
+++ b/settings-example.md
@@ -246,7 +246,7 @@
* `forceLoginMethod` and `forceLoginOrgUUID` pin the login method and organization
* `availableModels` and `enforceAvailableModels` restrict which models sessions can use
* `permissions.deny` blocks two file reads and `curl`, and `disableBypassPermissionsMode` removes the bypass permission mode
- * `allowManagedPermissionRulesOnly` and `allowManagedMcpServersOnly` make the managed permission and MCP allowlists the only ones that apply
+ * [`allowManagedPermissionRulesOnly`](</docs/en/settings-reference#allowmanagedpermissionrulesonly>) and [`allowManagedMcpServersOnly`](</docs/en/settings-reference#allowmanagedmcpserversonly>) make the managed permission and MCP allowlists the only ones that apply
* `allowedMcpServers` pins the MCP server by URL
* `strictKnownMarketplaces` allows one plugin marketplace
* `sandbox` sandboxes commands with a fixed network allowlist and no unsandboxed retry
@@ -340,7 +340,7 @@
// Remove the bypass-permissions mode from every session
"disableBypassPermissionsMode": "disable"
},
- // Only managed permission rules apply
+ // Ignore permission rules from user, project, and local settings
"allowManagedPermissionRulesOnly": true,
// Only the GitHub MCP server, matched by URL rather than by name, since a user can
// name any server "github". Servers that don't match don't load, which includes every
Show diff (182 lines)
--- a/settings-reference.md
+++ b/settings-reference.md
@@ -19,7 +19,7 @@
`allowedMcpServers`| Allowlist which [MCP servers](</docs/en/mcp>) people can use| MCP| Any file
`allowManagedHooksOnly`| Run only the [hooks](</docs/en/hooks>) your organization deploys| Hooks and automation| Managed
`allowManagedMcpServersOnly`| Make the managed [MCP](</docs/en/mcp>) allowlist the only one that applies| MCP| Managed
-`allowManagedPermissionRulesOnly`| Make [managed settings](</docs/en/managed-settings>) the only source of [permission rules](</docs/en/permissions#managed-settings>)| Permission settings| Managed
+`allowManagedPermissionRulesOnly`| Make [managed settings](</docs/en/managed-settings>) the only settings source of [permission rules](</docs/en/permissions#managed-settings>)| Permission settings| Managed
`alwaysThinkingEnabled`| Turn [extended thinking](</docs/en/model-config#extended-thinking>) off for every session| Model and responses| Any file
`apiKeyHelper`| Generate the [API credential](</docs/en/authentication#credential-management>) with your own command| Authentication and providers| Any file
`askUserQuestionTimeout`| Let an unanswered question [auto-continue](</docs/en/tools-reference#question-auto-continue-timeout>) after idle time| Interface and terminal| User or managed
@@ -115,7 +115,7 @@
`otelHeadersHelper`| Generate rotating [OpenTelemetry](</docs/en/monitoring-usage#dynamic-headers>) headers with your own command| Authentication and providers| Any file
`outputStyle`| Change Claude’s role, tone, and output format with an [output style](</docs/en/output-styles>)| Model and responses| Any file
`parentSettingsBehavior`| Apply or drop restrictions an [SDK or IDE host](</docs/en/managed-settings#let-an-embedding-host-add-policy>) passes when you deploy [managed settings](</docs/en/managed-settings>)| Enterprise and managed settings| Managed
-`permissionExplainerEnabled`| Turn off the Ctrl+E command explanation on shell [permission prompts](</docs/en/permissions#permission-system>)| Global config settings| Global config
+`permissionExplainerEnabled`| Removed in v2.1.257, together with the `Ctrl+E` command explanation on shell permission prompts| Global config settings| Global config
`permissions`| Set allow, ask, and deny rules and the starting [permission mode](</docs/en/permission-modes>)| Permission settings| Any file
`permissions.additionalDirectories`| Give Claude file access to [directories outside the current one](</docs/en/permissions#working-directories>)| Permission settings| Any file
`permissions.allow`| Approve listed [tool uses](</docs/en/permissions#permission-rule-syntax>) without a prompt| Permission settings| Any file
@@ -213,6 +213,8 @@
`terminalProgressBarEnabled`| Hide the terminal progress bar in terminals that support it| Interface and terminal| Any file
`terminalTitleFromRename`| Stop [`/rename`](</docs/en/sessions#name-your-sessions>) and `--name` from changing the terminal tab title| Interface and terminal| Any file
`theme`| Pick the interface [color theme](</docs/en/terminal-config#match-the-color-theme>), built-in or custom| Interface and terminal| Any file
+`timeFormat`| Show the times in the interface on a 12-hour or 24-hour clock, in UTC, or with a strftime pattern| Interface and terminal| Any file
+`timeZone`| Show the times in the interface in a time zone other than your system’s| Interface and terminal| Any file
`tui`| Choose the [fullscreen](</docs/en/fullscreen>) or classic terminal renderer| Interface and terminal| Any file
`ultracode`| Have Claude plan a [workflow](</docs/en/workflows#let-claude-decide-with-ultracode>) for each substantive task without being asked| Model and responses| Any file
`useAutoModeDuringPlan`| Let the [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) classifier review shell commands in [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>); set `false` to get prompts instead| Permission settings| User, local, or managed
@@ -245,7 +247,7 @@
`advisorModel`
-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; when it isn’t, Claude Code sends requests without the advisor. See [Choose an advisor model](</docs/en/advisor#choose-an-advisor-model>). 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`. In a session attached to a remote worker, the pick applies to that session only. To pick Fable, first accept the [usage-credits consent](</docs/en/advisor#fable-advisor-and-usage-credits>) by running `/model fable`. Until you do, picking Fable in `/advisor` saves nothing and Claude Code tells you to run `/model fable` first.
+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; when it isn’t, Claude Code sends requests without the advisor. See [Choose an advisor model](</docs/en/advisor#choose-an-advisor-model>). 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`. In a session attached to a remote worker, the pick applies to that session only. 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"`
@@ -258,7 +260,7 @@
"advisorModel": "opus"
}
-The key has no effect on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. `"fable"` requires [Fable 5 access](</docs/en/advisor#choose-an-advisor-model>).
+The key has no effect on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. `"fable"` requires [Fable access](</docs/en/advisor#choose-an-advisor-model>).
###
@@ -266,7 +268,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 Fable 5, `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 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
@@ -767,11 +769,11 @@
`allowManagedPermissionRulesOnly`
-Make managed settings the only source of `allow`, `ask`, and `deny` permission rules. Claude Code then ignores rules in user, project, local, and `--settings` files, ignores `--allowedTools`, hides the always-allow choices in permission prompts, and stops saving new rules. When [parent settings from an embedding host](</docs/en/managed-settings#let-an-embedding-host-add-policy>) apply, Claude Code treats them as part of the managed tier: it keeps their `deny` and `ask` rules and drops their `allow` rules and `additionalDirectories`.
+Make managed settings the only settings source of permission rules. Claude Code then ignores `allow`, `ask`, and `deny` rules in user, project, local, and `--settings` files, ignores `--allowedTools`, hides the always-allow choices in permission prompts, and stops saving new rules. When [parent settings from an embedding host](</docs/en/managed-settings#let-an-embedding-host-add-policy>) apply, Claude Code treats them as part of the managed tier: it keeps their `deny` and `ask` rules and drops their `allow` rules and `additionalDirectories`. `--disallowedTools` rules and the current session’s `deny` and `ask` rules still apply, including after Claude Code reloads settings mid-session. They only restrict, so they can’t widen what the managed rules grant. Before v2.1.257, Claude Code dropped those command-line and session rules at the first settings reload.
* **Scope** : `Managed`
* **Type** : Boolean
- * `true`: managed settings are the only source of `allow`, `ask`, and `deny` rules; Claude Code ignores rules from other files and `--allowedTools`, drops the `allow` rules and `additionalDirectories` of any host-supplied parent settings that apply while keeping their `deny` and `ask` rules, hides always-allow choices, and stops saving new rules
+ * `true`: managed settings become the only settings source of permission rules
* `false`: Claude Code applies permission rules from user, project, local, and `--settings` files in addition to the managed ones
* **Default** : unset, so Claude Code applies permission rules from user, project, and local settings and from `--settings`, in addition to the managed ones
@@ -1020,7 +1022,7 @@
Set the [permission mode](</docs/en/permission-modes>) new sessions start in. When you leave it unset, sessions start in the [built-in default](</docs/en/permission-modes#which-mode-a-session-starts-in>) for your plan and surface.
- * **Scope** : `Any file`. `auto` doesn’t take effect from project or local settings, so set it in `~/.claude/settings.json` instead. Conversations the VS Code extension starts read only user, managed, and `--settings` values.
+ * **Scope** : `Any file`. `auto` and `bypassPermissions` don’t take effect from project or local settings, so set them in `~/.claude/settings.json` instead. Before v2.1.257, `bypassPermissions` took effect from any file. For conversations the VS Code extension starts, Claude Code reads only user, managed, and `--settings` values.
* **Type** : string, one of:
* `"default"`: Claude Code runs only reads without asking
* `"acceptEdits"`: Claude Code also runs file edits and common filesystem commands such as `mkdir` and `mv` without asking
@@ -2639,7 +2641,7 @@
`dialogExpiry`
-Set the deadline for dialogs Claude Code [forwards to a remote client](</docs/en/remote-control#limitations>), such as a Remote Control or SDK host, for the approval dialog for a [held cross-session message](</docs/en/cross-session-messaging#control-inbound-messages>), and for the mid-session [Fable 5 usage-credits consent prompt](</docs/en/model-config#fable-5-and-usage-credits>) in a session that may have nobody at the terminal. When no answer arrives before the deadline, Claude Code cancels the dialog and continues with its no-action default. Requires Claude Code v2.1.224 or later.
+Set the deadline for dialogs Claude Code [forwards to a remote client](</docs/en/remote-control#limitations>), such as a Remote Control or SDK host, for the approval dialog for a [held cross-session message](</docs/en/cross-session-messaging#control-inbound-messages>), and for the mid-session [Fable usage-credits consent prompt](</docs/en/model-config#fable-and-usage-credits>) in a session that may have nobody at the terminal. When no answer arrives before the deadline, Claude Code cancels the dialog and continues with its no-action default. Requires Claude Code v2.1.224 or later.
* **Scope** : `User or managed`
* **Type** : string, one of `"60s"`, `"5m"`, `"10m"`, or `"never"`, which disables the deadline
@@ -3197,6 +3199,65 @@
}
See [Create a custom theme](</docs/en/terminal-config#create-a-custom-theme>).
+
+###
+
+
+
+`timeFormat`
+
+Choose how Claude Code writes the times it shows in the interface, such as the `done 6:05 PM` at the end of each turn duration message and the timestamps in the [transcript viewer](</docs/en/interactive-mode#transcript-viewer>). To pick a preset, run `/config` and set **Time format**. Requires Claude Code v2.1.257 or later.
+
+ * **Scope** : `Any file`
+ * **Type** : string, one of:
+ * `"auto"`: the same as unset; each time keeps its built-in format, which follows your locale on the turn duration message
+ * `"12-hour"`: a 12-hour clock
+ * `"24-hour"`: a 24-hour clock
+ * `"24-hour-utc"`: a 24-hour clock in UTC with `Z` after the minutes, such as `18:05Z`; Claude Code ignores `timeZone` for this preset
+ * A strftime pattern such as `"%H:%M"`: Claude Code writes each time with the pattern. Any value that contains a `%` is a pattern, and any other value outside the presets counts as `"auto"`
+ * **Default** : `"auto"`
+
+settings.json
+
+ {
+ "timeFormat": "24-hour"
+ }
+
+`/config` offers only the presets, so to use a strftime pattern, add the key to a settings file. This example shows each time as a two-digit 24-hour clock:
+
+settings.json
+
+ {
+ "timeFormat": "%H:%M"
+ }
+
+The turn duration message and the transcript viewer then show times such as `18:05`. In the transcript viewer, the pattern is the whole timestamp, so add date directives when you want the date there. This example puts the date in front of the clock:
+
+settings.json
+
+ {
+ "timeFormat": "%Y-%m-%d %H:%M"
+ }
+
+The same surfaces then show times such as `2026-09-01 18:05`.
+
+###
+
+
+
+`timeZone`
+
+Show the times in the interface in a time zone other than your system’s. Set it to an [IANA time zone name](<https://www.iana.org/time-zones>), such as `"UTC"` or `"Europe/Dublin"`. The times that `timeFormat` controls then show in this zone. If `timeFormat` is `"24-hour-utc"`, times stay in UTC and Claude Code ignores this key. `/config` has no row for this key, so set it in a settings file. Requires Claude Code v2.1.257 or later.
+
+ * **Scope** : `Any file`
+ * **Type** : string, an IANA time zone name. When Claude Code doesn’t recognize the name, it uses your system time zone
+ * **Default** : unset, so times show in your system time zone
+
+settings.json
+
+ {
+ "timeZone": "Europe/Dublin"
+ }
###
@@ -5995,21 +6056,13 @@
`permissionExplainerEnabled`
-When Claude asks permission to run a Bash or PowerShell command, you can press `Ctrl+E` on the prompt to get a model-generated [explanation of the command](</docs/en/permissions#permission-system>): what it does, why Claude is running it, and what could go wrong, labeled **Low risk** , **Med risk** , or **High risk**. Claude Code asks the model for the explanation only when you press the shortcut, and showing it doesn’t run the command. Set this key to `false` to turn the shortcut off.
-
- * **Scope** : `Global config`
- * **Type** : Boolean
- * `true`: you can press `Ctrl+E` on a Bash or PowerShell permission prompt to get a model-generated explanation of the command
- * `false`: Claude Code turns the `Ctrl+E` shortcut off
+Removed in v2.1.257, together with the `Ctrl+E` command explanation on Bash and PowerShell permission prompts. Setting it has no effect on current versions.
+
+Through v2.1.256, you could press `Ctrl+E` on a Bash or PowerShell permission prompt to see a model-generated explanation of the command, and set this key to `false` to turn that shortcut off.
+
+ * **Scope** : `Global config`. On v2.1.256 and earlier.
+ * **Type** : Boolean
* **Default** : `true`
-
-~/.claude.json
-
- {
- "permissionExplainerEnabled": false
- }
-
-Claude Code ignores this key in `settings.json`.
###
--- a/sub-agents.md
+++ b/sub-agents.md
@@ -30,7 +30,7 @@
A fast, read-only agent optimized for searching and analyzing codebases.
- * **Model** : inherits from the main conversation, capped at Opus on the Claude API, so Explore never runs on a more expensive model than the one you already chose for the session
+ * **Model** : inherits from the main conversation, capped at Opus on the Claude API, so Explore never runs on a more expensive model than the one you already chose for the session, unless you force `CLAUDE_CODE_SUBAGENT_MODEL` onto it
* **Tools** : read-only tools; Write and Edit are denied
* **Purpose** : file discovery, code search, codebase exploration
@@ -38,7 +38,7 @@
A research agent used during [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>) to gather context before presenting a plan.
- * **Model** : inherits from the main conversation
+ * **Model** : inherits from the main conversation, unless you force `CLAUDE_CODE_SUBAGENT_MODEL` onto it
* **Tools** : read-only tools; Write and Edit are denied
* **Purpose** : codebase research for planning
@@ -46,7 +46,7 @@
A capable agent for complex, multi-step tasks that require both exploration and action.
- * **Model** : the `CLAUDE_CODE_SUBAGENT_MODEL` model if you set one and nothing assigns a model another way, otherwise the main conversation’s model; Choose a model states the full order
+ * **Model** : the `CLAUDE_CODE_SUBAGENT_MODEL` model if you set one and nothing assigns a model another way, otherwise the main conversation’s model; Choose a model states the full order and how to force the variable onto subagents
* **Tools** : every tool available to subagents
* **Purpose** : complex research, multi-step operations, code modifications
@@ -295,7 +295,7 @@
3. The [`CLAUDE_CODE_SUBAGENT_MODEL`](</docs/en/model-config#environment-variables>) environment variable, when you set it to a model alias or model ID
4. The main conversation’s model
-Setting `CLAUDE_CODE_SUBAGENT_MODEL` by itself doesn’t change the model the built-in Explore and Plan subagents run on. Before v2.1.251, `CLAUDE_CODE_SUBAGENT_MODEL` came first in this order and overrode both the per-invocation parameter and the frontmatter, including `model: inherit`. Setting the variable to `inherit` is the same as leaving it unset. Before v2.1.196, that value forced subagents onto the main conversation’s model and ignored the other sources. Claude Code checks the per-invocation parameter, frontmatter, and environment variable values against your organization’s [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist. For a blocked value, it substitutes another model:
+Setting `CLAUDE_CODE_SUBAGENT_MODEL` by itself doesn’t change the model the built-in Explore and Plan subagents run on. Before v2.1.251, `CLAUDE_CODE_SUBAGENT_MODEL` came first in this order and overrode both the per-invocation parameter and the frontmatter, including `model: inherit`. Setting the variable to `inherit` is the same as leaving it unset. Before v2.1.196, that value forced subagents onto the main conversation’s model and ignored the other sources. Set [`CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1`](</docs/en/env-vars>) to run subagents, [teammates](</docs/en/agent-teams#specify-teammates-and-models>), and [workflow agents](</docs/en/workflows>) on `CLAUDE_CODE_SUBAGENT_MODEL` whatever model their definition or invocation names, the built-in Explore and Plan definitions included. A fork, and a [skill that runs in a subagent](</docs/en/skills#run-skills-in-a-subagent>) with `model: inherit`, still run on the main conversation’s model. When you haven’t set `CLAUDE_CODE_SUBAGENT_MODEL`, subagents, teammates, and workflow agents run on the main conversation’s model, and the built-in Explore subagent keeps its model cap. Requires Claude Code v2.1.257 or later. Claude Code checks the per-invocation parameter, frontmatter, and environment variable values against your organization’s [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist. For a blocked value, it substitutes another model:
* When the blocked value is a family alias such as `opus`, Claude Code runs the subagent on the newest version of that family the allowlist permits, following the same [substitution rules and provider scope](</docs/en/model-config#restrict-model-selection>) as `/model`. Before v2.1.222, Claude Code ran the subagent on the inherited model for a blocked family alias as well.
* For any other blocked value, on providers where that substitution doesn’t operate, or when the allowlist permits no version of the family, Claude Code runs the subagent on the inherited model instead. If you set `CLAUDE_CODE_SUBAGENT_MODEL`, Claude Code tries that model first, under these same rules.
Show diff (211 lines)
--- a/typescript.md
+++ b/typescript.md
@@ -427,7 +427,7 @@
* **`policyHelper`** : `resolveSettings()` reads MDM sources, including macOS plist and Windows HKLM/HKCU, but doesn’t execute the admin-configured `policyHelper` subprocess.
* **Server-managed settings** : `resolveSettings()` doesn’t fetch [server-managed settings](</docs/en/server-managed-settings#fetch-and-caching-behavior>). Pass them as `options.serverManagedSettings` to include them.
- * **`defaultMode`** : the snapshot returns `permissions.defaultMode` as-is from every tier. A live session [ignores `defaultMode: 'auto'` from project and local settings](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), so an `auto` from those tiers appears in the snapshot even though a session would ignore it.
+ * **`defaultMode`** : the snapshot returns `permissions.defaultMode` as-is from every tier, so it can include the `'auto'` and `'bypassPermissions'` values from project and local settings, which [a live session ignores](</docs/en/permission-modes#which-mode-a-session-starts-in>).
function resolveSettings(
options?: ResolveSettingsOptions
@@ -584,8 +584,8 @@
* `API_TIMEOUT_MS`: per-request timeout on the Anthropic client, in milliseconds. Default `600000`. Applies to the main loop and all subagents.
* `CLAUDE_CODE_MAX_RETRIES`: maximum API retries. Default `10`, capped at `15`. Each retry gets its own `API_TIMEOUT_MS` window, so worst-case wall time is roughly `API_TIMEOUT_MS × (CLAUDE_CODE_MAX_RETRIES + 1)` plus backoff. For unattended runs that need to wait through longer outages, set [`CLAUDE_CODE_RETRY_WATCHDOG=1`](</docs/en/errors#tune-retry-behavior>): it retries transient capacity errors indefinitely and, on Claude Code v2.1.199 or later, raises the default for other transient errors to `300` and removes the cap on this variable.
- * `CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS`: stall watchdog for subagents launched with `run_in_background`. Default `600000`. Resets on each stream event; on stall it aborts the subagent, marks the task failed, and surfaces the error to the parent with any partial result. Does not apply to synchronous subagents.
- * `CLAUDE_ENABLE_STREAM_WATCHDOG` with `CLAUDE_STREAM_IDLE_TIMEOUT_MS`: aborts the request when headers have arrived but the response body stops streaming. The watchdog is on by default for all providers; set `CLAUDE_ENABLE_STREAM_WATCHDOG=0` to disable it. `CLAUDE_STREAM_IDLE_TIMEOUT_MS` defaults to `300000` and is clamped to that minimum. After the abort, [Automatic retries](</docs/en/errors#automatic-retries>) covers what Claude Code does, based on how far the response had progressed.
+ * `CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS`: stall watchdog for subagents. While the stream watchdog is on, the default is `CLAUDE_STREAM_IDLE_TIMEOUT_MS` plus 5 minutes, which comes to `600000` unless you raise that variable. With the stream watchdog off, the default is `600000`. Before v2.1.257, the default was always `600000`. The timer resets on each stream event. On a stall, Claude Code aborts the subagent and reports the stall to the parent. For a background subagent, it also marks the task failed and attaches any partial result.
+ * `CLAUDE_ENABLE_STREAM_WATCHDOG` with `CLAUDE_STREAM_IDLE_TIMEOUT_MS`: stream watchdog that aborts the request when headers have arrived but the response body stops streaming. The watchdog is on by default for all providers; set `CLAUDE_ENABLE_STREAM_WATCHDOG=0` to disable it. `CLAUDE_STREAM_IDLE_TIMEOUT_MS` defaults to `300000` and is clamped to that minimum. After the abort, [Automatic retries](</docs/en/errors#automatic-retries>) covers what Claude Code does, based on how far the response had progressed. While the watchdog waits out a response that a gateway behind `ANTHROPIC_BASE_URL` holds open with keep-alive pings, a host that sets `includePartialMessages` keeps receiving `ping` stream events, so read those frames as liveness rather than timing the session out on silence. Before v2.1.257, the frames stopped 5 minutes after the last real stream event.
###
@@ -609,13 +609,19 @@
? 'low' | 'medium' | 'high' | 'xhigh' | 'max' | null
: Settings[K] | null;
}): Promise<void>;
+ updateSettings(
+ source: 'localSettings',
+ settings: Record<string, unknown>,
+ ): Promise<void>;
initializationResult(): Promise<SDKControlInitializeResponse>;
reinitialize(): Promise<SDKControlInitializeResponse>;
supportedCommands(): Promise<SlashCommand[]>;
supportedModels(): Promise<ModelInfo[]>;
supportedAgents(): Promise<AgentInfo[]>;
mcpServerStatus(): Promise<McpServerStatus[]>;
- getContextUsage(): Promise<SDKControlGetContextUsageResponse>;
+ getContextUsage(opts?: {
+ detail?: 'summary' | 'full';
+ }): Promise<SDKControlGetContextUsageResponse>;
readFile(
path: string,
options?: { maxBytes?: number; encoding?: 'utf-8' | 'base64' }
@@ -644,18 +650,19 @@
`setModel()`| Changes the model (only available in streaming input mode). Passing `undefined` or the string `"default"` resets to the session default model
`setMaxThinkingTokens()`| _Deprecated:_ Use the `thinking` option instead. Changes the maximum thinking tokens. Passing `null` resets thinking to the session default: a mid-session override is cleared, and thinking stays off for sessions that have it disabled
`applyFlagSettings(settings)`| Merges settings into the session’s flag settings layer at runtime (only available in streaming input mode). See `applyFlagSettings()`
+`updateSettings(source, settings)`| Merges settings into the project’s local settings file, `.claude/settings.local.json`; they take effect on the next request. Accepts only `source: 'localSettings'` and an allowlisted key set, currently `outputStyle`, with string values; deleting a key isn’t supported. Rejects on remote transports and in sessions whose `settingSources` exclude `local`. Requires TypeScript SDK v0.3.257 or later, which bundles Claude Code v2.1.257
`initializationResult()`| Returns the full initialization result including supported commands, models, account info, and output style configuration
`reinitialize()`| Re-sends the `initialize` control request to the running CLI and returns a fresh result instead of the cached first-connect result. Use it after a transport gap, such as reattaching to a session after a disconnect, so pending permission requests reach your `canUseTool` callback again. Make the callback idempotent per request ID, because a request whose response was lost is dispatched again. Requires Claude Code v2.1.195 or later
`supportedCommands()`| Returns available slash 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
-`getContextUsage()`| Returns an `SDKControlGetContextUsageResponse` breaking down the session’s context window usage by category, skill, and tool. The same data `/context` shows in an interactive session
+`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` and applies the same read-permission rules as the Read tool. 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
`accountInfo()`| Returns account information
-`reconnectMcpServer(serverName)`| Reconnect an MCP server by name
-`toggleMcpServer(serverName, enabled)`| Enable or disable an MCP server by name
+`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
`streamInput(stream)`| Stream input messages to the query for multi-turn conversations
`stopTask(taskId)`| Stop a running background task by ID
@@ -767,7 +774,7 @@
`SDKControlGetContextUsageResponse`
-Return type of `getContextUsage()`. This is the same payload Claude Code renders for the `/context` command in an interactive session, so alongside the token counts it carries display fields such as `color` and `gridRows` that Claude Code uses to draw the `/context` usage grid. When you send `/context` as a prompt instead of calling the method, Claude Code attaches an `SDKContextUsage` payload to the `context_usage` field of the assistant message that delivers the result. That field requires Agent SDK v0.3.232 or later.
+Return type of `getContextUsage()`. With the default `detail`, this is the same payload Claude Code renders for the `/context` command in an interactive session, so alongside the token counts it carries display fields such as `color` and `gridRows` that Claude Code uses to draw the `/context` usage grid. The method’s optional `detail` argument chooses how Claude Code counts each category. With the default, `'full'`, Claude Code counts each category with token-counting API requests. Pass `{ detail: 'summary' }` to get an answer from the last response’s usage and local estimates instead. No token-count requests go out, and the per-category numbers are approximate. The `detail` argument requires Agent SDK v0.3.257 or later. When you send `/context` as a prompt instead of calling the method, Claude Code attaches an `SDKContextUsage` payload to the `context_usage` field of the assistant message that delivers the result. That field requires Agent SDK v0.3.232 or later.
type SDKControlGetContextUsageResponse = {
categories: {
@@ -1311,7 +1318,7 @@
origin?: SDKMessageOrigin;
};
-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.
+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.
###
@@ -3556,7 +3563,7 @@
outputFile: string;
};
-Returns the result from the subagent. Discriminated on the `status` field: `"completed"` for finished tasks, `"async_launched"` for background tasks, and `"remote_launched"` for tasks Claude Code dispatched to a remote cloud session, where `sessionUrl` links to that session and `taskId` identifies it. On the `completed` variant, `resolvedModel` names the model the subagent started on, which can differ from the requested `model` input when [`availableModels`](</docs/en/model-config#restrict-model-selection>) or another override applies. This field requires Claude Code v2.1.174 or later. On `async_launched`, it names the model in use when the task moved to the background. `modelsUsed` lists the models the subagent used, in order. The field is present only when a mid-run swap happened, and a model appears again when the run swapped back to it. On `async_launched`, the list covers the models used before backgrounding. Both `modelsUsed` and the backgrounding behavior of `resolvedModel` require Claude Code v2.1.212 or later. If Claude Code [kept the subagent’s isolated worktree](</docs/en/worktrees#isolate-subagents-with-worktrees>), `worktreePath` on the `completed` result is where to find it. `worktreeBranch` is its branch, present when Claude Code created the worktree with git. Claude Code fills `usage` and `totalTokens` from the subagent’s final API request, not from the whole run, so `usage.service_tier` is the service tier string the API reported on that request. When present, `usage.output_tokens_details.thinking_tokens` is the number of that request’s output tokens that were thinking tokens. The `output_tokens_details` field requires TypeScript SDK v0.3.228 or later, which bundles Claude Code v2.1.228. Before v2.1.207, the published type was narrower. It omitted `worktreePath`, `worktreeBranch`, `citations`, `toolStats.frameCount`, and the `inference_geo`, `speed`, and `iterations` usage fields, and it typed `service_tier` as `"standard" | "priority" | "batch"`. Fields the type marks optional can be absent on results recorded by earlier versions.
+Returns the result from the subagent. Discriminated on the `status` field: `"completed"` for finished tasks, `"async_launched"` for background tasks, and `"remote_launched"` for tasks Claude Code dispatched to a remote cloud session, where `sessionUrl` links to that session and `taskId` identifies it. On the `completed` variant, `resolvedModel` names the model the subagent started on, which can differ from the requested `model` input when [`availableModels`](</docs/en/model-config#restrict-model-selection>) or another override applies. This field requires Claude Code v2.1.174 or later. On `async_launched`, it names the model in use when the task moved to the background. `modelsUsed` lists the models the subagent used, in order. The field is present only when a mid-run swap happened, and a model appears again when the run swapped back to it. On `async_launched`, the list covers the models used before backgrounding. Both `modelsUsed` and the backgrounding behavior of `resolvedModel` require Claude Code v2.1.212 or later. If Claude Code [kept the subagent’s isolated worktree](</docs/en/worktrees#isolate-subagents-with-worktrees>), `worktreePath` on the `completed` result is where to find it. `worktreeBranch` is its branch, present when Claude Code created the worktree with git. Claude Code fills `usage` and `totalTokens` from the subagent’s final API request, not from the whole run, so `usage.service_tier` is the service tier string the API reported on that request. When present, `usage.output_tokens_details.thinking_tokens` is the number of that request’s output tokens that were thinking tokens. The `output_tokens_details` field requires TypeScript SDK v0.3.228 or later, which bundles Claude Code v2.1.228. `usage.output_tokens_details` matches `Usage.output_tokens_details` in meaning, scoped to that final request, but every level of it is optional here. Guard both the object and the field, for example `usage.output_tokens_details?.thinking_tokens ?? 0`, rather than reading it directly. Before v2.1.207, the published type was narrower. It omitted `worktreePath`, `worktreeBranch`, `citations`, `toolStats.frameCount`, and the `inference_geo`, `speed`, and `iterations` usage fields, and it typed `service_tier` as `"standard" | "priority" | "batch"`. Fields the type marks optional can be absent on results recorded by earlier versions.
###
@@ -4785,6 +4792,7 @@
type ModelUsage = {
inputTokens: number;
outputTokens: number;
+ thinkingTokens?: number;
cacheReadInputTokens: number;
cacheCreationInputTokens: number;
webSearchRequests: number;
@@ -4796,7 +4804,7 @@
costBasis?: 'list' | 'managed' | 'unknown';
};
-The `canonicalModel` and `provider` fields require Claude Code v2.1.218 or later. `canonicalModel` is the canonical model ID that the pricing lookup uses; it can differ from the raw model string that keys the entry, for example when that string is a provider-specific ID or an alias. `provider` names the API backend that served the model, such as `firstParty`, `bedrock`, `vertex`, `foundry`, `anthropicAws`, `mantle`, or `gateway`. `costBasis` names the price table that priced the model’s latest request: `list` for list price, `managed` for a [`modelPricing`](</docs/en/settings-reference#modelpricing>) table, or `unknown` when neither matched the model ID. The field requires Claude Code v2.1.246 or later.
+`thinkingTokens` counts the thinking tokens this model generated. `outputTokens` already includes them, so don’t add the two together. The field is absent until a turn runs on a Claude Code version that records it, so a resumed session that began on an earlier version reports a partial count. `thinkingTokens` requires Agent SDK v0.3.257 or later. The `canonicalModel` and `provider` fields require Claude Code v2.1.218 or later. `canonicalModel` is the canonical model ID that the pricing lookup uses; it can differ from the raw model string that keys the entry, for example when that string is a provider-specific ID or an alias. `provider` names the API backend that served the model, such as `firstParty`, `bedrock`, `vertex`, `foundry`, `anthropicAws`, `mantle`, or `gateway`. `costBasis` names the price table that priced the model’s latest request: `list` for list price, `managed` for a [`modelPricing`](</docs/en/settings-reference#modelpricing>) table, or `unknown` when neither matched the model ID. The field requires Claude Code v2.1.246 or later.
###
@@ -4840,9 +4848,15 @@
speed: "standard" | "fast" | null;
inference_geo: string | null;
iterations: BetaIterationsUsage | null;
- };
-
-`BetaServerToolUsage` and `BetaIterationsUsage` are defined in `@anthropic-ai/sdk`.
+ output_tokens_details: BetaOutputTokensDetails | null;
+ };
+
+`BetaServerToolUsage`, `BetaIterationsUsage`, and `BetaOutputTokensDetails` are defined in `@anthropic-ai/sdk`. `output_tokens_details` breaks the billed output down by category. It currently carries one field, `thinking_tokens: number`, counting the output tokens the model generated as internal reasoning, including the thinking-block delimiters. The `output_tokens_details` field requires TypeScript SDK v0.3.228 or later, which bundles Claude Code v2.1.228.
+
+ * **Billing** : read the breakdown for observability, not for billing. `output_tokens` stays the authoritative total, and `output_tokens - thinking_tokens` approximates the non-reasoning output.
+ * **What the count covers** : the raw reasoning the model produced, which can be longer than the thinking text returned in the response body. The API computes it by re-tokenizing that raw text, so it can differ from the model’s exact generation count by a few tokens.
+ * **Streaming** : on streamed assistant messages this breakdown, like `output_tokens`, is a `message_start` placeholder and carries no real count, so read it from the result message’s `usage` as [Read output tokens from the result message](</docs/en/agent-sdk/cost-tracking#read-output-tokens-from-the-result-message>) describes. On the result message, `thinking_tokens` reads `0` when the model or provider reports no breakdown.
+ * **`null` cases**: `output_tokens_details` itself is `null` on assistant messages Claude Code synthesizes, such as API-error messages.
###
@@ -4860,6 +4874,36 @@
structuredContent?: Record<string, unknown>;
isError?: boolean;
};
+
+###
+
+
+
+`SDKMcpResourceLink`
+
+One file an MCP tool returned by reference. Claude Code builds each entry from a `resource_link` block in the tool’s result and delivers the list as `resourceLinks` on `SDKUserMessage.tool_use_result`, or as `resource_links` on `SDKTaskNotificationMessage` when the call finished in the background. Requires Agent SDK v0.3.257 or later.
+
+ type SDKMcpResourceLink = {
+ uri: string;
+ name: string;
+ title?: string;
+ description?: string;
+ mimeType?: string;
+ size?: number;
+ annotations?: Record<string, unknown>;
+ };
+
+Claude Code drops a block whose `uri` or `name` isn’t a string, and leaves out an optional field whose value isn’t of the listed type.
+
+Field| Type| Description
+---|---|---
+`uri`| `string`| URI of the resource, as the server returned it
+`name`| `string`| Name the server gave the resource
+`title`| `string | undefined`| Display title, when the server set one
+`description`| `string | undefined`| Description, when the server set one
+`mimeType`| `string | undefined`| MIME type, when the server set one
+`size`| `number | undefined`| Size in bytes, when the server set one
+`annotations`| `Record<string, unknown> | undefined`| The block’s MCP annotations object, when the server set one
###
@@ -4947,7 +4991,7 @@
* **Servers the call names** : except for built-in servers the CLI started at startup, Claude Code replaces a running server only when its config differs from the one you passed.
* **Built-in servers the CLI started at startup** : if the call names one, Claude Code drops that entry and reports it in `errors`.
-The promise resolves after newly added stdio, HTTP, and SSE servers connect or fail, so tools from servers that connected are available on the next turn.
+The promise resolves after newly added stdio, HTTP, and SSE servers connect or fail, so tools from servers that connected are available on the next turn. `added` lists the servers Claude Code added or replaced, whether or not they connected. A server that failed to connect appears in both `added` and `errors`, with the failure text under `errors` and a `failed` row in `mcpServerStatus()`. Before Claude Code v2.1.257, a server whose connection attempt threw was reported only under `errors`.
###
@@ -5007,11 +5051,12 @@
tool_uses: number;
duration_ms: number;
};
+ resource_links?: SDKMcpResourceLink[];
uuid: UUID;
session_id: string;
};
-Claude Code prepends a notice to every task notification it sends to the model, except deliveries stamped with the `scheduled-trigger` subkind, which carry an assigned-task framing instead. The notice states that no human input has occurred, so the model doesn’t treat the notification as a user instruction or approval. To detect a task-notification turn, check `origin.kind === "task-notification"` on the `SDKUserMessage` or `SDKResultMessage` rather than matching on the notice text. Read `subkind` from the same field if you need to know what raised it. Before v2.1.205, Claude Code left the notice off notifications that arrived while the session was idle.
+When Claude Code [moves a long MCP tool call to the background](</docs/en/mcp#automatic-backgrounding-of-long-tool-calls>), the `tool_result` block for that call holds only a placeholder and the call’s real result arrives in this notification. Match the notification to the call with `tool_use_id`. On a `completed` notification, `resource_links` lists the files the tool returned by reference as `SDKMcpResourceLink` entries, with the same 50-link and 64 KiB limits as `tool_use_result.resourceLinks`. Claude Code omits `resource_links` when the result had no links and on notifications for tasks that aren’t MCP tool calls. `resource_links` requires Agent SDK v0.3.257 or later. Claude Code prepends a notice to every task notification it sends to the model, except deliveries stamped with the `scheduled-trigger` subkind, which carry an assigned-task framing instead. The notice states that no human input has occurred, so the model doesn’t treat the notification as a user instruction or approval. To detect a task-notification turn, check `origin.kind === "task-notification"` on the `SDKUserMessage` or `SDKResultMessage` rather than matching on the notice text. Read `subkind` from the same field if you need to know what raised it. Before v2.1.205, Claude Code left the notice off notifications that arrived while the session was idle.
###
@@ -5120,10 +5165,10 @@
session_id: string;
};
-While a tool call runs in the main conversation, Claude Code emits a `tool_progress` message every 30 seconds with `heartbeat: true`. Each heartbeat carries the tool name and elapsed seconds, so you can distinguish a long-running call from a stalled session. Claude Code doesn’t emit heartbeats for the Agent tool, whose subagents stream their own progress, or for tool calls inside a subagent. The `heartbeat` field requires Agent SDK v0.3.214 or later. On `tool_progress` messages for the Agent tool, `subagent_type` names the running subagent type, such as `general-purpose`. `subagent_retry` is present while that subagent waits out an API error backoff, such as a rate limit or overload, with one message per retry attempt. Both fields require Agent SDK v0.3.214 or later. To render a retry indicator from `subagent_retry`:
+While a tool call runs in the main conversation, Claude Code emits a `tool_progress` message every 30 seconds with `heartbeat: true`. Each heartbeat carries the tool name and elapsed seconds, so you can distinguish a long-running call from a stalled session. Claude Code doesn’t emit heartbeats for tool calls inside a subagent. The `heartbeat` field requires Agent SDK v0.3.214 or later. Before v2.1.257, Claude Code didn’t emit heartbeats for a foreground Agent tool call either. On `tool_progress` messages for the Agent tool other than heartbeats, `subagent_type` names the running subagent type, such as `general-purpose`. `subagent_retry` is present while that subagent waits out an API error backoff, such as a rate limit or overload, with one message per retry attempt. Both fields require Agent SDK v0.3.214 or later. To render a retry indicator from `subagent_retry`:
* Track the indicator by `parent_tool_use_id`, which is unique per subagent. `tool_use_id` is shared by parallel subagents from one assistant turn, so tracking by it would let one subagent’s update clear another’s indicator.
- * Clear the indicator when a later `tool_progress` for the same `parent_tool_use_id` arrives without the field, or when the tool’s result message arrives. `attempt` can exceed `max_retries` under persistent retry, so don’t derive clearing from the counters.
+ * Clear the indicator when a later `tool_progress` for the same `parent_tool_use_id` arrives with neither `subagent_retry` nor `heartbeat: true`, or when the tool’s result message arrives. Frames with `heartbeat: true` report liveness only, so keep the indicator when one arrives. `attempt` can exceed `max_retries` under persistent retry, so don’t derive clearing from the counters.
* Treat `error_category` as a closed set of tokens for choosing your own message text, not as display text: `rate_limit`, `overloaded`, `authentication_failed`, `server_error`, or `unknown`.
###
@@ -5249,7 +5294,7 @@
`SDKThinkingTokensMessage`
-Emitted while Claude is producing a thinking block, including a redacted one, carrying a running estimate of the thinking tokens generated so far. `estimated_tokens` is the running total for the current thinking block and `estimated_tokens_delta` is the increment carried by this frame. Use it for progress display. The final count for the top-level agent loop is the result message’s `usage.output_tokens`, which [doesn’t include subagent tokens](</docs/en/agent-sdk/cost-tracking#get-the-total-cost-of-a-query>); use `modelUsage` for whole-tree accounting. Requires Claude Code v2.1.153 or later.
+Emitted while Claude is producing a thinking block, including a redacted one. `estimated_tokens` is a running estimate of the thinking tokens generated so far in the current block, and `estimated_tokens_delta` is the increment carried by this frame. Use these estimates for progress display. When the model or provider reports a breakdown, the final count for the top-level agent loop is the result message’s `usage.output_tokens_details.thinking_tokens`, which [doesn’t include subagent tokens](</docs/en/agent-sdk/cost-tracking#get-the-total-cost-of-a-query>). Requires Claude Code v2.1.153 or later.
type SDKThinkingTokensMessage = {
type: "system";
--- a/vs-code.md
+++ b/vs-code.md
@@ -90,11 +90,14 @@
* **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.
* **Edit automatically** : Claude makes edits without asking.
- * **Command menu** : click `/` or type `/` to open the command menu. Options include attaching files, switching models, toggling extended thinking, viewing plan usage (`/usage`), and starting a [Remote Control](</docs/en/remote-control>) session (`/remote-control`). The Customize section provides access to MCP servers, hooks, memory, permissions, and plugins. Items with a terminal icon open in the integrated terminal.
- * 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.
+ * **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. The picker includes a **More models** page with the models not on the main list. When the current model supports [effort levels](</docs/en/model-config#adjust-effort-level>), the picker also shows an **Effort** row. The model name button, the **More models** page, 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, slash commands, output styles, hooks, memory, 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.
+ * 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.
+ * 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 flip the toggle, the change applies to the sessions already open in VS Code, not only to sessions you start afterwards. If you turn it off, the open sessions disconnect. Before v2.1.257, the toggle applied only to sessions started after the change.
* 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. 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. 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.
* To report a bug, click **Report a problem** at the bottom of the menu, or type `/bug` or `/feedback` with an optional description that prefills the report. When you submit the report and you’re signed in to Anthropic on a first-party connection, Claude Code sends it to Anthropic. On a third-party provider, or without Anthropic credentials, the dialog still opens, but submitting shows an error and sends nothing: unlike the CLI’s `/bug`, the extension doesn’t write a local archive. Requires Claude Code v2.1.229 or later.
- * **Side questions** : type `/btw` followed by a question, or pick it from the command menu, to ask about your session [without adding to the conversation](</docs/en/interactive-mode#side-questions-with-%2Fbtw>). The answer opens in a panel beside the chat, where you can ask follow-up questions. The thread survives window reloads. Claude Code keeps the newest 20 exchanges and expires stored threads on the [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>) schedule, as long as Claude Code can [safely determine the retention period](</docs/en/claude-directory#cleaned-up-automatically>). To clear a thread, click the trash icon in the panel. Requires Claude Code v2.1.227 or later.
+ * **Side questions** : type `/btw` followed by a question to ask about your session [without adding to the conversation](</docs/en/interactive-mode#side-questions-with-%2Fbtw>). The answer opens in a panel beside the chat, where you can ask follow-up questions. The thread survives window reloads. Claude Code keeps the newest 20 exchanges and expires stored threads on the [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>) schedule, as long as Claude Code can [safely determine the retention period](</docs/en/claude-directory#cleaned-up-automatically>). To clear a thread, click the trash icon in the panel. Requires Claude Code v2.1.227 or later.
* **Context indicator** : the prompt box shows how much of Claude’s context window you’re using. Claude automatically compacts when needed, or you can run `/compact` manually.
* **Extended thinking** : lets Claude spend more time reasoning through complex problems. Toggle it on via the command menu (`/`). Claude’s reasoning appears in the conversation as collapsed blocks: click a block to read it, or press `Ctrl+O` to expand or collapse every thinking block in the session. See [Extended thinking](</docs/en/model-config#extended-thinking>) for details.
* **Multi-line input** : press `Shift+Enter` to add a new line without sending. This also works in the “Other” free-text input of question dialogs.
@@ -118,7 +121,7 @@
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 (Today, Yesterday, Last 7 days, etc.). Click any conversation to resume it with the full message history. New sessions receive AI-generated titles based on your first message. Hover over a session to reveal rename and remove actions: rename to give it a descriptive title, or remove to delete it from the list. For more on resuming sessions, see [Manage sessions](</docs/en/sessions>). When the conversation you resume ended in plan mode, Claude Code restores plan mode. Requires Claude Code v2.1.246 or later. Claude Code doesn’t restore it in two cases:
+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. For more on resuming sessions, see [Manage sessions](</docs/en/sessions>). New sessions receive AI-generated titles based on your first message. Hover over a session to reveal rename and archive actions: rename to give it a descriptive title, or archive to move it to the **Archived sessions** group at the bottom of the list. To restore an archived session, expand **Archived sessions** and click **Unarchive session**. Before v2.1.257, the action was **Delete session** , which hid a session with no way to restore it. Sessions you deleted then appear under **Archived sessions** after you upgrade. When the conversation you resume ended in plan mode, Claude Code restores plan mode. Requires Claude Code v2.1.246 or later. Claude Code doesn’t restore it in two cases:
* The extension [chooses the starting permission mode](</docs/en/permission-modes#switch-permission-modes>) from `claudeCode.initialPermissionMode` or a pick that carries over from an earlier conversation
* You have `claudeCode.claudeProcessWrapper` configured
@@ -157,7 +160,7 @@
Check account and usage
-Run `/usage` from the command menu to open the Account & usage dialog. It shows your signed-in account, plan, and usage bars for the current session and week with how long until each limit resets. The dialog also breaks down what is contributing to your plan limits. It flags behaviors that account for 10% or more of recent usage, such as cache misses, long context, and subagent-heavy or highly parallel sessions, each with a tip to reduce it. Attribution tables show how much usage came from each skill, subagent, plugin, and MCP server. Requires Claude Code v2.1.174 or later. Use the Day and Week toggle to switch between the last 24 hours and the last 7 days. The figures are approximate and computed from local sessions on this machine, so usage from other devices or claude.ai is not included. For more on tracking and reducing usage, see [Track your costs](</docs/en/costs#track-your-costs>).
+Run `/usage` to open the Account & usage dialog. The dialog requires a claude.ai sign-in, so it isn’t offered on a third-party provider. It shows your signed-in account, your plan, and usage bars for the current session and the week. Each bar shows how long until its limit resets. The dialog also breaks down what is contributing to your plan limits. It flags behaviors that account for 10% or more of recent usage, such as cache misses, long context, and subagent-heavy or highly parallel sessions, each with a tip to reduce it. Attribution tables show how much usage came from each skill, subagent, plugin, and MCP server. Requires Claude Code v2.1.174 or later. Use the Day and Week toggle to switch between the last 24 hours and the last 7 days. The figures are approximate and computed from local sessions on this machine, so usage from other devices or claude.ai is not included. For more on tracking and reducing usage, see [Track your costs](</docs/en/costs#track-your-costs>).
##
@@ -199,6 +202,7 @@
* **Group or ungroup a session** : right-click a session to create a group from it, move it into an existing group, or remove it from its group. Each session belongs to one group at a time, so moving it into another group removes it from the first.
* **Move several sessions at once** : `Cmd`-click (Mac) / `Ctrl`-click (Windows/Linux) each session, or `Shift`-click to select a range, then right-click the selection.
+ * **Group a session from its tab** : run **Claude Code: Add Session Tab to Group** from the Command Palette, or right-click the session’s editor tab, then pick or create a group. Requires Claude Code v2.1.257 or later.
* **Rename or delete a group** : right-click a group header. Deleting a group removes only the group, and its sessions return to the ungrouped list.
The extension saves groups per workspace folder, so they survive window reloads and appear in every window where you open the same folder. When you search the list, the extension shows matches in one flat list across all groups.
@@ -289,6 +293,9 @@
Reopen Closed Session| `Cmd+Shift+T` (Mac) / `Ctrl+Shift+T` (Windows/Linux)| Reopen the most recently closed Claude session tab. Falls through to VS Code’s normal reopen-closed-editor when the last closed tab wasn’t a Claude session. Disable with `enableReopenClosedSessionShortcut`
Insert @-Mention Reference| `Option+K` (Mac) / `Alt+K` (Windows/Linux)| Insert a reference to the current file and selection (requires editor to be focused)
Toggle Focus view| `Ctrl+Option+F` (Mac) / `Ctrl+Alt+F` (Windows/Linux)| Hide or show tool activity in the conversation. Works while a Claude panel or sidebar is visible. Requires Claude Code v2.1.221 or later
+Rename Session Tab| -| Rename the session in the active Claude tab. The command also appears in the tab’s right-click menu. Requires Claude Code v2.1.257 or later
+Add Session Tab to Group| -| Add the session in the active Claude tab to a session group you pick or create. The command also appears in the tab’s right-click menu. Requires Claude Code v2.1.257 or later
+Mark Session as Unread| -| Mark the session in the active Claude tab as unread in the sessions list. The command also appears in the tab’s right-click menu. Requires Claude Code v2.1.257 or later
Show Logs| -| View extension debug logs
Logout| -| Sign out of your Anthropic account
@@ -383,7 +390,7 @@
* **Claude’s replies** : the extension announces each reply once, when it’s complete, and stays silent while text streams in. Your screen reader reads code blocks as a line-count summary, reads links by their label, and reads tables cell by cell; the full reply stays readable in the transcript.
* **Permission requests and questions** : the extension announces a request when its permission prompt appears, naming the tool Claude wants to use. It announces in the same way when Claude asks you a question and when Claude finishes a plan and waits for your review.
* **Status changes** : the extension announces when Claude starts working, when Claude is ready for your input, and when Claude Code starts compacting the conversation.
- * **Errors and model prompts** : the extension announces errors in the conversation, and announces when the [usage-credits consent prompt](</docs/en/model-config#fable-5-and-usage-credits>) or the [flagged-request prompt](</docs/en/model-config#ask-before-switching>) appears.
+ * **Errors and model prompts** : the extension announces errors in the conversation, and announces when the [usage-credits consent prompt](</docs/en/model-config#fable-and-usage-credits>) or the [flagged-request prompt](</docs/en/model-config#ask-before-switching>) appears.
Each turn in the transcript starts with a visually hidden heading labeled with the prompt that started the turn, so you can jump between turns with your screen reader’s heading navigation. You can also move focus to the transcript itself with `Tab`, since the extension exposes it as a labeled region, and read it at your own pace. While Claude works, your screen reader reads a text label in place of the progress spinner’s animation. When you reopen a session or switch to another one, the extension announces nothing: restored history, pending permission prompts, and in-progress status stay silent until something new happens.
@@ -510,6 +517,8 @@
These guides cover configuring your provider in `~/.claude/settings.json`, which ensures your settings are shared between the VS Code extension and the CLI.
+On a third-party provider, the extension doesn’t offer features that require a claude.ai account, such as usage tracking, [voice dictation](</docs/en/voice-dictation>), and the Web tab for cloud sessions. A claude.ai sign-in left over from an earlier `/login` stays unused: the extension doesn’t send it with any request.
+
##
--- a/zero-data-retention.md
+++ b/zero-data-retention.md
@@ -35,7 +35,7 @@
What ZDR covers
-ZDR covers model inference calls made through Claude Code on Claude for Enterprise. When you use Claude Code in your terminal, the prompts you send and the responses Claude generates are not retained by Anthropic. This applies to every model available to ZDR organizations. Some models require data retention and are not available under ZDR; see Model availability under ZDR.
+ZDR covers model inference calls made through Claude Code on Claude for Enterprise. When you use Claude Code in your terminal, the prompts you send and the responses Claude generates are not retained by Anthropic. This applies to every model available to your ZDR organization. Some models require data retention by default; see Model availability under ZDR.
###
@@ -78,7 +78,7 @@
Model availability under ZDR
-Claude Fable 5 is not available for organizations with zero data retention enabled. This model class [requires data retention](<https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements>), so requests from ZDR organizations cannot be served by it. The model is either absent from the `/model` picker for ZDR organizations or shown as disabled with a notice that disabling ZDR is required, and the server rejects requests for it regardless of client configuration. Other models remain available under ZDR. Fable 5 is not the default model, and the `best` alias, which resolves to Fable 5 where it is available, resolves to Opus for organizations where it is not, including ZDR organizations.
+Claude Fable 5.1 and Fable 5 are [Covered Models](<https://support.claude.com/en/articles/15425695-covered-models>) that [require data retention](<https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements>) by default, and whether a ZDR organization or workspace can use them is governed by the Covered Models policies rather than by Claude Code. Where your organization can’t use them, the models are either absent from the `/model` picker or shown as disabled, and the server rejects requests for them regardless of client configuration. Other models remain available under ZDR. Fable models are not the default, and the `best` alias, which resolves to the latest Fable model where it is available, resolves to Opus for organizations where it is not.
##