Changes on
41 changes detected
--- a/agent-loop.md
+++ b/agent-loop.md
@@ -11,10 +11,10 @@
1. **Receive prompt.** Claude receives your prompt, along with the system prompt, tool definitions, and conversation history. The SDK yields a `SystemMessage` with subtype `"init"` containing session metadata.
2. **Evaluate and respond.** Claude evaluates the current state and determines how to proceed. It may respond with text, request one or more tool calls, or both. The SDK yields one or more `AssistantMessage` objects, one for each content block, such as a text block or a tool call request.
3. **Execute tools.** The SDK runs each requested tool and collects the results. Each set of tool results feeds back to Claude for the next decision. You can use [hooks](</docs/en/agent-sdk/hooks>) to intercept, modify, or block tool calls before they run.
- 4. **Repeat.** Steps 2 and 3 repeat as a cycle. Each full cycle is one turn. Claude continues calling tools and processing results until it produces a response with no tool calls.
+ 4. **Repeat.** Steps 2 and 3 repeat as a cycle. Claude continues calling tools and processing results until it produces a response with no tool calls.
5. **Return result.** The SDK yields a final `AssistantMessage` with the text response (no tool calls), followed by a `ResultMessage` with the final text, token usage, cost, and session ID.
-A quick question (“what files are here?”) might take one or two turns of calling `Glob` and responding with the results. A complex task (“refactor the auth module and update the tests”) can chain dozens of tool calls across many turns, reading files, editing code, and running tests, with Claude adjusting its approach based on each result.
+A quick question such as “what files are here?” might take two or three turns: one or two calling `Glob`, then one responding with the results. A complex task such as “refactor the auth module and update the tests” can chain dozens of tool calls across many turns as Claude adjusts after each result.
##
@@ -22,7 +22,7 @@
Turns and messages
-A turn is one round trip inside the loop: Claude produces output that includes tool calls, the SDK executes those tools, and the results feed back to Claude automatically. This happens without yielding control back to your code. Turns continue until Claude produces output with no tool calls, at which point the loop ends and the final result is delivered. Consider what a full session might look like for the prompt “Fix the failing tests in auth.ts”. First, the SDK sends your prompt to Claude and yields a `SystemMessage` with the session metadata. Then the loop begins:
+A turn is one pass through the loop: Claude produces output, and if it includes tool calls, the SDK executes them and the results feed back to Claude automatically. This happens without yielding control back to your code. Turns continue until Claude produces output with no tool calls, at which point the loop ends and the final result is delivered. Consider what a full session might look like for the prompt “Fix the failing tests in auth.ts”. First, the SDK sends your prompt to Claude and yields a `SystemMessage` with the session metadata. Then the loop begins:
1. **Turn 1:** Claude calls `Bash` to run `npm test`. The SDK yields an `AssistantMessage` with the tool call, executes the command, then yields a `UserMessage` with the output (three failures).
2. **Turn 2:** Claude calls `Read` on `auth.ts` and `auth.test.ts`. The SDK yields an `AssistantMessage` for each call and returns the file contents.
--- a/anthropic-marketplaces.md
+++ b/anthropic-marketplaces.md
@@ -1,4 +1,4 @@
-Anthropic publishes three general-purpose plugin marketplaces for Claude Code: [official](<https://github.com/anthropics/claude-plugins-official>), [community](<https://github.com/anthropics/claude-plugins-community>), and [demo](<https://github.com/anthropics/claude-code>). Each is a catalog of plugins in its own GitHub repository. When you install a plugin from one of them in a Claude Code session, you type the marketplace’s name after `@`, as in `/plugin install commit-commands@claude-plugins-official`. Use this page to distinguish the three marketplaces and to find where to check whether the official one holds a given plugin.
+Anthropic publishes two general-purpose plugin marketplaces for Claude Code: [official](<https://github.com/anthropics/claude-plugins-official>) and [community](<https://github.com/anthropics/claude-plugins-community>). Each is a catalog of plugins in its own GitHub repository. When you install a plugin from one of them in a Claude Code session, you type the marketplace’s name after `@`, as in `/plugin install commit-commands@claude-plugins-official`. Use this page to distinguish the two marketplaces and to find where to check whether the official one holds a given plugin.
These cases are covered on other pages:
@@ -7,7 +7,7 @@
Go to the part of the page you need:
- * To distinguish the three marketplaces by repository, marketplace name, and how you get each one, see Anthropic’s marketplaces.
+ * To distinguish the two marketplaces by repository, marketplace name, and how you get each one, see Anthropic’s marketplaces.
* To find a plugin in the official marketplace, see Find plugins in the official marketplace.
##
@@ -16,14 +16,14 @@
Anthropic’s marketplaces
-A marketplace is a catalog of plugins that a repository defines in its `.claude-plugin/marketplace.json` file. The official, community, and demo marketplaces each come from their own GitHub repository. Anthropic also publishes topic-specific marketplaces, such as `anthropics/skills` and `anthropics/knowledge-work-plugins`, which you add in a Claude Code session with `/plugin marketplace add <owner>/<repo>`. This table gives each marketplace’s repository and marketplace name, which is what you type after `@` when you install a plugin from that marketplace. The community marketplace’s name is `claude-community`, not its repository name.
+A marketplace is a catalog of plugins that a repository defines in its `.claude-plugin/marketplace.json` file. The official and community marketplaces each come from their own GitHub repository. Anthropic also publishes topic-specific marketplaces, such as `anthropics/skills` and `anthropics/knowledge-work-plugins`, which you add in a Claude Code session with `/plugin marketplace add <owner>/<repo>`. This table gives each marketplace’s repository and marketplace name, which is what you type after `@` when you install a plugin from that marketplace. The community marketplace’s name is `claude-community`, not its repository name.
-| Official| Community| Demo
----|---|---|---
-Repository| [`anthropics/claude-plugins-official`](<https://github.com/anthropics/claude-plugins-official>)| [`anthropics/claude-plugins-community`](<https://github.com/anthropics/claude-plugins-community>)| [`anthropics/claude-code`](<https://github.com/anthropics/claude-code/tree/main/plugins>)
-Marketplace name| `claude-plugins-official`| `claude-community`| `claude-code-plugins`
-What’s in it| Plugins Anthropic maintains, plus plugins from partners and other authors| Third-party plugins that their authors submitted to Anthropic| A small set of example plugins that show what a plugin can contain
-How you get it| Claude Code adds it the first time you start an interactive terminal session, unless a [managed policy](</docs/en/plugins/org#allow-the-official-marketplace-and-your-own>) or `CLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALL` blocks it. See [Marketplace `claude-plugins-official` not found](</docs/en/plugins/troubleshooting#marketplace-claude-plugins-official-not-found>) if it’s missing| You add it in a Claude Code session with `/plugin marketplace add anthropics/claude-plugins-community`| You add it in a Claude Code session with `/plugin marketplace add anthropics/claude-code`
+| Official| Community
+---|---|---
+Repository| [`anthropics/claude-plugins-official`](<https://github.com/anthropics/claude-plugins-official>)| [`anthropics/claude-plugins-community`](<https://github.com/anthropics/claude-plugins-community>)
+Marketplace name| `claude-plugins-official`| `claude-community`
+What’s in it| Plugins Anthropic maintains, plus plugins from partners and other authors| Third-party plugins that their authors submitted to Anthropic
+How you get it| Claude Code adds it the first time you start an interactive terminal session, unless a [managed policy](</docs/en/plugins/org#allow-the-official-marketplace-and-your-own>) or `CLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALL` blocks it. See [Marketplace `claude-plugins-official` not found](</docs/en/plugins/troubleshooting#marketplace-claude-plugins-official-not-found>) if it’s missing| You add it in a Claude Code session with `/plugin marketplace add anthropics/claude-plugins-community`
If you wrote a plugin and want other people to install it, see [Publish a plugin](</docs/en/plugins/publish>), which covers your own marketplace and submitting to Anthropic’s directory.
@@ -31,9 +31,16 @@
-The demo marketplace in `anthropics/claude-code`
+Deprecated `claude-code-plugins` marketplace
-If a tutorial or an older set of instructions tells you to run `/plugin marketplace add anthropics/claude-code`, that adds the demo marketplace, named `claude-code-plugins`. It isn’t the official marketplace. Most of the demo marketplace’s plugins are also in the official marketplace under the same names. For example, `code-review`, `feature-dev`, and `commit-commands` are in both. Install those from `claude-plugins-official` so you don’t have two copies installed.
+The `claude-code-plugins` marketplace in `anthropics/claude-code` is deprecated. To add a plugin, run `claude plugin install <plugin>@claude-plugins-official` in your shell, and skip any tutorial step that runs `/plugin marketplace add anthropics/claude-code`.
+
+Unless you have one of the two plugins below, you can leave your `claude-code-plugins` plugins and the marketplace as they are. They update from the `claude-plugins-official` repository.
+
+ * **`ralph-wiggum`** : this plugin is now `ralph-loop`, and its commands start with `/ralph-loop:`. If those commands aren’t available, run `claude plugin install ralph-loop@claude-plugins-official` in your shell.
+ * **`claude-opus-4-5-migration`** : this plugin is retired, so remove it by running `claude plugin uninstall claude-opus-4-5-migration@claude-code-plugins` in your shell.
+
+If any other plugin stopped working, see [Plugin installed but not working](</docs/en/plugins/troubleshooting#plugin-installed-but-not-working>).
##
@@ -62,14 +69,9 @@
-Add the community or demo marketplace
+Add the community marketplace
-The community and demo marketplaces aren’t registered until you add them in a Claude Code session:
-
- * **Community** : run `/plugin marketplace add anthropics/claude-plugins-community`, then install with the `@claude-community` suffix.
- * **Demo** : run `/plugin marketplace add anthropics/claude-code`, then install with the `@claude-code-plugins` suffix.
-
-If `claude-plugins-official` isn’t on the **Marketplaces** tab of `/plugin`, add it the same way with `/plugin marketplace add anthropics/claude-plugins-official`. For `not found` errors and marketplaces that won’t add, see [Troubleshoot plugins](</docs/en/plugins/troubleshooting#install-a-plugin>).
+The community marketplace isn’t registered until you add it. In a Claude Code session, run `/plugin marketplace add anthropics/claude-plugins-community`, then install with the `@claude-community` suffix. If `claude-plugins-official` isn’t on the **Marketplaces** tab of `/plugin`, add it the same way with `/plugin marketplace add anthropics/claude-plugins-official`. For `not found` errors and marketplaces that won’t add, see [Troubleshoot plugins](</docs/en/plugins/troubleshooting#install-a-plugin>).
##
--- a/api.md
+++ b/api.md
@@ -340,6 +340,7 @@
A recurring job scheduled with a tool such as CronCreate that comes due before the user’s next input| Starts no turn then. The job loses that run and keeps its schedule.| Nothing needed
An event from a monitor your mod started| The monitor keeps running. An event the monitor raises before the user’s next input is dropped, except the notice that the monitor ended, which arrives after that input.| Nothing can be done
A subagent your mod spawned and later resumed with `$.session.send` that finishes before the user’s next input| Its finish notice waits, and reaches the conversation after that input| Nothing needed
+A foreground Bash or PowerShell command from `$.tool.call` that was already running when the user stopped the turn and reaches its timeout before their next input| Stopped at its timeout instead of [moving to the background](</docs/en/tools-reference#foreground-commands-that-move-to-the-background>). The call resolves with `isError` set, and the output includes the line `Ended instead of moving to the background: plugins' input is held, by a Stop or by the host's limits.`| Run it again after the user’s next input, as Retry a refused or dropped call shows
When a scheduled job comes due or a monitor raises an event before the user’s next input, the user can see the [`Stopped:` toast](</docs/en/plugins/mods/troubleshoot#stopped-type-a-message-to-continue>).
--- a/authentication.md
+++ b/authentication.md
@@ -11,7 +11,7 @@
* **API key** : you’ve set the `ANTHROPIC_API_KEY` environment variable and you approve the key when Claude Code asks whether to use it
* **Earlier sign-in** : you ran [`claude auth login`](</docs/en/cli-reference#cli-commands>) in your shell before your first session, or you rebuilt a dev container that keeps your credentials in a [volume](</docs/en/devcontainer#persist-authentication-and-settings-across-rebuilds>). If you see the login prompt anyway, check what can cause it.
-If the browser doesn’t open automatically, press `c` to copy the login URL to your clipboard, then paste it into your browser. If your browser shows a login code instead of redirecting back after you sign in, paste it into the terminal at the `Paste code here if prompted` prompt. This happens when the browser can’t reach Claude Code’s local callback server, which is common in WSL2, SSH sessions, and containers. When login completes, the terminal shows `Login successful` and prompts you to press `Enter` to continue. You can authenticate with any of these account types:
+If the browser doesn’t open automatically, press `c` to copy the login URL to your clipboard, then paste it into your browser. If your browser shows a login code instead of redirecting back after you sign in, paste it into the terminal at the `Paste code here if prompted` prompt. When login completes, the terminal shows `Login successful` and prompts you to press `Enter` to continue. You can authenticate with any of these account types:
* **Claude Pro or Max subscription** : log in with your claude.ai account. Subscribe at [claude.com/pricing](<https://claude.com/pricing?utm_source=claude_code&utm_medium=docs&utm_content=authentication_pro_max>).
* **Claude for Teams or Enterprise** : log in with the claude.ai account your team admin invited you to.
@@ -147,7 +147,8 @@
In practice, the profile stores an OAuth login while an API key is a static credential. Claude Code refreshes the profile’s login automatically, and when refresh fails, requests fail with an [expired profile login error](</docs/en/errors#anthropic-profile-login-expired>) until you sign in again. You don’t get the choice on every machine. Claude Code creates an API key without asking in these cases:
* You run against a cloud provider, such as [Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry](</docs/en/third-party-integrations>) or [Claude Platform on AWS](</docs/en/claude-platform-on-aws>)
- * Any settings file sets `forceLoginOrgUUID`, or sets `forceLoginMethod` to `"claudeai"` or `"console"`
+ * Any settings file sets `forceLoginOrgUUID`, or sets `forceLoginMethod` to `"claudeai"`
+ * `forceLoginMethod` is `"console"` and no settings file sets `forceLoginOrgUUID`, until you retry from the error screen after a failed sign-in
* A managed settings source on your machine, such as the managed settings file, an MDM profile, or the cached server-managed settings, exists but Claude Code [can’t read it](</docs/en/managed-settings#invalid-entries-in-managed-settings>) and no other managed source supplies a policy
Unset `ANTHROPIC_API_KEY` before you sign in without a key. After you sign in without a key, you have a profile instead of a stored API key:
@@ -158,6 +159,18 @@
Everything else about profiles applies to this sign-in, including where it ranks against your other credentials, the `Profile` row you get in `/status`, and the features that need a claude.ai login. See Anthropic profiles and federation credentials.
+####
+
+
+
+Stop offering the keyless sign-in on managed machines
+
+To stop Claude Code offering the keyless sign-in, use your device management tooling to deploy [`forceLoginOrgUUID`](</docs/en/settings-reference#forceloginorguuid>) in [managed settings](</docs/en/managed-settings>) to each developer’s machine. Set it to your [Console organization ID](<https://platform.claude.com/settings/organization>). Before you deploy it, make sure each developer has a role that can create API keys. Once you deploy it, a developer without that role can’t sign in to Console at `/login`. With only `forceLoginMethod` set to `"console"`, developers can retry a failed sign-in and choose the keyless option. Once `forceLoginOrgUUID` is deployed, the login screen drops that option, but developers can still use an Anthropic profile they have or create with [`ant auth login`](<https://platform.claude.com/docs/en/cli-sdks-libraries/cli/authentication>). After you deploy it, handle these credentials and logins on each machine:
+
+ * **Keyless sign-ins** : to move a developer to an API key, have them log out and then log in to Console again, which creates the key. For a keyless sign-in, they run `claude auth logout` in their shell. For an `ant auth login` profile, they run `ant auth logout`. Claude Code refuses the session if a profile and an API key are both on the machine, so they log out first.
+ * **Environment and helper credentials** : Claude Code refuses sessions that authenticate with `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, or `apiKeyHelper`, even when managed settings supply them. Remove those credentials, then have developers run `/login` to create a saved API key.
+ * **claude.ai logins** : Claude Code refuses a login to an organization you haven’t listed, including one already in use on the machine. To keep one, add it to a `forceLoginOrgUUID` array.
+
###
@@ -196,7 +209,7 @@
* **`claude setup-token` and `/install-github-app`**: enforce only `forceLoginMethod`, so they can mint a token in a different organization
* **[Gateway](</docs/en/claude-apps-gateway>) sign-in**: selected by `forceLoginMethod: "gateway"` rather than restricted by it, and doesn’t authenticate against an Anthropic organization, so `forceLoginOrgUUID` doesn’t apply; use your gateway identity provider to restrict access
-Deploy the keys through your device management tooling. [Server-managed settings](</docs/en/server-managed-settings>) reach only accounts that are already authenticated into your organization, so they can’t redirect a developer’s first login. If your organization distributes server-managed settings as well, set the keys in both places: managed-settings sources [don’t merge](</docs/en/server-managed-settings#settings-precedence>), and cached server-managed settings replace the device-managed file apart from a few [per-key exceptions](</docs/en/server-managed-settings#per-key-exceptions-across-managed-sources>). `forceLoginOrgUUID` and the `"claudeai"` and `"console"` values of `forceLoginMethod` aren’t among those exceptions, so keep them in both places. In a [gateway](</docs/en/claude-apps-gateway>) deployment, also keep `forceLoginMethod` and `forceLoginOrgUUID` out of the [settings the gateway serves](</docs/en/claude-apps-gateway-config#managed>). The keys also decide whether a session that doesn’t use a login credential can start. See [`forceLoginOrgUUID`](</docs/en/settings-reference#forceloginorguuid>) in the settings reference for the full behavior.
+Deploy `forceLoginMethod` and `forceLoginOrgUUID` through your device management tooling. A developer receives [server-managed settings](</docs/en/server-managed-settings>) only after authenticating into your organization, so you can’t redirect a first login with those settings. If you also distribute server-managed settings from claude.ai, set both keys there too until every client runs v2.1.299 or later. For where to set the keys afterward, and which source’s value applies, see [Which managed source supplies login keys](</docs/en/managed-settings#which-managed-source-supplies-login-keys>). In a [gateway](</docs/en/claude-apps-gateway>) deployment, also keep `forceLoginMethod` and `forceLoginOrgUUID` out of the [settings the gateway serves](</docs/en/claude-apps-gateway-config#managed>). The keys also decide whether a session that doesn’t use a login credential can start. See [`forceLoginOrgUUID`](</docs/en/settings-reference#forceloginorguuid>) in the settings reference for the full behavior.
* **`ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, or `apiKeyHelper`**: blocked at startup. Under `forceLoginOrgUUID`, organization membership can’t be verified for an environment credential, and under `forceLoginMethod` the credential would stand in for the required sign-in. When the managed settings also require the [gateway](</docs/en/claude-apps-gateway>) sign-in, Claude Code blocks an API key saved by an earlier Claude Console login the same way. See [Administrator policy requires a Cloud gateway sign-in](</docs/en/errors#administrator-policy-requires-a-cloud-gateway-sign-in>)
* **Cloud provider sessions such as Amazon Bedrock** : blocked only while an `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, or `apiKeyHelper` credential, or an API key saved by an earlier Claude Console login, is still present on the machine. Remove it and the session starts. These sessions authenticate against your cloud provider, whose access policies govern them
modified
Claude apps gateway for Amazon Bedrock, Claude Platform on AWS, Google Cloud, and Microsoft Foundry
View current →
--- a/claude-apps-gateway.md
+++ b/claude-apps-gateway.md
@@ -404,7 +404,7 @@
These parent-supplied settings pass the filter even with all five locks set:
- * **`forceLoginOrgUUID`** : Claude Code honors a parent-supplied value when the highest-priority admin source doesn’t set an org UUID. Gateway sign-in doesn’t check this key. An org UUID in the highest-priority admin source blocks the parent’s value and is the one Claude Code enforces.
+ * **`forceLoginOrgUUID`** : Claude Code honors a parent-supplied value when the managed settings it applies don’t set an org UUID. Gateway sign-in doesn’t check this key. An org UUID in the managed settings Claude Code applies blocks the parent’s value and is the org UUID Claude Code enforces. If your fleet pins an Anthropic organization, see [Which managed source supplies login keys](</docs/en/managed-settings#which-managed-source-supplies-login-keys>) for where to set `forceLoginOrgUUID`.
* **`allowedMcpServers`** : Claude Code honors a parent-supplied allowlist when no admin list is in force. `allowManagedMcpServersOnly` doesn’t block it, because the lock enforces whichever list wins as the managed value, including a parent-supplied one when no admin source supplies a list. A list in the highest-priority admin source blocks the parent’s and is the list Claude Code enforces, so set `allowedMcpServers` there, next to the lock. Before v2.1.223, a value for either key in any admin source blocked the parent’s.
* **`availableModels`** : Claude Code honors a parent-supplied model list when the winning managed source doesn’t set one. If your fleet restricts models, set `availableModels` in the winning source.
* **`allowedProviders`** : Claude Code honors a parent-supplied API provider allowlist when the winning managed source doesn’t set one. If your fleet restricts which API providers developers can use, set `allowedProviders` in the winning source. Requires Claude Code v2.1.285 or later.
@@ -412,7 +412,7 @@
* **`blockedMarketplaces`** : a parent-supplied marketplace blocklist passes and adds to any blocklist that a managed source sets, since a blocklist can only restrict further. Requires Claude Code v2.1.282 or later.
* **`strictPluginOnlyCustomization`** : this key passes the filter regardless of any lock, and it makes Claude Code ignore the developer’s own customization, including protective hooks. No lock blocks it.
-Under the default first-wins setting, an admin value blocks the parent’s only when it sits in the highest-priority admin source, except for `allowedMcpServers` while the MCP server lock is on. Under the `managedSourcesBehavior` merge opt-in, [how Claude Code combines managed sources](</docs/en/managed-settings#how-claude-code-combines-managed-sources>) says which source’s value applies instead.
+If you set `managedSourcesBehavior` to `"merge"`, check [which source’s value applies for each kind of key](</docs/en/managed-settings#compose-every-managed-source>).
####
--- a/claude-apps-gateway-config.md
+++ b/claude-apps-gateway-config.md
@@ -400,7 +400,7 @@
This example gives one model a custom id that only the isolated upstream serves:
models:
- - id: claude-opus-restricted # a custom id, not a built-in model name
+ - id: restricted-claude-opus-4-8 # a custom id, not a built-in model name
upstream_model:
bedrock-isolated: us.anthropic.claude-opus-4-8 # the only upstream that serves it
@@ -579,7 +579,12 @@
Multiple upstreams
-The same provider can appear more than once with a distinct `name:`. This covers different regions, different accounts via different credential chains, provisioned throughput versus on-demand, and cross-provider fallback. The gateway tries upstreams in order. `5xx`, `429`, `401`, `403`, `404`, timeouts, and missing-endpoint (`501`) fail over; other `4xx` doesn’t. `429` is per-upstream capacity, so provisioned-throughput (PT) exhaustion fails over to on-demand. If you set `forward_user_identity: true` on an upstream, a `429` to a request that carried the developer’s email is a per-user denial instead and doesn’t fail over. Every request starts at the first upstream. A request reaches a later upstream only when every upstream ahead of it has failed or doesn’t serve the requested model. The gateway keeps no record of failed upstreams, so while an upstream is down, every request that reaches it still tries it and waits for it to fail before moving on. For an Anthropic API upstream, `timeouts.upstream_ttfb_ms` bounds the wait on a down upstream. That setting doesn’t apply to the other providers, where the gateway waits up to one hour for an upstream to start responding. `404` is per-upstream model availability, so an upstream that hasn’t enabled a model doesn’t block a later upstream that serves it. An upstream that can’t resolve the requested model is skipped without a network round-trip. This example routes a provisioned-throughput Amazon Bedrock allotment first, overflows to on-demand and a second account, and falls back to the Anthropic API last:
+The same provider can appear more than once with a distinct `name:`. This covers different regions, different accounts via different credential chains, provisioned throughput versus on-demand, and cross-provider fallback. The gateway tries upstreams in order. `5xx`, `429`, `401`, `403`, `404`, timeouts, and missing-endpoint (`501`) fail over; other `4xx` doesn’t. `429` is per-upstream capacity, so provisioned-throughput (PT) exhaustion fails over to on-demand. If you set `forward_user_identity: true` on an upstream, a `429` to a request that carried the developer’s email is a per-user denial instead and doesn’t fail over. Every request starts at the first upstream. A request reaches a later upstream only when every upstream ahead of it has failed or doesn’t serve the requested model. The gateway keeps no record of failed upstreams, so while an upstream is down, every request that reaches it still tries it and waits for it to fail before moving on. The gateway waits this long for a response to start:
+
+ * **`provider: anthropic` upstreams**: `timeouts.upstream_ttfb_ms`, 120 seconds by default
+ * **Other providers** : up to one hour. To shorten that wait for streaming requests, set `timeouts.upstream_ttfb_ms` on gateway v2.1.295 or later. Non-streaming model requests wait up to one hour either way
+
+`404` is per-upstream model availability, so an upstream that hasn’t enabled a model doesn’t block a later upstream that serves it. An upstream that can’t resolve the requested model is skipped without a network round-trip. This example routes a provisioned-throughput Amazon Bedrock allotment first, overflows to on-demand and a second account, and falls back to the Anthropic API last:
upstreams:
# Primary: provisioned throughput in your home region.
@@ -824,9 +829,11 @@
policies:
- match: { groups: [restricted-projects] }
cli:
- availableModels: [claude-opus-restricted]
+ availableModels: [restricted-claude-opus-4-8]
enforceAvailableModels: true
- model: claude-opus-restricted
+ model: restricted-claude-opus-4-8
+ env:
+ ANTHROPIC_DEFAULT_OPUS_MODEL: restricted-claude-opus-4-8 # opus and Default resolve to the ID too
####
@@ -1060,7 +1067,11 @@
##### Keys that need a later gateway or Claude Desktop version
-The gateway validates a `desktop` block against the schema bundled with its installed version, as it does the `cli` block. To deliver a setting introduced by a newer Claude Desktop release, upgrade the gateway first. For example, `userPluginMarketplacesEnabled` and `userPluginUploadsEnabled` need Claude Code v2.1.260 or later on the gateway server and Claude Desktop 1.37937.0 or later on members’ machines. `blockReadsOutsideWorkingDirectories`, `disableBypassPermissionsMode`, `configRecheckIntervalMinutes`, and `sshClientPath` need Claude Code v2.1.281 or later on the gateway server. So do the `required` value of `microsoftAuthBroker` and the `continuousAccessEvaluation` field of a Microsoft 365 `managedMcpServers` entry. Claude Desktop releases that predate the `required` value read it as `disabled`, so set `required` only after every member’s Claude Desktop supports it. Claude Desktop’s [managed configuration reference](<https://claude.com/docs/third-party/claude-desktop/configuration>) lists the release that first reads each key. If you set `orgPluginSettings` in a policy’s `desktop` block, the gateway serves it in the array form that Claude Desktop 1.15200.0 and later reads. Older desktops ignore the array and enforce no plugin tool policy, so update members to 1.15200.0 or later before you rely on it.
+The gateway validates a `desktop` block against the schema bundled with its installed version, as it does the `cli` block. To deliver a setting introduced by a newer Claude Desktop release, upgrade the gateway first. For example, `userPluginMarketplacesEnabled` and `userPluginUploadsEnabled` need Claude Code v2.1.260 or later on the gateway server and Claude Desktop 1.37937.0 or later on members’ machines. `blockReadsOutsideWorkingDirectories`, `disableBypassPermissionsMode`, `configRecheckIntervalMinutes`, and `sshClientPath` need Claude Code v2.1.281 or later on the gateway server. So do the `required` value of `microsoftAuthBroker` and the `continuousAccessEvaluation` field of a Microsoft 365 `managedMcpServers` entry. Claude Desktop releases that predate the `required` value read it as `disabled`, so set `required` only after every member’s Claude Desktop supports it. Claude Desktop’s [managed configuration reference](<https://claude.com/docs/third-party/claude-desktop/configuration>) lists the release that first reads each key.
+
+[`sshTransport`](<https://claude.com/docs/third-party/claude-desktop/configuration#sshtransport>) needs Claude Code v2.1.293 or later on the gateway server.
+
+If you set `orgPluginSettings` in a policy’s `desktop` block, the gateway serves it in the array form that Claude Desktop 1.15200.0 and later reads. Older desktops ignore the array and enforce no plugin tool policy, so update members to 1.15200.0 or later before you rely on it.
##### How a role policy inherits the base `desktop` block
@@ -1270,7 +1281,7 @@
`limits`| `max_request_bytes`| 32 MiB| Max inbound request body; oversize requests get `413` before the body is buffered. Raise for large file or image requests.
`limits`| `max_request_header_bytes`| unset| Lowers the gateway’s 256 KiB limit on a request’s total headers. A request over the limit returns `431`, and a value above 256 KiB has no effect. If developers get `431` after signing in, see [Request headers too large after sign-in](</docs/en/claude-apps-gateway-deploy#request-headers-too-large-after-sign-in>).
`limits`| `max_url_length`| unset| When set, an over-long URL returns `414`
-`timeouts`| `upstream_ttfb_ms`| 120000| Max wait for the upstream’s response headers (time to first byte). The response body then streams with no wall-clock cap. Applies to the direct Anthropic upstream path; on every other provider the gateway waits up to one hour for the response to start.
+`timeouts`| `upstream_ttfb_ms`| 120000| Max wait for the upstream’s response headers (time to first byte). The response body then streams with no wall-clock cap. If the key is unset, the default applies to `provider: anthropic` upstreams, and on every other provider the gateway waits up to one hour for the response to start. To shorten that wait, see Multiple upstreams.
`rate_limits`| `device_authorization.max` / `.window_seconds`| 30 / 600| Per-IP rate limit on the unauthenticated device-authorization endpoint. Raise for a large org behind a shared egress IP or NAT. [Large rollouts](</docs/en/claude-apps-gateway-deploy#large-rollouts>) shows how to size it. These limits apply only to the device-grant sign-in flow, not to `/v1/messages` inference. See [User-code brute-force resistance](</docs/en/claude-apps-gateway-deploy#user-code-brute-force-resistance>).
`rate_limits`| `device_verify.max` / `.window_seconds`| 10 / 600| Per-IP rate limit on `user_code` submissions at `/device`. It is what stops someone from guessing another developer’s code. [Large rollouts](</docs/en/claude-apps-gateway-deploy#large-rollouts>) shows how far to raise it.
--- a/claude-code-on-the-web.md
+++ b/claude-code-on-the-web.md
@@ -214,7 +214,7 @@
Teleport requires claude.ai subscription authentication. Find the case that matches yours:
- * **You’re authenticated via API key** : run `/login` to sign in with your claude.ai account instead
+ * **You’re signed in with an API key or Console account** : run `claude auth login` in your shell, then sign in with claude.ai
* **The error names your provider** : cloud sessions aren’t available through third-party providers. See the error table
* **You’re already signed in via claude.ai** : your organization may have disabled cloud sessions
@@ -495,10 +495,11 @@
Unable to get organization UUID
-`claude --cloud` and `claude --teleport` require sign-in with a claude.ai account. If you authenticate with an API key, or your stored account details are stale, you see one of these:
+`claude --cloud` and `claude --teleport` require sign-in with a claude.ai account. If you authenticate with an API key or a Console sign-in instead, or your stored account details are stale, you see a message such as:
* `Unable to get organization UUID`
* `Cloud sessions need a claude.ai sign-in. Run `claude auth login` (or /login in a local session), then try again.`
+ * `Cloud sessions aren't available with this Console sign-in. They need a claude.ai sign-in. Run `claude auth login` (or /login in a local session), then try again.`
* `Error loading Claude Code sessions` in the session picker, when you run `claude --teleport` without a session ID
Run [`claude auth login`](</docs/en/cli-reference#cli-commands>) in your shell to sign in with your claude.ai account, then retry the command. Inside a running session, `/login` does the same. If the error names your provider instead, see the error table: cloud sessions aren’t available through third-party providers. From v2.1.274 through v2.1.289, the sign-in message read `Claude Code cloud sessions require authentication with a Claude.ai account. API key authentication is not sufficient. Please run /login to authenticate, or check your authentication status with /status.`
--- a/claude-directory.md
+++ b/claude-directory.md
@@ -1,4 +1,4 @@
-Claude Code reads instructions, settings, skills, subagents, and memory from your project directory and from `~/.claude` in your home directory. Commit project files to git to share them with your team; files in `~/.claude` are personal configuration that applies across all your projects. On Windows, `~/.claude` resolves to `%USERPROFILE%\.claude`. If you set [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>), every `~/.claude` path on this page lives under that directory instead. Most users only edit `CLAUDE.md` and `settings.json`. If your repository already has an `AGENTS.md` for other coding agents, Claude Code [can read that](</docs/en/memory#agents-md>) in place of a `CLAUDE.md`. The rest of the directory is optional: add skills, rules, or subagents as you need them.
+Claude Code reads instructions, settings, skills, subagents, and memory from your project directory and from `~/.claude` in your home directory. Commit project files to git to share them with your team; files in `~/.claude` are personal configuration that applies across all your projects. On Windows, `~/.claude` resolves to `%USERPROFILE%\.claude`. If you set [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>), every `~/.claude` path on this page lives under that directory instead. The same applies to `.claude.json`, which otherwise sits at `~/.claude.json`. Most users only edit `CLAUDE.md` and `settings.json`. If your repository already has an `AGENTS.md` for other coding agents, Claude Code [can read that](</docs/en/memory#agents-md>) in place of a `CLAUDE.md`. The rest of the directory is optional: add skills, rules, or subagents as you need them.
##
@@ -78,7 +78,7 @@
`agents/*.md`| Project and global| ✓| Subagent definitions with their own prompt and tools| [Subagents](</docs/en/sub-agents>)
`workflows/*.js`| Project and global| ✓| Dynamic workflow scripts written by Claude and saved from `/workflows`; each file becomes a `/<name>` command| [Dynamic workflows](</docs/en/workflows>)
`agent-memory/<name>/`| Project and global| ✓| Persistent memory for subagents| [Persistent memory](</docs/en/sub-agents#enable-persistent-memory>)
-`~/.claude.json`| Global only| | App state, account details, UI toggles, personal MCP servers| [Global config](</docs/en/settings-reference#global-config-settings>)
+`~/.claude.json`| Global only| | App state, account details, UI toggles, personal MCP servers. If it’s missing, Claude Code creates it when you start a session or run a subcommand such as `claude auth status`, but not for `--version` or `--help`.| [Global config](</docs/en/settings-reference#global-config-settings>)
`projects/<project>/memory/`| Global only| | Auto memory: Claude’s notes to itself across sessions| [Auto memory](</docs/en/memory#auto-memory>)
`keybindings.json`| Global only| | Custom keyboard shortcuts| [Keybindings](</docs/en/keybindings>)
`themes/*.json`| Global only| | Custom color themes| [Custom themes](</docs/en/terminal-config#create-a-custom-theme>)
--- a/cloud-environments.md
+++ b/cloud-environments.md
@@ -95,10 +95,9 @@
These requirements decide whether you can add a secret and whether the agent proxy can use it once added:
- * **Role** : on Pro, Max, and Team plans, you can add and delete secrets on your own environments whatever your role. On Team and Enterprise, Owners hold an organization admin role in your claude.ai organization and Admins don’t, which changes what you see in these cases:
- * **Your own environment on Enterprise** : with an organization admin role, you add and delete secrets. Without it, the **Network secrets** row opens the secrets list with the note “Only an organization admin can add or delete network secrets” and no **Add secret** or delete button. Ask an Owner to add the secret to a shared environment, then run your sessions there
+ * **Role** : on every plan, you can add and delete secrets on your own environments whatever your role. On Team and Enterprise, Owners hold an organization admin role in your claude.ai organization and Admins don’t, which changes what you see in these cases:
+ * **Your own environment** : without an organization admin role, **Add secret** opens a shorter form
* **A shared environment** : Owners add and delete its secrets from admin settings. Without an organization admin role, ask an Owner to add the secret, because the environment’s dialog has no **Network secrets** section
- * **Your own environment on Team** : without an organization admin role, **Add secret** opens a shorter form that takes one host
* **Environment type** : an Anthropic-hosted cloud environment that already exists. A [self-hosted environment](</docs/en/self-hosted-environments>) doesn’t have network secrets
* **API reachability** : the API accepts connections from the internet, because requests leave from Anthropic’s network
* **Encryption keys** : if your organization uses customer-managed encryption keys, you can’t save network secrets
@@ -109,7 +108,7 @@
Add a secret
-You add secrets one at a time. To change a secret’s hosts or value, delete it and add it again. To add a secret to a shared environment, open it for editing from the **Cloud environments** page in [admin settings](<https://claude.ai/admin-settings>), then continue from step 2 in its **Network secrets** section. If you’re on a Team plan and don’t hold an organization admin role, follow step 1 on your own environment, then fill in the shorter form.
+You add secrets one at a time. To change a secret’s hosts or value, delete it and add it again. To add a secret to a shared environment, open it for editing from the **Cloud environments** page in [admin settings](<https://claude.ai/admin-settings>), then continue from step 2 in its **Network secrets** section. If you’re on a Team or Enterprise plan and don’t hold an organization admin role, follow step 1 on your own environment, then fill in the shorter form.
1
@@ -141,9 +140,9 @@
-Add a secret on a Team plan without an organization admin role
-
-If you’re on a Team plan and don’t hold an organization admin role, the **Add secret** form takes one secret for one host. Select your environment’s **Network secrets** row and then **Add secret**. Fill in these fields and select the form’s **Add secret** button:
+Add a secret without an organization admin role
+
+If you’re on a Team or Enterprise plan and don’t hold an organization admin role, the **Add secret** form takes one secret for one host. Select your environment’s **Network secrets** row and then **Add secret**. Fill in these fields and select the form’s **Add secret** button:
* **Host** : the one host that gets the secret, such as `api.example.com`. The form doesn’t accept a `*.` wildcard
* **Name** : an optional label for the secret
--- a/corporate-launcher.md
+++ b/corporate-launcher.md
@@ -28,7 +28,7 @@
The following processes don’t start through the launcher:
* A session you start yourself in a terminal, which runs however you invoked it. To cover these sessions, put a script named `claude` in a directory earlier on `PATH` that runs your launcher with the real binary; don’t replace the managed symlink. The background service and its sessions start without a `PATH` lookup, so the two launchers don’t stack there.
- * The first process of a `claude-cli://` deep link, which the operating system’s protocol handler starts directly. Everything that session starts in the background afterward runs through the launcher. To close this path entirely, [prevent handler registration](</docs/en/deep-links#registration-and-supported-platforms>) with the `disableDeepLinkRegistration` setting.
+ * A session opened from a `claude-cli://` deep link, which starts in a new terminal without your launcher. To prevent deep links from opening sessions for a new user, set [`disableDeepLinkRegistration`](</docs/en/settings-reference#disabledeeplinkregistration>) to `"disable"` before that user first runs Claude Code. For a user who already has a [registered handler](</docs/en/deep-links#registration-and-supported-platforms>), deep links keep opening sessions, because the setting doesn’t remove the handler.
* The relaunch that `--worktree` combined with `--tmux` performs: the terminal multiplexer starts that pane, not Claude Code’s binary.
* The native-messaging host that [Claude in Chrome](</docs/en/chrome>) registers: the browser starts it, not Claude Code’s binary.
--- a/create.md
+++ b/create.md
@@ -408,4 +408,4 @@
* [Plugin structure and testing](<https://claude.com/docs/plugins/build>): the same plugin folder installs on claude.ai and in Cowork. Some components are Claude Code-only, and the [component support table](<https://claude.com/docs/plugins/platform-support#compare-component-support-by-app>) lists which load on each surface
* [Plugin manifest reference](</docs/en/plugins/manifest-reference>): every `plugin.json` field, path rule, and directory
* [Skills](</docs/en/skills>): write the skills your plugin provides
- * [Anthropic’s plugins in the claude-code repository](<https://github.com/anthropics/claude-code/tree/main/plugins>): complete worked examples of the layout on this page, such as `feature-dev` and `code-review`
+ * [Anthropic’s plugins in the claude-plugins-official repository](<https://github.com/anthropics/claude-plugins-official/tree/main/plugins>): complete worked examples of the layout on this page, such as `feature-dev` and `code-review`
--- a/create-marketplace.md
+++ b/create-marketplace.md
@@ -234,7 +234,7 @@
Host your marketplace
-Once you can install a plugin from the marketplace on your own machine, as in Create a marketplace, push the marketplace directory to a git host. Your teammates then run `claude plugin marketplace add <owner>/<repo>` in their shell for a GitHub repository, or the same command with the repository URL. They then install a plugin by name as in the walkthrough. For private-repository access, updates, versioning, and renaming or removing entries, see [Host and maintain a marketplace](</docs/en/plugins/host-marketplace>).
+Once you can install a plugin from the marketplace on your own machine, as in Create a marketplace, push the marketplace directory to a git host. Before you push, give the marketplace a top-level `name` that other authors are unlikely to pick, because a user [can’t have two marketplaces with the same name](</docs/en/plugins/marketplace-reference#marketplace-file>). Your teammates then run `claude plugin marketplace add <owner>/<repo>` in their shell for a GitHub repository, or the same command with the repository URL. They then install a plugin by name as in the walkthrough. For private-repository access, updates, versioning, and renaming or removing entries, see [Host and maintain a marketplace](</docs/en/plugins/host-marketplace>).
##
--- a/deep-links.md
+++ b/deep-links.md
@@ -1,4 +1,4 @@
-A deep link is a `claude-cli://` URL that opens Claude Code in a new terminal window. The URL can carry a working directory and a prompt to pre-fill. This lets you share a one-click starting point for a task: anyone with Claude Code installed who clicks the link sees a session open with the prompt already typed. The prompt is populated but not sent until you press Enter. Because a deep link is a URL, you can put one anywhere a link can go:
+A deep link is a `claude-cli://` URL that opens Claude Code in a new terminal window. The URL can carry a working directory and a prompt to pre-fill. The prompt is populated but not sent until you press Enter. To make links open on a machine, first send a prompt in an interactive Claude Code session there, so that Claude Code registers its `claude-cli://` handler. Because a deep link is a URL, you can put one anywhere a link can go:
* An incident runbook step that opens the affected service’s repo with a diagnostic prompt
* A monitoring alert or dashboard that links to an investigation prompt for a specific metric
@@ -94,7 +94,7 @@
2. [Open Claude Code in the gateway repo](claude-cli://open?repo=acme/web-gateway&q=5xx%20rate%20is%20elevated%20on%20web-gateway.%20Check%20recent%20deploys%2C%20error%20logs%20from%20the%20last%2030%20minutes%2C%20and%20open%20incidents%20in%20Linear.)
3. Post initial findings in #incident.
-To use this in your own runbook, replace `acme/web-gateway` with your service’s repository slug. This allows engineers with Claude Code installed and a local clone of that repository to click step 2 and start investigating with the prompt ready to send.
+To use this in your own runbook, replace `acme/web-gateway` with your service’s repository slug. Before engineers click step 2, they must have sent a prompt in an interactive Claude Code session on their machine and opened Claude Code in their local clone.
###
--- a/desktop.md
+++ b/desktop.md
@@ -35,7 +35,7 @@
Before you send your first message, choose the environment, project folder, permission mode, and model in the row under the prompt box:
* **Environment** : use the environment selector, the first control in the row, to choose where Claude runs. See environment configuration.
- * If a new session has no environment selector under the prompt box, follow the earlier layout’s steps.
+ * If a new session shows no environment under the prompt box, follow the earlier layout’s steps.
* **Project folder** : click the project folder control, next to the environment selector, to choose the folder Claude works in.
* **Cloud session** : select repositories instead of a folder
* **Saved local or SSH environment** : the environment already holds its folders, so the row shows no project folder control. To change the folders, edit the environment.
@@ -969,7 +969,7 @@
Add the variables to a saved local environment and start your sessions from it. Desktop sets some variables itself, such as `API_TIMEOUT_MS`, and your sessions get its value for those instead of yours.
-If your environment selector is above the prompt box, you have the earlier layout, which has no saved local environments. Use the local environment editor instead.
+If a new session shows no environment under the prompt box, you have the earlier layout, which has no saved local environments. Use the local environment editor instead.
1
@@ -1111,7 +1111,7 @@
If you use Desktop with a [third-party provider](</docs/en/third-party-integrations>), SSH sessions need their own setup. See [SSH remote sessions in Claude Desktop on 3P](<https://claude.com/docs/third-party/claude-desktop/ssh-remote-sessions>).
-Add an SSH connection in the **New environment** dialog, then start a session on that connection. If a new session has no environment selector under the prompt box, you have the earlier layout. See Check which layout you have.
+Add an SSH connection in the **New environment** dialog, then start a session on that connection. If a new session shows no environment under the prompt box, you have the earlier layout. See Check which layout you have.
1
@@ -2278,13 +2278,13 @@
Check which layout you have
-If a new session has no environment selector under the prompt box, you have the earlier layout:
+If a new session shows the environment above the prompt box instead of under it, you have the earlier layout:
* **Desktop older than v2.37337.0** : update to get the current layout. Select **Claude > Check for Updates…** on macOS or **Help > Check for Updates…** on Windows.
* **[Third-party provider](</docs/en/third-party-integrations>) with sessions on your computer**: the current layout requires Claude Desktop v3.1623.0 or later, so check your version. To update, select **Claude > Check for Updates…** on macOS or **Help > Check for Updates…** on Windows. If your organization turns off auto-updates, **Check for Updates…** is hidden, so ask your administrator for v3.1623.0 or later.
- * **Third-party provider with sessions on your organization’s infrastructure** : when your organization runs sessions on its own infrastructure rather than on your computer, Desktop keeps the earlier layout, and updating doesn’t change the layout. If you don’t know where your sessions run, ask your administrator.
-
-In the earlier layout, choose the environment and project folder above the prompt box, and the permission mode and model in the row under it. The earlier layout lacks the session details panel and saved local and SSH environments.
+ * **Third-party provider with sessions on your organization’s infrastructure** : the current layout requires Claude Desktop v4.29.0 or later, so check your version. If you’re on an older version, ask your administrator for v4.29.0 or later. If you don’t know where your sessions run, ask your administrator.
+
+In the earlier layout, choose the environment and any project folder or repository above the prompt box, and the permission mode and model in the row under it. The earlier layout lacks the session details panel and saved local and SSH environments.
###
--- a/desktop-quickstart.md
+++ b/desktop-quickstart.md
@@ -57,7 +57,7 @@
Choose an environment and folder
-In the [row under the prompt box](</docs/en/desktop#start-a-session>), click the first control, the environment selector, and select the top entry in the **Local** group. Then click the project folder control beside the environment selector, select **Open folder…** , and choose your project’s directory.If no environment selector appears under your prompt box, you have the earlier layout. See [Check which layout you have](</docs/en/desktop#check-which-layout-you-have>).
+In the [row under the prompt box](</docs/en/desktop#start-a-session>), click the first control, the environment selector, and select the top entry in the **Local** group. Then click the project folder control beside the environment selector, select **Open folder…** , and choose your project’s directory.If a new session shows no environment under your prompt box, you have the earlier layout. See [Check which layout you have](</docs/en/desktop#check-which-layout-you-have>).
Start with a small project you know well. It’s the fastest way to see what Claude Code can do.
--- a/devcontainer.md
+++ b/devcontainer.md
@@ -52,7 +52,7 @@
For cloud providers, pass credentials into the container as environment variables through `containerEnv`, a Codespaces secret, or your cloud’s workload identity rather than mounting credential files from the host. See [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), or [Microsoft Foundry](</docs/en/microsoft-foundry>) for the credential chain Claude Code reads. See [Choose your API provider](</docs/en/admin-setup#choose-your-api-provider>) to decide which path fits your organization.
-If the browser sign-in completes but the callback never reaches the container, copy the code shown in the browser and paste it at the `Paste code here if prompted` prompt in the terminal. This can happen when the editor’s port forwarding doesn’t route the localhost callback.
+For the Anthropic sign-in: if no browser opens, or it signs you in and then shows a `localhost` connection error, use the login URL shown above the terminal’s paste prompt. Copy it into your browser, sign in there, then paste the code the browser shows into that prompt. If pasting does nothing, see [OAuth login fails in WSL2, SSH, or containers](</docs/en/troubleshoot-install#oauth-login-fails-in-wsl2-ssh-or-containers>).
##
--- a/env-vars.md
+++ b/env-vars.md
@@ -215,7 +215,7 @@
`CLAUDE_CODE_DISABLE_ATTACHMENTS`| Set to `1` to disable attachment processing. File mentions with `@` syntax are sent as plain text instead of being expanded into file content. Ignored in [project and local settings](</docs/en/settings-reference#variables-claude-code-ignores-in-env>)
`CLAUDE_CODE_DISABLE_AUTH_REFRESH_LOCK`| Set to `1` to make a Claude Code process run its [`gcpAuthRefresh`](</docs/en/settings-reference#gcpauthrefresh>) or [`awsAuthRefresh`](</docs/en/settings-reference#awsauthrefresh>) command itself instead of waiting while another process runs it. Requires Claude Code v2.1.286 or later
`CLAUDE_CODE_DISABLE_AUTO_MEMORY`| Set to `1` to disable [auto memory](</docs/en/memory#auto-memory>). Set to `0` to force auto memory on even when `--bare` mode or [`autoMemoryEnabled: false`](</docs/en/settings-reference#automemoryenabled>) would otherwise disable it. When disabled, Claude does not create or load auto memory files
-`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`| Set to `1` to remove the `run_in_background` parameter from the Bash, PowerShell, and subagent tools and to turn off the Ctrl+B shortcut and background runs of [forked skills](</docs/en/skills#run-skills-in-a-subagent>). Claude Code then also stops moving subagents, long MCP tool calls, and timed-out shell commands to the background automatically. [MCP tasks](</docs/en/mcp#make-claude-wait-for-the-result-of-an-mcp-task>) and the [Monitor tool](</docs/en/tools-reference#monitor-tool>) still run in the background
+`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`| Set to `1` to remove the `run_in_background` parameter from the Bash, PowerShell, and subagent tools and to turn off the Ctrl+B shortcut and background runs of [forked skills](</docs/en/skills#run-skills-in-a-subagent>). Claude Code then also stops moving subagents, long MCP tool calls, and timed-out shell commands to the background automatically. [MCP tasks](</docs/en/mcp#make-claude-wait-for-the-result-of-an-mcp-task>) and the [Monitor tool](</docs/en/tools-reference#monitor-tool>) still run in the background. To turn off [background sessions](</docs/en/agent-view#turn-off-agent-view>) too, set `CLAUDE_CODE_DISABLE_AGENT_VIEW` to `1`
`CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_DEFAULT`| Set to `1` to stop Claude Code from treating an [Amazon Bedrock](</docs/en/amazon-bedrock>) streaming response with a missing or empty `Content-Type` header as Amazon Bedrock’s binary event stream. By default, Claude Code assumes a gateway dropped the header from an otherwise unmodified response, so it decodes the body and streaming keeps working. Set this only for a gateway that also re-emits the stream as server-sent events; Claude Code then reads the header-less body as server-sent events instead. Requires Claude Code v2.1.239 or later
`CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_GUARD`| Set to `1` to skip the check that an [Amazon Bedrock](</docs/en/amazon-bedrock>) streaming response carries the `application/vnd.amazon.eventstream` content-type. Without this variable, when a response carries a different content-type, Claude Code fails the request with an error naming that type, which means a [gateway or proxy is transforming the response](</docs/en/amazon-bedrock#streaming-errors-behind-a-gateway-or-proxy>). Configure the gateway to forward the `Content-Type` header and body unmodified rather than setting this variable. Requires Claude Code v2.1.208 or later
`CLAUDE_CODE_DISABLE_BG_EXIT_HANDOFF`| Set to `1` to stop a [background session’s](</docs/en/agent-view>) in-flight work when the [supervisor](</docs/en/agent-view#the-supervisor-process>) stops, restarts, or updates that session’s process, instead of handing it to the session’s next process. That work is the session’s running background shell commands, plus background subagents as of v2.1.198. Affects only that handoff: backgrounding a session with `←` or [`/background`](</docs/en/agent-view#from-inside-a-session>) still carries in-flight background work over. Requires Claude Code v2.1.196 or later
@@ -258,7 +258,7 @@
`CLAUDE_CODE_DISABLE_WEB_FETCH`| Set to `1` to turn off the [WebFetch](</docs/en/tools-reference#webfetch-tool-behavior>) tool. The [WebSearch](</docs/en/tools-reference#websearch-tool-behavior>) tool stays available. Requires Claude Code v2.1.285 or later
`CLAUDE_CODE_DISABLE_WINDOWS_SHELL_LAUNCHER`| Set to `1` to start [PowerShell tool](</docs/en/tools-reference#powershell-tool>) commands on Windows directly instead of through the `cmd.exe` launcher. By default, the launcher lets a PowerShell command [running in the background](</docs/en/tools-reference#background-commands>) [carry over to the session’s next process](</docs/en/agent-view#the-supervisor-process>), such as when you [background the session](</docs/en/agent-view#from-inside-a-session>). If you set the variable, a backgrounded PowerShell command stops when the session’s process exits. Bash commands aren’t affected. Requires Claude Code v2.1.269 or later
`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
-`CLAUDE_CODE_EFFORT_LEVEL`| Set the effort level for supported models. Values: `low`, `medium`, `high`, `xhigh`, `max`, or `auto` to use the model default. Available levels depend on the model. Takes precedence over `--effort`, `/effort`, and the `modelSettings` and `effortLevel` settings. A [`maxEffortLevel`](</docs/en/settings-reference#maxeffortlevel>) cap still applies. See [Adjust effort level](</docs/en/model-config#adjust-effort-level>)
+`CLAUDE_CODE_EFFORT_LEVEL`| Set the effort level for supported models. Values: `low`, `medium`, `high`, `xhigh`, or `max`. Available levels depend on the model. Takes precedence over `--effort`, `/effort`, and the `modelSettings` and `effortLevel` settings. A [`maxEffortLevel`](</docs/en/settings-reference#maxeffortlevel>) cap still applies. Set it to `auto` or `unset` to have Claude Code [send no effort level](</docs/en/model-config#send-no-effort-level>), so that the API applies its own default for the model. See [Adjust effort level](</docs/en/model-config#adjust-effort-level>)
`CLAUDE_CODE_EMIT_SESSION_STATE_EVENTS`| Set to `1` to add [`session_state_changed`](</docs/en/agent-sdk/typescript#sdksessionstatechangedmessage>) messages, which carry the session’s state, to the message stream. Requires either the [Agent SDK](</docs/en/agent-sdk/overview>) or `--print`, `--output-format stream-json`, and `--verbose`
`CLAUDE_CODE_ENABLE_AUTO_MODE`| Accepted for compatibility with older releases and has no effect. Auto mode is available by default on every provider, including Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions. In v2.1.158 through v2.1.206, setting this to `1` was required to make [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) available on those providers
`CLAUDE_CODE_ENABLE_AWAY_SUMMARY`| Override [session recap](</docs/en/interactive-mode#session-recap>) availability. Set to `0` to force recaps off regardless of the `/config` toggle. Set to `1` to force recaps on when [`awaySummaryEnabled`](</docs/en/settings-reference#awaysummaryenabled>) is `false`. Takes precedence over the setting and `/config` toggle
@@ -562,7 +562,7 @@
* Get the [PowerShell tool](</docs/en/tools-reference#powershell-tool>) by default for claude.ai and Console accounts on Windows with Git Bash installed; Claude Code routes shell commands through Git Bash unless you set `CLAUDE_CODE_USE_POWERSHELL_TOOL=1`. On Windows without Git Bash, the tool stays on
* Get [Claude-drafted feedback](</docs/en/tools-reference#sendfeedback-tool-behavior>), which Claude Code turns on through a fetched flag
* Have Claude [treat large pastes as pasted rather than typed text](</docs/en/terminal-config#how-claude-treats-pasted-text>); the content behind a `[Pasted text #N]` placeholder reaches Claude unmarked
- * Have Claude Code [exclude MCP tools whose input schema the API would reject](</docs/en/mcp#tools-with-invalid-input-schemas>); it sends the schema anyway, and a request that includes it fails with [a 400 error naming the tool by its position](</docs/en/errors#tool-input-schema-is-invalid>)
+ * Have Claude Code [exclude MCP tools whose input schema the API would reject](</docs/en/mcp#tools-with-invalid-input-schemas>)
* Have Claude Code [compact a long conversation while your terminal session is idle](</docs/en/settings-reference#idlecompaction>), shortly before a one-hour prompt cache expires
###
Show diff (136 lines)
--- a/errors.md
+++ b/errors.md
@@ -211,6 +211,7 @@
`Cloud sessions use your claude.ai login`, at the end of a policy denial that names a credential| Command-line errors
`Couldn't verify your organization's policy for cloud sessions`| Command-line errors
`Cloud sessions aren't available:` followed by why your organization’s policy couldn’t be loaded| Command-line errors
+`Cloud sessions aren't available with this Console sign-in. They need a claude.ai sign-in.`| [Unable to get organization UUID](</docs/en/claude-code-on-the-web#unable-to-get-organization-uuid>)
`Cloud sessions need a claude.ai sign-in`| [Unable to get organization UUID](</docs/en/claude-code-on-the-web#unable-to-get-organization-uuid>)
`Nothing was stashed: "<path>" is now a folder in place of a tracked file or link` / `are now folders in place of tracked files or links`| Command-line errors
`Error: --json-schema is not a valid JSON Schema`| Command-line errors
@@ -317,6 +318,7 @@
`File is covered by a Read deny rule in your permission settings`| Tool errors
`cannot contain null bytes (\0)`| Tool errors
`Path contains null bytes`| Tool errors
+`command contains the invisible character U+FEFF (byte order mark) or U+180E (Mongolian vowel separator), and was not run`| Tool errors
`File is too large to read as an image (the limit is 128MB)`| Tool errors
`Cannot read this as an image: <path> is a pipe or a device`| Tool errors
`subagent_type is required: the general-purpose agent is not available in this session`| Tool errors
@@ -389,6 +391,7 @@
`Claude Code process exited with code N`| Wrapper and IDE errors
`The connection to Claude Code ended before this message completed`| Wrapper and IDE errors
`Could not locate the Claude CLI on PATH`| Wrapper and IDE errors
+`The Claude Code program for this computer, the <build> build, could not be found`| Wrapper and IDE errors
`Restored the code, but skipped N files`| Rewind warnings and errors
`No files were restored: N files failed (backup missing, or the file could not be updated)`| Rewind warnings and errors
`Transcript writes are failing (...)`| Session saving warnings
@@ -477,13 +480,21 @@
What you see while Claude Code retries or waits
-While retrying, the spinner shows a `Retrying in Ns · attempt x/y` countdown after an error label. The label names the specific reason from the first attempt for failures you can act on right away: the network is down, a TLS handshake failed, or you hit a rate limit. For other errors it reads `API error` at first. As of v2.1.198 it switches to the specific reason from the third attempt, or on the final attempt when `CLAUDE_CODE_MAX_RETRIES` allows fewer than three; earlier versions switch only on the final attempt. As of v2.1.198, the usual spinner tip is suppressed during retries. Once the error reason is revealed, if the failure is a 529 overload the line below the countdown also names where to check service status: `status.claude.com` on the Anthropic API, or the provider or gateway host named in the message on other configurations. If no data arrives on the response stream for 20 seconds while a request is still pending, the spinner shows `Waiting for API response · will retry in … · check your network` before any retry has started. The request hasn’t failed yet: the countdown runs to the point where Claude Code aborts the stalled connection. After the abort, what you see depends on how far the response had got:
+While retrying, the spinner shows a `Retrying in Ns · attempt x/y` countdown after an error label. The label names the specific reason from the first attempt for failures you can act on right away: the network is down, a TLS handshake failed, or you hit a rate limit. For other errors it reads `API error` at first. As of v2.1.198 it switches to the specific reason from the third attempt, or on the final attempt when `CLAUDE_CODE_MAX_RETRIES` allows fewer than three; earlier versions switch only on the final attempt. As of v2.1.198, the usual spinner tip is suppressed during retries. Once the error reason is revealed, if the failure is a 529 overload the line below the countdown also names where to check service status: `status.claude.com` on the Anthropic API, or the provider or gateway host named in the message on other configurations.
+
+####
+
+
+
+Waiting for API response
+
+The `Waiting for API response · will retry in … · check your network` banner means that Claude Code has waited at least 20 seconds without receiving any data for a request. The request hasn’t failed yet: the countdown runs to the point where Claude Code aborts the stalled connection. If the abort happens:
* Before Claude has completed a block of text or a tool call, or started one after finishing its thinking, Claude Code retries the request or ends the turn with an error. Automatic retries says which stalls it retries and how many times.
* After Claude has completed a block of text or a tool call, or started one after finishing its thinking, but before Claude has finished the response, Claude Code keeps what Claude completed, continues the turn from any tool calls Claude finished, and shows The response above may be incomplete. In a non-interactive session, and for a subagent’s response in any session, Claude Code may first prompt Claude to continue the response; that entry says when it does and when you still see the notice there.
* After Claude finished the response, Claude Code ends the turn normally.
-The banner clears on its own once data resumes or a retry succeeds. If it reappears on every attempt, treat it as a network issue. Before v2.1.185, the banner appeared after 10 seconds with different wording. While Claude is consulting the [advisor](</docs/en/advisor>), the banner appears after 90 seconds without data instead of 20, because a long advisor review can send nothing for well over 20 seconds. Before v2.1.214, the 20-second threshold applied during advisor calls too, so the banner appeared during advisor reviews even when nothing was wrong.
+The banner clears on its own once data resumes or a retry succeeds. If it reappears on every attempt, treat it as a network issue. If you connect through a gateway, see The waiting banner comes and goes behind a gateway. Before v2.1.185, the banner appeared after 10 seconds with different wording.
####
@@ -2332,7 +2343,7 @@
The first form means the schema isn’t valid JSON Schema draft 2020-12. The second means a top-level property name doesn’t match the pattern the message quotes. Claude Code [excludes MCP tools whose input schema would fail this validation](</docs/en/mcp#tools-with-invalid-input-schemas>) when it loads a server’s tools, so requests normally never include one. On a [deployment where flag fetching is off](</docs/en/env-vars#features-that-need-feature-flag-fetching>), or on a machine whose flags have never arrived, Claude Code records in the server’s log which tool would be rejected but sends it anyway, so this error can still occur. The error can also occur for a tool whose schema declares a JSON Schema dialect other than draft 2020-12 in `$schema`. Claude Code doesn’t check those schemas against the JSON Schema meta-schema, though the top-level property-name check still applies. Before v2.1.216, no deployment ran the exclusion checks. **What to do:**
- * If your Claude Code version is earlier than v2.1.216, run `claude update`.
+ * If your Claude Code version is earlier than v2.1.300, run [`claude update`](</docs/en/setup#update-claude-code>) in your shell. Before v2.1.300, Claude Code didn’t [retry the request without the rejected tool’s parameters](</docs/en/mcp#tools-whose-input-schema-the-api-refuses>), so this error repeated on every request that included the tool.
* Remove or [disable](</docs/en/mcp#disable-a-server-without-removing-it>) the MCP server that declares the invalid schema. The error names the tool only by position. On v2.1.216 or later, check each server’s log for a line naming a tool whose input schema would be rejected. If no log names one, disable servers one at a time.
* If you maintain the server, fix the tool’s `input_schema`. The schema must be valid JSON Schema, and top-level property names must be 1 to 64 characters long and use only ASCII letters and digits, `_`, `.`, and `-`. See [Tools with invalid input schemas](</docs/en/mcp#tools-with-invalid-input-schemas>).
@@ -3406,7 +3417,6 @@
* `Shell command permission check failed for pattern "..."`: the command’s permission check didn’t allow it. [Permission checks on injected commands](</docs/en/skills#permission-checks-on-injected-commands>) covers which results abort in each permission mode and how to pre-approve a command with `allowed-tools`
* `Skill <name> requires bash (`shell: bash` in frontmatter) but Git Bash was not found`: the skill’s frontmatter demands bash on a machine without it. Install Git for Windows or change the frontmatter to `shell: powershell`. See [How injected commands run](</docs/en/skills#how-injected-commands-run>)
- * `No shell command in <name> was run`: one of the file’s `!` commands contains a raw control character other than tab or newline, so none of them runs. See how to find and remove the character
**What to do:**
@@ -3420,14 +3430,19 @@
No shell command in a skill or command was run
-One of the `!`<command>`` [dynamic context commands](</docs/en/skills#inject-dynamic-context>) in a skill or custom command file contains a raw control character other than tab or newline. Claude Code refuses the whole invocation before any of the file’s commands runs. The message names the shell tool that would have run the commands, Bash or PowerShell, and ends with the refused command. Each such character is replaced by `�` so you can see where it is:
+`No shell command in <name> was run` means a `!`<command>`` [dynamic context command](</docs/en/skills#inject-dynamic-context>) in that skill or command file contains a character that the Bash or PowerShell tool refuses:
+
+ * **Either tool** : a raw control character other than a tab or newline
+ * **PowerShell tool** : also U+FEFF or U+180E
+
+The message ends with the refused command, showing each refused character as `�`, as in this Bash tool example:
No shell command in /my-skill was run, because the Bash tool does not accept one of them: command contains control characters that would be hidden in the approval dialog. Unprintable characters are shown as � below: remove them from the skill or command file, or from the arguments or options substituted into it.
build.sh --target�dist
**What to do:**
- * Find each `�` in the command quoted at the end of the message. Remove the character it stands for from the skill or command file, or from the arguments or options substituted into the file.
+ * Find each `�` in the command quoted at the end of the message. Remove the character it stands for from the [skill or command file](</docs/en/skills#where-skills-live>), or from the arguments or [options](</docs/en/plugins/manifest-reference#user-configuration>) substituted into the file.
###
@@ -4372,6 +4387,21 @@
* Nothing on your side: the error is returned to Claude as the tool’s result, and the message itself tells Claude to remove the null byte and try again
Before v2.1.281, a null byte in a Read, Write, Edit, or NotebookEdit path ended the whole turn with an error naming `Path contains null bytes`, and the tool never ran.
+
+###
+
+
+
+Command contains an invisible character
+
+The [PowerShell tool](</docs/en/tools-reference#powershell-tool>) refused to run a command that contains U+FEFF or U+180E:
+
+ Error: command contains the invisible character U+FEFF (byte order mark) or U+180E (Mongolian vowel separator), and was not run. Remove the character, keep the text that needs it in a file that the command reads, or write it as $([char]0xFEFF) or $([char]0x180E) inside a double-quoted string
+
+**What to do:**
+
+ * **For a command Claude wrote** : you have nothing to fix. The message tells Claude how to rewrite the command.
+ * **For a skill or command file** : the message follows `No shell command in <name> was run`. See where to find the character and remove it.
###
@@ -5219,6 +5249,24 @@
+The Claude Code program for this computer could not be found
+
+The [VS Code extension](</docs/en/vs-code>) looked for the copy of Claude Code bundled inside it and found none built for your computer. The message names the build your computer needs:
+
+ The Claude Code program for this computer, the Linux (linux-x64) build, could not be found.
+
+**What to do:**
+
+ * If the message says which build the extension holds, you have the extension package for another platform: install the package made for the build the message names
+ * If the message doesn’t say which build the extension holds, reinstall the Claude Code extension from your editor’s Extensions view
+ * Or, in either case, set [`claudeCode.claudeProcessWrapper`](</docs/en/vs-code#extension-settings>) to a separately installed `claude` binary
+
+Before v2.1.290, this appeared as `Unsupported platform: <platform>-<arch>. No compatible Claude Code binary found.`
+
+###
+
+
+
The connection to Claude Code ended before this message completed
The [VS Code extension](</docs/en/vs-code>) sent your message to the `claude` process, and the connection ended without an error before the process acknowledged or finished it. The extension can’t tell whether the message was processed, so it asks you to send it again:
--- a/fast-mode.md
+++ b/fast-mode.md
@@ -1,10 +1,10 @@
-Fast mode is in research preview. The feature, pricing, and availability may change based on feedback.
+Fast mode for Claude Opus 5.5 is available, and fast mode for Claude Opus 5 and Claude Opus 4.8 is in research preview.
Fast mode is a high-speed configuration for Claude Opus, making the model up to 2.5x faster at a higher cost per token. Toggle it on with `/fast` when you need speed for interactive work like rapid iteration or live debugging, and toggle it off when cost matters more than latency. Fast mode is not a different model. It uses Claude Opus with a different API configuration that prioritizes speed over cost efficiency. You get identical quality and capabilities with faster responses. Fast mode is supported on Opus 5.5, Opus 5, and Opus 4.8. It is not available on Sonnet, Haiku, or other models. Opus 4.7 doesn’t support fast mode, so switching to it turns fast mode off. Fast mode for Opus 4.7 was deprecated on June 25, 2026, and removed on July 24, 2026. What to know:
* Use `/fast` to toggle on fast mode in the Claude Code CLI. The [VS Code extension](</docs/en/vs-code>) offers a **Toggle fast mode** command when the selected model supports fast mode. Claude Code saves that toggle to your `fastMode` setting.
* Fast mode pricing per MTok input/output is $8/$40 on Opus 5.5 and $10/$50 on Opus 5 and Opus 4.8.
- * Available to Claude Code users on subscription plans (Pro/Max/Team/Enterprise) and on Claude Console. Team and Enterprise organizations need an Owner to enable it first, and Console organizations need access provisioned first, both described under Requirements.
+ * Available to Claude Code users on subscription plans (Pro/Max/Team/Enterprise) and on Claude Console. Team and Enterprise organizations need an Owner to enable it first, and Console organizations need access provisioned first to use it with Opus 5 or Opus 4.8. Requirements describes both.
* For Claude Code users on subscription plans (Pro/Max/Team/Enterprise), fast mode is available via usage credits only and not included in the subscription rate limits.
##
@@ -117,14 +117,14 @@
Fast mode requires all of the following:
- * **Anthropic API or subscription only** : fast mode is available through the Anthropic Console API and for Claude subscription plans using usage credits. It is not available on Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, or Claude Platform on AWS. Console organizations must also have fast mode access provisioned.
+ * **Anthropic API or subscription only** : fast mode is available through the Anthropic Console API and for Claude subscription plans using usage credits. It is not available on Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, or Claude Platform on AWS. Console organizations must also have fast mode access provisioned to use it with Opus 5 or Opus 4.8.
* **Usage credits turned on for subscription plans** : on a Pro, Max, Team, or Enterprise plan, your account must have [usage credits](</docs/en/costs#add-usage-credits-to-your-subscription>) turned on, which allows billing beyond your plan’s included usage. Until they’re on, `/fast` reports “Fast mode requires usage credits”. How you turn them on depends on your plan:
* On Pro and Max, turn them on in the **Usage credits** section of [**Settings > Usage**](<https://claude.ai/settings/usage>) on claude.ai, or run `/usage-credits` to open that page.
* On Team and Enterprise, a member with billing access turns them on for the organization at [**Organization settings > Usage**](<https://claude.ai/admin-settings/usage>), and a member without it runs `/usage-credits` to send the organization’s admins a request.
Fast mode usage draws directly from usage credits, even if you have remaining usage on your plan.
- * **Paid Console organization** : Claude Console accounts don’t use usage credits, and your organization pays for fast mode per token with the rest of its API usage. On the Console’s free Evaluation plan, `/fast` shows “Fast mode unavailable during evaluation. Please purchase credits.” To clear it, purchase credits in your [Console billing settings](<https://platform.claude.com/settings/billing>).
+ * **Paid Console organization** : Claude Console accounts don’t use usage credits, and your organization pays for fast mode per token with the rest of its API usage. On the Console’s free Evaluation plan, `/fast` shows “Fast mode unavailable during evaluation. Please purchase credits.” To clear it, purchase credits in your [Console billing settings](<https://platform.claude.com/settings/billing>). Fast mode with Opus 5.5 also depends on your organization’s [usage tier](<https://platform.claude.com/docs/en/api/rate-limits>).
* **Owner enablement for Team and Enterprise** : fast mode is disabled by default for Team and Enterprise organizations. An Owner must explicitly enable fast mode before users can access it.
Four organization settings can block turning fast mode on with `/fast`:
@@ -142,10 +142,10 @@
Where you enable fast mode depends on which product your organization uses:
- * **Console** (API customers): an admin enables it in [Claude Code preferences](<https://platform.claude.com/claude-code/preferences>). Fast mode is in research preview, so your organization must also have fast mode access provisioned before fast mode requests succeed. To get access, contact your account manager or join the waitlist, as described in [fast mode on the Claude API](<https://platform.claude.com/docs/en/build-with-claude/fast-mode>). Without provisioned access, the API rejects each fast mode request with a 429, and Claude Code treats each rejection as a fast mode rate limit. Unlike a rate limit’s cooldown, the rejections continue until access is provisioned.
+ * **Console** (API customers): an admin enables it in [Claude Code preferences](<https://platform.claude.com/claude-code/preferences>)
* **Claude AI** (Team and Enterprise): an Owner enables it at [**Organization settings > Claude Code**](<https://claude.ai/admin-settings/claude-code>)
-Another option to disable fast mode entirely is to set `CLAUDE_CODE_DISABLE_FAST_MODE=1`. See [Environment variables](</docs/en/env-vars>).
+Console organizations that use Claude Opus 5 or Claude Opus 4.8 also need provisioned access, as described in [fast mode on the Claude API](<https://platform.claude.com/docs/en/build-with-claude/fast-mode>). Without that access, fast mode requests on those models hit the fast mode rate limit and fall back to standard speed until access is provisioned. Another option to disable fast mode entirely is to set `CLAUDE_CODE_DISABLE_FAST_MODE=1`. See [Environment variables](</docs/en/env-vars>).
###
@@ -211,7 +211,7 @@
Handle rate limits
-Fast mode has separate rate limits from standard Opus. All supported Opus models share one fast mode rate limit pool: usage on any of them draws from the same limits. When you hit the fast mode rate limit:
+Fast mode has separate rate limits from standard Opus; for Console organizations, the Claude Platform’s [rate limits](<https://platform.claude.com/docs/en/api/rate-limits>) page describes them. When you hit the fast mode rate limit:
1. Fast mode automatically falls back to standard speed
2. The `↯` icon turns gray to indicate cooldown
@@ -229,7 +229,7 @@
Research preview
-Fast mode is a research preview feature. This means:
+Fast mode for Claude Opus 5 and Claude Opus 4.8 is a research preview feature, which means:
* The feature may change based on feedback
* Availability and pricing are subject to change
--- a/feature-availability.md
+++ b/feature-availability.md
@@ -70,7 +70,7 @@
These features work in the local CLI but depend on a server-side capability that not every provider exposes. Feature| Claude subscription| Anthropic Console| Amazon Bedrock| Claude Platform on AWS| Google Cloud’s Agent Platform| Microsoft Foundry
---|---|---|---|---|---|---
[Web search](</docs/en/tools-reference#websearch-tool-behavior>)| ✓| ✓| ✗| ✓| See note 1| ✓
-[Fast mode](</docs/en/fast-mode>)| ✓ ([Owner-enabled](</docs/en/fast-mode#enable-fast-mode-for-your-organization>) on Team and Enterprise)| ✓ (provisioned organizations)| ✗| ✗| ✗| ✗
+[Fast mode](</docs/en/fast-mode>)| ✓ ([Owner-enabled](</docs/en/fast-mode#enable-fast-mode-for-your-organization>) on Team and Enterprise)| ✓ (Opus 5 and 4.8 need provisioning)| ✗| ✗| ✗| ✗
[Auto mode](</docs/en/auto-mode-config>)| ✓| ✓| See note 2| ✓| See note 2| See note 2
[Advisor](</docs/en/advisor>)| ✓| ✓| ✗| ✗| ✗| ✗
[Cross-session messaging](</docs/en/cross-session-messaging>)| ✓ 5| ✓ (same machine) 5| ✓ (same machine) 5| ✓ (same machine) 5| ✓ (same machine) 5| ✓ (same machine) 5
@@ -149,7 +149,7 @@
**Alternatives:** for scheduling, use [`/loop`](</docs/en/scheduled-tasks>) instead of `/schedule`. For cloud sessions, use [GitHub Actions](</docs/en/github-actions>).
-**Not available:** all features that require a Claude subscription.Everything in CLI capabilities that vary by provider is available, except that [fast mode](</docs/en/fast-mode>) requires [provisioned access](</docs/en/fast-mode#enable-fast-mode-for-your-organization>). [Server-managed settings](</docs/en/server-managed-settings>) that you configure in a claude.ai Team or Enterprise organization don’t reach a session that authenticates with a Console API key. See [Platform availability](</docs/en/server-managed-settings#platform-availability>) for how to cover those sessions.**Partial support:**
+**Not available:** all features that require a Claude subscription.Everything in CLI capabilities that vary by provider is available, except that [fast mode](</docs/en/fast-mode>) with Claude Opus 5 or Claude Opus 4.8 requires [provisioned access](</docs/en/fast-mode#enable-fast-mode-for-your-organization>). [Server-managed settings](</docs/en/server-managed-settings>) that you configure in a claude.ai Team or Enterprise organization don’t reach a session that authenticates with a Console API key. See [Platform availability](</docs/en/server-managed-settings#platform-availability>) for how to cover those sessions.**Partial support:**
* [Desktop](</docs/en/desktop>): via [Claude Desktop on 3P with the Claude API](<https://claude.com/docs/third-party/claude-desktop/claude-api>)
--- a/github-actions.md
+++ b/github-actions.md
@@ -248,8 +248,8 @@
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
- plugin_marketplaces: "https://github.com/anthropics/claude-code.git"
- plugins: "code-review@claude-code-plugins"
+ plugin_marketplaces: "https://github.com/anthropics/claude-plugins-official.git"
+ plugins: "code-review@claude-plugins-official"
prompt: "/code-review:code-review --comment ${{ github.repository }}/pull/${{ github.event.pull_request.number }}"
claude_args: '--allowedTools "mcp__github_inline_comment__create_inline_comment"'
--- a/github-enterprise-server.md
+++ b/github-enterprise-server.md
@@ -259,6 +259,19 @@
+Connection test passes but a second test fails
+
+The second test connects to your GHES instance the way Anthropic-hosted cloud sessions do. Find your message to see whether to check your firewall or try again:
+
+ * **`Connection test passed, but a second test failed.`** : if your instance is behind a firewall, allow all of Anthropic’s [outbound IP addresses](<https://platform.claude.com/docs/en/api/ip-addresses#outbound-ip-addresses>), because a connection test can pass even when your firewall blocks some of them. You can also try again in a few minutes.
+ * **`Connection test passed, but a second test could not run.`** : try again in a few minutes.
+
+To test again, open the connection’s **More options** menu in [**Organization settings > Git providers**](<https://claude.ai/admin-settings/source-control#github-enterprise>) and select **Test connection**.
+
+###
+
+
+
Session start fails with `Unable to get organization UUID`
Claude Code couldn’t read a claude.ai organization from your credentials. Sign in with `/login` using an account in your Team or Enterprise organization, since GitHub Enterprise Server support is limited to those plans. See [Unable to get organization UUID](</docs/en/claude-code-on-the-web#unable-to-get-organization-uuid>) for the causes and the other messages this state produces.
--- a/install.md
+++ b/install.md
@@ -199,7 +199,7 @@
Source| What you type| Example
---|---|---
-GitHub repository| `owner/repo`. Add `#ref` to pin a branch or tag.| `/plugin marketplace add anthropics/claude-code`, or `/plugin marketplace add your-org/plugins#v1.2.0` to pin the `v1.2.0` tag
+GitHub repository| `owner/repo`. Add `#ref` to pin a branch or tag.| `/plugin marketplace add anthropics/claude-plugins-official`, or `/plugin marketplace add your-org/plugins#v1.2.0` to pin the `v1.2.0` tag
Git repository on any host| The full clone URL. Add `#ref` to pin a branch or tag.| `/plugin marketplace add https://gitlab.example.com/your-group/your-marketplace.git#v1.0.0`
Local directory or file| A relative or absolute path to a directory that holds `.claude-plugin/marketplace.json`, or to the JSON file itself. Start a relative path with `./` or `../`, because Claude Code reads a bare `name/name` as a GitHub repository.| `/plugin marketplace add ./my-marketplace`
Hosted `marketplace.json`| Its `https://` URL| `/plugin marketplace add https://example.com/marketplace.json`
@@ -423,7 +423,7 @@
Next steps
- * [Anthropic’s marketplaces](</docs/en/plugins/anthropic-marketplaces>): how the official, community, and demo marketplaces differ and where to browse each one
+ * [Anthropic’s marketplaces](</docs/en/plugins/anthropic-marketplaces>): how the official and community marketplaces differ and where to browse each one
* [Plugin loading reference](</docs/en/plugins/loading>): why a plugin loaded, didn’t load, or didn’t change after an update
* [Plugin security and trust](</docs/en/plugins/security>): what to review before you install a plugin from a marketplace you don’t know
* [Troubleshoot plugins](</docs/en/plugins/troubleshooting>): install and marketplace error messages with their fixes
--- a/interactive-mode.md
+++ b/interactive-mode.md
@@ -382,7 +382,7 @@
* Background commands in a local session you work in from a terminal, the desktop app, or the VS Code extension have no time limit. In a session that runs unattended, such as a `-p` run or a cloud session, Claude Code stops a background command at its [time limit](</docs/en/tools-reference#time-limit-for-background-commands>)
* A background command that a foreground [subagent](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) started ends when that subagent’s run ends, whether it finished, failed, or was interrupted; see [When a background command stops](</docs/en/tools-reference#when-a-background-command-stops>) in the tools reference
-To turn off background commands, set the [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`](</docs/en/env-vars#variables>) environment variable to `1`. With it set, you also lose background subagents, background forked skills, and `Ctrl+B`. Starting in [bare mode](</docs/en/headless#start-faster-with-bare-mode>) has the same effect. **Common backgrounded commands:**
+To turn off background commands, set the [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`](</docs/en/env-vars#variables>) environment variable to `1`. With it set, you also lose the `Ctrl+B` shortcut and [other background features](</docs/en/env-vars#variables>), such as [running skills in the background](</docs/en/skills#run-skills-in-a-subagent>). Starting in [bare mode](</docs/en/headless#start-faster-with-bare-mode>) has the same effect. **Common backgrounded commands:**
* Build tools (webpack, vite, make)
* Package managers (npm, yarn, pnpm)
--- a/managed-settings.md
+++ b/managed-settings.md
@@ -178,7 +178,18 @@
* [`forceRemoteSettingsRefresh`](</docs/en/server-managed-settings>)
* `env`, merged per variable across the admin sources: each variable comes from the highest-priority source that defines it, so lower sources fill in variables the higher ones leave unset. A few variables follow their own rules; [Per-key exceptions across managed sources](</docs/en/server-managed-settings#per-key-exceptions-across-managed-sources>) names each one. Requires Claude Code v2.1.223 or later. Before v2.1.223, Claude Code applied the selected source’s whole `env` block only
-The gateway login keys follow a separate rule. Claude Code never reads them from server-managed settings, so while server-managed settings are the selected source, the highest-ranked admin source on the machine that carries a policy key still supplies them. A value in an admin source ranked below that one, or in the HKCU registry, is ignored. [`allowedProviders`](</docs/en/settings-reference#allowedproviders>) has its own rule: its entry’s Scope note says how a list set on the machine combines with a server-managed one. Requires Claude Code v2.1.285 or later. When an admin source sets `allowManagedMcpServersOnly` or an `allowedMcpServers` list and that value isn’t the one in force, `/status` and `claude doctor` name that source and key.
+[`allowedProviders`](</docs/en/settings-reference#allowedproviders>) has its own rule: its entry’s Scope note says how a list set on the machine combines with a server-managed one. Requires Claude Code v2.1.285 or later. When an admin source sets `allowManagedMcpServersOnly` or an `allowedMcpServers` list and that value isn’t the one in force, `/status` and `claude doctor` name that source and key.
+
+####
+
+
+
+Which managed source supplies login keys
+
+On a machine with an MDM policy or managed settings file, Claude Code takes the login keys from that policy or file, even for a key remote settings also set. Settings from the claude.ai admin console are remote settings, so set login keys such as [`forceLoginOrgUUID`](</docs/en/settings-reference#forceloginorguuid>) in the MDM policy or file. If a machine has both an MDM policy and a managed settings file, use the MDM policy. When that policy sets any policy key, Claude Code ignores login keys in the file, even under `managedSourcesBehavior: "merge"`. The login keys are:
+
+ * `forceLoginOrgUUID` and `forceLoginMethod` set to `"claudeai"` or `"console"`: if the policy or file omits either key, the value in remote settings applies. Until every client runs v2.1.299 or later, set the keys in [server-managed settings](</docs/en/server-managed-settings>) from claude.ai as well
+ * The gateway login keys: Claude Code doesn’t use a value in remote settings for the gateway sign-in
###
@@ -195,8 +206,9 @@
Restriction allowlists| Takes the list whole from the highest-ranked source that sets it, without adding entries from lower sources| `availableModels`, `allowedMcpServers`, `strictKnownMarketplaces`, `allowedChannelPlugins`, and the `fallbackModel` chain
Values taken whole| Takes the value whole from the highest-ranked source that sets it, without combining entries or fields from lower sources| `sandbox.credentials.awsPairs`, `sandbox.ripgrep`
Provided MCP servers| Combines the server names from every source; when two sources set the same name, applies the higher-ranked source’s whole entry| `managedMcpServers`
-Keys read from the highest-ranked source only| Ignores the key in every lower source, even when the highest-ranked source leaves it unset| Credential helpers such as `apiKeyHelper`, login pins such as `forceLoginOrgUUID`, `modelPicker`, `permissions.defaultMode`
+Keys read from the highest-ranked source only| Ignores the key in every lower source, even when the highest-ranked source leaves it unset| `modelPicker`, `permissions.defaultMode`, and credential helpers such as `apiKeyHelper`
`env`| Merges per variable across admin sources under either setting, as Keys read from every admin source describes|
+Login keys| Under either setting, takes them from the MDM policy or managed settings file, whichever is the higher-ranked one carrying a policy key, ahead of remote settings| `forceLoginOrgUUID`, `forceLoginMethod`, and the gateway login keys
Every other key| Takes the value from the highest-ranked source that sets it| `model`, `cleanupPeriodDays`
To confirm which sources combined on a machine, read the `Setting sources` line in `/status`; that section says what each label means.
@@ -222,7 +234,7 @@
When another application launches Claude Code, such as Claude Desktop, an IDE extension, or an Agent SDK app, that host can pass its own managed settings through the SDK `managedSettings` option. Claude Code calls these parent settings. By default, Claude Code ignores parent settings whenever an admin source is present: server-managed settings, an MDM or OS-level policy, or a managed settings file. To have Claude Code merge parent settings alongside an admin source, set [`parentSettingsBehavior`](</docs/en/settings-reference#parentsettingsbehavior>) to `"merge"` in the highest-priority managed source; Claude Code reads the key from that source only. Claude Code then keeps only the host’s values that restrict what Claude can do, with one gap to know about: unless you also set the `allowManaged*Only` locks, the host’s permission allow rules and sandbox allowlists still apply. See [Restrict parent settings](</docs/en/claude-apps-gateway#restrict-parent-settings>) for the locks. A [`policyHelper`](</docs/en/settings-reference#policyhelper>) can turn parent merging off regardless of this key; its entry says when. Claude Code also applies these checks to parent-supplied values on their own:
* When any admin source sets `allowManagedPermissionRulesOnly`, Claude Code drops [parent-supplied](</docs/en/claude-apps-gateway#restrict-parent-settings>) permission allow rules and `additionalDirectories` as it reads them, even when a higher-priority source leaves the key unset. The key’s effect on your own permission rules comes from the managed settings Claude Code applies, or from parent settings you’ve chosen to merge
- * Claude Code enforces the `forceLoginOrgUUID` or `allowedMcpServers` value in the managed settings it applies and blocks a parent-supplied one. Outside the MCP allowlist lock, a value in a lower admin source that Claude Code doesn’t apply neither applies nor blocks the parent’s. On Claude Code v2.1.273 or later, while `allowManagedMcpServersOnly` is on, the `allowedMcpServers` list from the highest-ranked admin source that sets one applies and blocks the parent’s, as a cross-source key. The parent’s list applies only when no admin source sets one. The [`managedSourcesBehavior`](</docs/en/settings-reference#managedsourcesbehavior>) entry says which source supplies each key under `"merge"`. Before v2.1.223, a value in any admin source blocked the parent’s
+ * Claude Code enforces the `forceLoginOrgUUID` or `allowedMcpServers` value in the managed settings it applies and blocks a parent-supplied one. If you deliver more than one managed source, see which source supplies `forceLoginOrgUUID`. On Claude Code v2.1.273 or later, while `allowManagedMcpServersOnly` is on, the `allowedMcpServers` list from the highest-ranked admin source that sets one applies and blocks the parent’s, as a cross-source key. The parent’s list applies only when no admin source sets one. The [`managedSourcesBehavior`](</docs/en/settings-reference#managedsourcesbehavior>) entry says which source supplies each key under `"merge"`. Before v2.1.223, a value in any admin source blocked the parent’s
* For `availableModels`, Claude Code enforces the value in the managed settings it applies and blocks a parent-supplied list
* For `strictKnownMarketplaces`, Claude Code likewise enforces the list in the managed settings it applies and blocks a parent-supplied one. The parent’s list applies only when no applied managed source sets one. Requires Claude Code v2.1.282 or later
* For `allowedProviders`, a list in the selected managed source blocks a parent-supplied one, and under the [`managedSourcesBehavior`](</docs/en/settings-reference#managedsourcesbehavior>) `"merge"` opt-in a list in any admin source does. Requires Claude Code v2.1.285 or later
--- a/mcp-quickstart.md
+++ b/mcp-quickstart.md
@@ -59,6 +59,7 @@
`✘ Connection error`| The connection attempt threw an error. See Troubleshooting
`⏸ Pending approval (run `claude` to approve)`| A project-scoped server you haven’t approved yet. See Edit .mcp.json directly
`⊘ Disabled for this project (re-enable via /mcp)`| A server turned off for this project by the project’s `disabledMcpServers` list. See [Disable a server without removing it](</docs/en/mcp#disable-a-server-without-removing-it>)
+`✘ Blocked by enterprise managed policy`| One of your organization’s policies blocks this server, so Claude Code won’t connect. Ask your administrator which policy. See [Server status](</docs/en/mcp#server-status>)
Some legacy Windows consoles, such as the default console on Windows 10, don’t support these Unicode glyphs and show `√` and `×` in place of `✔` and `✘`.
--- a/model-config.md
+++ b/model-config.md
@@ -599,7 +599,7 @@
* **`/effort`** : run `/effort` with no arguments to open an interactive slider, `/effort` followed by a level name to set it directly, or `/effort auto` to clear your saved level for the active model
* **In`/model`**: use left/right arrow keys to adjust the effort slider when selecting a model
* **`--effort` flag**: pass a level name to set it for a single session when launching Claude Code
- * **Environment variable** : set `CLAUDE_CODE_EFFORT_LEVEL` to a level name or `auto`
+ * **Environment variable** : set `CLAUDE_CODE_EFFORT_LEVEL` to a level name. To have Claude Code send no effort level, set it to `auto` or `unset` instead
* **Settings** : set a per-model level in [`modelSettings`](</docs/en/settings-reference#modelsettings>), or set [`effortLevel`](</docs/en/settings-reference#effortlevel>) to `low`, `medium`, `high`, or `xhigh` as the default for models without one. `max` isn’t accepted as a level in either key, and `ultracode` has its own [`ultracode`](</docs/en/settings-reference#ultracode>) key
* **From a connected device** : in a [Remote Control](</docs/en/remote-control#what-connected-devices-see>) session, pick a level from the effort control on your phone or in your browser. The level applies to the current session only. Requires Claude Code v2.1.234 or later
* **Skill and subagent frontmatter** : set `effort` in a [skill](</docs/en/skills#frontmatter-reference>) or [subagent](</docs/en/sub-agents#supported-frontmatter-fields>) markdown file to override the effort level when that skill or subagent runs
@@ -626,6 +626,23 @@
* **While Claude is still working** : type a message, such as `keep going`, and press `Enter` to queue it without interrupting the turn. Claude gets it when its current tool calls finish, or when the turn ends at the latest, and works at the new level from then on.
Before v2.1.242, Claude Code could queue `/effort` itself until the turn finished, and always did in a session that doesn’t [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), such as on a [third-party provider](</docs/en/third-party-integrations>).
+
+####
+
+
+
+Send no effort level
+
+When Claude Code sends no effort level to a supported model, the [API’s default](<https://platform.claude.com/docs/en/build-with-claude/effort>) applies instead of Claude Code’s. To have Claude Code send none, start `claude` from a shell that exports `CLAUDE_CODE_EFFORT_LEVEL` with the value `auto` or the value `unset`, which do the same thing:
+
+ export CLAUDE_CODE_EFFORT_LEVEL=auto
+
+The session header and footer show no effort level while none is sent. To confirm that none is sent, run `/effort status` at the Claude Code prompt:
+
+ * **`Effort level: auto`** : no effort level is sent.
+ * **`Effort level: auto (currently<level>)`**: a level is still sent. If a [`maxEffortLevel`](</docs/en/settings-reference#maxeffortlevel>) setting below `max` applies to the active model, Claude Code sends its own default for the model, lowered to that cap. Remove the setting or set it to `max`.
+
+Before v2.1.304, `/effort status` printed `Effort level: auto (currently high)` even while no level was sent.
####
--- a/monitoring-usage.md
+++ b/monitoring-usage.md
@@ -839,6 +839,7 @@
* `output_tokens`: Number of output tokens
* `cache_read_tokens`: Number of tokens read from cache
* `cache_creation_tokens`: Number of tokens used for cache creation
+ * `cache_creation_5m_tokens`, `cache_creation_1h_tokens`: the number of tokens the API response reports as written to the cache with a five-minute [cache lifetime](</docs/en/prompt-caching#cache-lifetime>) and the number written with a one-hour lifetime. Both are `0` when the API response doesn’t report them, even when `cache_creation_tokens` is above zero. Requires Claude Code v2.1.300 or later
* `request_id`: API request ID, such as `"req_011..."`, described under Event correlation attributes.
* `client_request_id`: Client-generated UUID sent as the `x-client-request-id` request header; see the event correlation attributes table for when it’s present
* `speed`: `"fast"` or `"normal"`, indicating whether fast mode was active
--- a/publish.md
+++ b/publish.md
@@ -120,7 +120,7 @@
]
}
-In your shell, run `claude plugin validate .` in the repository before you push. For what the run checks, see [Validate a directory](</docs/en/plugins/cli-reference#validate-a-directory>). [Create a marketplace](</docs/en/plugins/create-marketplace>) covers the layout with several plugins in one repository.
+Replace `your-marketplace` with a name that other authors are unlikely to pick, because a user [can’t have two marketplaces with the same name](</docs/en/plugins/marketplace-reference#marketplace-file>). In your shell, run `claude plugin validate .` in the repository before you push. For what the run checks, see [Validate a directory](</docs/en/plugins/cli-reference#validate-a-directory>). [Create a marketplace](</docs/en/plugins/create-marketplace>) covers the layout with several plugins in one repository.
###
--- a/python.md
+++ b/python.md
@@ -1374,6 +1374,8 @@
`updated_input`| `dict[str, Any] | None`| `None`| Modified input to use instead of original
`updated_permissions`| `list[PermissionUpdate] | None`| `None`| Permission updates to apply
+If you return `PermissionResultAllow` with more than 4,096 items in `updated_permissions`, Claude Code treats the result as invalid and denies the tool call. Each `PermissionUpdate` counts as one item, and so does each entry in its `rules` or `directories` list. The denial message ends with `updatedPermissions may hold at most 4096 updates, rules and directories in all.` To avoid the denial, return 4,096 items or fewer.
+
###
--- a/self-hosted-environments-configuration.md
+++ b/self-hosted-environments-configuration.md
@@ -8,9 +8,9 @@
Wrapper scripts
-Use a wrapper script when each session needs setup the runner can’t do on its own: provisioning short-lived credentials scoped to the session creator, exporting environment-specific secrets, preparing language toolchains, or applying resource limits around the child process. The runner starts your wrapper in place of the Claude Code binary, once per session. End the wrapper by `exec`-ing into `$CLAUDE_RUNNER_CLAUDE_BIN`, the runner’s own binary, so signals and exit codes propagate correctly. Point `--exec-path`, or `SELF_HOSTED_RUNNER_EXEC_PATH`, at the wrapper when you start the runner:
-
- claude self-hosted-runner --environment-secret-file /etc/claude/environment-secret --exec-path /etc/claude/session-wrapper.sh
+Use a wrapper script when each session needs setup the runner can’t do on its own: provisioning short-lived credentials scoped to the session creator, exporting environment-specific secrets, preparing language toolchains, or applying resource limits around the child process. The runner starts your wrapper in place of the Claude Code binary, once per session. End the wrapper by `exec`-ing into `$CLAUDE_RUNNER_CLAUDE_BIN`, the runner’s own binary, so signals and exit codes propagate correctly. Point `--exec-path`, or `SELF_HOSTED_RUNNER_EXEC_PATH`, at the wrapper when you start the runner, replacing `<writable-dir>` as the [quickstart](</docs/en/self-hosted-environments-quickstart#set-up-manually>) describes:
+
+ claude self-hosted-runner --environment-secret-file /etc/claude/environment-secret --base-dir '<writable-dir>' --exec-path /etc/claude/session-wrapper.sh
The runner sets the following in the wrapper’s environment:
@@ -451,6 +451,39 @@
The orchestrator’s log then shows that message. If the hook creates other objects, name each after the order ID, give it its own command, and treat its already-exists answer as success in the same way. For an object that holds a secret, print a fixed message in place of the command’s output.
To confirm the trap works, add a line directly below the `trap` line that calls a command that doesn’t exist, such as `no-such-command`. Run the hook file from your shell and check that `echo $?` prints `1`, then remove the line.
+
+###
+
+
+
+Stop or restart the orchestrator
+
+To stop or restart the orchestrator without cutting off running `spawn-runner` hooks, start it with [`--shutdown-drain-sec`](</docs/en/self-hosted-environments-reference#orchestrator-cli-flags>). On `SIGTERM` it then gives running hooks up to the number of seconds you set to finish. To choose the value and set up your process supervisor to match, see Size `--shutdown-drain-sec` and the orchestrator’s stop timeout. This start command allows 70 seconds:
+
+ claude self-hosted-runner orchestrator \
+ --environment-secret-file /etc/claude/environment-secret \
+ --hooks-dir /etc/claude/hooks \
+ --shutdown-drain-sec 70
+
+The orchestrator exits once the poll already sent and every hook have finished. When the `--shutdown-drain-sec` seconds are up, hooks still running get `SIGTERM` and the orchestrator exits. A second `SIGTERM` or any `SIGINT` does the same without waiting. The log line containing `[runner:orchestrator] stop summary:` counts hooks and spawn requests by how each one ended. Without `--shutdown-drain-sec`, the orchestrator stops immediately on `SIGTERM` or `SIGINT`. Each running hook gets `SIGTERM`, and Anthropic is told nothing. A session whose runner never got started can then sit in the queue until Anthropic re-requests it, which happens once `--expected-spawn-seconds` has passed, 120 seconds by default.
+
+`--shutdown-drain-sec` requires Claude Code v2.1.299 or later. An older version exits at startup with `error: unknown flag --shutdown-drain-sec`.
+
+####
+
+
+
+Size `--shutdown-drain-sec` and the orchestrator’s stop timeout
+
+At default settings, use [`--shutdown-drain-sec 70`](</docs/en/self-hosted-environments-reference#orchestrator-cli-flags>) with a stop timeout of 85 seconds, meaning `terminationGracePeriodSeconds: 85` on Kubernetes or `TimeoutStopSec=85` under systemd. If you changed `--hook-timeout`, scale both:
+
+ * **`--shutdown-drain-sec`** : at least `--hook-timeout` plus 10 seconds, so a hook that started right before `SIGTERM` can still finish
+ * **Stop timeout** : at least `--shutdown-drain-sec` plus 15 seconds. The orchestrator logs this figure at startup: look for the line that contains `shutdown drain:`.
+
+Have your process supervisor send a single `SIGTERM`, to the orchestrator process alone, because a second one cuts the `--shutdown-drain-sec` wait short. If you leave systemd’s default [`KillMode=control-group`](</docs/en/self-hosted-environments-deploy#what-reaches-a-running-post-session-hook>) in place, the hooks get `SIGTERM` too, and a hook can die before it submits its workload. Before you change `KillMode`, check how your `spawn-runner` hook starts runners:
+
+ * **If your hook submits its workload to a platform and exits** : run the orchestrator as the unit’s main process and set `KillMode=mixed`, which sends `SIGTERM` to that process alone.
+ * **If your hook starts runners as processes in the orchestrator’s own unit** : `KillMode=mixed` sends those runners no `SIGTERM`. Instead systemd later sends them `SIGKILL`, so they exit without draining their sessions or running their `post-session` hook.
##
--- a/self-hosted-environments-deploy.md
+++ b/self-hosted-environments-deploy.md
@@ -625,7 +625,14 @@
Shutdown timing
-After `SIGTERM`, a runner needs time to shut its sessions down cleanly before your orchestrator kills it. It logs how long at startup, in a line that contains `This runner needs up to 80s` at default settings. Set your orchestrator’s stop timeout to at least that many seconds: `terminationGracePeriodSeconds` on Kubernetes, `stop_grace_period` on Docker Compose, or your platform’s equivalent. Kubernetes defaults to 30 seconds, so without this setting it can stop the pod before the runner finishes. On `SIGTERM`, the runner stops accepting new sessions. It then begins a graceful shutdown, called a drain, unless you set `--defer-shutdown-max-min` to delay it. The drain has three steps:
+These timings apply to runners. The `claude self-hosted-runner orchestrator` process has its own: see [Size `--shutdown-drain-sec` and the orchestrator’s stop timeout](</docs/en/self-hosted-environments-configuration#size-shutdown-drain-sec-and-the-supervisors-stop-timeout-for-the-orchestrator>).
+
+At startup, each runner logs how long it can need after `SIGTERM` to shut its sessions down cleanly, such as `This runner needs up to 80s` at default settings. Your stop timeout is how long your process supervisor waits after `SIGTERM` before it kills the runner. Set it to at least the logged time:
+
+ * **Kubernetes** : `terminationGracePeriodSeconds`. Kubernetes defaults to 30 seconds, so without this setting it can stop the pod before the runner finishes.
+ * **Docker Compose** : `stop_grace_period`
+
+On `SIGTERM`, the runner stops accepting new sessions. It then begins a graceful shutdown, called a drain, unless you set `--defer-shutdown-max-min` to delay it. The drain has three steps:
1. The runner waits up to [`--drain-wait-sec`](</docs/en/self-hosted-environments-reference#runner-cli-flags>) seconds, `0` by default, for turns still running to finish.
2. It terminates each session’s process tree, including any command Claude was still running, but not a process still running after its shell command exited.
@@ -816,10 +823,11 @@
Start the runner
-From your shell, start the runner with `--hold-idle-file`, `--release-idle-session-min`, and [`--max-hold-min`](</docs/en/self-hosted-environments-reference#runner-cli-flags>), the cap on a hold, counted from when a session goes idle. Without it, the cap is one day. Set it above `--release-idle-session-min`, or nothing is held. This example releases idle sessions after 30 minutes and releases a held session at most 4 hours after it went idle:
+From your shell, start the runner with `--hold-idle-file`, `--release-idle-session-min`, and [`--max-hold-min`](</docs/en/self-hosted-environments-reference#runner-cli-flags>), the cap on a hold, counted from when a session goes idle. Without it, the cap is one day. Set it above `--release-idle-session-min`, or nothing is held. Replace `<writable-dir>` as the [quickstart](</docs/en/self-hosted-environments-quickstart#set-up-manually>) describes. This example releases idle sessions after 30 minutes and releases a held session at most 4 hours after it went idle:
claude self-hosted-runner \
--environment-secret-file /etc/claude/environment-secret \
+ --base-dir '<writable-dir>' \
--release-idle-session-min 30 \
--hold-idle-file /var/lib/claude-hold/hold-idle \
--max-hold-min 240
@@ -894,6 +902,7 @@
* **Uncommitted changes are still lost** : to prompt Claude to commit and push when it finishes responding, see [Prompt sessions to push their work](</docs/en/self-hosted-environments-configuration#prompt-sessions-to-push-their-work>)
* **A command cut off by a lost runner can run again** : when the session resumes on another runner, Claude sees the interrupted tool call with a result saying its outcome is unknown.
* **A repository added mid-session can fail to clone** : Claude clones it with `git clone` over HTTPS. On a runner without `--use-anthropic-git-proxy`, the clone fails with a git authentication error if nothing on the host can read the repository. Where you can, select every repository the session needs when you create it.
+ * **When the session resumes** : a [`checkout` hook](</docs/en/self-hosted-environments-configuration#checkout>) runs for the added repository too, with [`CLAUDE_RUNNER_REPO_REF`](</docs/en/self-hosted-environments-configuration#checkout>) empty, so make your hook handle that.
* **Some connectors don’t appear in self-hosted sessions** : a connector you haven’t yet connected in claude.ai Settings isn’t listed in a self-hosted session, and the session won’t prompt you to connect it. Connect it in Settings first, then start a fresh session. Adding a connector to an already-running session also doesn’t make its tools available to Claude; start a fresh session to pick up a newly added connector.
* **When someone archives or deletes a session, or releases its runner from the session’s menu** : don’t count on the [`--push-outcome-on-release`](</docs/en/self-hosted-environments-reference#runner-cli-flags>) push. To save commits in those cases, push `HEAD` to a rescue branch from a [`post-session` hook](</docs/en/self-hosted-environments-configuration#post-session>). If you start from the example there, make it push even when nothing is uncommitted, because it pushes only after a snapshot commit.
@@ -917,12 +926,12 @@
Common issues:
- * **Runner doesn’t appear in the environment** : confirm the host can reach `api.anthropic.com` over HTTPS, the environment secret is current, and the host clock is within five minutes of real time; larger skew causes authentication to fail. The runner logs `[runner:fatal]` with the rejection reason on auth failure.
+ * **Runner doesn’t appear in the environment** : confirm the host can reach `api.anthropic.com` over HTTPS and the environment secret is current. The runner logs `[runner:fatal]` with the rejection reason on auth failure.
* **Runner exits at startup with`cannot create or write to base directory`**: the runner can’t create or write to `--base-dir`, which defaults to `/workspace`. Fix the directory’s ownership or point `--base-dir` at a writable path, as described in Keep the base directory and capacity identical across runners. If the runner instead logs `[runner:fatal]` saying the base directory check timed out, the directory is on a hung NFS or CSI mount. Check mount health rather than permissions. The runner prints both of these startup failures to stderr before it opens `--log-file`, so look for them in the terminal or your platform’s container logs rather than the log file. Before v2.1.225, the runner didn’t check the base directory at startup, and this misconfiguration failed sessions after pickup instead.
* **Runner exits at startup with`RegisterRunner failed:` and a TLS certificate error**: the error can be `self signed certificate in certificate chain`, for example. The runner doesn’t trust the certificate authority (CA) behind the certificate it received, as happens behind a TLS-inspecting proxy. Set [`NODE_EXTRA_CA_CERTS`](</docs/en/network-config#custom-ca-certificates>) in the runner’s environment to a PEM file with the proxy’s root CA. You don’t set it again for sessions, which inherit it. Git doesn’t read it: for clones through that proxy, set `GIT_SSL_CAINFO` too.
- * **Your start script prints a write error containing`Resource temporarily unavailable` and exits**: your script shares its stdout or stderr with the `claude self-hosted-runner` or [orchestrator](</docs/en/self-hosted-environments-configuration#on-demand-runners>) process it starts, which has switched that shared pipe or socket to non-blocking mode. When the pipe is full, a write from your script fails with this operating-system error instead of waiting, and under `set -e` the script exits. To stop the error, send the runner’s or orchestrator’s output to a file that your script’s user can create. Append `>> "$HOME/claude-runner.log" 2>&1` to the command that starts it, ahead of any `&` that backgrounds it:
-
- claude self-hosted-runner --environment-secret-file /etc/claude/environment-secret >> "$HOME/claude-runner.log" 2>&1
+ * **Your start script prints a write error containing`Resource temporarily unavailable` and exits**: your script shares its stdout or stderr with the `claude self-hosted-runner` or [orchestrator](</docs/en/self-hosted-environments-configuration#on-demand-runners>) process it starts, which has switched that shared pipe or socket to non-blocking mode. When the pipe is full, a write from your script fails with this operating-system error instead of waiting, and under `set -e` the script exits. To stop the error, send the runner’s or orchestrator’s output to a file that your script’s user can create. Append `>> "$HOME/claude-runner.log" 2>&1` to the command that starts it, ahead of any `&` that backgrounds it, and replace `<writable-dir>` as the [quickstart](</docs/en/self-hosted-environments-quickstart#set-up-manually>) describes:
+
+ claude self-hosted-runner --environment-secret-file /etc/claude/environment-secret --base-dir '<writable-dir>' >> "$HOME/claude-runner.log" 2>&1
Your script’s own output still goes where it went before, while what the runner writes to stdout and stderr, its startup errors included, goes to that file. Use this shell redirect rather than [`--log-file`](</docs/en/self-hosted-environments-reference#runner-cli-flags>) alone, which mirrors the log to a file while the runner keeps writing to stdout and stderr. If you already pass `--log-file`, keep it as well, because the redirect doesn’t change what that file receives.
* **Orchestrator logs`poll failed:` with a TLS certificate error and keeps retrying**: the orchestrator doesn’t trust the CA behind the certificate it received, as happens behind a TLS-inspecting proxy. Set [`NODE_EXTRA_CA_CERTS`](</docs/en/network-config#custom-ca-certificates>) in the orchestrator’s environment to a PEM file with the proxy’s root CA. Set it for the runners your `spawn-runner` hook starts too. For example, a line can end `poll failed: self signed certificate in certificate chain — retrying in 1s`, with the TLS library’s words between the colon and the dash. To confirm the fix, check that `connected` is `true` in the orchestrator’s [`/healthz`](</docs/en/self-hosted-environments-reference#health-endpoint>) body.
@@ -949,6 +958,8 @@
* **Turns fail with a 401** : when a turn ends with a 401 or 403 from the Anthropic API, the runner fetches a fresh [`CLAUDE_CODE_OAUTH_TOKEN`](</docs/en/self-hosted-environments-configuration#wrapper-scripts>) from Anthropic and passes it to the session. The failed turn isn’t retried. This token is short-lived, and the runner rotates it over the session’s stdin. When a fetch fails, the runner logs an `inference_token refresh failed` line that says when it will retry, and it keeps retrying for as long as the session runs. If every call starts failing about 30 minutes into a session, a wrapper script has likely severed the session’s stdin, so token rotations can’t reach it; see [Keep stdin and file descriptor 3 attached](</docs/en/self-hosted-environments-configuration#keep-stdin-and-file-descriptor-3-attached>). Before v2.1.274, the runner stopped retrying a failed fetch after a few attempts and waited for the next scheduled one. A failed turn didn’t trigger a fetch, so every turn failed with a 401 until the next scheduled fetch.
* **A turn fails in claude.ai/code with`This model needs a newer version of Claude Code`**: the Claude Code version that your runners start sessions with is older than the session’s model requires, so the API [rejects the request](</docs/en/errors#claude-code-does-not-support-this-model>). Upgrade the runners to the version the message asks for, or a later one, as described in Pin the version. Until then, people can pick a different model in the session.
* **Pod is killed mid-drain** : raise `terminationGracePeriodSeconds` to at least the value the runner logs at startup. See Shutdown timing.
+ * **Runner logs a`[runner:log]` line ending `was paused or too slow`**: the runner kept running and needs no restart. Until the stdout or stderr stream named in the line was read again, the runner discarded all but that stream’s newest 256 KiB of lines. If you passed [`--log-file`](</docs/en/self-hosted-environments-reference#runner-cli-flags>), look there for the discarded lines.
+ * **Runner logs`Nobody can read this process's stdout anymore`**: whatever read the runner’s stdout is gone, so the runner stops writing there for the rest of its run and keeps running. While stderr is still open, this line and the runner’s later status lines, `[runner:fatal]` lines included, go to stderr, so read them there.
Once logging is initialized, the runner writes its lifecycle log, including `[runner:fatal]` lines, to stdout, and debug output to stderr, all as plain-text lines rather than JSON. The base directory failures described in the troubleshooting entries above print to stderr before that point. Capture both streams with `--log-file`, which also lets `self-hosted-runner doctor` tail them, or with your platform’s log collection. Each session’s child process writes a separate debug log. On failure the runner surfaces the log’s tail alongside the session in claude.ai/code. Unless you started the runner with [`--remove-session-state`](</docs/en/self-hosted-environments-reference#runner-cli-flags>), it also keeps a failed session’s log on disk and prints its path in the runner log.
--- a/self-hosted-environments-quickstart.md
+++ b/self-hosted-environments-quickstart.md
@@ -29,7 +29,7 @@
* A Linux or macOS host or container with outbound HTTPS to `api.anthropic.com`, to `claude.ai` and the download hosts it redirects to for the install step below, and to your git host for the clone; the [network requirements table](</docs/en/self-hosted-environments-deploy#network-requirements>) has the full list. Windows isn’t supported as a runner host; run the runner in a Linux container instead. Developer workstations aren’t affected, since sessions start from claude.ai in a browser.
* A repository for the test session: a public one, or one this host can already clone by its HTTPS URL without being asked for credentials. An SSH key alone isn’t enough, because the runner clones the repository’s `https://` URL. To clone over SSH instead, see [Rewrite git URLs for private networks](</docs/en/self-hosted-environments-deploy#rewrite-git-urls-for-private-networks>).
- * A clock synchronized to real time, for example with NTP. Authentication fails when the clock is more than five minutes off; see [Troubleshooting](</docs/en/self-hosted-environments-deploy#troubleshooting>).
+ * A clock synchronized to real time, for example with NTP.
###
--- a/self-hosted-environments-reference.md
+++ b/self-hosted-environments-reference.md
@@ -97,6 +97,7 @@
`--hook-timeout <sec>`| `60`| Terminate the hook’s process tree after this many seconds. The timeout plus its 5-second kill grace must stay below `--expected-spawn-seconds`; the orchestrator enforces this at startup.
`--expected-spawn-seconds <sec>`| `120`| Expected p99 time from when the orchestrator receives a spawn request to when the runner registers, including any wait for capacity on your platform. The server enforces a range of 10 to 3600. Sent on every poll as the server-side lease: if no runner registers before it elapses, the session is re-offered with a fresh order ID. All replicas must share this value.
`--min-idle <n>`| `0`| Keep at least N idle session slots free by spawning standby runners proactively. `0` disables pre-warming. Pair with the runner’s `--exit-if-unused-min` so surplus standby runners reclaim themselves.
+`--shutdown-drain-sec <n>`| `0`| On `SIGTERM`, stop polling for spawn requests and give running `spawn-runner` hooks and any unanswered poll up to this many seconds to finish before stopping what’s left. At `0`, stop immediately. Maximum `3600`, which the orchestrator enforces at startup. To choose a value, see [Size `--shutdown-drain-sec` and the orchestrator’s stop timeout](</docs/en/self-hosted-environments-configuration#size-shutdown-drain-sec-and-the-supervisors-stop-timeout-for-the-orchestrator>). Requires Claude Code v2.1.299 or later.
`--debug-dir <path>`| unset| Write each spawn request’s work order and hook stderr to disk. Debug only; never set in production.
###
--- a/server-managed-settings.md
+++ b/server-managed-settings.md
@@ -158,6 +158,7 @@
* **Telemetry unit** : the `OTEL_EXPORTER_OTLP_*` exporter keys, the `OTEL_LOG_*` content-capture toggles, `OTEL_LOGS_EXPORTER`, and the beta tracing variables `ENABLE_BETA_TRACING_DETAILED` and `BETA_TRACING_ENDPOINT` follow the highest source that sets any of them as a unit. A source that delivers the `otelHeadersHelper` credential key claims the unit too, but lands these variables only when it is the selected source: a source that isn’t selected but delivers the key contributes none of them and still blocks lower sources from filling them in. Either way, an exporter endpoint from one source can never pair with credentials from another.
* **Credential-paired routing** : a source that pairs routing variables with a selected-source-only credential key, such as `apiKeyHelper` or `otelHeadersHelper`, contributes those routing variables only when it wins the slot.
* **`allowedProviders`** : a list set on the machine and a server-managed list combine as [its entry’s Scope note](</docs/en/settings-reference#allowedproviders>) states. Requires Claude Code v2.1.285 or later
+ * **First-party sign-in keys** : [`forceLoginOrgUUID`](</docs/en/settings-reference#forceloginorguuid>) and the `"claudeai"` and `"console"` values of [`forceLoginMethod`](</docs/en/settings-reference#forceloginmethod>). If you also deploy an MDM policy or managed settings file, set them there and in server-managed settings from claude.ai until every client runs v2.1.299 or later. For where to set the keys afterward, and which source’s value applies, see [Which managed source supplies login keys](</docs/en/managed-settings#which-managed-source-supplies-login-keys>).
* **Gateway sign-in keys** : Claude Code never reads [`forceLoginGatewayUrl`](</docs/en/settings-reference#forcelogingatewayurl>), [`gatewayInternalNetworks`](</docs/en/settings-reference#gatewayinternalnetworks>), or the `"gateway"` value of [`forceLoginMethod`](</docs/en/settings-reference#forceloginmethod>) from server-managed settings, so a value there neither applies nor hides one set in an MDM policy or managed settings file. The [`managedSourcesBehavior` entry](</docs/en/settings-reference#managedsourcesbehavior>) says which admin source on the machine supplies them.
###
--- a/settings-reference.md
+++ b/settings-reference.md
@@ -2722,12 +2722,12 @@
Idle compaction is on by default for conversations that meet all of these conditions:
- * **Session** : you’re in an interactive terminal session, or in the VS Code extension’s chat panel or the desktop app’s Code tab on an account that Anthropic selects
+ * **Session** : you’re in an interactive terminal session, in the VS Code extension’s chat panel, or in the desktop app’s Code tab when the session runs on your machine or over SSH
* **Auto-compaction** : `autoCompactEnabled` is on
* **Prompt cache** : the conversation is on the [one-hour prompt cache TTL](</docs/en/prompt-caching#which-ttl-each-request-gets>)
* **Feature flags** : Claude Code can [fetch feature flags from Anthropic](</docs/en/env-vars#features-that-need-feature-flag-fetching>)
* **Size** : the conversation’s context has reached the token threshold, which you can change from its default of 200,000
- * **Idle time** : about 54 minutes have passed since the last request, and your computer is awake at that point
+ * **Idle time** : about an hour has passed since the last request, and your computer stays awake until then
To turn idle compaction off, set this key to `false`.
@@ -2777,7 +2777,7 @@
Compacted using a summary written while you were away · turn off with "idleCompaction": false in settings.json
-You don’t need to do anything. To turn idle compaction off, set `idleCompaction` to `false` in `~/.claude/settings.json` or another [settings file](</docs/en/settings#settings-files-and-who-they-affect>). In the VS Code extension’s chat panel and the desktop app’s Code tab, idle compaction runs for accounts that Anthropic selects. Claude Code writes the summary while you’re away, then compacts with it only if your next message comes an hour or more after the last request.
+You don’t need to do anything. To turn idle compaction off, set `idleCompaction` to `false` in `~/.claude/settings.json` on the machine or WSL distribution where the session runs, or in another [settings file](</docs/en/settings#settings-files-and-who-they-affect>).
###
@@ -5931,7 +5931,7 @@
`forceLoginMethod`
-Restrict which kind of account people can log in with. Set `"claudeai"` to allow only claude.ai accounts, `"console"` to allow only Claude Console accounts, or `"gateway"` to send people to a [cloud gateway](</docs/en/claude-apps-gateway>) instead of a first-party login. Administrators set it in managed settings and pair it with `forceLoginOrgUUID` to keep developers’ claude.ai logins inside one organization. If you set it to `"claudeai"` or `"console"` in any settings file, Claude Code also stops offering the [keyless Console sign-in](</docs/en/authentication#sign-in-without-an-api-key>) in the sessions that file applies to.
+Restrict which kind of account people can log in with. Set `"claudeai"` to allow only claude.ai accounts, `"console"` to allow only Claude Console accounts, or `"gateway"` to send people to a [cloud gateway](</docs/en/claude-apps-gateway>) instead of a first-party login. Administrators set it in managed settings and pair it with `forceLoginOrgUUID` to keep developers’ claude.ai logins inside one organization. If you set it to `"claudeai"` in any settings file, Claude Code also stops offering the [keyless Console sign-in](</docs/en/authentication#sign-in-without-an-api-key>) in the sessions that file applies to. With `"console"` alone, people can still reach the keyless sign-in after a failed login. To stop Claude Code offering it, see [Stop offering the keyless sign-in on managed machines](</docs/en/authentication#stop-offering-the-keyless-sign-in-on-managed-machines>), which also lists what else `forceLoginOrgUUID` changes.
* **Scope** : `Any file`. Claude Code honors `"gateway"` from the same sources as `forceLoginGatewayUrl` and treats it as unset everywhere else.
* **Type** : string, one of:
@@ -6417,7 +6417,7 @@
Restriction allowlists| Takes the list whole from the highest source that sets it, without adding entries from lower sources. When the highest source doesn’t set one, takes it whole from the next source down| `availableModels`, `allowedMcpServers`, `allowedProviders`, `strictKnownMarketplaces`, `allowedChannelPlugins`, and the `fallbackModel` chain
Values taken whole| Takes the value whole from the highest source that sets it, without combining entries or fields from lower sources. When the highest source doesn’t set it, takes it whole from the next source down| `sandbox.credentials.awsPairs`, `sandbox.ripgrep`
Provided MCP servers| Combines the server names from every source. When two sources set the same name, applies the higher source’s whole entry| `managedMcpServers`
-Read from the highest-priority source only| Reads the key only from the highest-priority source that carries a policy key, so a lower source’s value is ignored even when the highest source sets none| `apiKeyHelper`, `awsAuthRefresh`, `awsCredentialExport`, `gcpAuthRefresh`, `otelHeadersHelper`, `proxyAuthHelper`, `forceLoginOrgUUID`, the `"claudeai"` and `"console"` values of `forceLoginMethod`, `parentSettingsBehavior`, `modelPicker`, `policyHelper`, `permissions.defaultMode`
+Read from the highest-priority source only| Reads the key only from the highest-priority source that carries a policy key, so a lower source’s value is ignored even when the highest source sets none| `apiKeyHelper`, `awsAuthRefresh`, `awsCredentialExport`, `gcpAuthRefresh`, `otelHeadersHelper`, `proxyAuthHelper`, `parentSettingsBehavior`, `modelPicker`, `policyHelper`, `permissions.defaultMode`
`env`| [Merges per variable across admin sources](</docs/en/managed-settings#keys-read-from-every-admin-source>), under both `"first-wins"` and `"merge"`| `env`
Every other key| Takes the value from the highest source that sets it| `cleanupPeriodDays`, `model`
@@ -6426,6 +6426,7 @@
* **`policyHelper`** : Claude Code honors it only when the highest source that carries a policy key is an MDM policy or a managed settings file, so under server-managed settings it doesn’t apply.
* **`modelOverrides`** : pairs with `availableModels`. Claude Code takes `modelOverrides` from the highest source that sets it, unless a higher source sets `availableModels` without `modelOverrides`. In that case it ignores `modelOverrides` from every source.
* **`forceLoginGatewayUrl`, `gatewayInternalNetworks`, and the `"gateway"` value of `forceLoginMethod`**: Claude Code never reads any of them from server-managed settings, so a value there neither applies nor hides one set in an MDM policy or managed settings file. Among the admin sources on the machine, only the highest-ranked one that carries a policy key supplies them, whether or not server-managed settings are also present.
+ * **`forceLoginOrgUUID` and the `"claudeai"` and `"console"` values of `forceLoginMethod`**: look up which value applies in [Which managed source supplies login keys](</docs/en/managed-settings#which-managed-source-supplies-login-keys>) rather than in the table.
* **`allowedProviders`** : after the table’s rule, the machine’s own list still limits the result, as its entry’s Scope note states.
To confirm which sources combined on a machine, run `/status` and [read the `Setting sources` line](</docs/en/managed-settings#read-the-source-in-/status>).
--- a/sub-agents.md
+++ b/sub-agents.md
@@ -842,7 +842,7 @@
2. Run `claude` again from your shell, or open a new VS Code conversation.
3. Ask Claude to wait when you need a result first, for example “run the reviewer subagent and wait for its report”.
-To keep working while Claude waits, press **Ctrl+B** in the terminal or click [**Run in background**](</docs/en/vs-code#move-a-running-command-or-subagent-to-the-background>) in VS Code. If you set the [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`](</docs/en/env-vars>) environment variable to `1` instead of turning fork mode off, Claude waits for every subagent. Background commands are off too, and **Ctrl+B** doesn’t move anything to the background.
+To keep working while Claude waits, press **Ctrl+B** in the terminal or click [**Run in background**](</docs/en/vs-code#move-a-running-command-or-subagent-to-the-background>) in VS Code. If you set the [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`](</docs/en/env-vars>) environment variable to `1` instead of turning fork mode off, Claude waits for subagents to finish before it continues. Background commands are off too, and **Ctrl+B** doesn’t move anything to the background.
####
--- a/troubleshoot-install.md
+++ b/troubleshoot-install.md
@@ -1023,16 +1023,34 @@
OAuth login fails in WSL2, SSH, or containers
-When Claude Code runs in WSL2, on a remote machine over SSH, or inside a container, the browser usually opens on a different host and its redirect can’t reach Claude Code’s local callback server. After you sign in, the browser shows a login code instead of redirecting back automatically. Paste that code into the terminal at the `Paste code here if prompted` prompt to complete login. If the browser doesn’t open at all from WSL2, set the `BROWSER` environment variable to your Windows browser path:
+If no browser opens, or the browser signs you in and then shows a connection error for a `localhost` address, you can finish signing in without fixing either problem. Sign in through the separate login URL that the terminal shows above its paste prompt instead:
+
+1
+
+Copy the login URL
+
+At the interactive login prompt, press `c` to copy the URL, or select it in the terminal. With `claude auth login`, copy the URL that it prints.
+
+2
+
+Sign in through that URL
+
+Open the URL in a browser on your local machine and sign in. The browser then shows a code instead of returning to `localhost`.
+
+3
+
+Paste the code
+
+Paste that code into the terminal at the prompt that begins `Paste code here`.
+
+If pasting the code into the interactive prompt does nothing, your terminal’s paste binding likely isn’t reaching the input field. Try your terminal’s alternate paste shortcut, often right-click or Shift+Insert in Windows Terminal, or use `claude auth login` instead, which reads the pasted code from standard input:
+
+ claude auth login
+
+This fallback also applies on native Windows or any terminal where pasting into the interactive prompt fails. On WSL2, if no browser opened, you can also let Claude Code open your Windows browser next time by setting the `BROWSER` environment variable to that browser’s path:
export BROWSER="/mnt/c/Program Files/Google/Chrome/Application/chrome.exe"
claude
-
-Alternatively, press `c` at the interactive login prompt to copy the OAuth URL, or copy the URL that `claude auth login` prints, and open it in a browser on your local machine. If pasting the code into the interactive prompt does nothing, your terminal’s paste binding likely isn’t reaching the input field. Try your terminal’s alternate paste shortcut, often right-click or Shift+Insert in Windows Terminal, or use `claude auth login` instead, which reads the pasted code from standard input:
-
- claude auth login
-
-This fallback also applies on native Windows or any terminal where pasting into the interactive prompt fails.
###
--- a/typescript.md
+++ b/typescript.md
@@ -1236,7 +1236,11 @@
console.log(result.plugins.map((plugin) => plugin.path));
-If the folder loaded, the printed list includes `/opt/my-app/plugins/reports`, and the plugin’s commands and subagents appear in `result.commands` and `result.agents`. An added folder stays part of the session. When you call `reloadPlugins()` again, Claude Code reloads it with the other plugins, and you don’t pass it in `addPlugins` again. If `reloadPlugins()` rejects, none of the `addPlugins` folders are added, so pass them in `addPlugins` again when you retry. When the rejection has one of the following causes, the session keeps the plugins it already had:
+If the folder loaded, the printed list includes `/opt/my-app/plugins/reports`, and the plugin’s commands and subagents appear in `result.commands` and `result.agents`. An added folder stays part of the session. When you call `reloadPlugins()` again, Claude Code reloads it with the other plugins, and you don’t pass it in `addPlugins` again.
+
+##### When `reloadPlugins()` doesn’t load the `addPlugins` folders
+
+If `reloadPlugins()` rejects, none of the `addPlugins` folders are added, so pass them in `addPlugins` again when you retry. When the rejection has one of the following causes, the session keeps the plugins it already had:
* **A relative`path` or a malformed entry**: the error message says `add_plugins must be a list of { type: "local", path } entries with absolute paths`. Claude Code refuses the whole list over one bad entry, so pass every entry as `{ type: "local", path }` with an absolute `path`
* **An administrator has turned on[`disableSideloadFlags`](</docs/en/settings-reference#disablesideloadflags>) in your managed settings**: the message says `reload_plugins add_plugins is disabled by managed settings (disableSideloadFlags)`. To load the folder, ask that administrator to remove the setting
@@ -1497,7 +1501,7 @@
toolUseID?: string;
};
-If you return `allow` with more than 4,096 items in `updatedPermissions`, Claude Code treats the result as invalid and denies the tool call. Each update counts as one item, and so does each entry in its `rules` or `directories` list. The denial message ends with `updatedPermissions may hold at most 4096 updates, rules and directories in all`. To have the call allowed, return 4,096 items or fewer.
+If you return `allow` with more than 4,096 items in `updatedPermissions`, Claude Code treats the result as invalid and denies the tool call. Each update counts as one item, and so does each entry in its `rules` or `directories` list. The denial message ends with `updatedPermissions may hold at most 4096 updates, rules and directories in all.` To have the call allowed, return 4,096 items or fewer.
###
@@ -1649,12 +1653,18 @@
`permission_policy`| `'always_allow' | 'always_ask' | 'always_deny'`| The approval policy for the tool’s calls, `always_ask` or `always_deny`. `always_allow` is ignored on an in-process server: to pre-approve a tool, list it in `allowedTools` instead
`org_max_permission`| `'allow' | 'ask' | 'blocked'`| A per-tool ceiling that an organization admin sets. Ignored on an in-process server, so leave it unset
+##### `permission_policy` values
+
Choose `always_ask` to approve each call yourself, or `always_deny` to block the tool outright:
* **`always_ask`** : each call to the tool [needs approval](</docs/en/agent-sdk/permissions#how-permissions-are-evaluated>), even if an `allowedTools` entry or allow rule covers it. The call goes to your `canUseTool` callback or `permissionPromptToolName` tool, unless it’s settled first. A [mod](</docs/en/plugins/mods/overview>) in a plugin you load [can approve it first](</docs/en/permissions#precedence-among-rules-hooks-and-mods>). Otherwise, in `dontAsk` mode it’s denied, and in `auto`, `plan`, and `bypassPermissions` mode it can be approved before it reaches your callback
* **`always_deny`** : a call to the tool [is denied](</docs/en/agent-sdk/permissions#how-permissions-are-evaluated>) in every permission mode, including `bypassPermissions`, but a mod in a plugin you load [can still approve it](</docs/en/permissions#precedence-among-rules-hooks-and-mods>)
-If you pass neither `canUseTool` nor `permissionPromptToolName`, or set `permissionPrompts` to `'none'`, an `always_ask` call that isn’t settled first is denied unless a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) allows it. In `auto`, `plan`, and `bypassPermissions` mode, a call to a tool marked `always_ask` can be approved before it reaches your `canUseTool` callback.
+If you pass neither `canUseTool` nor `permissionPromptToolName`, or set `permissionPrompts` to `'none'`, an `always_ask` call that isn’t settled first is denied unless a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) allows it.
+
+##### Permission modes that can approve an `always_ask` call
+
+In `auto`, `plan`, and `bypassPermissions` mode, a call to a tool marked `always_ask` can be approved before it reaches your `canUseTool` callback.
* **`auto`** : the auto mode [classifier](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) reviews the call and can allow it. To make every call reach your callback in `auto` mode, set `destructiveHint: true` in the tool’s annotations
* **`plan`** : while [auto mode is available](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) to the session, calls to an `always_ask` tool annotated `readOnlyHint: true` go to the auto mode classifier, which can allow them. Calls to other `always_ask` tools reach your callback. To make a read-only tool’s calls reach your callback too, add `destructiveHint: true` to that tool’s annotations alongside `readOnlyHint: true`. Alternatively, set [`useAutoModeDuringPlan`](</docs/en/settings-reference#useautomodeduringplan>) to `false`, which turns the classifier off during planning
@@ -4977,9 +4987,10 @@
humanSchedule: string;
recurring: boolean;
durable?: boolean; // true when persisted to .claude/scheduled_tasks.json; false when session-only
- };
-
-Returns the job ID and a human-readable description of the schedule.
+ nextFireAt?: number;
+ };
+
+Returns the job ID, a human-readable schedule, and the next run time. `nextFireAt` gives it in epoch milliseconds, with [jitter](</docs/en/scheduled-tasks#jitter>) already applied, so it’s when the job is set to run. The field requires TypeScript Agent SDK v0.3.299 or later and Claude Code v2.1.299 or later.
###
@@ -5011,10 +5022,11 @@
prompt: string;
recurring?: boolean;
durable?: boolean;
+ nextFireAt?: number;
}[];
};
-Returns the scheduled cron jobs: durable jobs from `.claude/scheduled_tasks.json` and session-only jobs from the current session. A session-only job carries `durable: false`; jobs read from disk omit the field.
+Returns the scheduled cron jobs: durable jobs from `.claude/scheduled_tasks.json` and session-only jobs from the current session. A session-only job carries `durable: false`; jobs read from disk omit the field. `nextFireAt` is the job’s next run time in epoch milliseconds, [jitter](</docs/en/scheduled-tasks#jitter>) included. No value is earlier than the `CronList` call: a job whose time [passed without a run](</docs/en/scheduled-tasks#how-scheduled-tasks-run>) carries the call’s time. The field requires TypeScript Agent SDK v0.3.299 or later and Claude Code v2.1.299 or later.
###
@@ -5791,7 +5803,7 @@
errors: Record<string, string>;
};
-When you call `setMcpServers()`, Claude Code applies these rules:
+The `setMcpServers()` 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. When you call `setMcpServers()`, Claude Code applies these rules:
* **Servers the call doesn’t name** : outside a [cloud session](</docs/en/claude-code-on-the-web>), Claude Code disconnects the servers an earlier `setMcpServers()` call added and the in-process SDK servers, and lists them in `removed`. Other servers keep running and aren’t listed in `removed`, among them the stdio, HTTP, and SSE servers from the `mcpServers` option, servers from settings files, and plugin-provided servers.
* **Stdio, HTTP, and SSE servers that an earlier`setMcpServers()` call added**: outside a cloud session, a server you name again with an identical config keeps its connection and tools. It appears in neither `added` nor `removed`. If you pass a changed config, Claude Code reconnects the server using that config and lists it in `added`, not in `removed`.
@@ -5800,7 +5812,10 @@
* **Built-in servers the CLI started at startup** : if the call names one, Claude Code drops that entry and reports it in `errors`.
* **Stdio, HTTP, or SSE servers that share a name with one from an MCP installation scope such as`.mcp.json`**: under that name the session uses your server’s tools rather than the [installation-scope server’s](</docs/en/mcp#mcp-installation-scopes>). Before Claude Code v2.1.305, Claude Code could disconnect your server and connect the installation-scope server when your app reloaded plugins.
-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`.
+`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`. An `errors` value starting `Blocked by enterprise` means policy refused the server, not that connecting failed:
+
+ * `Blocked by enterprise policy (allowedMcpServers/deniedMcpServers)`: the server isn’t in `added`. A [`deniedMcpServers`](</docs/en/managed-mcp#policy-based-control-with-allowlists-and-denylists>) entry matches it, or an `allowedMcpServers` list is set and omits it. If that list is in a settings file you load through `settingSources`, edit the file. If it’s in managed settings, ask your administrators to change it.
+ * `Blocked by enterprise managed policy`: the server is in `added`, with a `failed` row in `mcpServerStatus()`. Ask an administrator which policy blocks it.
###
--- a/vs-code.md
+++ b/vs-code.md
@@ -106,7 +106,7 @@
* `/plan open`: when you’re already in plan mode, opens the plan file in the editor.
* **Edit automatically** : Claude makes edits without asking.
* **Model** : select **Switch model…** from the command menu to change the model mid-session. You can also click the model name at the bottom of the prompt box to open the same picker. With Claude Code v2.1.284 or later, typing `/model` on its own in the prompt box opens the picker too. When the current model supports [effort levels](</docs/en/model-config#adjust-effort-level>), the picker also shows an **Effort** row and the model name button shows the selected level. When you pick a level other than `max`, Claude Code saves it for the current model as your default, under [`modelSettings`](</docs/en/settings-reference#modelsettings>) in your user settings; `max` applies to the current session only. The model name button and the **Effort** row require Claude Code v2.1.257 or later. When [dynamic workflows](</docs/en/workflows>) are enabled and the current model supports it, an **Ultracode** switch appears under the **Effort** row. Turn it on to have Claude plan a [workflow](</docs/en/workflows#let-claude-decide-with-ultracode>) for each substantive task in this session, at the selected effort level. While it’s on, the model name button shows `· Ultracode` after the level. The switch requires Claude Code v2.1.284 or later.
- * **Command menu** : click `/` or type `/` to open the command menu. Options include attaching files, switching models, and toggling extended thinking. The Customize section includes entries such as MCP servers, commands, output styles, hooks, memory, instructions, permissions, and plugins. Items with a terminal icon open in the integrated terminal.
+ * **Command menu** : click `/` or type `/` to open the command menu. Options include attaching files and switching models. The Customize section includes entries such as MCP servers, commands, output styles, hooks, memory, instructions, permissions, and plugins. Items with a terminal icon open in the integrated terminal.
* To browse commands such as `/usage` or [`/remote-control`](</docs/en/remote-control>), select **Slash commands** in the Customize section. A dialog lists them with a filter box. Pick one to run it. Typing `/` in the prompt box still suggests commands inline. Requires Claude Code v2.1.257 or later. Typing `/skills` also opens this dialog. Each [skill](</docs/en/skills>) row shows its [visibility](</docs/en/skills#override-skill-visibility-from-settings>), such as **On** or **Name only**. Click the visibility to change it, except on rows marked **locked** , such as plugin skills. The `/skills` shortcut and the visibility controls require Claude Code v2.1.280 or later.
* Select **Output styles** in the Customize section to pick an [output style](</docs/en/output-styles>), including your custom styles. Requires Claude Code v2.1.257 or later. To create a custom style instead, select **Build a custom style** from the **Output styles** menu. Claude Code writes the [style file](</docs/en/output-styles#create-a-custom-output-style>) for you at the project or user level. Requires Claude Code v2.1.261 or later.
* Select **Hooks** in the Customize section to view the [hooks](</docs/en/hooks>) loaded in the session, grouped by event. You can add, edit, or remove hooks saved in your user, project, and local settings files. Hooks from other sources, such as managed settings or plugins, are read-only. Requires Claude Code v2.1.269 or later.
@@ -131,7 +131,7 @@
* When the countdown runs out, the minutes disappear and the icon turns red, or your theme’s error color, until the next response. The cache has likely expired, so expect a slower, more expensive response to your next message while the cache rebuilds. If the five-minute lifetime keeps running out between your messages, see [Choose the TTL yourself](</docs/en/prompt-caching#choose-the-ttl-yourself>).
* Right after the conversation is [compacted](</docs/en/prompt-caching#compacting-the-conversation>), the icon also turns red without minutes until the next response, because the cache doesn’t cover the compacted conversation yet.
* **Agent map** : when the conversation includes [subagents](</docs/en/sub-agents>), an agent count such as **2 agents** appears at the bottom of the prompt box. Its dot shows whether any subagent is working or waiting for your permission. Click the agent count to open the agent map, which draws the conversation’s subagents as a tree under the main agent, each with its status, elapsed time, and token count. Click a subagent to see its prompt and tool calls, open its read-only transcript, or stop it while it runs. Requires Claude Code v2.1.269 or later. The map also lists the session’s other [background tasks](</docs/en/tools-reference#background-commands>), such as background shell commands and [monitors](</docs/en/tools-reference#monitor-tool>), below the agents. Click a row to open the task’s card and stop it there. To open the map when no agent count is showing, such as when Claude has started a background shell but no subagents, type `/tasks` in the prompt box. Background tasks in the map and the typed `/tasks` require Claude Code v2.1.277 or later. With Claude Code v2.1.286 or later, when you click **Stop** or press `Esc`, the current turn ends. Background agents keep running until they finish or you stop them from the map.
- * **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.
+ * **Extended thinking** : lets Claude spend more time reasoning through complex problems. To turn it off or back on, use the **Thinking** switch in the Model section of the command menu (`/`). On models where [thinking can’t be turned off](</docs/en/model-config#extended-thinking>), the menu has no **Thinking** switch and thinking stays on. A thinking block that shows only a label, such as `Thought for 12s`, has no text and doesn’t open when you click it. To see thinking summaries, set [`showThinkingSummaries`](</docs/en/settings-reference#showthinkingsummaries>) to `true` in `~/.claude/settings.json`, then run **Developer: Reload Window** from the Command Palette. Thinking blocks you already have stay empty. In responses after the reload, click a block or press `Ctrl+O` to expand them all.
* **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.
###
@@ -591,6 +591,14 @@
summarize the changes I've made to the auth module
When creating pull requests, Claude generates descriptions based on the actual code changes and can add context about testing or implementation decisions.
+
+###
+
+
+
+Reopen a conversation that moved into a worktree
+
+On a reopened conversation, the **This session is in worktree** banner means the conversation’s working directory is the [worktree](</docs/en/worktrees>) it names, not the folder this window has open. To open the worktree in a new VS Code window, click **Open worktree** on the banner. A conversation moves into a worktree when, for example, you [ask Claude to work in one](</docs/en/worktrees#ask-claude-to-create-a-worktree>). When you reopen it, or the panel reopens it after a window reload, it resumes in the worktree if Claude Code created the worktree under `.claude/worktrees/` and it still exists. Before Claude Code v2.1.300, an empty conversation opened instead. On those versions, update the extension.
##
@@ -663,7 +671,7 @@
Insert @-Mention Reference| `Option+K` (Mac) / `Alt+K` (Windows/Linux)| Insert a reference to the current file and selection (requires editor to be focused)
Accept Change at Cursor| -| Accept the change at the cursor while reviewing a proposed edit one change at a time. Requires Claude Code v2.1.275 or later
Reject Change at Cursor| -| Revert the change at the cursor while reviewing a proposed edit one change at a time. Requires Claude Code v2.1.275 or later
-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
+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. On Windows/Linux, `Ctrl+Alt+F` opens VS Code’s Find instead while focus is in the Debug Console or a searchable list such as the Explorer. Focus an editor or the Claude panel and press it again. Requires Claude Code v2.1.221 or later
Rename Session Tab| -| Rename the session in the active Claude tab. 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. 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. Requires Claude Code v2.1.257 or later
@@ -703,7 +711,7 @@
Parameter| Description
---|---
`prompt`| Text to pre-fill in the prompt box. Must be URL-encoded. The prompt is pre-filled but not submitted automatically.
-`session`| A session ID to resume instead of starting a new conversation. The session must belong to the workspace currently open in VS Code. If the session isn’t found, a fresh conversation starts instead. If the session is already open in a tab, that tab is focused. To capture a session ID programmatically, see [Continue conversations](</docs/en/headless#continue-conversations>).
+`session`| ID of a session to resume, from the folder open in VS Code. With Claude Code v2.1.300 or later, a session from the main checkout or a [worktree](</docs/en/worktrees>) of that folder’s repository also resumes. If the session isn’t found, a fresh conversation starts instead. If the session is already open in a tab, that tab is focused. To capture a session ID programmatically, see [Continue conversations](</docs/en/headless#continue-conversations>).
For example, to open a tab pre-filled with “review my changes”:
@@ -946,6 +954,7 @@
`Claude Code process exited with code 1`, or another code| [Claude Code process exited with code N](</docs/en/errors#claude-code-process-exited-with-code-n>)
`Could not locate the Claude CLI on PATH`| [Could not locate the Claude CLI on PATH](</docs/en/errors#could-not-locate-the-claude-cli-on-path>)
`The connection to Claude Code ended before this message completed`| [The connection to Claude Code ended before this message completed](</docs/en/errors#the-connection-to-claude-code-ended-before-this-message-completed>)
+`The Claude Code program for this computer, the <build> build, could not be found`| [The Claude Code program for this computer could not be found](</docs/en/errors#the-claude-code-program-for-this-computer-could-not-be-found>)
`claude` isn’t found in VS Code’s integrated terminal| Run CLI in VS Code
###
--- a/worktrees.md
+++ b/worktrees.md
@@ -204,7 +204,7 @@
Reuse a worktree name
-Passing `--worktree` a name whose directory already exists opens that existing worktree instead of creating a new one. With the default `"fresh"` base, a reopened worktree resets to the repository’s default branch instead of continuing at its old tip when all of the following hold:
+If a worktree with the name you pass to `--worktree` already exists, Claude Code opens it instead of creating a new one. If Claude Code stops with an error containing `belongs to a different repository` or `is a leftover worktree`, see The worktree directory `belongs to a different repository`. With the default `"fresh"` base, a reopened worktree resets to the repository’s default branch instead of continuing at its old tip when all of the following hold:
* It has no uncommitted changes or untracked files.
* It is still on the branch Claude Code created for it.
@@ -351,6 +351,26 @@
+`Can only use --worktree in a git repository`
+
+This error means you passed `--worktree` in a directory that isn’t a git checkout, and no `WorktreeCreate` hook is active.
+
+ * In a folder with no version control, run `git init` there, create a first commit, then retry.
+ * In a checkout of another version control system, set up the hook the message suggests.
+ * To work in the directory directly, start Claude without `--worktree`.
+
+###
+
+
+
+The worktree directory `belongs to a different repository`
+
+The errors `belongs to a different repository` and `is a leftover worktree` both mean git ties the directory for the worktree name you passed to another location. This can happen after you copy or move a project. Pass a different worktree name. If the directory has no work to keep and you didn’t copy or move a project, you can remove it and retry the same name. After a copy or move, that retry can fail with `is already checked out elsewhere in this repository`, so use a different name.
+
+###
+
+
+
Claude Code refuses to use a worktree
An error starting `Refusing to use <path> as an isolation worktree` means Claude Code checked the directory’s git identity before adopting it as a session’s or subagent’s isolated checkout, and declined it. The check runs whether Claude Code is creating the worktree, entering an existing one, or reusing one from an earlier run. In most cases the rest of the message says the directory’s git metadata resolves into the main checkout: for example, its `.git` file points at the main repository’s own `.git` directory, or git resolves its working tree to the main checkout through a `core.worktree` redirect. From such a directory, an ordinary git command such as `git reset --hard` would act on the main checkout instead of the worktree. Claude Code also refuses when the directory has a `.git` entry it can’t read, rather than assuming the worktree is safe. A directory with no git metadata at all, such as one your `WorktreeCreate` hook creates, passes the check only when no git repository contains it. If the hook creates the directory inside a repository, git resolves it to that repository’s checkout and Claude Code refuses it with the `git resolves its working tree to` message, so have the hook create its directories outside any repository. Claude Code leaves the refused directory in place, since it may hold work. Match the message to its recovery, whether it follows `Refusing to use <path>` or appears in a resume message; some endings occur only in resume messages: