Changes on
111 changes detected
--- a/2026-w14.md
+++ b/2026-w14.md
@@ -73,7 +73,7 @@
`/buddy`: hatch a small creature that watches you code. An April Fools’ joke, no longer available
-`disableSkillShellExecution` setting blocks inline shell from skills, slash commands, and plugin commands
+`disableSkillShellExecution` setting blocks inline shell from skills, custom commands, and plugin commands
Edit tool now works on files viewed via `cat` or `sed -n` without a separate Read
--- a/2026-w20.md
+++ b/2026-w20.md
@@ -48,7 +48,7 @@
The Rewind menu added “Summarize up to here” to compress earlier context while keeping recent turns intact
-Remote Control, `/schedule`, Claude.ai MCP connectors, and notification preferences are now disabled when `ANTHROPIC_API_KEY`, `apiKeyHelper`, or `ANTHROPIC_AUTH_TOKEN` is set, even alongside a Claude.ai login; unset the API key to use these features
+Remote Control, `/schedule`, claude.ai MCP connectors, and notification preferences are now disabled when `ANTHROPIC_API_KEY`, `apiKeyHelper`, or `ANTHROPIC_AUTH_TOKEN` is set, even alongside a claude.ai login; unset the API key to use these features
MCP stdio servers now receive `CLAUDE_PROJECT_DIR` in their environment, matching hooks, and plugin configs can reference `$CLAUDE_PROJECT_DIR` in commands
--- a/admin-setup.md
+++ b/admin-setup.md
@@ -26,7 +26,7 @@
Google Cloud’s Agent Platform| You want to inherit existing GCP compliance controls and billing
Microsoft Foundry| You want to inherit existing Azure compliance controls and billing
-Some Claude Code features require a claude.ai account. [Claude Code on the web](</docs/en/claude-code-on-the-web>), [Routines](</docs/en/routines>), [Code Review](</docs/en/code-review>), [Remote Control](</docs/en/remote-control>), and the [Chrome extension](</docs/en/chrome>) aren’t available through Console API keys or cloud-provider credentials alone. If you deploy through Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, plan whether developers also need Claude for Teams or Enterprise seats. Each feature page lists its plan requirements. For the full provider comparison covering authentication, regions, and feature parity, see the [enterprise deployment overview](</docs/en/third-party-integrations>). Each provider’s auth setup is in [Authentication](</docs/en/authentication>). Proxy and firewall requirements in [Network configuration](</docs/en/network-config>) apply regardless of provider. If you want a single endpoint in front of multiple providers or centralized request logging, see [LLM gateway](</docs/en/llm-gateway>).
+Some Claude Code features require a claude.ai account. [Cloud sessions](</docs/en/claude-code-on-the-web>), [Routines](</docs/en/routines>), [Code Review](</docs/en/code-review>), [Remote Control](</docs/en/remote-control>), and the [Chrome extension](</docs/en/chrome>) aren’t available through Console API keys or cloud-provider credentials alone. If you deploy through Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, plan whether developers also need Claude for Teams or Enterprise seats. Each feature page lists its plan requirements. For the full provider comparison covering authentication, regions, and feature parity, see the [enterprise deployment overview](</docs/en/third-party-integrations>). Each provider’s auth setup is in [Authentication](</docs/en/authentication>). Proxy and firewall requirements in [Network configuration](</docs/en/network-config>) apply regardless of provider. If you want a single endpoint in front of multiple providers or centralized request logging, see [LLM gateway](</docs/en/llm-gateway>).
##
@@ -100,7 +100,7 @@
* [Organization default model](</docs/en/model-config#organization-default-model>): set which model new sessions start on. Users can change it unless your organization enforces the default, which is available to a limited set of organizations; ask your Anthropic account team.
* [Organization effort limits](</docs/en/model-config#organization-effort-limits>): cap effort levels per role. Enforced server-side.
-None of these controls reach sessions on Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, or [Claude Platform on AWS](</docs/en/claude-platform-on-aws>). On those providers, use managed settings instead: `availableModels` for restrictions, `model` for a default, and [`maxEffortLevel`](</docs/en/settings-reference#maxeffortlevel>) for an effort cap. [Claude Code on the web](</docs/en/claude-code-on-the-web>) has its own admin surface: on the Cloud environments page in admin settings, Owners create [organization-shared environments](</docs/en/cloud-environments#organization-shared-environments>) that set the [network access level](</docs/en/cloud-environments#network-access>), environment variables, and setup script for members’ cloud sessions. Owners choose the organization’s default environment separately, at [claude.ai/admin-settings/claude-code](<https://claude.ai/admin-settings/claude-code>). Permission rules and sandboxing cover different layers. Denying WebFetch blocks Claude’s fetch tool, but if Bash is allowed, `curl` and `wget` can still reach any URL. Sandboxing closes that gap with a network domain allowlist enforced at the OS level. For the threat model these controls defend against, see [Security](</docs/en/security>).
+None of these controls reach sessions on Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, or [Claude Platform on AWS](</docs/en/claude-platform-on-aws>). On those providers, use managed settings instead: `availableModels` for restrictions, `model` for a default, and [`maxEffortLevel`](</docs/en/settings-reference#maxeffortlevel>) for an effort cap. [Cloud sessions](</docs/en/claude-code-on-the-web>) have their own admin surface: on the Cloud environments page in admin settings, Owners create [organization-shared environments](</docs/en/cloud-environments#organization-shared-environments>) that set the [network access level](</docs/en/cloud-environments#network-access>), environment variables, and setup script for members’ cloud sessions. Owners choose the organization’s default environment separately, at [claude.ai/admin-settings/claude-code](<https://claude.ai/admin-settings/claude-code>). Permission rules and sandboxing cover different layers. Denying WebFetch blocks Claude’s fetch tool, but if Bash is allowed, `curl` and `wget` can still reach any URL. Sandboxing closes that gap with a network domain allowlist enforced at the OS level. For the threat model these controls defend against, see [Security](</docs/en/security>).
##
--- a/agent-loop.md
+++ b/agent-loop.md
@@ -202,7 +202,7 @@
Max turns (`max_turns` / `maxTurns`)| Maximum tool-use round trips| No limit
Max budget (`max_budget_usd` / `maxBudgetUsd`)| Maximum cost before stopping| No limit
-When either limit is hit, the SDK returns a `ResultMessage` with a corresponding error subtype (`error_max_turns` or `error_max_budget_usd`). See Handle the result for how to check these subtypes and [`ClaudeAgentOptions`](</docs/en/agent-sdk/python#claudeagentoptions>) / [`Options`](</docs/en/agent-sdk/typescript#options>) for syntax. The budget cap covers [subagents](</docs/en/agent-sdk/subagents>): their spend counts toward the total. Once spend reaches the cap, spawning another subagent fails with `Budget limit reached`, and Claude Code stops any background subagents still running. The cap-enforcement behaviors require Claude Code v2.1.217 or later. With [streaming input](</docs/en/agent-sdk/streaming-vs-single-mode>), a message that is still queued when a turn ends at the max-turns limit stays queued. Claude Code doesn’t add it to that turn’s last model call. It starts a new turn for the message, and the max-turns count starts over for that turn.
+When either limit is hit, the SDK returns a `ResultMessage` with a corresponding error subtype (`error_max_turns` or `error_max_budget_usd`). See Handle the result for how to check these subtypes and [`ClaudeAgentOptions`](</docs/en/agent-sdk/python#claudeagentoptions>) / [`Options`](</docs/en/agent-sdk/typescript#options>) for syntax. The budget cap covers [subagents](</docs/en/agent-sdk/subagents>): their spend counts toward the total. Once spend reaches the cap, spawning another subagent fails with `Budget limit reached`, and Claude Code stops any background subagents still running. The cap-enforcement behaviors require Claude Code v2.1.217 or later. With [streaming input](</docs/en/agent-sdk/streaming-vs-single-mode>), a message that is still queued when a turn ends at the max-turns limit stays queued. Claude Code doesn’t add it to that turn’s last model call. It starts a new turn for the message, and the max-turns count starts over for that turn. The budget total keeps accumulating across messages, and once spend reaches `maxBudgetUsd`, later messages in the same conversation end with the `error_max_budget_usd` result. A [`/clear`](</docs/en/agent-sdk/cost-tracking>) starts the budget over.
###
@@ -251,7 +251,7 @@
Model
-If you don’t set `model`, the SDK uses Claude Code’s default, which depends on your authentication method and subscription. Set it explicitly (for example, `model="claude-sonnet-5"`) to pin a specific model or to use a smaller model for faster, cheaper agents. See [models](<https://platform.claude.com/docs/en/about-claude/models>) for available IDs.
+Set the `model` option to choose which model runs the session. For more information, see [Choose a model](</docs/en/agent-sdk/configuration#choose-a-model>).
##
@@ -346,7 +346,7 @@
`error_during_execution`| An error interrupted the loop (for example, a cancelled request)| No
`error_max_structured_output_retries`| No valid structured output was produced within the configured retry limit: every attempt failed validation, or a model fallback retracted the completed output with no successful retry| No
-The `result` field holds the final text output and is only present on the `success` variant, so always check the subtype before reading it. All result subtypes carry `total_cost_usd`, `usage`, `num_turns`, and `session_id` so you can track cost and resume even after errors. Two things to guard for:
+The `result` field holds the final text output and is only present on the `success` variant, so always check the subtype before reading it. All result subtypes carry `total_cost_usd`, `usage`, `num_turns`, and `session_id` so you can track cost and resume even after errors. Guard for these cases:
* After a session crash, the final result is an `error_during_execution` whose cost fields may be zeroed and whose `stop_reason` is `null`, and the process exits after emitting it. See [Recover totals after a session crash](</docs/en/agent-sdk/cost-tracking#recover-totals-after-a-session-crash>).
* In Python, `total_cost_usd`, `usage`, and `model_usage` are typed as optional, so check that they aren’t `None` before you read them.
--- a/agent-view.md
+++ b/agent-view.md
@@ -858,7 +858,7 @@
* [Run agents in parallel](</docs/en/agents>): compare agent view with subagents, agent teams, and worktrees
* [Cross-session messaging](</docs/en/cross-session-messaging>): have your sessions pass findings to each other
* [Agent teams](</docs/en/agent-teams>): coordinate multiple sessions that message each other
- * [Claude Code on the web](</docs/en/claude-code-on-the-web>): run sessions in a managed cloud environment instead of locally
+ * [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>): run sessions in a managed cloud environment instead of locally
##
@@ -871,6 +871,7 @@
Version| Change
---|---
v2.1.268| When a delete is refused because git or your `WorktreeRemove` hook couldn’t remove the worktree, the message names the cause, including how a hook ended and the start of its stderr. For a linked worktree under the repository’s `.claude/worktrees/` with no uncommitted changes to tracked files, no nested repository inside it, and no other session’s record naming it, deleting the session again removes the directory anyway, from agent view or with `claude rm <id> --force-remove-worktree <worktree-id>`. Before this release, the row showed only `worktree could not be removed (WorktreeRemove hook failed)` or git’s error, the hook’s stderr went only to the debug log, and deleting again was refused the same way.
+v2.1.268| After the first `←` shows `Press ← again to open agents`, or `Press ← again to go back to agents` in an attached session, the first press that comes at least a second later switches, even when quicker presses in between were ignored. Before this release, each ignored press restarted the wait, so pressing `←` again at a steady pace didn’t switch until you paused for over a second.
v2.1.260| When you background a session, your other sessions’ [agent listing](</docs/en/cross-session-messaging#see-which-sessions-claude-can-reach>) shows the conversation once, as its background session, and their messages to it no longer reach the terminal you moved it from. Before this release, that terminal could stay listed as a second interactive session under the conversation’s name, and a session that had messaged the conversation before the move kept delivering to that terminal.
v2.1.260| When a delete is refused over unpushed commits, the message names the worktree’s branch and how many commits are unpushed, and deleting the session again discards the worktree and its commits. Before this release, the refusal said only `worktree has commits that are not pushed anywhere`, deleting again was refused the same way, and deleting the session required pushing the commits or removing the worktree by hand.
v2.1.257| `←` detaches from an attached session while the `/btw` overlay is open, even mid-answer, and the overlay reopens when you next attach. Before this release, `←` didn’t detach while the overlay was open.
--- a/agents.md
+++ b/agents.md
@@ -10,7 +10,7 @@
In every approach the workers are Claude sessions. To involve a different tool, expose it to Claude as an [MCP server](</docs/en/mcp>). Three more tools support this work without being a way to run agents themselves:
* [Worktrees](</docs/en/worktrees>) give each session a separate git checkout, so parallel sessions never edit the same files. Use them for sessions you run yourself. A session you dispatch from agent view [moves into a worktree of its own before it edits files](</docs/en/agent-view#how-file-edits-are-isolated>), and subagents you spawn can each get one too.
- * [Cross-session messaging](</docs/en/cross-session-messaging>) lets Claude list and message your other Claude Code sessions on this machine, on another machine, or on [Claude Code on the web](</docs/en/claude-code-on-the-web>), so sessions you run yourself can pass findings and status between themselves.
+ * [Cross-session messaging](</docs/en/cross-session-messaging>) lets Claude list and message your other Claude Code sessions on this machine, on another machine, or [in the cloud](</docs/en/claude-code-on-the-web>), so sessions you run yourself can pass findings and status between themselves.
* [`/batch`](</docs/en/commands>) is a [skill](</docs/en/skills>) that has Claude split one large change into 5 to 30 worktree-isolated subagents that each open a pull request. It’s a packaged use of subagents and worktrees, not a separate coordination style.
A few other features run Claude without you driving each step, but they solve a different problem than splitting work across agents:
--- a/amazon-bedrock.md
+++ b/amazon-bedrock.md
@@ -58,7 +58,7 @@
Before you invoke an Anthropic model for the first time, submit use case details. You do this once per AWS account.
1. Ensure you have the right IAM permissions described below
- 2. Navigate to the [Amazon Bedrock console](<https://console.aws.amazon.com/bedrock/>)
+ 2. Go to the [Amazon Bedrock console](<https://console.aws.amazon.com/bedrock/>)
3. Select an Anthropic model from the **Model catalog**
4. Complete the use case form. Access is granted immediately after submission.
@@ -378,7 +378,7 @@
Use the Mantle endpoint
-Mantle is an Amazon Bedrock endpoint that serves Claude models through the native Anthropic API shape rather than the Amazon Bedrock Invoke API. It uses the same AWS credentials, IAM permissions, and `awsAuthRefresh` configuration described earlier on this page.
+Mantle is an Amazon Bedrock endpoint that serves Claude models through the native Anthropic API shape rather than the Amazon Bedrock Invoke API. It uses the same AWS credentials, IAM permissions, and `awsAuthRefresh` configuration.
###
--- a/artifacts.md
+++ b/artifacts.md
@@ -116,7 +116,7 @@
Read the comments on https://claude.ai/code/artifact/5fbea6f3-... and make the changes the commenters ask for.
-If Claude tells you it can’t read comments, check three things:
+If Claude tells you it can’t read comments, confirm your version, your session, and your feature-flag setting:
* You’re running Claude Code v2.1.221 or later.
* You’re not in your first session since you installed Claude Code or upgraded from a version before v2.1.221. In that [first session after an install or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>), Claude might not be able to read comments yet; start a new session and ask again.
@@ -237,7 +237,7 @@
Bring the result back to your session
-An artifact can act as a lightweight editor for a decision you then hand back to Claude. Ask for an export control that produces text you can paste into the terminal, so the result of interacting with the page flows back into the session instead of staying on the page.
+An artifact can act as a lightweight editor for a decision you then send back to Claude. Ask for an export control that produces text you can paste into the terminal, so the result of interacting with the page flows back into the session instead of staying on the page.
Make a triage board artifact with each open issue as a draggable card across Now, Next, Later, and Cut columns. Add a "Copy as prompt" button that gives me the final ordering to paste back here.
--- a/authentication.md
+++ b/authentication.md
@@ -1,4 +1,4 @@
-Claude Code supports multiple authentication methods depending on your setup. Individual users can log in with a Claude.ai account, while teams can use Claude for Teams or Enterprise, the Claude Console, or a cloud provider like Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry.
+Claude Code supports multiple authentication methods depending on your setup. Individual users can log in with a claude.ai account, while teams can use Claude for Teams or Enterprise, the Claude Console, or a cloud provider like Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry.
##
@@ -8,8 +8,8 @@
After [installing Claude Code](</docs/en/setup#install-claude-code>), run `claude` in your terminal. On first launch, Claude Code opens a browser window for you to log in. If you’ve set the `ANTHROPIC_API_KEY` environment variable, Claude Code skips the login prompt and asks you to approve the key instead. 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:
- * **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.
+ * **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.
* **Claude Console** : log in with your Console credentials. Your admin must have invited you first. You can sign in with or without creating an API key.
* **Cloud providers** : if your organization uses [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), or [Microsoft Foundry](</docs/en/microsoft-foundry>), set the required environment variables before running `claude`, or select **3rd-party platform** at the login prompt, which launches an interactive setup wizard for Bedrock and Vertex AI. No browser login is needed.
* **Cloud gateway** : if your organization runs a self-hosted [Claude apps gateway](</docs/en/claude-apps-gateway>), sign in with corporate SSO through `/login`. The gateway-issued token is the session’s only credential.
@@ -58,7 +58,7 @@
Install and log in
-Team members install Claude Code and log in with their Claude.ai accounts.
+Team members install Claude Code and log in with their claude.ai accounts.
###
@@ -186,7 +186,7 @@
* On Windows, credentials are stored in `%USERPROFILE%\.claude\.credentials.json` and inherit the access controls of your user profile directory, which restricts the file to your user account by default.
* If you’ve set the `CLAUDE_CONFIG_DIR` environment variable, Claude Code keeps the `.credentials.json` file under that directory instead, including the file the macOS fallback writes, and keys the macOS Keychain entry to that directory too, so a session with a different `CLAUDE_CONFIG_DIR` reads a different entry.
* Claude Code manages `.credentials.json` through `/login` and `/logout`. To route requests through a custom API endpoint, set the [`ANTHROPIC_BASE_URL`](</docs/en/env-vars>) environment variable instead.
- * **Supported authentication types** : Claude.ai credentials, Claude API credentials, Microsoft Foundry Auth, Bedrock Auth, Vertex Auth, Anthropic profile and [Workload Identity Federation](<https://platform.claude.com/docs/en/manage-claude/workload-identity-federation>) credentials, and [Claude apps gateway](</docs/en/claude-apps-gateway>) session tokens.
+ * **Supported authentication types** : claude.ai credentials, Claude API credentials, Microsoft Foundry Auth, Bedrock Auth, Vertex Auth, Anthropic profile and [Workload Identity Federation](<https://platform.claude.com/docs/en/manage-claude/workload-identity-federation>) credentials, and [Claude apps gateway](</docs/en/claude-apps-gateway>) session tokens.
* **Custom credential scripts** : configure the [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>) setting to run a shell script that returns an API key.
* **Refresh intervals** : Claude Code re-runs `apiKeyHelper` after five minutes by default. Set the `CLAUDE_CODE_API_KEY_HELPER_TTL_MS` environment variable for custom refresh intervals. See [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>) for the other cases in which Claude Code re-runs the helper.
* **Slow helper notice** : if `apiKeyHelper` takes longer than 10 seconds to return a key, Claude Code displays a warning notice in the prompt bar showing the elapsed time. If you see this notice regularly, check whether your credential script can be optimized.
@@ -218,7 +218,7 @@
6. Anthropic profile and federation credentials, the credentials that the `ant` CLI and Workload Identity Federation use. A profile that `ant auth login` wrote ranks here only when you name it in `ANTHROPIC_PROFILE`; otherwise it ranks below `/login`. See Anthropic profiles and federation credentials.
7. Subscription OAuth credentials from `/login`. This is the default for Claude Pro, Max, Team, and Enterprise users.
-A signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) session sits outside this list: it is a provider selection like Amazon Bedrock or Google Cloud’s Agent Platform, and it outranks them. When a gateway session exists, the CLI authenticates with the gateway token even if `CLAUDE_CODE_USE_BEDROCK`, `CLAUDE_CODE_USE_VERTEX`, or `CLAUDE_CODE_USE_FOUNDRY` is set, and credential sources above such as the bearer token, API key, `apiKeyHelper`, and profiles are not used. If your machine’s [managed settings](</docs/en/managed-settings>) set [`forceLoginMethod`](</docs/en/settings-reference#forceloginmethod>) to `"gateway"` or set [`forceLoginGatewayUrl`](</docs/en/settings-reference#forcelogingatewayurl>), and you don’t select a cloud provider through a variable such as `CLAUDE_CODE_USE_BEDROCK` or `CLAUDE_CODE_USE_VERTEX`, your session uses only the gateway sign-in. Claude Code skips the other credential sources and asks you to sign in with `/login`. See [Administrator policy requires a Cloud gateway sign-in](</docs/en/errors#administrator-policy-requires-a-cloud-gateway-sign-in>) for what you see with each leftover credential. Before v2.1.261, or before v2.1.265 on a machine that sets only `forceLoginGatewayUrl`, Claude Code used a leftover saved login on these machines until you signed in to the gateway. If you have an active Claude subscription but also have `ANTHROPIC_API_KEY` set in your environment, Claude Code uses the API key once you approve it. This can cause authentication failures if the key belongs to a disabled or expired organization. Run `unset ANTHROPIC_API_KEY` to fall back to your subscription, and check `/status` to confirm which method is active. When a login and an API key are both configured, `/status` marks the credential that isn’t in use. [Claude Code on the Web](</docs/en/claude-code-on-the-web>) always uses your subscription credentials. If you set `ANTHROPIC_API_KEY` or `ANTHROPIC_AUTH_TOKEN` in the sandbox environment, it doesn’t override your subscription credentials.
+A signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) session sits outside this list: it is a provider selection like Amazon Bedrock or Google Cloud’s Agent Platform, and it outranks them. When a gateway session exists, the CLI authenticates with the gateway token even if `CLAUDE_CODE_USE_BEDROCK`, `CLAUDE_CODE_USE_VERTEX`, or `CLAUDE_CODE_USE_FOUNDRY` is set, and credential sources above such as the bearer token, API key, `apiKeyHelper`, and profiles are not used. If your machine’s [managed settings](</docs/en/managed-settings>) set [`forceLoginMethod`](</docs/en/settings-reference#forceloginmethod>) to `"gateway"` or set [`forceLoginGatewayUrl`](</docs/en/settings-reference#forcelogingatewayurl>), and you don’t select a cloud provider through a variable such as `CLAUDE_CODE_USE_BEDROCK` or `CLAUDE_CODE_USE_VERTEX`, your session uses only the gateway sign-in. Claude Code skips the other credential sources and asks you to sign in with `/login`. See [Administrator policy requires a Cloud gateway sign-in](</docs/en/errors#administrator-policy-requires-a-cloud-gateway-sign-in>) for what you see with each leftover credential. Before v2.1.261, or before v2.1.265 on a machine that sets only `forceLoginGatewayUrl`, Claude Code used a leftover saved login on these machines until you signed in to the gateway. If you have an active Claude subscription but also have `ANTHROPIC_API_KEY` set in your environment, Claude Code uses the API key once you approve it. This can cause authentication failures if the key belongs to a disabled or expired organization. Run `unset ANTHROPIC_API_KEY` to fall back to your subscription, and check `/status` to confirm which method is active. When a login and an API key are both configured, `/status` marks the credential that isn’t in use. [Cloud sessions](</docs/en/claude-code-on-the-web>) always use your subscription credentials. If you set `ANTHROPIC_API_KEY` or `ANTHROPIC_AUTH_TOKEN` in the cloud environment, it doesn’t override your subscription credentials.
####
--- a/auto-mode-config.md
+++ b/auto-mode-config.md
@@ -81,7 +81,7 @@
* **Organization**
* **Primary use of Claude Code** : defaults to software development
* **Cloud provider(s)**
- * **Repository visibility** : a repository is assumed private unless its remote host and name indicate otherwise, or a visibility check earlier in the conversation the classifier reads shows it is public. The classifier reads your messages and the commands Claude runs, not their output, so the evidence has to be something it can read, such as your own message naming the repository as public; the output of a `gh repo view` on its own doesn’t reach it. The transcript-evidence check requires Claude Code v2.1.200 or later
+ * **Repository visibility** : a repository is assumed private unless its remote host and name indicate otherwise, or the classifier reads a visibility check earlier in the conversation showing it is public. In the classifier requests sent by Claude Code itself, the classifier reads your messages and the commands Claude runs, not their output. The evidence has to be something the classifier can read, such as your own message naming the repository as public; the output of a `gh repo view` on its own doesn’t reach it. The transcript-evidence check requires Claude Code v2.1.200 or later
* **Internal sharing / snippet hosting** : public paste and gist services are treated as outside the trust boundary until you name one
* **Org-specific CLIs**
* **Secrets management**
@@ -149,7 +149,7 @@
Run `/auto-mode-setup` to have Claude Code draft `autoMode.environment` entries, and sometimes rule entries too, from your project and your recent sessions in it. If you accept the draft, Claude Code writes it to `~/.claude/settings.json`.
-`/auto-mode-setup` requires a Pro, Max, or Team plan and Claude Code v2.1.228 or later. On native Windows it requires v2.1.233 or later. You can’t run it in [Claude Code on the web](</docs/en/claude-code-on-the-web>). It also needs [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>), so you can’t run it in a session where you’ve turned flag fetching off.
+`/auto-mode-setup` requires a Pro, Max, or Team plan and Claude Code v2.1.228 or later. On native Windows it requires v2.1.233 or later. You can’t run it in a [cloud session](</docs/en/claude-code-on-the-web>). It also needs [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>), so you can’t run it in a session where you’ve turned flag fetching off.
###
@@ -267,7 +267,7 @@
Route all shell commands through the classifier
-By default, narrow Bash and PowerShell allow rules such as `Bash(npm test)` stay in effect in auto mode, and Claude Code resolves them before the classifier runs. Claude Code suspends only the broad rules that grant arbitrary code execution, such as `Bash(*)` or wildcarded interpreters, together with every rule that names [`Monitor`](</docs/en/tools-reference#monitor-tool>), because Monitor commands run through the shell. This means a narrow rule can still let a destructive argument through without the classifier seeing it, for example a script path or flag the rule’s prefix didn’t anticipate. Set `autoMode.classifyAllShell` to `true` to suspend every Bash and PowerShell allow rule while auto mode is active, so the classifier evaluates every shell command regardless of your allow list.
+By default, narrow Bash and PowerShell allow rules such as `Bash(npm test)` stay in effect in auto mode. Claude Code resolves them before the classifier runs, unless the command carries [per-command allowed domains](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>). Claude Code suspends only the broad rules that grant arbitrary code execution, such as `Bash(*)` or wildcarded interpreters, together with every rule that names [`Monitor`](</docs/en/tools-reference#monitor-tool>), because Monitor commands run through the shell. This means a narrow rule can still let a destructive argument through without the classifier seeing it, for example a script path or flag the rule’s prefix didn’t anticipate. Set `autoMode.classifyAllShell` to `true` to suspend every Bash and PowerShell allow rule while auto mode is active, so the classifier evaluates every shell command regardless of your allow list.
{
"autoMode": {
--- a/best-practices.md
+++ b/best-practices.md
@@ -1,4 +1,4 @@
-Claude Code is an agentic coding environment. Unlike a chatbot that answers questions and waits, Claude Code can read your files, run commands, make changes, and autonomously work through problems while you watch, redirect, or step away entirely. This changes how you work. Instead of writing code yourself and asking Claude to review it, you describe what you want and Claude figures out how to build it. Claude explores, plans, and implements. But this autonomy still comes with a learning curve. Claude works within certain constraints you need to understand. This guide covers patterns that have proven effective across Anthropic’s internal teams and for engineers using Claude Code across various codebases, languages, and environments. For how the agentic loop works under the hood, see [How Claude Code works](</docs/en/how-claude-code-works>).
+Claude Code is an agentic coding environment. Unlike a chatbot that answers questions and waits, Claude Code can read your files, run commands, make changes, and autonomously work through problems while you watch, redirect, or step away entirely. This changes how you work. Instead of writing code yourself and asking Claude to review it, you describe what you want and Claude figures out how to build it. Claude explores, plans, and implements. But this autonomy still comes with a learning curve. Claude works within certain constraints you need to understand. This guide covers patterns that have proven effective across Anthropic’s internal teams and for engineers using Claude Code across various codebases, languages, and environments. For how the agentic loop works, see [How Claude Code works](</docs/en/how-claude-code-works>).
* * *
@@ -469,7 +469,7 @@
* [Worktrees](</docs/en/worktrees>): run separate CLI sessions in isolated git checkouts so edits don’t collide
* [Cross-session messaging](</docs/en/cross-session-messaging>): let the sessions you run yourself pass findings to each other
* [Desktop app](</docs/en/desktop#work-in-parallel-with-sessions>): manage multiple local sessions visually, optionally each in its own worktree
- * [Claude Code on the web](</docs/en/claude-code-on-the-web>): run sessions in the cloud, on Anthropic-managed infrastructure by default
+ * [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>): run sessions on Anthropic-managed infrastructure by default
* [Agent view](</docs/en/agent-view>): research preview. Run `claude agents` to dispatch sessions that keep running in the background and watch them from one screen
* [Agent teams](</docs/en/agent-teams>): experimental and disabled by default. Automated coordination of multiple sessions with shared tasks, messaging, and a team lead
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,75 @@
This page is generated from the [CHANGELOG.md on GitHub](<https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md>). Run `claude --version` to check your installed version.
+
+
+
+2.1.273
+
+September 15, 2026
+
+ * Added `x-claude-code-request-class`, `x-claude-code-agent-type`, `x-claude-code-prev-tool-durations`, `x-claude-code-compaction` and `x-claude-code-context-compacted` request headers for LLM gateways; opt in with `CLAUDE_CODE_GATEWAY_HINT_HEADERS=1`
+ * Added a notification when an MCP server disconnects mid-session and automatic reconnection gives up, pointing at `/mcp`
+ * Added forking a session started with `claude --remote-control` or `/remote-control` from the Claude app; the fork runs as a background session on your computer
+ * Fixed Bash commands the permission checker cannot fully analyze skipping the prompt under `permissions.blockReadsOutsideWorkingDirectories`, and a subshell hiding a dangerous `rm` in bypass mode
+ * Fixed skills synced from claude.ai staying available after your organization turns Skills off; they now move to the recoverable trash
+ * Fixed `allowManagedMcpServersOnly`, `deniedMcpServers` and `disableClaudeAiConnectors` set via MDM or `managed-settings.json` being ignored when server-managed settings are also present
+ * Fixed 401/403 errors on Bedrock, Vertex and Foundry, and Claude apps gateway 403s, telling you to run `/login`; the message now names the credential to refresh or points to your gateway administrator
+ * Fixed `/login`, `/upgrade`, and `/extra-usage` discarding earlier thinking from the conversation, which forced a full prompt-cache rewrite on the next request
+ * Fixed auto mode stopping for approval when the Artifact tool uploads a file you attached to the chat in a cloud or Remote Control session
+ * Fixed a long-running session recreating a stub `.git/info/exclude` after the repository’s `.git` directory was removed or moved away
+ * Fixed the main prompt dropping a `!` typed at the start while already in shell mode, so negated commands like `! grep …` can be typed
+ * Fixed Read on macOS refusing a dragged-in screenshot, or any file the system reports under a second path, with “symlink resolution changed after permission was checked”
+ * Fixed `permissions.blockReadsOutsideWorkingDirectories`: a memory directory chosen by a repository’s settings is no longer loaded into the prompt, recalled, indexed, or used by memory extraction
+ * Fixed sub-agents and background agents being reported as failed, with their result never delivered, when the final streamed reply omitted token usage or carried no model id
+ * Fixed the context meter and auto-compact counting advisor-tool turns at roughly twice their real context size, which made auto-compact fire at about half the real window
+ * Fixed `/tui` refusing to restart because of an agent-team teammate that had already finished its work and was no longer shown in the agents panel
+ * Fixed saved scheduled tasks running in the wrong session after `.claude/scheduled_tasks.json` was copied into another folder, such as a new worktree
+ * Fixed SDK and `--output-format stream-json` output dropping a subagent’s remaining messages and final report after it is moved to the background mid-run (e.g. by `CLAUDE_AUTO_BACKGROUND_TASKS`)
+ * Fixed `/install-github-app` reporting a SAML single sign-on block as “admin permissions required”
+ * Fixed Remote Control clients attached to a Claude Desktop, VS Code or JetBrains session being refused when they ask for the session’s context window usage
+ * Fixed the spinner showing a doubled ellipsis (”……”) on compaction status lines such as “Running PreCompact hooks…”
+ * Fixed a false-positive spinner tip suggesting the frontend-design plugin after reading or publishing Artifacts
+ * Reverted a 2.1.268 change that checked Read and Edit deny rules on Bash lines the permission checker can’t analyze (`eval`, `env -C`); commands like `time -p make build` prompt again instead of being denied
+ * Improved responsiveness in long sessions: hook progress and sub-agent activity no longer re-process the whole conversation on every update
+ * Improved the Artifact tool’s error when a publish includes a file type artifacts don’t serve: Claude is told which types are served and what to do instead, and the terminal shows one plain line
+ * Improved the Artifact tool’s page read to state the capabilities and database rules the artifact service holds for the page, for anyone who can publish to it
+ * Improved artifact database writes: an update can now remove a single field instead of rewriting the whole document
+ * Improved artifact publishing: a publish whose connection drops after reaching claude.ai is now re-sent safely instead of failing or creating a duplicate version
+ * Improved the cloud-session GitHub error for an IP allow list, a suspended app installation or SAML single sign-on to show the cause instead of a generic install hint
+ * Improved `/autofix-pr`: when `gh pr view` fails it now shows gh’s own error (sign-in, SAML, rate limit) instead of a generic exit-code line
+ * Improved `/autofix-pr` to say why GitHub webhook delivery couldn’t be set up for the PR (for example, no linked GitHub account) instead of a generic warning
+ * Improved `/web-setup` errors: a refused GitHub token now lists the likely reasons and the fix, and a connection failure names a configured proxy or TLS certificate problem
+ * Improved the in-session SSL certificate and proxy connection errors to name the error code and what to fix, such as `NODE_EXTRA_CA_CERTS` for an untrusted corporate CA
+ * Improved the error when a cloud session can’t be created because your Claude login expired or was revoked: it now tells you to run `/login`
+ * Improved the error shown when an MCP server’s sign-in expires mid-session to say how to re-authenticate (`/mcp`)
+ * Changed auto mode on Bedrock, Vertex and Foundry to use the local classifier by default for now; set `CLAUDE_CODE_AUTO_MODE_SERVER=1` to use the platform’s server-side classifier
+ * Changed `OTEL_LOG_TOOL_DETAILS=1` to also include real agent, skill, plugin and MCP server names on cost and token metrics
+ * Changed sign-in with a Claude account to also request access to your claude.ai plugins
+ * Changed `/bug` and `/feedback` reports to include only model-behavior params (model, system prompt, tools) from the last API request, omitting request metadata and `CLAUDE_CODE_EXTRA_BODY` fields
+ * [VSCode] Fixed “Report a problem” still appearing, and `/bug` / `/feedback` opening a report form, for organizations that have product feedback disabled
+ * [VSCode] Fixed a red “Claude Code process exited with code 4294967295” banner appearing after completed turns on Windows
+ * Windows: Improved the network-path permission check for UNC paths when a mapped network drive was added with `--add-dir`
+ * [Claude Code on the web] Fixed routines losing access to an organization connector, and still calling the old one, after an admin removed and re-added that connector
+ * [Claude Code on the web] Fixed creating a self-hosted environment from organization settings occasionally failing with a server error and leaving a half-created environment behind
+ * [Claude Code on the web] Changed the admin “Share cloud sessions” setting to live under Data and privacy instead of the Claude Code page, where Data and privacy admins can also manage it
+ * [Claude Code on the web] Added a “Discard unsaved changes?” confirmation before the New routine page or the Edit routine dialog throws away a routine name, prompt or edit you typed
+ * [Claude Code on the web] Removed the full-page desktop-app download screen that new users without a cloud environment saw on Mac and Windows; they now go straight to setup
+ * [Claude Code on the web] Improved the routine detail page: menu and rename in the breadcrumb, the on/off switch and Run now at the top, and run history beside the routine’s settings
+ * [Claude Tag] Fixed Claude going silent minutes after reinstalling the app when an Enterprise Grid was disconnected but one of its workspaces stayed connected
+ * [Claude Tag] Fixed scheduled tasks set up in an organization-shared private Slack channel silently never posting; they now keep running in the thread they were created in
+ * [Claude Tag] Fixed replying in an older Slack thread while Claude is mid-task sometimes restarting it from scratch and losing work it had not pushed yet
+ * [Claude Tag] Fixed Claude occasionally dropping a message with an incorrect “couldn’t find a Claude Code environment” notice right after your account token refreshed
+ * [Claude Tag] Fixed AWS connections refusing region-less endpoints such as Budgets, Savings Plans, WAF Classic and Import/Export; Global Accelerator requests now sign correctly
+ * [Claude Tag] Improved AWS connection failures: when a request can’t be signed, such as a hostname with no region, Claude is told why and how to fix it instead of a bare error
+ * [Claude Tag] Fixed OAuth client-credentials and JWT-bearer connections failing with providers that return a lowercase token type; requests now send the standard Bearer scheme
+ * [Claude Tag] Fixed adding a channel manager being refused on Enterprise Grid shared channels, on channels where Claude hasn’t been used yet, and on legacy private channels
+ * [Claude Tag] Changed Claude to start watching related public channels on its own, such as an incident channel a conversation depends on, instead of only when asked
+ * [Claude Tag] Fixed the admin Memory page not listing Slack channels Claude set up on its own even when they had saved memory; admins can now open, edit and delete that memory
+ * [Code Review] Fixed merging the base branch into a PR whose earlier review listed “Additional findings” triggering a full re-review; these pushes now get the lighter follow-up review
+ * [Code Review] Fixed a whole REVIEW.md being ignored because of an @-mention, a code span wrapped across lines, or a backticked HTML tag; only lines linking to changed files are withheld
+ * [Code Review] Improved suggested fixes to say what the fix must keep working when other code depends on the behavior being changed
+ * [Code Review] Improved review comments that point to a second affected location to state that location’s issue in a full sentence instead of a cut-off stub
+ * [Code Review] Fixed `/ultrareview --post` so a retry after a GitHub error posts the findings comment exactly once instead of never or twice; the comment now names the reviewed commit
+ * [Code Review] Fixed empty or content-identical pushes being re-reviewed on GitHub repositories whose owner or name contains a capital letter; these pushes are now skipped
--- a/channels.md
+++ b/channels.md
@@ -172,7 +172,7 @@
* `Marketplace "claude-plugins-official" not found`: add the marketplace with `/plugin marketplace add anthropics/claude-plugins-official`, then retry the install.
* The plugin is [not found in the marketplace](</docs/en/discover-plugins#install-plugins>): check the plugin name.
-When the install asks for an installation scope, choose the user scope option so the plugin is available across all your projects. If the install summary reports `Run /reload-plugins to activate.`, you can skip that here, because restarting in the next step picks up the plugin.
+When the install asks for an installation scope, choose the user scope option so the plugin is available across all your projects.If the install summary reports `Run /reload-plugins to activate.`, you don’t need to act on it here, because restarting in the next step picks up the plugin.
3
@@ -225,7 +225,7 @@
* `Marketplace "claude-plugins-official" not found`: add the marketplace with `/plugin marketplace add anthropics/claude-plugins-official`, then retry the install.
* The plugin is [not found in the marketplace](</docs/en/discover-plugins#install-plugins>): check the plugin name.
-When the install asks for an installation scope, choose the user scope option so the plugin is available across all your projects. If the install summary reports `Run /reload-plugins to activate.`, you can skip that here, because restarting in the next step picks up the plugin.
+When the install asks for an installation scope, choose the user scope option so the plugin is available across all your projects.If the install summary reports `Run /reload-plugins to activate.`, you don’t need to act on it here, because restarting in the next step picks up the plugin.
2
@@ -331,8 +331,8 @@
Feature| What it does| Good for
---|---|---
-[Claude Code on the web](</docs/en/claude-code-on-the-web>)| Runs tasks in a fresh cloud sandbox, cloned from GitHub| Delegating self-contained async work you check on later
-[Claude in Slack](</docs/en/slack>)| Spawns a web session from an `@Claude` mention in a channel or thread| Starting tasks directly from team conversation context
+[Cloud sessions](</docs/en/claude-code-on-the-web>)| Run tasks in a fresh cloud sandbox, cloned from GitHub| Delegating self-contained async work you check on later
+[Claude in Slack](</docs/en/slack>)| Spawns a cloud session from an `@Claude` mention in a channel or thread| Starting tasks directly from team conversation context
Standard [MCP server](</docs/en/mcp>)| Claude queries it during a task; nothing is pushed to the session| Giving Claude on-demand access to read or query a system
[Remote Control](</docs/en/remote-control>)| You drive your local session from claude.ai or the Claude mobile app| Steering an in-progress session while away from your desk
--- a/channels-reference.md
+++ b/channels-reference.md
@@ -50,7 +50,7 @@
Create the project
-The permission relay examples later on this page import `zod` directly, so it installs alongside the MCP SDK. Create a new directory and install both:
+The permission relay examples import `zod` directly, so it installs alongside the MCP SDK. Create a new directory and install both:
mkdir webhook-channel && cd webhook-channel
bun add @modelcontextprotocol/sdk zod
@@ -100,7 +100,7 @@
},
})
-The file does three things in order:
+The file configures the server, connects over stdio, and starts an HTTP listener, in that order:
* **Server configuration** : creates the MCP server with `claude/channel` in its capabilities, which is what tells Claude Code this is a channel. Claude Code delivers the `instructions` string to Claude as context when the server connects: tell Claude what events to expect, whether to reply, and how to route replies if it should.
* **Stdio connection** : connects to Claude Code over stdin/stdout. This is standard for any [MCP server](<https://modelcontextprotocol.io/docs/concepts/transports#standard-io>).
@@ -728,7 +728,7 @@
curl -d "yes <id>" -H "X-Sender: dev" localhost:8788
-The local dialog closes, the `reply` tool runs, and Claude’s reply lands in the stream. The three channel-specific pieces in this file:
+The local dialog closes, the `reply` tool runs, and Claude’s reply appears in the stream. The three channel-specific pieces in this file:
* **Capabilities** in the `Server` constructor: `claude/channel` registers the notification listener, `claude/channel/permission` opts in to permission relay, `tools` lets Claude discover the reply tool.
* **Outbound paths** : the `reply` tool handler is what Claude calls for conversational responses; the `PermissionRequestSchema` notification handler is what Claude Code calls when a permission dialog opens. Both call `send()` to broadcast over `/events`, but they’re triggered by different parts of the system.
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -85,7 +85,7 @@
Bash command changes not tracked
-Checkpointing does not track files modified by bash commands. For example, if Claude Code runs:
+Checkpointing does not track files modified by Bash commands. For example, if Claude Code runs:
rm file.txt
mv old.txt new.txt
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
@@ -43,7 +43,7 @@
This quickstart walks the minimal path: register an OAuth client in your IdP, write a `gateway.yaml`, run the gateway alongside Postgres with Docker Compose, and verify sign-in end to end. It uses an Amazon Bedrock upstream; Claude Platform on AWS, Google Cloud’s Agent Platform, Microsoft Foundry, and the Anthropic API are equally supported by swapping the `upstreams` block as shown in the [configuration reference](</docs/en/claude-apps-gateway-config#upstreams>). At the end you have a gateway a developer can `/login` to.
-**Deploy on your private network.** Claude Code only connects to a gateway whose address is private. This is a security guard, because a trusted gateway can push settings that run commands on developer machines. Put the gateway behind an internal load balancer or VPN and give it a hostname that resolves to private IPs only.
+**Deploy on your private network.** Claude Code only connects to a gateway whose address is private. This is a security guard, because a trusted gateway can push settings that run commands on developer machines. Put the gateway behind an internal load balancer or VPN and give it a hostname that resolves to private IPs only. If your internal network is numbered from public IPv4 space your organization owns, see Allow a gateway on public address space you own.
###
@@ -60,7 +60,7 @@
PostgreSQL 14 or later| Backs the device sign-in flow, where the browser callback writes and the polling CLI reads, plus rate-limit counters. Any managed Postgres works, including the smallest tier. Without spend limits configured, the gateway stores a few KB of short-lived auth state; with [spend limits](</docs/en/claude-apps-gateway-spend-limits>), it also holds durable spend, audit, and identity tables that should be backed up. TLS via `?sslmode=require` is recommended.
Model upstream| Amazon Bedrock credentials, Claude Platform on AWS credentials, Google Cloud credentials, a Microsoft Foundry resource, or an Anthropic API key. Multiple upstreams are supported with failover.
HTTPS| The gateway must be reachable over `https://` from developer laptops and from any browser used for sign-in; the gateway serves the device-verification page on the same listener. Either provide a TLS cert via `listen.tls` or run behind a TLS-terminating ingress, and set `listen.public_url` to the external origin in both cases. A plain `http://` origin is accepted only when the gateway host is loopback: `localhost`, `127.0.0.1`, or `::1`.
-Private-network address| At `/login`, Claude Code requires the gateway’s hostname or IP address to resolve only to private addresses: RFC 1918, link-local, CGNAT `100.64.0.0/10`, IPv6 ULA `fc00::/7`, or loopback. For a gateway you host, any public address is rejected; see the [threat model](</docs/en/claude-apps-gateway-deploy#threat-model-summary>) in the deployment guide. The check runs on each resolved IP, so if any address the name resolves to is public, `/login` rejects the URL. If developer machines route HTTPS through a corporate proxy, sign-in also requires the proxy host to resolve to private addresses; if it doesn’t, add the gateway host to `NO_PROXY` so the CLI connects directly.
+Private-network address| At `/login`, Claude Code requires the gateway’s hostname or IP address to resolve only to private addresses: RFC 1918, link-local, CGNAT `100.64.0.0/10`, IPv6 ULA `fc00::/7`, or loopback. For a gateway you host, any public address outside a block you declare is rejected; see the [threat model](</docs/en/claude-apps-gateway-deploy#threat-model-summary>) in the deployment guide. If developer machines route HTTPS through a corporate proxy, sign-in also requires the proxy host to resolve to private addresses; if it doesn’t, add the gateway host to `NO_PROXY` so the CLI connects directly. If your internal network is numbered from public IPv4 space your organization owns, declare those blocks so `/login` accepts a gateway there.
Linux runtime| The gateway server runs only on the native Linux binary. macOS works for local development. Windows isn’t supported as a server platform.
###
@@ -169,7 +169,7 @@
[gateway] 2026-06-10T17:03:21.431Z info migration 6 applied
[gateway] 2026-06-10T17:03:21.512Z info claude gateway listening on http://0.0.0.0:8080
-If boot exits before the `claude gateway listening on` line, the last line of stderr names the problem:
+The gateway also logs a warning that `access_control.allow_cidrs` is empty. That’s expected here, because nothing limits which client addresses the gateway serves until you set an allow list. The [`access_control` reference](</docs/en/claude-apps-gateway-config#http-tuning>) has the recommended ranges.If boot exits before the `claude gateway listening on` line, the last line of stderr names the problem:
* an unreachable Postgres
* a Postgres role without DDL permission
@@ -182,7 +182,7 @@
Verify the auth surface
-Three checks confirm the gateway can authenticate a real user before you hand it to a developer.The examples use the gateway’s public URL; for the local Compose setup without an ingress, substitute `http://localhost:8080` in the first two checks. The third check opens `verification_uri_complete`, which is built from `public_url`, so for local Compose set `public_url: http://localhost:8080` in `gateway.yaml`, and add `http://localhost:8080/oauth/callback` as a second redirect URI on the OAuth client from step 1, because the gateway builds the IdP `redirect_uri` from `public_url`. The verification link then opens in your local browser.In Windows PowerShell, run `curl.exe`; the bare `curl` is an alias for `Invoke-WebRequest` and rejects these flags.First, fetch the discovery document, which confirms the gateway is up, the config is valid, and all boot checks passed:
+Three checks confirm the gateway can authenticate a real user before you share it with a developer.The examples use the gateway’s public URL; for the local Compose setup without an ingress, substitute `http://localhost:8080` in the first two checks. The third check opens `verification_uri_complete`, which is built from `public_url`, so for local Compose set `public_url: http://localhost:8080` in `gateway.yaml`, and add `http://localhost:8080/oauth/callback` as a second redirect URI on the OAuth client from step 1, because the gateway builds the IdP `redirect_uri` from `public_url`. The verification link then opens in your local browser.In Windows PowerShell, run `curl.exe`; the bare `curl` is an alias for `Invoke-WebRequest` and rejects these flags.First, fetch the discovery document, which confirms the gateway is up, the config is valid, and all boot checks passed:
curl -s https://claude-gateway.internal.example.com/.well-known/oauth-authorization-server | jq
@@ -246,6 +246,37 @@
}
The developer presses Enter to connect. The first-connect TLS fingerprint prompt still appears. Once the file is on a machine, a developer who hasn’t completed the gateway sign-in sees one of the messages described under [Administrator policy requires a Cloud gateway sign-in](</docs/en/errors#administrator-policy-requires-a-cloud-gateway-sign-in>). Developers who select a cloud provider through an environment variable such as `CLAUDE_CODE_USE_BEDROCK` don’t need the gateway sign-in. A developer can’t set this up manually. The login picker has no gateway option, and `forceLoginGatewayUrl` is ignored in a developer’s own settings files. `forceLoginMethod` alone, without a URL, leaves the developer at a “Contact your IT administrator” message. The login keys belong in the file you push to machines, not in the gateway’s `managed.policies[].cli` block, which only reaches clients that are already connected.
+
+###
+
+
+
+Allow a gateway on public address space you own
+
+Some organizations number their internal network from a public IPv4 block they own, such as a carrier’s own address space or a legacy `/8`, so their gateway can’t have a private address. List those blocks in the `gatewayInternalNetworks` managed setting. `/login` then accepts a gateway inside a listed block when the developer’s machine connects to it from an address inside the same block. This requires Claude Code v2.1.268 or later on the developer machine; earlier versions ignore the key and apply the private-address rule.
+
+`gatewayInternalNetworks` is for internal networks that happen to be numbered from public address space. It doesn’t make it safe to expose a gateway to the internet: a trusted gateway can push settings that run commands on developer machines.Keep the gateway unreachable from outside your network with your firewall or load balancer rules. Set the gateway’s [`access_control.allow_cidrs`](</docs/en/claude-apps-gateway-config#http-tuning>) to the same blocks you declare here, so the gateway itself refuses clients from anywhere else. Behind a load balancer or ingress, set `listen.trusted_proxies` to that front end as well, because the gateway otherwise matches `allow_cidrs` against the front end’s own address rather than the developer’s.
+
+Add the key to the same managed settings source as the login keys: the managed settings file, MDM profile, or registry policy. Claude Code ignores it in user, project, and server-managed settings. This example declares one block. Replace `203.0.113.0/24` with your own block. It is a documentation range, and Claude Code refuses those.
+
+ {
+ "gatewayInternalNetworks": ["203.0.113.0/24"]
+ }
+
+Claude Code validates the list at `/login` before it contacts any gateway:
+
+ * Each entry is an IPv4 block written as its first address and a prefix from `/8` to `/32`.
+ * The list holds at most four blocks, and no two overlap.
+ * No block overlaps private address space: `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`, `127.0.0.0/8`, `169.254.0.0/16`, and `100.64.0.0/10`. `/login` already accepts a gateway there without this key.
+ * No block overlaps space that is never an organization’s network: `198.18.0.0/15` and `192.0.0.0/24`, which VPN and NAT64 clients hold as local addresses; the documentation ranges `192.0.2.0/24`, `198.51.100.0/24`, and `203.0.113.0/24`; and the reserved ranges `0.0.0.0/8`, `192.88.99.0/24`, and multicast `224.0.0.0/4`. You can declare blocks inside `240.0.0.0/4`, which some large networks use as internal unicast space.
+
+Blocks from `managed-settings.json` and its `managed-settings.d/` drop-in files combine into one list, and these limits apply to the combined list. To narrow a block, replace its entry rather than add a second, overlapping one in a drop-in; `/login` refuses the overlap. If an entry breaks a rule, or the value isn’t a list of strings, Claude Code refuses every new gateway sign-in on that machine and names the problem in the message. Sign-in to a gateway on a private address fails too, and existing sign-ins keep working. Try the value on one machine before you deploy it. Claude Code also lists a wrongly typed value among the [invalid managed settings it reports](</docs/en/managed-settings#keys-that-fail-closed>). With a valid list, `/login` applies three checks to a gateway whose address is inside a listed block:
+
+ * Every address the gateway’s hostname resolves to is inside that one block. Claude Code refuses a name that also has records outside it, private and IPv6 addresses included.
+ * The developer’s machine connects from inside the same block. Claude Code refuses a machine behind NAT, inside a container or WSL2, or on a VPN whose address pool sits outside the block, and names the address the machine connected from.
+ * The connection is direct. If `HTTPS_PROXY` applies to the gateway host, `/login` refuses and names the `NO_PROXY` entry to add.
+
+When all three pass, the trust prompt adds a line naming the machine’s address, the gateway’s address, and the declared block that contains both. The key changes nothing for other gateways: sign-in to one on a private address works as before, and sign-in to one on a public address outside every listed block is refused as before. A declared block narrows who can sign in but doesn’t prove where a machine is, so declare only address space your organization controls. A block shared with other tenants, such as a cloud provider’s public range, lets anyone in it pass the same check.
###
--- a/claude-apps-gateway-config.md
+++ b/claude-apps-gateway-config.md
@@ -521,7 +521,7 @@
`managed`
-The `managed` block defines role-based access policies keyed on IdP groups or email domain. Policies are evaluated in order; the first match is selected, then merged onto the `match: {}` catch-all base described below. They are served per-user at `GET /managed/settings` with ETag/304 caching.
+The `managed` block defines role-based access policies keyed on IdP groups or email domain. Policies are evaluated in order; the first match is selected, then merged onto the `match: {}` catch-all base. They are served per-user at `GET /managed/settings` with ETag/304 caching.
managed:
policies:
@@ -721,7 +721,7 @@
Each destination opts into `metrics`, `logs`, and `traces` independently, and the default is metrics only. The signals differ in sensitivity:
* **Metrics** : aggregate counters such as token counts, request counts, and latency
- * **Logs and traces** : can carry full bash commands, tool inputs, and file paths, covering anything Claude Code does on a developer’s machine
+ * **Logs and traces** : can carry full Bash commands, tool inputs, and file paths, covering anything Claude Code does on a developer’s machine
Enable logs and traces only on destinations with the access controls and retention policy that data warrants.
@@ -790,6 +790,13 @@
`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; every other provider is bounded by its provider SDK’s own timeout.
`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. 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`
+
+If you leave both `access_control` lists empty, which is the default, the gateway serves any client address, so only your network restricts who can reach it. That matters because a gateway can push managed settings that run commands on developer machines. While `allow_cidrs` is empty, the gateway warns in two places, without changing how it answers any request:
+
+ * **At boot** : a warning in the operational log recommends allowing only the private ranges `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`, `100.64.0.0/10`, `127.0.0.0/8`, `::1/128`, and `fc00::/7`, plus any other internal ranges your developers connect from. If you bind the gateway to a loopback address and set neither `trusted_proxies` nor `public_url`, as in local development, the warning doesn’t appear.
+ * **At runtime** : the first time a request arrives from an address outside those private ranges, the gateway logs a warning and emits an [`access.public_client` audit event](</docs/en/claude-apps-gateway-deploy#logs>) carrying the client IP. Both fire once per process. Link-local addresses, `169.254.0.0/16` and `fe80::/10`, don’t count as public. The gateway answers `/healthz` and `/readyz` before this check runs, so health probes from public ranges don’t trigger it.
+
+Both signals use the client address as the gateway resolves it. If a load balancer, port-forward, or tunnel relays traffic and isn’t listed in `listen.trusted_proxies`, the gateway sees the relay’s address, which is usually private, so neither the runtime warning nor a private allow list catches traffic relayed through it. Behind such a front end, set `listen.trusted_proxies` first so the gateway sees real client addresses, and keep the gateway and everything in front of it unreachable from the public internet regardless.
##
@@ -954,7 +961,7 @@
"parentSettingsBehavior": "merge"
}
-`parentSettingsBehavior: "merge"` keeps Claude Desktop’s delivery of the egress allowlist to its embedded Claude Code sessions working; [Deliver policy to Claude Desktop sessions](</docs/en/claude-apps-gateway#deliver-policy-to-claude-desktop-sessions>) explains the mechanism and where the opt-in must sit. Deploy the `managed-settings.json` file to each device, typically via your MDM platform. The file path differs by platform. See [where each mechanism stores the policy](</docs/en/managed-settings#where-each-mechanism-stores-the-policy>). By default, a registry policy on Windows or a managed-preferences plist on macOS replaces the `managed-settings.json` file rather than merging with it, apart from the exception keys and cross-source checks above. All three keys in this snippet follow the highest-priority-source rule, so fleets that deliver policy through Group Policy or configuration profiles must put all three in that mechanism instead. For Claude Desktop, set the `bootstrapUrl` key in Claude Desktop’s own [managed configuration](<https://claude.com/docs/third-party/claude-desktop/configuration>) to `<listen.public_url>/user/bootstrap`. The sign-in flow and per-group policy then match the CLI’s once a policy opts in server-side with a `desktop` key; without the opt-in, `/user/bootstrap` returns 404. See Claude Desktop overlay for the server-side half. [`forceLoginGatewayUrl`](</docs/en/settings-reference#forcelogingatewayurl>), and the `"gateway"` value of [`forceLoginMethod`](</docs/en/settings-reference#forceloginmethod>), are honored only from a managed source on the machine: `managed-settings.json`, the macOS plist or Windows HKLM registry, or a policy helper. A developer setting them in their own `~/.claude/settings.json` has no effect, and neither does setting them in the gateway payload.
+`parentSettingsBehavior: "merge"` keeps Claude Desktop’s delivery of the egress allowlist to its embedded Claude Code sessions working; [Deliver policy to Claude Desktop sessions](</docs/en/claude-apps-gateway#deliver-policy-to-claude-desktop-sessions>) explains the mechanism and where the opt-in must sit. Deploy the `managed-settings.json` file to each device, typically via your MDM platform. The file path differs by platform. See [where each mechanism stores the policy](</docs/en/managed-settings#where-each-mechanism-stores-the-policy>). By default, a registry policy on Windows or a managed-preferences plist on macOS replaces the `managed-settings.json` file rather than merging with it, apart from the exception keys and cross-source checks above. All three keys in this snippet follow the highest-priority-source rule, so fleets that deliver policy through Group Policy or configuration profiles must put all three in that mechanism instead. For Claude Desktop, set the `bootstrapUrl` key in Claude Desktop’s own [managed configuration](<https://claude.com/docs/third-party/claude-desktop/configuration>) to `<listen.public_url>/user/bootstrap`. The sign-in flow and per-group policy then match the CLI’s once a policy opts in server-side with a `desktop` key; without the opt-in, `/user/bootstrap` returns 404. See Claude Desktop overlay for the server-side half. Claude Code honors [`forceLoginGatewayUrl`](</docs/en/settings-reference#forcelogingatewayurl>), [`gatewayInternalNetworks`](</docs/en/settings-reference#gatewayinternalnetworks>), and the `"gateway"` value of [`forceLoginMethod`](</docs/en/settings-reference#forceloginmethod>) only from a managed source on the machine: `managed-settings.json`, the macOS plist or Windows HKLM registry, or a policy helper. A developer setting them in their own `~/.claude/settings.json` has no effect, and neither does setting them in the gateway payload.
##
--- a/claude-apps-gateway-deploy.md
+++ b/claude-apps-gateway-deploy.md
@@ -7,7 +7,7 @@
If a sign-in or boot fails along the way, go straight to Troubleshooting, which is keyed on the error you see.
-**Deploy on your private network.** Claude Code only connects to a gateway whose address is private. This is a security guard, because a trusted gateway can push settings that run commands on developer machines. Put the gateway you deploy behind an internal load balancer or VPN and give it a hostname that resolves to private IPs only.
+**Deploy on your private network.** Claude Code only connects to a gateway whose address is private. This is a security guard, because a trusted gateway can push settings that run commands on developer machines. Put the gateway you deploy behind an internal load balancer or VPN and give it a hostname that resolves to private IPs only. If your internal network is numbered from public IPv4 space your organization owns, see [Allow a gateway on public address space you own](</docs/en/claude-apps-gateway#allow-a-gateway-on-public-address-space-you-own>).
##
@@ -120,11 +120,12 @@
The gateway writes two streams to stderr, both JSON-friendly:
- * **Audit events** : single-line JSON per security-relevant event. Pipe stderr to your log aggregator. The events emitted include `config.load`, `session.mint`, `session.refresh`, `device.authorize`, `device.verify`, `device.callback`, `auth.denied`, `access.denied`, `inference`, `managed.serve`, `desktop_bootstrap.serve`, `desktop_bootstrap.denied`, `spend.blocked`, `admin.denied`, `admin.limit.upsert`, and `admin.limit.delete`. Fields vary by event:
+ * **Audit events** : single-line JSON per security-relevant event. Pipe stderr to your log aggregator. The events emitted include `config.load`, `session.mint`, `session.refresh`, `device.authorize`, `device.verify`, `device.callback`, `auth.denied`, `access.denied`, `access.public_client`, `inference`, `managed.serve`, `desktop_bootstrap.serve`, `desktop_bootstrap.denied`, `spend.blocked`, `admin.denied`, `admin.limit.upsert`, and `admin.limit.delete`. Fields vary by event:
* Successful mint and refresh events carry `sub`, `email`, `client_ip`, and the result
* `auth.denied` and `access.denied` carry the reason and client IP, plus the request path for `auth.denied`, since no user identity exists at those denials. Two `access.denied` reasons change what the event carries:
* `xff_unparseable`: the event also carries the `X-Forwarded-For` entry that couldn’t be read
* `client_ip_unknown`: the event carries no client IP, because the connection had no peer address while an `access_control` list was set
+ * `access.public_client` carries the client IP of the first request per process to arrive from a public address while `access_control.allow_cidrs` is empty. The gateway serves the request as usual; the event signals that the gateway may be reachable from the public internet. See the [`access_control` reference](</docs/en/claude-apps-gateway-config#http-tuning>) for what counts as public and for the recommended allow list.
* `inference` records which upstream served the request and the response status
* `desktop_bootstrap.denied` records a rejected Claude Desktop bootstrap fetch with the reason (`not_configured`, `policy_not_opted_in`, or `no_policy_matched`) and the user’s identity
* `admin.denied` records a rejected admin-API auth attempt with the client IP, method, path, and a reason, without the presented key material: `invalid_key` when an `x-api-key` was presented but matched no configured key, `bearer_rejected` when only an `Authorization` header was presented and it didn’t verify as a gateway session in `admin.admin_groups`, or `no_credentials` when neither header was presented
@@ -159,7 +160,7 @@
JWT secret rotation
-Rotate the signing secret in three steps so existing sessions stay valid:
+Rotate the signing secret in stages so existing sessions stay valid:
1. Generate a new secret. Prepend it to the `session.jwt_secret` array.
2. Roll the deployment. New tokens sign with the new secret; old tokens still verify.
@@ -278,8 +279,12 @@
Claude Desktop reports that its bootstrap configuration couldn’t be fetched| `/user/bootstrap` returned 404: the policy matching the user doesn’t carry a `desktop` key, or no policy matched. The gateway’s audit log records each rejection as `desktop_bootstrap.denied` with the reason.| Add a `desktop` block to the policy that matches the user, or to the `match: {}` base layer; an empty `desktop: {}` suffices. See [Claude Desktop overlay](</docs/en/claude-apps-gateway-config#claude-desktop-overlay>).
Startup shows `Gateway login is configured in managed settings, but this Claude Code build does not include Cloud gateway support.`| The installed Claude Code build predates gateway support| Have the developer update Claude Code to a release that includes Cloud gateway support
Startup or `/login` reports `Claude Code may not be enabled for your organization` after a 403 on the managed settings load| The gateway, or something in front of it, answered the `/managed/settings` request with 403. The gateway’s own settings route never answers 403. The status comes from the [`access_control`](</docs/en/claude-apps-gateway-config#http-tuning>) IP checks or from a proxy or WAF in front of the gateway. The audit log records an IP-check denial as `access.denied` with the reason. The developer stays signed in.| Check the audit log for `access.denied` at the time of the failure and fix the `access_control` lists or the front end, then have the developer start `claude` again
-CLI `/login`: `Gateway hosts must be on your organization's private network; <host> resolves to the public (or unrecognized) address <ip>`| The gateway hostname resolves to at least one public IP address. Claude Code checks each resolved address and requires every one to be private. A common cause is a dual-stack name where one family resolves to a public address, including AWS internal dual-stack load balancers, which return public-range AAAA addresses.| Have the gateway name resolve only to private addresses on developer machines. For a dual-stack name, drop the public-range record or serve a separate internal-only DNS name. See the [private-network prerequisite](</docs/en/claude-apps-gateway#prerequisites>).
+CLI `/login`: `Gateway hosts must be on your organization's private network; <host> resolves to the public (or unrecognized) address <ip>`| The gateway hostname resolves to at least one public IP address. Claude Code checks each resolved address and requires every one to be private. A common cause is a dual-stack name where one family resolves to a public address, including AWS internal dual-stack load balancers, which return public-range AAAA addresses.| Have the gateway name resolve only to private addresses on developer machines. For a dual-stack name, drop the public-range record or serve a separate internal-only DNS name. See the [private-network prerequisite](</docs/en/claude-apps-gateway#prerequisites>). If the address is public space your organization owns and uses internally, [declare that block](</docs/en/claude-apps-gateway#allow-a-gateway-on-public-address-space-you-own>) instead.
CLI `/login`: `Gateway login would go through proxy <proxy>, which is not on a private network`| An `HTTPS_PROXY` or `HTTP_PROXY` applies to the gateway host and the proxy’s hostname resolves to a public address. A proxy whose host resolves only to private addresses is allowed and doesn’t trigger this error| Add the gateway host to `NO_PROXY` on the developer’s machine so the connection is direct, or use a proxy whose hostname resolves to private addresses. The message names the exact `NO_PROXY` entry to add
+CLI `/login`: `Claude Code only signs in to <host> from inside its declared network <block> (managed settings), and this machine is connecting from <ip>, outside it`| The gateway is on a block declared in [`gatewayInternalNetworks`](</docs/en/claude-apps-gateway#allow-a-gateway-on-public-address-space-you-own>), and the developer’s machine reached it from an address outside that block: a VPN address pool, a container or WSL2 NAT segment, or a network that isn’t yours| Have the developer run `/login` from the host OS on your network. If the address shown is also your organization’s own public space, replace the gateway’s entry with a block that covers both, up to `/8`; a second, overlapping entry is refused
+CLI `/login`: `Every address for gateway host <host> must be inside its declared network <block>, and it also resolves to <ip>`| The gateway’s name resolves to an address outside the block declared in [`gatewayInternalNetworks`](</docs/en/claude-apps-gateway#allow-a-gateway-on-public-address-space-you-own>): a second site, or an IPv6 record on a dual-stack name. Under a declared block every record must be inside that one IPv4 block, private and IPv6 addresses included| Publish only records inside the block for the gateway name on developer machines, or serve a separate internal-only name
+CLI `/login`: `<host> is on the declared network <block>, which Claude Code checks over a direct connection, not through an HTTP proxy`| An `HTTPS_PROXY` or `HTTP_PROXY` applies to a gateway on a declared block| On the developer’s machine, add the `NO_PROXY` entry the message names
+CLI `/login`: a message starting `gatewayInternalNetworks in managed settings`| The value breaks one of the [validation rules](</docs/en/claude-apps-gateway#allow-a-gateway-on-public-address-space-you-own>), and the message names which. Until you fix it, Claude Code refuses every new gateway `/login` on the machine, gateways on private addresses included; existing sign-ins keep working| In the managed settings source you deploy, correct the entry the message names, then rerun `/login`
CLI `/login`: `Could not resolve the configured HTTP proxy`| The hostname in `HTTPS_PROXY` or `HTTP_PROXY` doesn’t resolve from the developer’s machine, typically because it isn’t connected to the corporate network| Have the developer connect to your network or VPN and retry, or fix the proxy URL
CLI `/login`: `Could not resolve gateway host <host>`| The machine can’t resolve the gateway’s internal DNS name, typically because it isn’t on the corporate network| Have the developer connect to your network or VPN, then retry `/login`
Boot exits with a config validation error naming `store.postgres_url`| No Postgres configured; the gateway requires Postgres| Set `store.postgres_url`. For local development, use a throwaway container: `docker run --rm -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust postgres`.
--- a/claude-code-features.md
+++ b/claude-code-features.md
@@ -1,4 +1,4 @@
-The Agent SDK is built on the same foundation as Claude Code, which means your SDK agents have access to the same filesystem-based features: project instructions (`CLAUDE.md` and rules), skills, hooks, and more. When you omit `settingSources`, `query()` reads the same filesystem settings as the Claude Code CLI: user, project, and local settings, CLAUDE.md files, and `.claude/` skills, agents, and commands. To run without these, pass `settingSources: []`, which limits the agent to what you configure programmatically. Managed policy settings and the global `~/.claude.json` config are read regardless of this option. See What settingSources does not control.
+The Agent SDK is built on the same foundation as Claude Code, which means your SDK agents have access to the same filesystem-based features: project instructions (`CLAUDE.md` and rules), skills, hooks, and more. When you omit `settingSources`, `query()` reads the same filesystem settings as the Claude Code CLI: user, project, and local settings, CLAUDE.md files, and `.claude/` skills, agents, and commands. To run without these, pass `settingSources: []`, which limits the agent to what you configure programmatically. Managed policy settings and the global `~/.claude.json` config are read regardless of this option. For more information, see What settingSources does not control.
##
@@ -91,7 +91,7 @@
Project instructions (CLAUDE.md and rules)
-`CLAUDE.md` files and `.claude/rules/*.md` files give your agent persistent context about your project: coding conventions, build commands, architecture decisions, and instructions. When `settingSources` includes `"project"` (as in the example above), the SDK loads these files into context at session start. The agent then follows your project conventions without you repeating them in every prompt.
+`CLAUDE.md` files and `.claude/rules/*.md` files give your agent persistent context about your project: coding conventions, build commands, architecture decisions, and instructions. When `settingSources` includes `"project"`, as in the `settingSources` example, the SDK loads these files into context at session start. The agent then follows your project conventions without you repeating them in every prompt.
###
Show diff (166 lines)
--- a/claude-code-on-the-web.md
+++ b/claude-code-on-the-web.md
@@ -1,14 +1,22 @@
-Claude Code on the web is in research preview for Pro, Max, and Team users, and for Enterprise users with premium seats or Chat + Claude Code seats.
-
-Claude Code on the web runs tasks on Anthropic-managed cloud infrastructure at [claude.ai/code](<https://claude.ai/code>), or on your organization’s [self-hosted environment](</docs/en/self-hosted-environments>) when routed there. Sessions persist even if you close your browser, and you can monitor them from the Claude mobile app.
-
-New to Claude Code on the web? Start with [Get started](</docs/en/web-quickstart>) to connect your GitHub account and submit your first task.
-
-This page covers the web product itself:
+Cloud sessions are in research preview for Pro, Max, and Team users, and for Enterprise users with premium seats or Chat + Claude Code seats.
+
+A cloud session is a Claude Code session that runs on cloud infrastructure instead of on your machine. By default it runs on infrastructure Anthropic manages, or on your organization’s [self-hosted environment](</docs/en/self-hosted-environments>) when routed there. The session keeps running after you close your laptop, and you can check on it or steer it from any device. You can start a cloud session from any of these surfaces:
+
+ * **Browser** : [claude.ai/code](<https://claude.ai/code>), also called Claude Code on the web
+ * **Mobile** : the **Code** tab in the [Claude app](</docs/en/mobile>)
+ * **Desktop app** : select **Cloud** instead of **Local** when you [start a session](</docs/en/desktop#run-long-running-tasks-in-the-cloud>)
+ * **Terminal** : `claude --cloud`
+ * **Routines** : [scheduled and triggered runs](</docs/en/routines>) each run as a cloud session
+
+A session in your terminal, your IDE, or the Desktop app with **Local** selected runs on your own machine instead. To steer one of those local sessions from your phone or browser, use [Remote Control](</docs/en/remote-control>).
+
+New to cloud sessions? Start with [Get started](</docs/en/web-quickstart>) to connect your GitHub account and submit your first task.
+
+This page covers:
* Cloud environments: where sessions run, and where to configure that
* GitHub authentication options: two ways to connect GitHub
- * Move tasks between web and terminal with `--cloud` and `--teleport`
+ * Move tasks between terminal and cloud with `--cloud` and `--teleport`
* Work with sessions: permission modes, reviewing, sharing, archiving, deleting
* Auto-fix pull requests: respond automatically to CI failures and review comments
* Security and isolation: how sessions are isolated
@@ -20,7 +28,7 @@
Cloud environments
-Every cloud session runs in a [cloud environment](</docs/en/cloud-environments>), the saved configuration that controls network access, environment variables, and setup scripts. If you don’t have an environment yet, onboarding sets up a **Default** environment with [**Trusted** network access](</docs/en/cloud-environments#access-levels>), either by creating it for you or by asking you to create it. See [The Default environment](</docs/en/cloud-environments#the-default-environment>) for which of those happens on your plan and how sessions choose an environment when you have more than one. The same environments apply wherever you start a cloud session: the web, the terminal, [Claude Tag](<https://claude.com/docs/claude-tag/overview>), [routines](</docs/en/routines>), and the mobile and Desktop apps. Claude Tag channel sessions use organization-level environments only, either [shared environments](</docs/en/cloud-environments#organization-shared-environments>) or [self-hosted environments](</docs/en/self-hosted-environments>). See [Configure cloud environments](</docs/en/cloud-environments>) to change what an environment allows, set variables, or add a setup script, and [Installed tools](</docs/en/cloud-environments#installed-tools>) for what sessions include without any configuration.
+Every cloud session runs in a [cloud environment](</docs/en/cloud-environments>), the saved configuration that controls network access, environment variables, and setup scripts. If you don’t have an environment yet, onboarding sets up a **Default** environment with [**Trusted** network access](</docs/en/cloud-environments#access-levels>), either by creating it for you or by asking you to create it. See [The Default environment](</docs/en/cloud-environments#the-default-environment>) for which of those happens on your plan and how sessions choose an environment when you have more than one. The same environments apply wherever you start a cloud session: the browser, the terminal, [Claude Tag](<https://claude.com/docs/claude-tag/overview>), [routines](</docs/en/routines>), and the mobile and Desktop apps. Claude Tag channel sessions use organization-level environments only, either [shared environments](</docs/en/cloud-environments#organization-shared-environments>) or [self-hosted environments](</docs/en/self-hosted-environments>). See [Configure cloud environments](</docs/en/cloud-environments>) to change what an environment allows, set variables, or add a setup script, and [Installed tools](</docs/en/cloud-environments#installed-tools>) for what sessions include without any configuration.
##
@@ -43,17 +51,17 @@
-Move tasks between web and terminal
+Move tasks between terminal and cloud
These workflows require the [Claude Code CLI](</docs/en/quickstart>) signed in to the same claude.ai account. You can start new cloud sessions from your terminal, or pull cloud sessions into your terminal to continue locally. Cloud sessions persist even if you close your laptop, and you can monitor them from anywhere including the Claude mobile app.
-From the CLI, session handoff is one-way: you can pull cloud sessions into your terminal with `--teleport`, but you can’t push an existing terminal session to the web. The `--cloud` flag with a task description creates a new cloud session for your current repository; with `-p` and a session ID or claude.ai/code URL it instead [queues a message into that existing session](</docs/en/claude-code-on-the-web#send-follow-ups-from-the-cli>). The [Desktop app](</docs/en/desktop#continue-in-another-surface>) provides a Continue in menu that can send a local session to the web.
-
-###
-
-
-
-From terminal to web
+From the CLI, session handoff is one-way: you can pull cloud sessions into your terminal with `--teleport`, but you can’t push an existing terminal session to the cloud. The `--cloud` flag with a task description creates a new cloud session for your current repository; with `-p` and a session ID or claude.ai/code URL it instead [queues a message into that existing session](</docs/en/claude-code-on-the-web#send-follow-ups-from-the-cli>). The [Desktop app](</docs/en/desktop#continue-in-another-surface>) provides a **Continue in** menu that can send a local session to the cloud.
+
+###
+
+
+
+From terminal to cloud
Start a cloud session from the command line with the `--cloud` flag:
@@ -61,7 +69,7 @@
This creates a new cloud session on claude.ai. The cloud VM clones your current directory’s GitHub remote at your current branch, not your local checkout, so push first if you have local commits. See Send local repositories without GitHub for the cases where Claude Code uploads your local repository instead of cloning. `--cloud` works with a single repository at a time. The task runs in the cloud while you continue working locally. The older `--remote` spelling still works as a deprecated alias for `--cloud`. While the cloud container starts, the CLI shows a live checklist of setup steps, such as cloning the repository and running your [setup script](</docs/en/cloud-environments#setup-scripts>). It queues messages you type during provisioning and sends them once the session is ready.
-`--cloud` creates cloud sessions. `--remote-control` is unrelated: it exposes a local CLI session for monitoring from the web. See [Remote Control](</docs/en/remote-control>).
+`--cloud` creates cloud sessions. `--remote-control` is unrelated: it lets you monitor and steer a local CLI session from claude.ai or the Claude app. See [Remote Control](</docs/en/remote-control>).
Open the session on claude.ai or the Claude mobile app to check progress or interact directly. From there you can steer Claude, provide feedback, or answer questions as in any other conversation. If Claude asks a question and the session sits idle, you can still answer when you come back, up to environment expiry, and the session continues from your answer.
@@ -71,7 +79,7 @@
Tips for cloud tasks
-**Plan locally, execute remotely** : for complex tasks, start Claude in plan mode to collaborate on the approach, then send work to the cloud:
+**Plan locally, execute in the cloud** : for complex tasks, start Claude in plan mode to collaborate on the approach, then send work to the cloud:
claude --permission-mode plan
@@ -85,7 +93,7 @@
claude --cloud "Update the API documentation"
claude --cloud "Refactor the logger to use structured output"
-When a session completes, you can create a PR from the web interface or teleport the session to your terminal to continue working.
+When a session completes, you can create a PR from claude.ai/code or teleport the session to your terminal to continue working.
####
@@ -145,14 +153,14 @@
-From web to terminal
+From cloud to terminal
Pull a cloud session into your terminal using any of these:
* **Using`--teleport`**: from the command line, run `claude --teleport` for an interactive session picker, or `claude --teleport <session-id>` to resume a specific session directly. If you have uncommitted changes, you’ll be prompted to stash them first.
* **Using`/teleport`**: inside an existing CLI session, run `/teleport` or `/tp` to open the same session picker without restarting Claude Code.
* **From`/tasks`**: run `/tasks` to see your background sessions, then press `t` to teleport into one.
- * **From the web interface** : select **Open in > Terminal** from the session menu to copy a command you can paste into your terminal.
+ * **From claude.ai/code** : select **Open in > Terminal** from the session menu to copy a command you can paste into your terminal.
* **From inside the cloud session** : type `/teleport` and Claude Code replies with the exact `claude --teleport <session-id>` command for that session, ready to run from a checkout of the repository. Requires Claude Code v2.1.223 or later in the session’s environment.
When you teleport a session, Claude verifies you’re in the correct repository, fetches and checks out the branch from the cloud session, and loads the full conversation history into your terminal. The terminal gets its own copy of the session: new work there stays local and doesn’t appear in the cloud session on claude.ai or the Claude mobile app. To keep steering from your phone after teleporting, start [`/remote-control`](</docs/en/remote-control>) in the local session. `--teleport` is distinct from `--resume`. `--resume` reopens a conversation from this machine’s local history and doesn’t list cloud sessions; `--teleport` pulls a cloud session and its branch.
@@ -198,7 +206,7 @@
* **`/model`, `/effort`, `/color`, and `/rename`**: pass the value as an argument, for example `/model sonnet`, instead of opening the terminal picker or slider. The argument forms require Claude Code v2.1.205 or later in the session’s environment and follow each command’s [availability notes](</docs/en/commands#all-commands>): `/effort` reports `Not applied` while a model’s [launch-default effort hold](</docs/en/model-config#adjust-effort-level>) is in force.
* **`/fast`** : toggles [fast mode](</docs/en/fast-mode#use-fast-mode-in-cloud-sessions>) for the session when fast mode is [available on your account](</docs/en/fast-mode#requirements>). Requires Claude Code v2.1.271 or later in the session’s environment.
- * **`/config`** : on the web, opens the Claude Code section of your settings instead of setting a value, and text after the command, including `key=value`, is ignored. To change settings for a cloud session, use [environment variables](</docs/en/cloud-environments#set-environment-variables>) or commit [settings files](</docs/en/settings>) to the repository.
+ * **`/config`** : in your browser at claude.ai/code, opens the Claude Code section of your settings instead of setting a value, and text after the command, including `key=value`, is ignored. To change settings for a cloud session, use [environment variables](</docs/en/cloud-environments#set-environment-variables>) or commit [settings files](</docs/en/settings>) to the repository.
For context management specifically:
@@ -208,7 +216,7 @@
`/context`| Yes| Shows what’s currently in the context window
`/clear`| No| Start a new session from the sidebar instead
-Auto-compaction runs automatically when the context window approaches capacity. Claude Code on the web sets [`CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`](</docs/en/env-vars>) in cloud sessions itself, so compaction triggers partway through the [auto-compact window](</docs/en/model-config#set-the-auto-compact-window>) rather than when the window fills. That value overrides one you add in your [environment variables](</docs/en/cloud-environments#set-environment-variables>), so adding the variable there doesn’t change when compaction triggers. To change the auto-compact window instead, set [`CLAUDE_CODE_AUTO_COMPACT_WINDOW`](</docs/en/env-vars>) in your environment variables, or run [`/autocompact`](</docs/en/commands#all-commands>) with a token count in a session where the variable isn’t set. [Subagents](</docs/en/sub-agents>) work the same way they do locally. Claude can spawn them with the Agent tool to offload research or parallel work into a separate context window, keeping the main conversation lighter. Subagents defined in your repo’s `.claude/agents/` are picked up automatically. [Agent teams](</docs/en/agent-teams>) are off by default but can be enabled by adding `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` to your [environment variables](</docs/en/cloud-environments#set-environment-variables>).
+Auto-compaction runs automatically when the context window approaches capacity. Cloud sessions set [`CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`](</docs/en/env-vars>) themselves, so compaction triggers partway through the [auto-compact window](</docs/en/model-config#set-the-auto-compact-window>) rather than when the window fills. That value overrides one you add in your [environment variables](</docs/en/cloud-environments#set-environment-variables>), so adding the variable there doesn’t change when compaction triggers. To change the auto-compact window instead, set [`CLAUDE_CODE_AUTO_COMPACT_WINDOW`](</docs/en/env-vars>) in your environment variables, or run [`/autocompact`](</docs/en/commands#all-commands>) with a token count in a session where the variable isn’t set. [Subagents](</docs/en/sub-agents>) work the same way they do locally. Claude can spawn them with the Agent tool to offload research or parallel work into a separate context window, keeping the main conversation lighter. Subagents defined in your repo’s `.claude/agents/` are picked up automatically. [Agent teams](</docs/en/agent-teams>) are off by default but can be enabled by adding `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` to your [environment variables](</docs/en/cloud-environments#set-environment-variables>).
###
@@ -283,12 +291,12 @@
There are a few ways to turn on auto-fix depending on where the PR came from and what device you’re using:
- * **PRs created in Claude Code on the web** : open the CI status bar and select **Auto-fix**
- * **From your terminal** : run [`/autofix-pr`](</docs/en/commands>) while on the PR’s branch. Claude Code detects the open PR with `gh`, spawns a web session, and turns on auto-fix in one step
+ * **PRs created in a cloud session** : open the session at claude.ai/code, open the CI status bar, and select **Auto-fix**
+ * **From your terminal** : run [`/autofix-pr`](</docs/en/commands>) while on the PR’s branch. Claude Code detects the open PR with `gh`, spawns a cloud session, and turns on auto-fix in one step
* **From the mobile app** : tell Claude to auto-fix the PR, for example “watch this PR and fix any CI failures or review comments”
* **Any existing PR** : paste the PR URL into a session and tell Claude to auto-fix it
-Auto-fix is a per-PR toggle. To stop monitoring, open the CI status bar in the web session and clear the **Auto-fix** toggle, or tell Claude to stop watching the PR.
+Auto-fix is a per-PR toggle. To stop monitoring, open the CI status bar in the session at claude.ai/code and clear the **Auto-fix** toggle, or tell Claude to stop watching the PR.
###
@@ -366,7 +374,7 @@
Environment expired
-Cloud sessions stop after a period of inactivity and the session’s VM is reclaimed. A session counts as inactive while it waits for you to approve an [MCP connector](</docs/en/cloud-environments#network-access>) tool call or to sign in to an MCP server, and it can expire during that wait. On the web, the session is marked expired in the session list. Reopen the session from [claude.ai/code](<https://claude.ai/code>) to provision a fresh VM with your conversation history restored. Background work that was still running when the VM was reclaimed, such as subagents and shell commands, isn’t restored.
+Cloud sessions stop after a period of inactivity and the session’s VM is reclaimed. A session counts as inactive while it waits for you to approve an [MCP connector](</docs/en/cloud-environments#network-access>) tool call or to sign in to an MCP server, and it can expire during that wait. Reopen the session from [claude.ai/code](<https://claude.ai/code>) to provision a fresh VM with your conversation history restored. Background work that was still running when the VM was reclaimed, such as subagents and shell commands, isn’t restored.
##
@@ -376,8 +384,8 @@
Before relying on cloud sessions for a workflow, account for these constraints:
- * **Rate limits** : Claude Code on the web shares rate limits with all other Claude and Claude Code usage within your account. Running multiple tasks in parallel consumes more rate limits proportionately. There is no separate compute charge for the cloud VM.
- * **Repository authentication** : you can only move sessions from web to local when you are authenticated to the same account
+ * **Rate limits** : cloud sessions share rate limits with all other Claude and Claude Code usage within your account. Running multiple tasks in parallel consumes more rate limits proportionately. There is no separate compute charge for the cloud VM.
+ * **Repository authentication** : you can only pull a cloud session into your terminal when you are authenticated to the same account
* **Platform restrictions** : repository cloning and pull request creation require GitHub. Self-hosted [GitHub Enterprise Server](</docs/en/github-enterprise-server>) instances are supported for Team and Enterprise plans. You can send a GitLab, Bitbucket, or other non-GitHub repository to a cloud session as a local bundle by setting `CCR_FORCE_BUNDLE=1`, but the session can’t push results back to that remote
* **Organization IP allowlist** : cloud sessions call the Anthropic API from Anthropic-managed infrastructure, not your network, while sessions in a [self-hosted environment](</docs/en/self-hosted-environments>) call it from your own network. If your organization has [IP allowlisting](<https://support.claude.com/en/articles/13200993-restrict-access-to-claude-with-ip-allowlisting>) enabled, every Anthropic-hosted cloud session fails with an authentication error. The same applies to [Code Review](</docs/en/code-review>) and to [routines](</docs/en/routines>) that run on Anthropic-hosted environments; a routine routed to a self-hosted environment calls the API from your own network. Contact [Anthropic support](<https://support.claude.com/>) to exempt Anthropic-hosted services from your organization’s IP allowlist.
--- a/claude-directory.md
+++ b/claude-directory.md
@@ -20,7 +20,7 @@
---|---|---
`managed-settings.json`| System-level, varies by OS| Enterprise-enforced settings that you can’t override, apart from [narrow exceptions](</docs/en/settings#security-keys-where-the-stricter-value-applies>). See [where to save the file](</docs/en/managed-settings#deploy-a-managed-settings-file>) and [which managed source Claude Code uses](</docs/en/managed-settings#precedence-within-the-managed-tier>).
`CLAUDE.local.md`| Project root| Your private preferences for this project, loaded alongside CLAUDE.md. Create it manually and add it to `.gitignore`.
-Installed plugins| `~/.claude/plugins`| Cloned marketplaces, installed plugin versions, and per-plugin data, managed by `claude plugin` commands. For a plugin installed from a marketplace [`command` source](</docs/en/plugin-marketplaces#command-sources>) in link mode, Claude Code stores links here instead of a copy, and the plugin’s files stay in the directory the command prints. A `command` source requires Claude Code v2.1.229 or later. See [plugin caching](</docs/en/plugins-reference#plugin-caching-and-file-resolution>) for how orphaned versions are cleaned up.
+Installed plugins| `~/.claude/plugins`| Cloned marketplaces, installed plugin versions, and per-plugin data, managed by `claude plugin` commands. For a plugin installed from a marketplace [`command` source](</docs/en/plugin-marketplaces#command-sources>) in link mode, Claude Code stores links here instead of a copy, and the plugin’s files stay in the directory the command prints. A `command` source requires Claude Code v2.1.229 or later. A plugin listed by relative path in a local-directory marketplace also [loads in place](</docs/en/plugins-reference#plugin-caching-and-file-resolution>) from its source directory rather than from a cache copy. See [plugin caching](</docs/en/plugins-reference#plugin-caching-and-file-resolution>) for how orphaned versions are cleaned up.
`~/.claude` also holds data Claude Code writes as you work: transcripts, prompt history, file snapshots, caches, and logs. See application data below.
@@ -96,7 +96,7 @@
Application data
-Beyond the config you author, `~/.claude` holds data Claude Code writes during sessions. These files are plaintext. Anything that passes through a tool lands in a transcript on disk: file contents, command output, pasted text.
+Beyond the config you author, `~/.claude` holds data Claude Code writes during sessions. These files are plaintext. Anything that passes through a tool is written to a transcript on disk: file contents, command output, pasted text.
###
--- a/claude-platform-on-aws.md
+++ b/claude-platform-on-aws.md
@@ -44,7 +44,7 @@
The key is sent as `x-api-key` and takes precedence over SigV4, so any AWS credentials in your environment are ignored. API keys from a separate Claude Console organization won’t work here. Treat workspace API keys like any other production credential. The [user settings file](</docs/en/settings>) `env` block is a convenient way to scope the key to your machine without exporting it globally.
-The `/login` and `/logout` commands don’t sign you into a Claude.ai subscription for Claude Platform on AWS. Authentication runs through your AWS credentials or workspace API key.
+The `/login` and `/logout` commands don’t sign you into a claude.ai subscription for Claude Platform on AWS. Authentication runs through your AWS credentials or workspace API key.
###
--- a/claude-security.md
+++ b/claude-security.md
@@ -68,13 +68,13 @@
Read the report
-While the scan runs, it reports each stage as it starts, with the detail available under [`/workflows`](</docs/en/workflows>). Results land in a timestamped directory in your repository, described in Read the scan results.
+While the scan runs, it reports each stage as it starts, with the detail available under [`/workflows`](</docs/en/workflows>). Results are written to a timestamped directory in your repository, described in Read the scan results.
5
Turn findings into patches
-Run `/claude-security` again and pick **Suggest patches** , then choose which findings to address. Reviewed patches land in the report’s `patches/` folder; Fix findings covers how each patch is built and reviewed.
+Run `/claude-security` again and pick **Suggest patches** , then choose which findings to address. Reviewed patches are written to the report’s `patches/` folder; Fix findings covers how each patch is built and reviewed.
6
@@ -129,7 +129,7 @@
Patches are never applied automatically
-Applying a patch is always your decision. Patches land in the report’s `patches/` folder, one `F<n>.patch` per finding with a note beside it explaining the change. Apply one from your shell, or ask Claude to apply it and open a pull request:
+Applying a patch is always your decision. Patches are written to the report’s `patches/` folder, one `F<n>.patch` per finding with a note beside it explaining the change. Apply one from your shell, or ask Claude to apply it and open a pull request:
git apply CLAUDE-SECURITY-<timestamp>/patches/F1.patch
--- a/cli-reference.md
+++ b/cli-reference.md
@@ -72,7 +72,7 @@
`--bg`, `--background`| Start the session as a [background agent](</docs/en/agent-view>) and return immediately. Prints the session ID and management commands. Combine with `--exec` to run a shell command as a background job instead of a Claude session, or with `--agent` to run a specific subagent. Can’t be combined with `-p`/`--print`; see the [error reference](</docs/en/errors#command-line-errors>)| `claude --bg "investigate the flaky test"`
`--channels`| (Research preview) MCP servers whose [channel](</docs/en/channels>) notifications Claude should listen for in this session. Space-separated list of `plugin:<name>@<marketplace>` entries. Requires Anthropic authentication through claude.ai or a Console API key| `claude --channels plugin:my-notifier@my-marketplace`
`--chrome`| Enable [Chrome browser integration](</docs/en/chrome>) for web automation and testing| `claude --chrome`
-`--cloud`| With a task description, create a new [web session](</docs/en/claude-code-on-the-web>) on claude.ai. With a session ID (`session_...` or `cse_...`) or a claude.ai/code URL, queue a message into that existing session instead, with `-p`. See [send a follow-up message](</docs/en/claude-code-on-the-web#send-follow-ups-from-the-cli>).| `claude --cloud "Fix the login bug"`
+`--cloud`| With a task description, create a new [cloud session](</docs/en/claude-code-on-the-web>). With a session ID (`session_...` or `cse_...`) or a claude.ai/code URL, queue a message into that existing session instead, with `-p`. See [send a follow-up message](</docs/en/claude-code-on-the-web#send-follow-ups-from-the-cli>).| `claude --cloud "Fix the login bug"`
`--continue`, `-c`| Load the most recent conversation in the current directory, including a [background session that has finished](</docs/en/sessions#resume-a-session>); opening finished background sessions requires Claude Code v2.1.257 or later. Skips sessions created with `claude -p` or the Agent SDK, and sessions whose first prompt was `/loop`. `claude -p --continue` includes `-p`, SDK, and `/loop` sessions. Includes sessions that added this directory with `/add-dir`| `claude --continue`
`--dangerously-load-development-channels`| Enable [channels](</docs/en/channels-reference#test-during-the-research-preview>) that are not on the approved allowlist, for local development. Accepts `plugin:<name>@<marketplace>` and `server:<name>` entries. Prompts for confirmation| `claude --dangerously-load-development-channels server:webhook`
`--dangerously-skip-permissions`| Skip permission prompts. Equivalent to `--permission-mode bypassPermissions`. See [permission modes](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>) for what this does and does not skip. For sessions started with `--bg`, the mode [persists when the supervisor restarts the session](</docs/en/agent-view#permission-mode-model-and-effort>)| `claude --dangerously-skip-permissions`
@@ -131,7 +131,7 @@
`--system-prompt`| Replace the entire system prompt with custom text| `claude --system-prompt "You are a Python expert"`
`--system-prompt-file`| Load system prompt from a file, replacing the default prompt| `claude --system-prompt-file ./custom-prompt.txt`
`--system-prompt-snapshot`| Pass `off` to rebuild the system prompt on every request instead of reusing the prompt recorded on the conversation’s first request, for example while you iterate on `--append-system-prompt` text across `--continue` runs. Requires Claude Code v2.1.257 or later| `claude --system-prompt-snapshot off`
-`--teleport`| Resume a [web session](</docs/en/claude-code-on-the-web>) in your local terminal| `claude --teleport`
+`--teleport`| Resume a [cloud session](</docs/en/claude-code-on-the-web>) in your local terminal| `claude --teleport`
`--teammate-mode`| Set how [agent team](</docs/en/agent-teams>) teammates display: `in-process` (default), `auto`, `tmux`, or `iterm2` (added in v2.1.186). Overrides the [`teammateMode`](</docs/en/settings-reference#teammatemode>) setting for this session. See [Choose a display mode](</docs/en/agent-teams#choose-a-display-mode>)| `claude --teammate-mode auto`
`--tmux`| Create a tmux session for the worktree. Requires `--worktree`. Uses iTerm2 native panes when available; pass `--tmux=classic` for traditional tmux| `claude -w feature-auth --tmux`
`--tools`| Restrict which built-in tools Claude can use. Use `""` to disable all, `"default"` for the default set, or tool names like `"Bash,Edit,Read"`. On macOS, Linux, and WSL, the default set leaves out `Glob` and `Grep`, as described under [Glob tool behavior](</docs/en/tools-reference#glob-tool-behavior>). If you name one of the [task-tracking tools](</docs/en/tools-reference#task-tool-availability>) here, Claude Code also opts the session in. The flag doesn’t affect MCP tools; to deny those too, use `--disallowedTools "mcp__*"`. A list that omits [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) doesn’t remove it; `""` removes it only when no MCP tools remain| `claude --tools "Bash,Edit,Read"`
--- a/cloud-environments.md
+++ b/cloud-environments.md
@@ -1,6 +1,6 @@
-Cloud environments require [Claude Code on the web](</docs/en/claude-code-on-the-web>), which is in research preview for Pro, Max, and Team users, and for Enterprise users with [premium seats or Chat + Claude Code seats](<https://support.claude.com/en/articles/11845131-use-claude-code-with-your-team-or-enterprise-plan>).
-
-Each [cloud session](</docs/en/claude-code-on-the-web>) runs in a cloud environment. You can configure an environment to allow or deny network access, set environment variables for the session, on Pro and Max plans store API credentials that sessions use without seeing them, and run a setup script before Claude starts working. The same environments apply wherever you start a cloud session: [Claude Code on the web](</docs/en/claude-code-on-the-web>), the terminal with [`claude --cloud`](</docs/en/claude-code-on-the-web#from-terminal-to-web>), [Claude Tag](<https://claude.com/docs/claude-tag/overview>), [routines](</docs/en/routines>), the [Claude mobile app](</docs/en/mobile>), and the [Desktop app](</docs/en/desktop>). Each of these surfaces can also route to a [self-hosted environment](</docs/en/self-hosted-environments>). [Availability and limitations](</docs/en/self-hosted-environments#availability-and-limitations>) covers what Claude can’t use yet when a Claude Tag session runs in one.
+Cloud environments apply to [cloud sessions](</docs/en/claude-code-on-the-web>), which are in research preview for Pro, Max, and Team users, and for Enterprise users with [premium seats or Chat + Claude Code seats](<https://support.claude.com/en/articles/11845131-use-claude-code-with-your-team-or-enterprise-plan>).
+
+Each [cloud session](</docs/en/claude-code-on-the-web>) runs in a cloud environment. You can configure an environment to allow or deny network access, set environment variables for the session, on Pro and Max plans store API credentials that sessions use without seeing them, and run a setup script before Claude starts working. The same environments apply wherever you start a cloud session: the [Desktop app](</docs/en/desktop>), the [Claude mobile app](</docs/en/mobile>), your browser at [claude.ai/code](<https://claude.ai/code>), the terminal with [`claude --cloud`](</docs/en/claude-code-on-the-web#from-terminal-to-cloud>), [routines](</docs/en/routines>), and [Claude Tag](<https://claude.com/docs/claude-tag/overview>). Each of these surfaces can also route to a [self-hosted environment](</docs/en/self-hosted-environments>). [Availability and limitations](</docs/en/self-hosted-environments#availability-and-limitations>) covers what Claude can’t use yet when a Claude Tag session runs in one.
[Remote Control](</docs/en/remote-control>) sessions connect the web and mobile interfaces to a session on your own machine, which uses your machine’s network and files, not a cloud environment. Claude Tag channel sessions use organization-level environments only, either shared environments or [self-hosted environments](</docs/en/self-hosted-environments>).
@@ -23,7 +23,7 @@
With only **Default** available, every session runs in it. When you have more than one environment, sessions choose one per surface:
- * On the web, the Desktop app, and the mobile app, sessions use the environment shown in the selector. An organization default set by an Owner fills the selection when you haven’t picked one.
+ * In the Desktop app, the mobile app, and at claude.ai/code, sessions use the environment shown in the selector. An organization default set by an Owner fills the selection when you haven’t picked one.
* From the CLI, Claude Code uses your `/remote-env` pick, or falls back to the Anthropic-hosted environment when your list has one, and otherwise to the first environment in your list that isn’t a bridge environment, an entry [Remote Control](</docs/en/remote-control>) registers to represent your own machine rather than a cloud environment. For a [self-hosted environment](</docs/en/self-hosted-environments>), passing `--environment <environment-id>` with its `ccpool_` ID [when you dispatch a session](</docs/en/self-hosted-environments-testing#run-the-test-loop>) overrides the `/remote-env` pick and the fallback for that invocation. Claude Code rejects Anthropic-hosted `env_` IDs passed to the flag, so use `/remote-env` to target those. The flag requires Claude Code v2.1.224 or later.
Configure an environment when the default isn’t enough: when Claude needs to reach domains outside the default allowlist, needs environment variables set for its sessions, or needs dependencies installed before it starts working.
@@ -60,7 +60,7 @@
LOG_LEVEL=debug
DATABASE_URL=postgres://localhost:5432/myapp
-Each session copies the environment’s values once, at startup, into ordinary environment variables that any command Claude runs can read. Because running sessions don’t re-read the configuration, editing or adding variables affects sessions you start afterward; sessions already running keep the values they started with. Claude Code on the web also sets some variables itself when it starts a session. For [`CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`](</docs/en/claude-code-on-the-web#manage-context>), the value Claude Code on the web sets overrides one you add here, so adding that key here has no effect. Anyone who uses the environment can read the values. On Pro and Max plans, use an API credential instead for a key the agent proxy can attach to a request. The requests that never get a credential are listed there.
+Each session copies the environment’s values once, at startup, into ordinary environment variables that any command Claude runs can read. Because running sessions don’t re-read the configuration, editing or adding variables affects sessions you start afterward; sessions already running keep the values they started with. A cloud session also sets some variables itself when it starts. For [`CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`](</docs/en/claude-code-on-the-web#manage-context>), the value the session sets overrides one you add here, so adding that key here has no effect. Anyone who uses the environment can read the values. On Pro and Max plans, use an API credential instead for a key the agent proxy can attach to a request. The requests that never get a credential are listed there.
###
@@ -146,7 +146,7 @@
Select an environment from the CLI
-Run `/remote-env` in your terminal to choose the default environment for cloud sessions you create from the CLI, such as [`claude --cloud`](</docs/en/claude-code-on-the-web#from-terminal-to-web>). The command opens a picker of your existing environments and saves your choice to the `remote.defaultEnvironmentId` key in your [user settings](</docs/en/settings#where-settings-live>), so it applies in every project on your machine until you change it, unless the same key is set at a higher-precedence [settings layer](</docs/en/settings#settings-precedence>), such as a repo’s project settings. A [self-hosted environment](</docs/en/self-hosted-environments>) ID, which has the form `ccpool_...`, follows a stricter source rule. See [`remote.defaultEnvironmentId`](</docs/en/settings-reference#remote-defaultenvironmentid>) for the settings layers Claude Code honors it from. `/remote-env` only sets the default: it doesn’t start a session, and it can’t add or edit environments. Manage them from the environment selector.
+Run `/remote-env` in your terminal to choose the default environment for cloud sessions you create from the CLI, such as [`claude --cloud`](</docs/en/claude-code-on-the-web#from-terminal-to-cloud>). The command opens a picker of your existing environments and saves your choice to the `remote.defaultEnvironmentId` key in your [user settings](</docs/en/settings#where-settings-live>), so it applies in every project on your machine until you change it, unless the same key is set at a higher-precedence [settings layer](</docs/en/settings#settings-precedence>), such as a repo’s project settings. A [self-hosted environment](</docs/en/self-hosted-environments>) ID, which has the form `ccpool_...`, follows a stricter source rule. See [`remote.defaultEnvironmentId`](</docs/en/settings-reference#remote-defaultenvironmentid>) for the settings layers Claude Code honors it from. `/remote-env` only sets the default: it doesn’t start a session, and it can’t add or edit environments. Manage them from the environment selector.
###
@@ -319,7 +319,7 @@
**Databases**| PostgreSQL 16, Redis 7.0
**Utilities**| git, gh, jq, yq, ripgrep, tmux, vim, nano
-¹ Bun is installed but has known proxy compatibility issues for package fetching. To get the versions of most of the tools in this table, ask Claude to run `check-tools` in a cloud session. It’s a shell command installed on the session VM, not a slash command; you ask Claude because Claude runs all VM commands for you. For a tool it doesn’t report, such as Ruby, PHP, bun, PostgreSQL, or Redis, ask Claude to run the tool’s own version command, for example `psql --version`. Node.js versions are installed at `/opt/node20`, `/opt/node21`, and `/opt/node22`, with 22 on `PATH` by default. To work with a different version, ask Claude to prepend that version’s `bin` directory, such as `/opt/node20/bin`, to `PATH`. Toolchains outside this list, such as the .NET SDK, aren’t pre-installed even when their package registries are on the default allowlist. Install them with a setup script.
+¹ Bun is installed but has known proxy compatibility issues for package fetching. To get the versions of most of the tools in this table, ask Claude to run `check-tools` in a cloud session. It’s a shell command installed on the session VM, not a command you type with `/`; you ask Claude because Claude runs all VM commands for you. For a tool it doesn’t report, such as Ruby, PHP, bun, PostgreSQL, or Redis, ask Claude to run the tool’s own version command, for example `psql --version`. Node.js versions are installed at `/opt/node20`, `/opt/node21`, and `/opt/node22`, with 22 on `PATH` by default. To work with a different version, ask Claude to prepend that version’s `bin` directory, such as `/opt/node20/bin`, to `PATH`. Toolchains outside this list, such as the .NET SDK, aren’t pre-installed even when their package registries are on the default allowlist. Install them with a setup script.
###
@@ -492,7 +492,7 @@
SessionStart hooks behave the same in the cloud as locally, with these caveats:
- * **No cloud-only scoping** : hooks run in both local and cloud sessions. To skip local execution, check the `CLAUDE_CODE_REMOTE` environment variable as shown above.
+ * **No cloud-only scoping** : hooks run in both local and cloud sessions. To skip local execution, exit early unless the `CLAUDE_CODE_REMOTE` environment variable is `true`, the way the dependency install script does.
* **Requires network access** : install commands need to reach package registries. If your environment uses **None** network access, these hooks fail. The default allowlist under **Trusted** covers npm, PyPI, RubyGems, and crates.io.
* **Proxy compatibility** : in Anthropic-hosted environments, all outbound traffic passes through a security proxy, and some package managers don’t work correctly with it; Bun is a known example. In a [self-hosted environment](</docs/en/self-hosted-environments-deploy#default-deny-egress>), outbound traffic goes through your own network boundary instead.
* **Adds startup latency** : hooks run each time a session starts or resumes, unlike setup scripts which benefit from environment caching. Keep install scripts fast by checking whether dependencies are already present before reinstalling.
@@ -763,8 +763,8 @@
Related resources
- * [Claude Code on the web](</docs/en/claude-code-on-the-web>): start, manage, and share cloud sessions
- * [Web quickstart](</docs/en/web-quickstart>): connect GitHub and start your first cloud session
+ * [Cloud sessions reference](</docs/en/claude-code-on-the-web>): start, manage, and share cloud sessions
+ * [Cloud sessions quickstart](</docs/en/web-quickstart>): connect GitHub and start your first cloud session
* [Claude Tag](<https://claude.com/docs/claude-tag/overview>): sessions Claude starts from Slack run in the same environments
* [Routines](</docs/en/routines>): scheduled runs use the same environments and network access levels
* [Remote Control](</docs/en/remote-control>): run sessions on your own machine’s network and files instead
--- a/code-review.md
+++ b/code-review.md
@@ -40,7 +40,7 @@
Rate and reply to findings
-Each review comment from Claude arrives with 👍 and 👎 already attached so both buttons appear in the GitHub UI for one-click rating. Click 👍 if the finding was useful or 👎 if it was wrong or noisy. Anthropic collects reaction counts after the PR merges and uses them to tune the reviewer. Reactions do not trigger a re-review or change anything on the PR. Replying to an inline comment does not prompt Claude to respond or update the PR. To act on a finding, fix the code and push. If the PR is subscribed to push-triggered reviews, the next run resolves the thread when the issue is fixed. To request a fresh review without pushing, comment `@claude review` as a top-level PR comment.
+Each review comment from Claude arrives with 👍 and 👎 already attached so both buttons appear in the GitHub UI for one-click rating. Click 👍 if the finding was useful or 👎 if it was wrong or noisy. Anthropic collects reaction counts after the PR merges and uses them to tune the reviewer. Reactions do not trigger a re-review or change anything on the PR. Replying to an inline comment does not prompt Claude to respond or update the PR. To act on a finding, fix the code and push. If the PR is subscribed to push-triggered reviews, the next run resolves the thread when the issue is fixed. To request a fresh review without pushing, comment `@claude review` as a top-level PR comment. To dismiss a finding without a code change, resolve its thread; replying doesn’t dismiss it.
###
@@ -179,7 +179,7 @@
REVIEW.md
-`REVIEW.md` is a file at your repository root that tailors Code Review to your repo. The agents in the review pipeline that find and verify findings receive its contents as your repository’s review instructions, alongside Code Review’s default review guidance, and the agents that rank and report findings consult it before settling severity and writing the review. The agents read the file’s text as-is, so `REVIEW.md` is plain instructions: [`@` import syntax](</docs/en/memory#import-additional-files>) is not expanded, and referenced files are not read along with it. Put the rules you want enforced directly in the file.
+`REVIEW.md` is a file at your repository root that tailors Code Review to your repo. The agents in the review pipeline that find and verify findings receive its contents as your repository’s review instructions, alongside Code Review’s default review guidance, and the agents that rank and report findings consult it before settling severity and writing the review. Put the rules you want enforced directly in `REVIEW.md`.
####
@@ -337,7 +337,7 @@
Ask Claude to fix what the review found. If you passed `--fix` or `--comment`, the review has already applied or posted its findings.
-Claude reports the findings as text in the reply in both of these runs, even when a host application requests the findings list described below:
+Claude reports the findings as text in the reply in both of these runs, even when a host application requests a findings list:
* In a terminal session, where `/code-review` runs the review as a [forked subagent](</docs/en/skills#run-skills-in-a-subagent>)
* In a `-p` run with text or JSON output
--- a/commands.md
+++ b/commands.md
@@ -6,7 +6,7 @@
Commands across a typical workflow
-Most commands are useful at a specific point in a session, from setting up a project to shipping a change. **First session in a repo.** Run `/init` to generate a starter `CLAUDE.md`, then `/memory` to refine it. Use `/mcp` to set up any servers the project needs, ask Claude to create any [subagents](</docs/en/sub-agents>) you want, and run `/permissions` to set your approval rules. **During a task.** `/plan` switches into plan mode before a large change. `/model` and `/effort` adjust which model you’re using and how much reasoning it applies. When the conversation gets long, `/context` shows what’s filling the window and `/compact` summarizes it to free space. Use `/btw` for a side question that shouldn’t add to the conversation history. **Run work in parallel.** Claude delegates side tasks to [subagents](</docs/en/sub-agents>), and `/tasks` lists the current session’s background work, including subagents that have finished. `/background` detaches the whole session to keep running as a [background agent](</docs/en/agent-view>) and frees your terminal. For a large change that spans the codebase, `/batch` decomposes it into independent units and runs each in its own [worktree](</docs/en/worktrees>). See [Run agents in parallel](</docs/en/agents>) for how these approaches relate. **Before you ship.** `/diff` shows what changed. `/code-review` checks the current diff for correctness bugs and cleanups and can apply the findings with `--fix`; pass a PR number, such as `/code-review high 1234`, to review a pull request instead. `/review` is an alias. `/code-review ultra` runs a multi-agent review in the cloud. `/security-review` checks the diff for security vulnerabilities. **Between sessions.** `/clear` starts fresh on a new task while keeping project memory. `/resume` returns to an earlier conversation, `/branch` branches the current one to try a different direction, and `/fork` copies it into a new [background session](</docs/en/agent-view>). `/teleport` pulls a web session into this terminal, and `/remote-control` lets you continue this local session from another device. **When something is wrong.** `/rewind` rolls code and conversation back to a checkpoint, or summarizes part of the conversation. `/doctor` runs a setup checkup that diagnoses installation and configuration issues and can fix them, `/debug` diagnoses runtime issues, and `/feedback` reports a bug with session context attached.
+Most commands are useful at a specific point in a session, from setting up a project to shipping a change. **First session in a repo.** Run `/init` to generate a starter `CLAUDE.md`, then `/memory` to refine it. Use `/mcp` to set up any servers the project needs, ask Claude to create any [subagents](</docs/en/sub-agents>) you want, and run `/permissions` to set your approval rules. **During a task.** `/plan` switches into plan mode before a large change. `/model` and `/effort` adjust which model you’re using and how much reasoning it applies. When the conversation gets long, `/context` shows what’s filling the window and `/compact` summarizes it to free space. Use `/btw` for a side question that shouldn’t add to the conversation history. **Run work in parallel.** Claude delegates side tasks to [subagents](</docs/en/sub-agents>), and `/tasks` lists the current session’s background work, including subagents that have finished. `/background` detaches the whole session to keep running as a [background agent](</docs/en/agent-view>) and frees your terminal. For a large change that spans the codebase, `/batch` decomposes it into independent units and runs each in its own [worktree](</docs/en/worktrees>). See [Run agents in parallel](</docs/en/agents>) for how these approaches relate. **Before you ship.** `/diff` shows what changed. `/code-review` checks the current diff for correctness bugs and cleanups and can apply the findings with `--fix`; pass a PR number, such as `/code-review high 1234`, to review a pull request instead. `/review` is an alias. `/code-review ultra` runs a multi-agent review in the cloud. `/security-review` checks the diff for security vulnerabilities. **Between sessions.** `/clear` starts fresh on a new task while keeping project memory. `/resume` returns to an earlier conversation, `/branch` branches the current one to try a different direction, and `/fork` copies it into a new [background session](</docs/en/agent-view>). `/teleport` pulls a cloud session into this terminal, and `/remote-control` lets you continue this local session from another device. **When something is wrong.** `/rewind` rolls code and conversation back to a checkpoint, or summarizes part of the conversation. `/doctor` runs a setup checkup that diagnoses installation and configuration issues and can fix them, `/debug` diagnoses runtime issues, and `/feedback` reports a bug with session context attached.
##
@@ -33,7 +33,7 @@
`/artifacts`| List the [artifacts](</docs/en/artifacts#find-an-artifact-again>) you own or that are shared with you, then attach one to the session, open it in your browser, or copy its link. Available where [artifacts](</docs/en/artifacts#availability>) are. Requires Claude Code v2.1.208 or later; attaching with `Enter` requires v2.1.216
`/auto-mode-setup`| [Draft `autoMode.environment` entries](</docs/en/auto-mode-config#generate-environment-entries>) from your project and recent sessions, then review the draft and save it to your user settings. Requires a Pro, Max, or Team plan and Claude Code v2.1.228 or later. On native Windows, requires v2.1.233 or later
`/autocompact [auto|<tokens>]`| Set the auto-compact window: how full the context window gets before Claude Code compacts automatically. Pass a size such as `500k`, or `auto` to return to the window tuned for your model. Claude Code saves the value to user settings and applies it to the current session. See [Set the auto-compact window](</docs/en/model-config#set-the-auto-compact-window>) for accepted values and what overrides it. Without an argument, opens a dialog that shows the current window. Requires Claude Code v2.1.221 or later
-`/autofix-pr [prompt]`| Spawn a [Claude Code on the web](</docs/en/claude-code-on-the-web#auto-fix-pull-requests>) session that watches the current branch’s PR and pushes fixes when CI fails or reviewers leave comments. Detects the open PR from your checked-out branch with `gh pr view`; to watch a different PR, check out its branch first. By default the cloud session is told to fix every CI failure and review comment; pass a prompt to give it different instructions, for example `/autofix-pr only fix lint and type errors`. Requires the `gh` CLI and access to [Claude Code on the web](</docs/en/claude-code-on-the-web>)
+`/autofix-pr [prompt]`| Spawn a [cloud session](</docs/en/claude-code-on-the-web#auto-fix-pull-requests>) that watches the current branch’s PR and pushes fixes when CI fails or reviewers leave comments. Detects the open PR from your checked-out branch with `gh pr view`; to watch a different PR, check out its branch first. By default the cloud session is told to fix every CI failure and review comment; pass a prompt to give it different instructions, for example `/autofix-pr only fix lint and type errors`. Requires the `gh` CLI and access to [cloud sessions](</docs/en/claude-code-on-the-web>)
`/background [prompt]`| Detach the current session to run as a [background agent](</docs/en/agent-view>) and free this terminal. Pass a prompt to send one more instruction before detaching. Monitor the session with `claude agents`. To copy the conversation into a new background session while this one keeps running, use `/fork`. Alias: `/bg`
`/batch <instruction>`| **[Skill](</docs/en/skills#bundled-skills>).** Orchestrate large-scale changes across a codebase in parallel. Researches the codebase, decomposes the work into 5 to 30 independent units, and presents a plan. Once approved, spawns one [background subagent](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) per unit in an isolated [git worktree](</docs/en/worktrees>). Each subagent implements its unit, runs tests, and opens a pull request. Requires a git repository. Example: `/batch migrate src/ from JavaScript to TypeScript`
`/branch [name]`| Create a branch of the current conversation at this point, so you can try a different direction without losing the conversation as it stands. Switches you into the branch and preserves the original, which you can return to with `/resume`. To run a copy as a separate [background session](</docs/en/agent-view>) instead of switching into it, use `/fork`; to hand a side task to a [subagent](</docs/en/sub-agents>) that reports back into this conversation, use `/subtask`
@@ -100,7 +100,7 @@
`/reload-plugins [--force]`| Reload all active [plugins](</docs/en/plugins>) to apply pending changes without restarting. Reports counts for each reloaded component and flags any load errors. When the reload would change which MCP tools are loaded and invalidate the prompt cache, the command warns and skips unless you pass `--force`. Also available in non-interactive mode (`-p`), the Agent SDK, and the desktop app, where it runs only on input typed directly into the session and doesn’t apply plugin MCP server changes; requires Claude Code v2.1.260 or later. See [Apply plugin changes without restarting](</docs/en/discover-plugins#apply-plugin-changes-without-restarting>)
`/reload-skills`| Re-scan [skill](</docs/en/skills>) and command directories so skills added or changed on disk during the session become available without restarting. Reports how many skills are available and how many were added or removed
`/remote-control`| Make this session available for [Remote Control](</docs/en/remote-control>) from claude.ai. Running it while signed out prints that Remote Control requires a claude.ai subscription and tells you how to sign in; before v2.1.206 it reported `Unknown command: /remote-control`. Alias: `/rc`
-`/remote-env`| Choose the default environment for [cloud agents](</docs/en/cloud-environments#select-an-environment-from-the-cli>)
+`/remote-env`| Choose the default [cloud environment](</docs/en/cloud-environments#select-an-environment-from-the-cli>) for cloud sessions you start from the CLI
`/rename [name]`| Rename the current session and show the name on the prompt bar. Without a name, auto-generates one from conversation history. Also available in non-interactive mode (`-p`); requires Claude Code v2.1.205 or later. From every rename surface, including claude.ai and the desktop app, Claude Code replaces control and invisible characters in the new name with spaces and caps the name at 200 characters. If the name is empty once invisible characters are removed, Claude Code rejects it and shows `That name is empty once invisible characters are removed. Usage: /rename <name>`. The character replacement and length cap require Claude Code v2.1.221 or later. If another live session on this machine already uses a name you pass, Claude Code applies [a variant of it](</docs/en/sessions#name-your-sessions>) instead
`/resume [session]`| Resume a conversation by ID or name, or open the session picker. [Background sessions](</docs/en/agent-view>) appear in the picker marked with `bg`; one that is still running can’t be resumed here, so attach to it from `claude agents` or stop it there first. Alias: `/continue`
`/review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [pr#|branch|path]`| Alias of [`/code-review`](</docs/en/code-review#review-a-diff-locally>): reviews the current diff, or a PR number, branch, or path you pass, such as `/review 1234`, and takes the same effort levels and flags. With no level given, the review reuses the last `low` through `max` level you typed; see [Review a diff locally](</docs/en/code-review#review-a-diff-locally>) for the exact rules. For a deep cloud review, use [`/code-review ultra`](</docs/en/ultrareview>). Before v2.1.223, `/review` was a separate command that ran a single-pass, read-only review of a GitHub pull request by number, listing open PRs to pick from when run with no argument; from v2.1.186 through v2.1.201, it ran the same multi-agent engine as `/code-review medium`
@@ -124,11 +124,11 @@
`/subtask <task>`| Spawn a [forked subagent](</docs/en/sub-agents#fork-the-current-conversation>): a background subagent that inherits the full conversation and works on the task while you keep working. Its result returns to this conversation when it finishes. To copy the conversation into a separate background session instead, use `/fork`. Requires Claude Code v2.1.212 or later; on v2.1.161 through v2.1.211 this command is `/fork`. When [agent view is turned off](</docs/en/agent-view#turn-off-agent-view>), `/subtask` isn’t available and `/fork` keeps the forked-subagent behavior
`/tasks`| View and manage background work in the current session, including subagents that have finished. Also available as `/bashes`
`/team-onboarding`| Generate a team onboarding guide from your Claude Code usage history. Claude analyzes your sessions, commands, and MCP server usage from the past 30 days and produces a markdown guide a teammate can paste as a first message to get set up quickly. For claude.ai subscribers on Pro, Max, Team, and Enterprise plans, also returns a share link teammates can open directly in Claude Code
-`/teleport`| Pull a [Claude Code on the web](</docs/en/claude-code-on-the-web#from-web-to-terminal>) session into this terminal. Opens a picker, then fetches the branch and conversation. Also available as `/tp`. Requires a claude.ai subscription
+`/teleport`| Pull a [cloud session](</docs/en/claude-code-on-the-web#from-cloud-to-terminal>) into this terminal. Opens a picker, then fetches the branch and conversation. Also available as `/tp`. Requires a claude.ai subscription
`/terminal-setup`| [Install a Shift+Enter keybinding for newlines](</docs/en/terminal-config#enter-multiline-prompts>) in VS Code, Cursor, Devin Desktop, Alacritty, or Zed. In Apple Terminal, [enable Option+Enter for newlines and turn off the audible bell](</docs/en/terminal-config#enable-option-key-shortcuts-on-macos>) instead. In iTerm2, [turn on clipboard access so that `/copy` works](</docs/en/terminal-config#enable-option-key-shortcuts-on-macos>)
`/theme`| Change the color theme. Includes an `auto` option that matches your terminal’s light or dark background, light and dark variants, colorblind-accessible (daltonized) themes, ANSI themes that use your terminal’s color palette, and any [custom themes](</docs/en/terminal-config#create-a-custom-theme>) from `~/.claude/themes/` or plugins. Select **New custom theme…** to create one
`/tui [default|fullscreen]`| Set the terminal UI renderer and relaunch into it with your conversation intact. `fullscreen` enables the [flicker-free alt-screen renderer](</docs/en/fullscreen>). With no argument, prints the active renderer
-`/ultraplan <prompt>`| Removed. Use [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>) instead. Previously sent a planning task to a [Claude Code on the web](</docs/en/claude-code-on-the-web>) session for review in your browser
+`/ultraplan <prompt>`| Removed. Use [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>) instead. Previously sent a planning task to a [cloud session](</docs/en/claude-code-on-the-web>) for review in your browser
`/ultrareview [PR or branch]`| Run a deep, multi-agent code review in a cloud sandbox with [ultrareview](</docs/en/ultrareview>). Pass a PR reference to review that pull request, or a branch name to change the comparison base. The preferred invocation is now `/code-review ultra`, and `/ultrareview` remains as an alias. Includes 3 free runs on Pro and Max, then requires [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>)
`/upgrade`| Open the upgrade page in your browser to switch to a higher plan tier. When the browser fails to open, the command shows a sign-in prompt without printing the URL
`/usage`| Show session cost, plan usage limits, and activity stats. On a Pro, Max, Team, or Enterprise plan, includes a [breakdown of what counts against your plan limits](</docs/en/costs#plan-usage-breakdown>). `/cost` and `/stats` are aliases
@@ -136,7 +136,7 @@
`/verify`| **[Skill](</docs/en/skills#bundled-skills>).** Confirm a code change does what it should by building your project’s app, running it, and observing the result, rather than relying on tests or type checks. See [Run and verify your app](</docs/en/skills#run-and-verify-your-app>)
`/vim`| Removed in v2.1.92. To toggle between Vim and Normal editing modes, use `/config` → Editor mode
`/voice [hold|tap|off]`| Toggle [voice dictation](</docs/en/voice-dictation>), or enable it in a specific mode. Requires a Claude.ai account
-`/web-setup`| Connect your GitHub account to [Claude Code on the web](</docs/en/web-quickstart#connect-from-your-terminal>) using your local `gh` CLI credentials
+`/web-setup`| Connect your GitHub account for [cloud sessions](</docs/en/web-quickstart#connect-from-your-terminal>) using your local `gh` CLI credentials
`/workflow-authoring`| **[Skill](</docs/en/skills#bundled-skills>).** Load the reference for writing [dynamic workflow](</docs/en/workflows>) scripts: the script API, resume behavior, quality patterns, and worked examples. Claude normally loads it on its own before writing a script; run it yourself before [editing a saved script by hand](</docs/en/workflows#edit-a-saved-script>). Available when dynamic workflows are enabled, and requires Claude Code v2.1.248 or later
`/workflows`| Open the [workflow](</docs/en/workflows#watch-the-run>) progress view to watch, pause, resume, or save running and completed workflows
Show diff (300 lines)
--- a/configuration.md
+++ b/configuration.md
@@ -0,0 +1,297 @@
+An Agent SDK session reads configuration from settings files, environment variables, and the `options` object you pass when you start it. This page shows how to compose the `options` object and what settings files and environment variables control. For every option’s type and default, see the [`Options`](</docs/en/agent-sdk/typescript#options>) (TypeScript) and [`ClaudeAgentOptions`](</docs/en/agent-sdk/python#claudeagentoptions>) (Python) references.
+
+##
+
+
+
+Pass options to a session
+
+Every `query()` call accepts an options object: `Options` in TypeScript, `ClaudeAgentOptions` in Python. Each field is optional, and a session started with no options runs with the SDK’s defaults. The example below configures a read-only session that summarizes a project’s open TODOs. Pairs read as TypeScript / Python where the spellings differ:
+
+ * **`model`** : picks the model
+ * **`allowedTools` / `allowed_tools`**: pre-approves a read-only tool list
+ * **`maxTurns` / `max_turns`**: caps the turn count
+ * **`cwd`** : sets the working directory
+
+TypeScript
+
+Python
+
+ import { query } from "@anthropic-ai/claude-agent-sdk";
+
+ for await (const message of query({
+ prompt: "Summarize the open TODOs in this repo",
+ options: {
+ model: "claude-sonnet-5",
+ allowedTools: ["Read", "Glob", "Grep"],
+ maxTurns: 8,
+ cwd: "/path/to/repo",
+ },
+ })) {
+ if (message.type === "result" && message.subtype === "success" && !message.is_error) {
+ console.log(message.result);
+ }
+ }
+
+ import asyncio
+
+ from claude_agent_sdk import ClaudeAgentOptions, ResultMessage, query
+
+ async def main():
+ options = ClaudeAgentOptions(
+ model="claude-sonnet-5",
+ allowed_tools=["Read", "Glob", "Grep"],
+ max_turns=8,
+ cwd="/path/to/repo",
+ )
+
+ async for message in query(
+ prompt="Summarize the open TODOs in this repo",
+ options=options,
+ ):
+ if isinstance(message, ResultMessage) and not message.is_error:
+ print(message.result)
+
+ asyncio.run(main())
+
+Point `cwd` at one of your own projects and run the example. The summary of that project’s open TODOs prints when the result message arrives. `allowedTools` (TypeScript) or `allowed_tools` (Python) pre-approves the listed tools, so calls to them run without stopping for approval. Tools outside the list stay available. When Claude calls an unlisted tool, the permission mode decides whether the call runs. For more information, see [Allow and deny rules](</docs/en/agent-sdk/permissions#allow-and-deny-rules>).
+
+##
+
+
+
+Load settings files
+
+Settings files supply configuration beyond the options object. Two options control how they load:
+
+ * **`settingSources` / `setting_sources`**: controls which filesystem sources load: user, project, and local. Settings files and CLAUDE.md files arrive through these sources.
+ * **`settings`** : loads a settings file path or an inline JSON string in either language, and TypeScript also accepts a settings object. Whichever form you pass overrides user, project, and local filesystem settings; only managed policy settings rank higher. The references document the full precedence order under [Settings precedence](</docs/en/agent-sdk/typescript#settings-precedence>) for TypeScript and [Settings precedence](</docs/en/agent-sdk/python#settings-precedence>) for Python.
+
+Pass `[]` to disable user, project, and local settings. For more information, see [Use Claude Code features in the SDK](</docs/en/agent-sdk/claude-code-features>).
+
+##
+
+
+
+Choose a model
+
+Unless the `model` option, your settings, or your environment selects a model, a new session starts on [Claude Code’s default model](</docs/en/model-config#default-model-setting>). For the order of those sources, see [Setting your model](</docs/en/model-config#setting-your-model>). Set `model` to pin a specific model, or to pick a smaller one for faster, cheaper agents. The value takes a model alias or a full model name; aliases and the versions they resolve to are listed under [Model aliases](</docs/en/model-config#model-aliases>). Set `fallbackModel` (TypeScript) or `fallback_model` (Python) to name a backup model. When the primary is overloaded or unavailable, the session switches to the backup. The primary is retried at the start of each user turn, so the session returns to it once the outage passes. In either language, the option accepts a single model or a comma-separated list of backups. For the order and the chain cap, see [Fallback model chains](</docs/en/model-config#fallback-model-chains>). In TypeScript, a fallback equal to `model` throws an error at startup. The examples below show a fallback list in TypeScript and a single fallback in Python:
+
+TypeScript
+
+Python
+
+ const options = {
+ model: "claude-fable-5",
+ fallbackModel: "claude-opus-5,claude-sonnet-5",
+ };
+
+ options = ClaudeAgentOptions(
+ model="claude-fable-5",
+ fallback_model="claude-opus-5",
+ )
+
+The [Messages API](<https://platform.claude.com/docs/en/api/messages>) request parameters `temperature`, `top_p`, and `max_tokens` have no fields on the options object in either language. Set the [effort level](</docs/en/agent-sdk/agent-loop#effort-level>) or a spend cap instead, or call the Messages API when you need those parameters directly.
+
+##
+
+
+
+Set environment variables
+
+The `env` option sets environment variables for the Claude Code process that runs your session. Whether your values replace the inherited environment or merge over it differs by language:
+
+ * **TypeScript** : `env` replaces the subprocess environment
+ * **Python** : the SDK merges your values over the inherited environment, and your values override the inherited ones
+
+In TypeScript, spread `process.env` into `env` to keep inherited variables such as `PATH`, `HOME`, and `ANTHROPIC_API_KEY`. When you leave `env` unset, the subprocess inherits your environment in both languages. The example routes API traffic through a gateway by setting `ANTHROPIC_BASE_URL`.
+
+TypeScript
+
+Python
+
+ const options = {
+ env: { ...process.env, ANTHROPIC_BASE_URL: "https://gateway.example.com" },
+ };
+
+ options = ClaudeAgentOptions(
+ env={"ANTHROPIC_BASE_URL": "https://gateway.example.com"},
+ )
+
+The variables you pass can also configure Claude Code itself. For the variables the Claude Code process reads, see [Environment variables](</docs/en/env-vars>). To tune API timeouts and stall detection this way, follow the Handle slow or stalled API responses section in the [TypeScript reference](</docs/en/agent-sdk/typescript#handle-slow-or-stalled-api-responses>) or the [Python reference](</docs/en/agent-sdk/python#handle-slow-or-stalled-api-responses>).
+
+##
+
+
+
+Set the working directory
+
+Set `cwd` to run the session in a specific directory. When you leave `cwd` unset, the session runs in your process’s working directory. Neither SDK has a setter for `cwd`. To run in a different directory, start another session with that `cwd`. Claude Code reads the working directory to determine:
+
+ * **Project settings and hooks** : which project’s [settings and hooks load](</docs/en/agent-sdk/claude-code-features>)
+ * **Skills** : where [session skills are discovered](</docs/en/agent-sdk/skills>)
+ * **Session storage** : which project a [stored session belongs to](</docs/en/agent-sdk/session-storage>)
+
+To let tools reach files outside the working directory, add paths with `additionalDirectories` (TypeScript) or `add_dirs` (Python). For the scope of that grant, see [Additional directories grant file access, not configuration](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>).
+
+##
+
+
+
+Limit turns and spend
+
+Cap turns and spend with `maxTurns` / `max_turns` and `maxBudgetUsd` / `max_budget_usd`. Both caps are off when unset. When a session hits a cap, the run ends with a result message whose subtype names the cap, `error_max_turns` or `error_max_budget_usd`. What happens next differs by input mode:
+
+ * **Single-shot`query()`**: the SDK yields the cap result and then raises, so wrap the loop in a try block to continue past the error
+ * **Streaming input** : the session stays alive past a cap result, and the max-turns count starts over for each queued message. The budget total accumulates across messages, and once spend reaches the cap, later messages in the same conversation end with the same budget result. A [`/clear`](</docs/en/agent-sdk/cost-tracking>) starts the budget over
+
+The two caps treat `0` differently:
+
+ * **`maxTurns` / `max_turns`**: `0` runs the session without a turn limit, the same as leaving the option unset
+ * **`maxBudgetUsd` / `max_budget_usd`**: the CLI rejects `0` as an invalid amount at startup, and the session never runs
+
+For more information about both caps, including subagent spend, see [Turns and budget](</docs/en/agent-sdk/agent-loop#turns-and-budget>).
+
+##
+
+
+
+Change configuration mid-session
+
+When you start a session with [streaming input](</docs/en/agent-sdk/streaming-vs-single-mode>), you can switch its model and permission mode while it runs. Where you call the setters differs by language:
+
+ * **TypeScript** : methods on the object `query()` returns
+ * **Python** : methods on [`ClaudeSDKClient`](</docs/en/agent-sdk/python#claudesdkclient>), since `query()` returns a plain iterator without control methods
+
+Both languages have the same setters:
+
+ * **`setModel()` / `set_model()`**: switches the model. Call it with no model to switch to [Claude Code’s default model](</docs/en/model-config#default-model-setting>) rather than the `model` you passed in options.
+ * **`setPermissionMode()` / `set_permission_mode()`**: switches the permission mode
+
+TypeScript also has `applyFlagSettings()` and `updateSettings()`:
+
+ * **`applyFlagSettings()`** : applies settings at runtime, as in `await session.applyFlagSettings({ effortLevel: "high" })`. The method takes settings file keys rather than options fields, so check the [`applyFlagSettings()` reference](</docs/en/agent-sdk/typescript#applyflagsettings>) for the schema and for which keys take effect mid-session.
+ * **`updateSettings()`** : writes an allowlisted set of keys to the project’s local settings file, as in `await session.updateSettings("localSettings", { outputStyle: "Explanatory" })`. The written keys take effect on the session’s next request and persist for later sessions that load `local` settings. The method’s row in the [methods table](</docs/en/agent-sdk/typescript#methods>) names the allowlisted keys and the version floor.
+
+The example below runs a two-turn session, changes the configuration between the turns, and prints the model that answered each turn. In TypeScript, the prompt stream holds the second message until the setters have run, and the second turn runs on the new model.
+
+TypeScript
+
+Python
+
+ import { query, type SDKUserMessage } from "@anthropic-ai/claude-agent-sdk";
+
+ function userMessage(text: string): SDKUserMessage {
+ return { type: "user", message: { role: "user", content: text }, parent_tool_use_id: null };
+ }
+
+ // Hold the second prompt until the setters have run.
+ let startSecondTurn!: () => void;
+ const secondTurnReady = new Promise<void>((resolve) => {
+ startSecondTurn = resolve;
+ });
+
+ async function* turnPrompts(): AsyncGenerator<SDKUserMessage, void> {
+ yield userMessage("Reply with exactly: ready");
+ await secondTurnReady;
+ yield userMessage("Reply with exactly: done");
+ }
+
+ const session = query({
+ prompt: turnPrompts(),
+ options: {
+ model: "claude-sonnet-5",
+ },
+ });
+
+ let turnModel = "";
+ let completedTurns = 0;
+
+ for await (const message of session) {
+ if (message.type === "assistant") {
+ turnModel = message.message.model;
+ } else if (message.type === "result") {
+ completedTurns += 1;
+ if (completedTurns === 1) {
+ console.log(`First turn model: ${turnModel}`);
+ await session.setModel("claude-opus-5");
+ await session.setPermissionMode("acceptEdits");
+ startSecondTurn();
+ } else {
+ console.log(`Second turn model: ${turnModel}`);
+ break;
+ }
+ }
+ }
+
+ import asyncio
+
+ from claude_agent_sdk import AssistantMessage, ClaudeAgentOptions, ClaudeSDKClient
+
+ async def main():
+ options = ClaudeAgentOptions(model="claude-sonnet-5")
+
+ async with ClaudeSDKClient(options=options) as client:
+ await client.query("Reply with exactly: ready")
+ first_model = ""
+ async for message in client.receive_response():
+ if isinstance(message, AssistantMessage):
+ first_model = message.model
+
+ await client.set_model("claude-opus-5")
+ await client.set_permission_mode("acceptEdits")
+
+ await client.query("Reply with exactly: done")
+ second_model = ""
+ async for message in client.receive_response():
+ if isinstance(message, AssistantMessage):
+ second_model = message.model
+
+ print(f"First turn model: {first_model}")
+ print(f"Second turn model: {second_model}")
+
+ asyncio.run(main())
+
+On the Claude API, the program prints `First turn model: claude-sonnet-5`, then `Second turn model: claude-opus-5` after the switch.
+
+Each model has its own prompt cache, so after a mid-session switch the next request recomputes the full conversation uncached at the new model’s rates. For more information, see [Switching models](</docs/en/prompt-caching#switching-models>).
+
+##
+
+
+
+Configure specific features
+
+The table below maps each option to the feature it configures. For options this page doesn’t cover, see the [TypeScript](</docs/en/agent-sdk/typescript#options>) and [Python](</docs/en/agent-sdk/python#claudeagentoptions>) references. If you know your goal but not which option serves it, start from [Choose the right feature](</docs/en/agent-sdk/claude-code-features#choose-the-right-feature>).
+
+TypeScript| Python| Controls| Covered in
+---|---|---|---
+`permissionMode`| `permission_mode`| What the agent can do without approval| [Configure permissions](</docs/en/agent-sdk/permissions>)
+`allowedTools`| `allowed_tools`| Which tool calls are pre-approved| [Configure permissions](</docs/en/agent-sdk/permissions>)
+`canUseTool`| `can_use_tool`| Your approval callback for tool calls| [Handle tool approval requests](</docs/en/agent-sdk/user-input#handle-tool-approval-requests>)
+`systemPrompt`| `system_prompt`| The agent’s instructions| [Modifying system prompts](</docs/en/agent-sdk/modifying-system-prompts>)
+`settingSources`| `setting_sources`| Which filesystem settings load| [Use Claude Code features in the SDK](</docs/en/agent-sdk/claude-code-features>)
+`mcpServers`| `mcp_servers`| External tool servers| [Connect to external tools with MCP](</docs/en/agent-sdk/mcp>)
+`agents`| `agents`| Subagent definitions| [Subagents](</docs/en/agent-sdk/subagents>)
+`hooks`| `hooks`| Callbacks at lifecycle points| [Hooks](</docs/en/agent-sdk/hooks>)
+`skills`| `skills`| Which skills load| [Extend agents with skills](</docs/en/agent-sdk/skills>)
+`plugins`| `plugins`| Which plugins load| [Plugins](</docs/en/agent-sdk/plugins>)
+`outputFormat`| `output_format`| Structured output schemas| [Structured outputs](</docs/en/agent-sdk/structured-outputs>)
+`resume`| `resume`| Continuing a stored session| [Sessions](</docs/en/agent-sdk/sessions>)
+`forkSession`| `fork_session`| Branching a session| [Sessions](</docs/en/agent-sdk/sessions>)
+`sessionStore`| `session_store`| External session persistence| [Session storage](</docs/en/agent-sdk/session-storage>)
+`enableFileCheckpointing`| `enable_file_checkpointing`| Rewindable file edits| [File checkpointing](</docs/en/agent-sdk/file-checkpointing>)
+`effort`| `effort`| How much work Claude puts into responses| [Effort level](</docs/en/agent-sdk/agent-loop#effort-level>)
+`sandbox`| `sandbox`| Sandbox behavior for tool execution| [TypeScript](</docs/en/agent-sdk/typescript#sandbox-configuration>) and [Python](</docs/en/agent-sdk/python#sandbox-configuration>) references, with deployment context in [Secure deployment](</docs/en/agent-sdk/secure-deployment>)
+
+##
+
+
+
+Next steps
+
+To see configuration composed into working agents:
+
+ * **[Quickstart](</docs/en/agent-sdk/quickstart>)** : build and run a first agent end to end
+ * **[Examples](</docs/en/agent-sdk/examples>)** : find a complete, runnable project or a guided Claude Cookbook recipe that matches what you want to build
+ * **[Multi-tenant isolation](</docs/en/agent-sdk/hosting#multi-tenant-isolation>)** : isolate each tenant’s settings and memory with `settingSources` / `setting_sources`, `env`, and `cwd`
--- a/context-window.md
+++ b/context-window.md
@@ -35,7 +35,7 @@
Context that hooks added earlier| Summarized with the rest of the conversation
[SessionStart hooks](</docs/en/hooks-guide#re-inject-context-after-compaction>) that match the `compact` source| Claude Code runs them and adds their output to the compacted context
-Path-scoped rules and nested CLAUDE.md files load into message history when their trigger file is read, so compaction summarizes them away with everything else. Right after compaction, Claude Code re-reads up to five of the files Claude has read or edited in the session, choosing the ones modified most recently, and reloads the rules and nested CLAUDE.md files that apply to those files. A file over 5,000 tokens comes back as a path reference without its content, shown as `Referenced file` instead of `Read`. Its rules still reload. If a rule must persist across compaction, drop the `paths:` frontmatter or move it to the project-root CLAUDE.md. Skill bodies are re-injected after compaction, but large skills are truncated to fit the per-skill cap, and the oldest invoked skills are dropped once the total budget is exceeded. Truncation keeps the start of the file, so put the most important instructions near the top of `SKILL.md`.
+Right after compaction, Claude Code re-reads up to five of the files Claude has read or edited in the session, choosing the ones modified most recently. A file over 5,000 tokens comes back as a path reference without its content, shown as `Referenced file` instead of `Read`. Path-scoped rules and nested CLAUDE.md files load into message history when their trigger file is read, so compaction summarizes them away with everything else. If a rule must persist across compaction, drop the `paths:` frontmatter or move it to the project-root CLAUDE.md. Skill bodies are re-injected after compaction, but large skills are truncated to fit the per-skill cap, and the oldest invoked skills are dropped once the total budget is exceeded. Truncation keeps the start of the file, so put the most important instructions near the top of `SKILL.md`.
##
--- a/cost-tracking.md
+++ b/cost-tracking.md
@@ -56,7 +56,7 @@
* **Every later result** : keeps counting from that reset.
* **The last result before each`/clear`**: holds the total for the turns since the previous reset.
-To total the whole call, add the last result from before each `/clear` to the call’s final result. Every other result, including the `/clear` turn’s own, is superseded by a later one. In TypeScript, the SDK also emits an [`SDKConversationResetMessage`](</docs/en/agent-sdk/typescript#sdkconversationresetmessage>) at each reset, so you can detect resets from the stream. In Python, the SDK likewise emits a `ConversationResetMessage`. Before Python SDK v0.2.137, the Python iterator dropped that message, so on those versions count the resets yourself from the `/clear` turns your app sends. `maxBudgetUsd`, or `max_budget_usd` in Python, is compared against the same running total, so a `/clear` also starts the budget over.
+To total the whole call, add the last result from before each `/clear` to the call’s final result. Every other result, including the `/clear` turn’s own, is superseded by a later one. In TypeScript, the SDK also emits an [`SDKConversationResetMessage`](</docs/en/agent-sdk/typescript#sdkconversationresetmessage>) at each reset, so you can detect resets from the stream. In Python, the SDK likewise emits a `ConversationResetMessage`. Before Python SDK v0.2.137, the Python iterator dropped that message, so on those versions count the resets yourself from the `/clear` turns your app sends. `maxBudgetUsd` (TypeScript) or `max_budget_usd` (Python) is compared against the same running total, so a `/clear` also starts the budget over.
##
--- a/cross-session-messaging.md
+++ b/cross-session-messaging.md
@@ -13,7 +13,7 @@
* **Hand over a finding** : when one session discovers a breaking change or makes a decision, Claude summarizes it for the session working on the affected area, instead of you re-explaining it there.
* **Coordinate parallel worktrees** : when sessions work the same repository in separate [worktrees](</docs/en/worktrees>), Claude can tell the other sessions what landed.
* **Get status from long-running work** : have a migration or test run report back to the session you’re watching, or ask it yourself from there. If that session is on this machine, Claude can also ask it for one notice when it next goes idle or exits.
- * **Message across machines** : reach one of your sessions on another machine or on the web.
+ * **Message across machines** : reach one of your sessions on another machine or in the cloud.
Use messaging between independent sessions that you start and steer yourself. Claude Code has a dedicated feature for each of the other ways to run or reach multiple sessions, so use the one built for what you’re doing instead:
@@ -121,7 +121,7 @@
* **Subagents** : agents running inside the current session.
* **Teammates** : this session’s own [agent team](</docs/en/agent-teams>) teammates. Before v2.1.239, teammates didn’t appear in the listing, though Claude could already message them by name.
* **Your other local sessions** : Claude Code sessions running on the same machine, including [background sessions](</docs/en/agent-view>). A session appears only when it binds an inbox socket.
- * **Your cloud sessions** : your [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions, shown while this session is connected to [Remote Control](</docs/en/remote-control>). Claude Code labels them `cloud` in the listing.
+ * **Your[cloud sessions](</docs/en/claude-code-on-the-web>)**: shown while this session is connected to [Remote Control](</docs/en/remote-control>). Claude Code labels them `cloud` in the listing.
* **Your Remote Control sessions on other machines** : shown while this session is connected to [Remote Control](</docs/en/remote-control>), and labeled `Remote Control`. Claude Code shows `offline` as the status of a session whose Remote Control connection has dropped.
This session isn’t one of the rows. If Claude addresses a message to this session’s own name, Claude Code refuses it and tells Claude the target is the current session. Before v2.1.239, the listing didn’t show this session’s name, and Claude Code reported a message sent to it as an agent it couldn’t find. While this session is connected to [Remote Control](</docs/en/remote-control>), Claude Code withholds some details of your local sessions from the `/list-agents` output, without changing what Claude itself sees when it looks for a session to message:
@@ -147,7 +147,7 @@
---|---
On this machine| Over a per-session socket on macOS and Linux, or a per-session named pipe on native Windows, never through Anthropic servers
On another of your machines| Through Anthropic servers, arriving over that machine’s [Remote Control](</docs/en/remote-control>) connection
-On [Claude Code on the web](</docs/en/claude-code-on-the-web>)| Through Anthropic servers, straight to the cloud session
+In the [cloud](</docs/en/claude-code-on-the-web>)| Through Anthropic servers, straight to the cloud session
Starting a conversation with a session on another of your machines requires Claude Code v2.1.225 or later and a target that appears in the listing. Before v2.1.225, Claude could only reply to a message that arrived from one. You can message a session shown as `offline` in the listing, one whose Remote Control connection has dropped. The send goes through, but the message arrives only after that session’s machine reconnects. Claude is told as much when it sends. Same-machine delivery works wherever the feature is enabled. Each session registers itself in files on disk. When Claude lists or messages your local sessions, Claude Code reads those files to find the sessions, so two sessions can reach each other only when they can see the same files. A container has its own filesystem, so a session inside it and a session on the host can’t reach each other. Two sessions inside the same container can still message each other, including on a [self-hosted runner](</docs/en/self-hosted-environments>). A session inside WSL 2 and a native Windows session on the same computer can’t reach each other either, because they register under different home directories and listen on different socket types. While this session is connected to Remote Control, when you message a session on another of your machines, Claude Code shows the message in that session’s conversation under this session’s Remote Control name. The Claude on that machine can reply to that name. For example, when this session is connected to Remote Control as `laptop-graceful-unicorn` and you message your desktop, you see the message in the desktop session under `laptop-graceful-unicorn`. If this session isn’t connected to Remote Control when Claude sends to a session beyond this machine, the message still goes through, but without a reply address, so the receiving Claude can’t answer it. Claude is told as much when it sends. To require your approval before any message goes beyond this machine, set `isolatePeerMachines`.
@@ -194,7 +194,7 @@
`hold`| Claude Code shows a notice for each message and doesn’t deliver it. If an `accept` later applies, per the [precedence rules](</docs/en/settings-reference#crosssessioninbound>), Claude Code releases the held messages
`refuse`| Claude Code drops each message without delivering it
-Beyond editing a settings file, you can select the value in the `/config` row **Messages from your other sessions**. Claude Code writes the value you select to your user settings. The row requires Claude Code v2.1.232 or later and doesn’t appear while managed settings or the `--settings` flag sets the key, since a user-settings value wouldn’t apply then. Claude Code rejects the `/config crossSessionInbound=value` shorthand for this key. To see which value applies, follow the `crossSessionInbound` precedence rules in the [settings reference](</docs/en/settings-reference#crosssessioninbound>). When no value applies, Claude Code decides per message from the two sessions’ permission modes. It groups sessions that [bypass permission prompts](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>) into one class, and every other session into the other. Plan mode counts as bypassing in sessions with bypass permissions available, and [auto](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), `acceptEdits`, and `dontAsk` count as prompting:
+Beyond editing a settings file, you can select the value in the `/config` row **Messages from your other sessions**. Claude Code writes the value you select to your user settings. The row requires Claude Code v2.1.232 or later and doesn’t appear while managed settings or the `--settings` flag sets the key, since a user-settings value wouldn’t apply then. Claude Code rejects the `/config crossSessionInbound=value` shorthand for this key. To see which value applies, follow the `crossSessionInbound` precedence rules in the [settings reference](</docs/en/settings-reference#crosssessioninbound>). When no value applies, Claude Code decides per message from the two sessions’ permission modes. It groups sessions that [bypass permission prompts](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>) into one class, and every other session into the other. Plan mode counts as bypassing in interactive terminal sessions with bypass permissions available, and [auto](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), `acceptEdits`, and `dontAsk` count as prompting:
* **The receiving session prompts for permissions** : Claude Code delivers each message. It holds one for your approval only when the sending session identifies itself as bypassing permission prompts.
* **The receiving session bypasses permission prompts** : Claude Code holds each message for your approval. It delivers one only when the sending session identifies itself as also bypassing.
@@ -303,7 +303,7 @@
* **Operating system** : available on macOS, Windows, and Linux, including Linux inside WSL 2.
* **Sessions on this machine** : available on every provider, including Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, and Microsoft Foundry, and in sessions that run with [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) off. On those providers, and with flag fetching off, same-machine messaging requires Claude Code v2.1.248 or later. Claude Code delivers these messages over a per-session socket on your machine, never through Anthropic servers. To stop a session from receiving them, set `crossSessionInbound` to `refuse`.
- * **Sessions beyond this machine** : Claude finds your [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions and your sessions on other machines from a session that is connected to Remote Control, which needs a claude.ai sign-in as this session’s active authentication and the other [Remote Control requirements](</docs/en/remote-control#requirements>). Claude can’t find those sessions with an API key or on Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, and Microsoft Foundry.
+ * **Sessions beyond this machine** : Claude finds your [cloud sessions](</docs/en/claude-code-on-the-web>) and your sessions on other machines from a session that is connected to Remote Control, which needs a claude.ai sign-in as this session’s active authentication and the other [Remote Control requirements](</docs/en/remote-control#requirements>). Claude can’t find those sessions with an API key or on Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, and Microsoft Foundry.
To check a session, type `/list-agents`, also available as `/peers`. The result separates a session that doesn’t have the feature from a session where something narrower blocked a message, such as a missing `SendMessage` tool or a refused send:
--- a/custom-tools.md
+++ b/custom-tools.md
@@ -130,7 +130,7 @@
Call a custom tool
-Pass the MCP server you created to `query` via the `mcpServers` option. The key in `mcpServers` becomes the `{server_name}` segment in each tool’s fully qualified name: `mcp__{server_name}__{tool_name}`. List that name in `allowedTools` so the tool runs without a permission prompt. These snippets reuse the `weatherServer` from the example above to ask Claude what the weather is in a specific location.
+Pass the MCP server you created to `query` via the `mcpServers` option. The key in `mcpServers` becomes the `{server_name}` segment in each tool’s fully qualified name: `mcp__{server_name}__{tool_name}`. List that name in `allowedTools` so the tool runs without a permission prompt. These snippets reuse the `weatherServer` from the weather tool example to ask Claude what the weather is in a specific location.
Python
--- a/data-usage.md
+++ b/data-usage.md
@@ -60,7 +60,7 @@
* [Zero data retention](</docs/en/zero-data-retention>): available to qualified accounts for Claude Code on Claude for Enterprise. ZDR is not included in the standard Enterprise plan; it is enabled on a per-organization basis by your account team after confirming eligibility
* Local caching: Claude Code clients store session transcripts locally in plaintext under `~/.claude/projects/` for 30 days by default to enable session resumption. Adjust the period with `cleanupPeriodDays`. See [application data](</docs/en/claude-directory#application-data>) for what’s stored and how to clear it. Transcripts of sessions started or most recently continued in Claude Desktop or Cowork are [exempt from that limit by default](</docs/en/claude-directory#cleaned-up-automatically>).
-You can delete individual Claude Code on the web sessions at any time. Deleting a session permanently removes the session’s event data. For instructions on how to delete sessions, see [Delete sessions](</docs/en/claude-code-on-the-web#delete-sessions>). Learn more about data retention practices in our [Privacy Center](<https://privacy.anthropic.com/>). For full details, please review our [Commercial Terms of Service](<https://www.anthropic.com/legal/commercial-terms>) (for Team, Enterprise, and API users) or [Consumer Terms](<https://www.anthropic.com/legal/consumer-terms>) (for Free, Pro, and Max users) and [Privacy Policy](<https://www.anthropic.com/legal/privacy>).
+You can delete individual cloud sessions at any time. Deleting a session permanently removes the session’s event data. For instructions on how to delete sessions, see [Delete sessions](</docs/en/claude-code-on-the-web#delete-sessions>). Learn more about data retention practices in our [Privacy Center](<https://privacy.anthropic.com/>). For full details, please review our [Commercial Terms of Service](<https://www.anthropic.com/legal/commercial-terms>) (for Team, Enterprise, and API users) or [Consumer Terms](<https://www.anthropic.com/legal/consumer-terms>) (for Free, Pro, and Max users) and [Privacy Policy](<https://www.anthropic.com/legal/privacy>).
##
@@ -93,7 +93,7 @@
Cloud execution: Data flow and dependencies
-When using [Claude Code on the web](</docs/en/claude-code-on-the-web>), sessions run in Anthropic-managed virtual machines by default instead of locally. Sessions your organization routes to a [self-hosted environment](</docs/en/self-hosted-environments>) run on infrastructure you control; for what stays on your machines and what still goes to Anthropic, see [What stays on your infrastructure](</docs/en/self-hosted-environments#what-stays-on-your-infrastructure>). In Anthropic-hosted cloud sessions:
+[Cloud sessions](</docs/en/claude-code-on-the-web>) run in Anthropic-managed virtual machines by default instead of locally. Sessions your organization routes to a [self-hosted environment](</docs/en/self-hosted-environments>) run on infrastructure you control; for what stays on your machines and what still goes to Anthropic, see [What stays on your infrastructure](</docs/en/self-hosted-environments#what-stays-on-your-infrastructure>). In Anthropic-hosted cloud sessions:
* **Code and data storage:** Your repository is cloned to an isolated VM. Code and session data are subject to the retention and usage policies for your account type (see Data retention section above)
* **Credentials:** GitHub authentication is handled through a secure proxy; your GitHub credentials never enter the sandbox
--- a/deep-links.md
+++ b/deep-links.md
@@ -15,7 +15,7 @@
The `claude-cli://` prefix is a custom URL scheme that Claude Code registers with your operating system, similar to how `mailto:` links open your email client. When you click a deep link:
- 1. The browser or app hands the URL to your operating system.
+ 1. The browser or app passes the URL to your operating system.
2. The operating system recognizes the `claude-cli://` prefix and starts Claude Code on your machine.
3. A new terminal window opens with Claude Code running in the directory the link specified, and the link’s prompt text already in the input box.
4. You read the prompt, edit it if you want, and press Enter to send it.
--- a/desktop.md
+++ b/desktop.md
@@ -139,7 +139,7 @@
Restrict external browsing for your organization
-The Browser follows the same [site allowlist and blocklist controls](<https://support.claude.com/en/articles/13065128-claude-in-chrome-admin-controls>) as the Claude in Chrome extension. If your organization already configured those lists for the extension, the Browser respects them automatically. Administrators can also turn off Claude’s tools on external pages with the `browserExternalPageTools` managed setting. With tools disabled, users can still navigate to external sites; Claude’s tools can’t read or act on them. To turn off external browsing entirely, set the `disableBrowserExternalNavigation` managed setting to `true`. This blocks all external navigation in the Browser, including sites on your organization’s allowlist; localhost dev servers and file previews keep working. Use `browserExternalPageTools` to let users keep browsing external sites without Claude’s tools, and `disableBrowserExternalNavigation` to block external sites for both users and Claude.
+The Browser follows the same [site allowlist and blocklist controls](<https://support.claude.com/en/articles/13065128-claude-in-chrome-admin-controls>) as the Claude in Chrome extension. If your organization already configured those lists for the extension, the Browser respects them automatically. Administrators can also turn off Claude’s tools on external pages with the `browserExternalPageTools` managed setting. With tools disabled, users can still visit external sites; Claude’s tools can’t read or act on them. To turn off external browsing entirely, set the `disableBrowserExternalNavigation` managed setting to `true`. This blocks all external navigation in the Browser, including sites on your organization’s allowlist; localhost dev servers and file previews keep working. Use `browserExternalPageTools` to let users keep browsing external sites without Claude’s tools, and `disableBrowserExternalNavigation` to block external sites for both users and Claude.
###
@@ -405,9 +405,9 @@
-Run long-running tasks remotely
-
-For large refactors, test suites, migrations, or other long-running tasks, select **Cloud** instead of **Local** when starting a session. Cloud sessions run on Anthropic-managed infrastructure by default and continue even if you close the app or shut down your computer. Check back anytime to see progress or steer Claude in a different direction. You can also monitor cloud sessions from [claude.ai/code](<https://claude.ai/code>) or the [Claude mobile app](</docs/en/mobile>). Cloud sessions also support multiple repositories. After selecting a cloud environment, click the **+** button next to the selected repository to add more repositories to the session. Each repo gets its own branch selector. This is useful for tasks that span multiple codebases, such as updating a shared library and its consumers. See [Claude Code on the web](</docs/en/claude-code-on-the-web>) for more on how cloud sessions work.
+Run long-running tasks in the cloud
+
+For large refactors, test suites, migrations, or other long-running tasks, select **Cloud** instead of **Local** when starting a session. Cloud sessions run on Anthropic-managed infrastructure by default and continue even if you close the app or shut down your computer. Check back anytime to see progress or steer Claude in a different direction. You can also monitor cloud sessions from [claude.ai/code](<https://claude.ai/code>) or the [Claude mobile app](</docs/en/mobile>). Cloud sessions also support multiple repositories. After selecting a cloud environment, click the **+** button next to the selected repository to add more repositories to the session. Each repo gets its own branch selector. This is useful for tasks that span multiple codebases, such as updating a shared library and its consumers. See [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>) for more on how cloud sessions work.
###
@@ -417,7 +417,7 @@
The **Continue in** menu, accessible from the VS Code icon in the bottom right of the session toolbar, lets you move your session to another surface:
- * **Claude Code on the Web** : sends your local session to continue running remotely. Desktop pushes your branch, generates a summary of the conversation, and creates a new cloud session with the full context. You can then choose to archive the local session or keep it. This requires a clean working tree, and is not available for SSH sessions.
+ * **Claude Code on the Web** : sends your local session to continue running in the cloud. Desktop pushes your branch, generates a summary of the conversation, and creates a new cloud session with the full context. You can then choose to archive the local session or keep it. This requires a clean working tree, and is not available for SSH sessions.
* **Your IDE** : opens your project in a supported IDE at the current working directory.
###
@@ -521,7 +521,7 @@
`port`| number| The port your server listens on. Defaults to 3000
`cwd`| string| Working directory relative to your project root. Defaults to the project root. Use `${workspaceFolder}` to reference the project root explicitly
`env`| object| Additional environment variables as key-value pairs, such as `{ "NODE_ENV": "development" }`. Don’t put secrets here since this file is committed to your repo. To pass secrets to your dev server, set them in the local environment editor instead.
-`autoPort`| boolean| How to handle port conflicts. See below
+`autoPort`| boolean| How to handle port conflicts. See Port conflicts
`program`| string| A script to run with `node`. See when to use `program` vs `runtimeExecutable`
`args`| string[]| Arguments passed to `program`. Only used when `program` is set
`url`| string| The address the preview opens instead of `http://localhost:<port>`. See open the preview at a specific URL
@@ -547,7 +547,7 @@
]
}
-Localhost addresses open directly, exactly like the default port address. This includes `localhost`, any `*.localhost` subdomain, `127.0.0.1`, and `::1`. For security, a localhost `url` must be just your server’s origin — no path or query, and the port must match the entry’s port. To show a specific page, ask Claude to navigate there after the preview opens. A localhost `url` with a path, query, or mismatched port is reported as a configuration error that names the url and shows the fix. For any other address, Desktop asks for your permission the first time the preview opens it, the same as when you browse to a new site in the preview. External addresses may include paths. Choose **Always allow** to skip the prompt for that site in the future. Organization policies that restrict external sites in the preview still apply. To preview a server you already run yourself, set `url` without a command. Claude attaches the preview to your running server instead of starting one:
+Localhost addresses open directly, exactly like the default port address. This includes `localhost`, any `*.localhost` subdomain, `127.0.0.1`, and `::1`. For security, a localhost `url` must be your server’s origin alone, with no path or query. Its port must match the entry’s port. To show a specific page, ask Claude to navigate there after the preview opens. A localhost `url` with a path, query, or mismatched port is reported as a configuration error that names the url and shows the fix. For any other address, Desktop asks for your permission the first time the preview opens it, the same as when you browse to a new site in the preview. External addresses may include paths. Choose **Always allow** to skip the prompt for that site in the future. Organization policies that restrict external sites in the preview still apply. To preview a server you already run yourself, set `url` without a command. Claude attaches the preview to your running server instead of starting one:
{
"version": "0.0.1",
@@ -752,7 +752,7 @@
These settings are configured through the [admin settings console](<https://claude.ai/admin-settings/claude-code>):
* **Code in the desktop** : control whether users in your organization can access Claude Code in the desktop app
- * **Code in the web** : enable or disable [web sessions](</docs/en/claude-code-on-the-web>) for your organization
+ * **Code in the web** : enable or disable [cloud sessions](</docs/en/claude-code-on-the-web>) for your organization
* **Remote Control** : enable or disable [Remote Control](</docs/en/remote-control>) for your organization
* **Disable Bypass permissions mode** : prevent users in your organization from enabling bypass permissions mode
--- a/desktop-ios-simulator.md
+++ b/desktop-ios-simulator.md
@@ -17,7 +17,7 @@
On this page, “device” refers to a simulated iPhone or iPad, one of the same simulator devices you manage in Xcode under **Window → Devices and Simulators** , not physical hardware.
-The simulator pane is available in local sessions only. In [cloud](</docs/en/desktop#run-long-running-tasks-remotely>) and [SSH](</docs/en/desktop#ssh-sessions>) sessions, Claude runs on a machine that can’t reach the simulators on your Mac.
+The simulator pane is available in local sessions only. In [cloud](</docs/en/desktop#run-long-running-tasks-in-the-cloud>) and [SSH](</docs/en/desktop#ssh-sessions>) sessions, Claude runs on a machine that can’t reach the simulators on your Mac.
##
@@ -64,7 +64,7 @@
* Save a screenshot with **Cmd+S** or a screen recording with **Cmd+R** , using the pane’s capture buttons or the shortcuts; the files are saved to your Desktop
* Stop streaming a device without shutting it down by clicking **Detach simulator** , which returns the pane to its **Attach simulator** state
-The row under the device name tunes the video stream from the simulator. Lower **Frame rate** or **Resolution** if the pane strains your Mac, switch **Encoding** between H.264 and JPEG, or check **FPS** to display the frame rate the pane is receiving. These settings change how the pane displays the device, not how the app runs. You and Claude drive the same device, so your taps change the app state Claude sees. To have Claude check a specific screen, navigate to it by tapping, then ask. While Claude is driving the device, the pane shows a **Claude is using this device** badge above the screen; hold off tapping until the badge clears, so the result reflects the app rather than your input.
+The row under the device name tunes the video stream from the simulator. Lower **Frame rate** or **Resolution** if the pane strains your Mac, switch **Encoding** between H.264 and JPEG, or check **FPS** to display the frame rate the pane is receiving. These settings change how the pane displays the device, not how the app runs. You and Claude drive the same device, so your taps change the app state Claude sees. To have Claude check a specific screen, tap through to it, then ask. While Claude is driving the device, the pane shows a **Claude is using this device** badge above the screen; hold off tapping until the badge clears, so the result reflects the app rather than your input.
##
--- a/desktop-quickstart.md
+++ b/desktop-quickstart.md
@@ -62,7 +62,7 @@
You can also select:
- * **Cloud** : Run sessions in the cloud that continue even if you close the app. Cloud sessions use the same infrastructure as [Claude Code on the web](</docs/en/claude-code-on-the-web>).
+ * **Cloud** : Run sessions in the cloud that continue even if you close the app. See [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>) for how cloud sessions work.
* **SSH** : Connect to a remote machine over SSH, such as your own servers, cloud VMs, or dev containers. Desktop installs Claude Code on the remote machine automatically the first time you connect.
* **WSL** (Windows): Run the session inside a [WSL 2 distribution](</docs/en/desktop-wsl>); Claude Code, tools, and git execute on the Linux side with native paths.
@@ -112,7 +112,7 @@
* **Accept edits** : Claude auto-accepts file edits for faster iteration.
* **Plan** : Claude proposes an approach without editing any files, which is useful before a large refactor.
-**Add plugins for more capabilities.** Click the **+** button next to the prompt box and select **Plugins** to browse and install [plugins](</docs/en/desktop#install-plugins>) that add skills, agents, MCP servers, and more. **Arrange your workspace.** Drag the chat, diff, terminal, file, and browser panes into whatever layout you want. Open the terminal with **Ctrl+`** to run commands alongside your session, or click a file path to open it in the file pane. See [Arrange your workspace](</docs/en/desktop#arrange-your-workspace>). **Preview your app.** When you run your dev server in the desktop, your app opens in the Browser pane, which can also [open external sites](</docs/en/desktop#browse-external-sites>). Claude can view the running app, test endpoints, inspect logs, and iterate on what it sees. See [Preview your app](</docs/en/desktop#preview-your-app>). **Track your pull request.** After opening a PR, Claude Code monitors CI check results and can automatically fix failures or merge the PR once all checks pass. See [Monitor pull request status](</docs/en/desktop#monitor-pull-request-status>). **Put Claude on a schedule.** Set up [scheduled tasks](</docs/en/desktop-scheduled-tasks>) to run Claude automatically on a recurring basis: a daily code review every morning, a weekly dependency audit, or a briefing that pulls from your connected tools. **Scale up when you’re ready.** Open [parallel sessions](</docs/en/desktop#work-in-parallel-with-sessions>) from the sidebar to work on multiple tasks at once, optionally each in its own Git worktree, and open the [tasks pane](</docs/en/desktop#watch-background-tasks>) to watch the subagents and background commands a session has running. Open a [side chat](</docs/en/desktop#ask-a-side-question-without-derailing-the-session>) to ask a question without derailing the main thread. Send [long-running work to the cloud](</docs/en/desktop#run-long-running-tasks-remotely>) so it continues even if you close the app, or [continue a session on the web or in your IDE](</docs/en/desktop#continue-in-another-surface>) if a task takes longer than expected. [Connect external tools](</docs/en/desktop#extend-claude-code>) like GitHub, Slack, and Linear to bring your workflow together.
+**Add plugins for more capabilities.** Click the **+** button next to the prompt box and select **Plugins** to browse and install [plugins](</docs/en/desktop#install-plugins>) that add skills, agents, MCP servers, and more. **Arrange your workspace.** Drag the chat, diff, terminal, file, and browser panes into whatever layout you want. Open the terminal with **Ctrl+`** to run commands alongside your session, or click a file path to open it in the file pane. See [Arrange your workspace](</docs/en/desktop#arrange-your-workspace>). **Preview your app.** When you run your dev server in the desktop, your app opens in the Browser pane, which can also [open external sites](</docs/en/desktop#browse-external-sites>). Claude can view the running app, test endpoints, inspect logs, and iterate on what it sees. See [Preview your app](</docs/en/desktop#preview-your-app>). **Track your pull request.** After opening a PR, Claude Code monitors CI check results and can automatically fix failures or merge the PR once all checks pass. See [Monitor pull request status](</docs/en/desktop#monitor-pull-request-status>). **Put Claude on a schedule.** Set up [scheduled tasks](</docs/en/desktop-scheduled-tasks>) to run Claude automatically on a recurring basis: a daily code review every morning, a weekly dependency audit, or a briefing that pulls from your connected tools. **Scale up when you’re ready.** Open [parallel sessions](</docs/en/desktop#work-in-parallel-with-sessions>) from the sidebar to work on multiple tasks at once, optionally each in its own Git worktree, and open the [tasks pane](</docs/en/desktop#watch-background-tasks>) to watch the subagents and background commands a session has running. Open a [side chat](</docs/en/desktop#ask-a-side-question-without-derailing-the-session>) to ask a question without derailing the main thread. Send [long-running work to the cloud](</docs/en/desktop#run-long-running-tasks-in-the-cloud>) so it continues even if you close the app, or [continue a session on the web or in your IDE](</docs/en/desktop#continue-in-another-surface>) if a task takes longer than expected. [Connect external tools](</docs/en/desktop#extend-claude-code>) like GitHub, Slack, and Linear to bring your workflow together.
##
--- a/devcontainer.md
+++ b/devcontainer.md
@@ -95,7 +95,7 @@
"DISABLE_AUTOUPDATER": "1"
}
-`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` also disables the feature-flag evaluation that [Remote Control](</docs/en/remote-control#requirements>) and the other [features that need feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) depend on, so sessions in the container can’t use them. The Dev Container Feature always installs the latest Claude Code release. To pin a specific Claude Code version for reproducible builds, install it from your Dockerfile with `npm install -g @anthropic-ai/claude-code@X.Y.Z` instead of using the feature, and set `DISABLE_AUTOUPDATER` as shown above. For the full list of policy controls including permission rules, tool restrictions, and MCP server allowlists, see [Set up Claude Code for your organization](</docs/en/admin-setup>). To make [MCP servers](</docs/en/mcp>) available inside the container, define them at [project scope](</docs/en/mcp#mcp-installation-scopes>) in a `.mcp.json` file at the repository root so they are checked in alongside your dev container configuration. Install any binaries that local stdio servers depend on in your Dockerfile, and add remote server domains to your network allowlist.
+`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` also disables the feature-flag evaluation that [Remote Control](</docs/en/remote-control#requirements>) and the other [features that need feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) depend on, so sessions in the container can’t use them. The Dev Container Feature always installs the latest Claude Code release. To pin a specific Claude Code version for reproducible builds, install it from your Dockerfile with `npm install -g @anthropic-ai/claude-code@X.Y.Z` instead of using the feature, and set `DISABLE_AUTOUPDATER` to `1` in `containerEnv`. For the full list of policy controls including permission rules, tool restrictions, and MCP server allowlists, see [Set up Claude Code for your organization](</docs/en/admin-setup>). To make [MCP servers](</docs/en/mcp>) available inside the container, define them at [project scope](</docs/en/mcp#mcp-installation-scopes>) in a `.mcp.json` file at the repository root so they are checked in alongside your dev container configuration. Install any binaries that local stdio servers depend on in your Dockerfile, and add remote server domains to your network allowlist.
##
@@ -162,7 +162,7 @@
Once Claude Code is running in your dev container, the pages below cover the rest of an organization rollout: choosing an authentication path, delivering managed policy outside the repository, monitoring usage, and understanding what Claude Code stores and sends.
* [Set up Claude Code for your organization](</docs/en/admin-setup>): choose an authentication provider, decide how policy reaches devices, and plan the rollout
- * [Server-managed settings](</docs/en/server-managed-settings>): deliver managed policy from the Claude.ai admin console so engineers cannot bypass it by editing repository files
+ * [Server-managed settings](</docs/en/server-managed-settings>): deliver managed policy from the claude.ai admin console so engineers cannot bypass it by editing repository files
* [Monitor usage and audit activity](</docs/en/monitoring-usage>): export OpenTelemetry metrics and review what your team is running
* [Network access requirements](</docs/en/network-config#network-access-requirements>): the full domain allowlist for proxies and firewalls
* [Telemetry services and opt-out](</docs/en/data-usage#telemetry-services>): what Claude Code sends by default and the environment variables that disable it
--- a/discover-plugins.md
+++ b/discover-plugins.md
@@ -63,7 +63,7 @@
You can also [create your own LSP plugin](</docs/en/plugins-reference#lsp-servers>) for other languages.
-If you see `Executable not found in $PATH` in the `/plugin` Errors tab after installing a plugin, install the required binary from the table above.
+If you see `Executable not found in $PATH` in the `/plugin` Errors tab after installing a plugin, install the binary the code intelligence table lists for that plugin.
####
--- a/env-vars.md
+++ b/env-vars.md
@@ -194,6 +194,7 @@
`CLAUDE_CODE_AUTO_COMPACT_WINDOW`| Set the [auto-compact window](</docs/en/model-config#set-the-auto-compact-window>) in tokens, from `100000` to `1000000`. Accepts a plain integer such as `500000` only: a value like `500k` reads as `500` and clamps to the 100K minimum. The effective window is also capped at the model’s context window. Takes precedence over the `/autocompact` command, the `--autocompact` flag, and the `autoCompactWindow` setting. The status line’s `used_percentage` always measures against the model’s full context window, so once this variable is set, that percentage no longer indicates when compaction will run
`CLAUDE_CODE_AUTO_CONNECT_IDE`| Override automatic [IDE connection](</docs/en/vs-code>). By default, Claude Code connects automatically when launched inside a supported IDE’s integrated terminal. Set to `false` to prevent this. Set to `true` to force a connection attempt when auto-detection fails, such as when tmux obscures the parent terminal. Takes precedence over the [`autoConnectIde`](</docs/en/settings-reference#autoconnectide>) global config setting
`CLAUDE_CODE_AWS_CHAIN_RESOLVE_TIMEOUT_MS`| Time in milliseconds Claude Code waits for the AWS default credential provider chain to produce credentials before the request fails with [`AWS default-chain credential resolve timed out`](</docs/en/errors#aws-default-chain-credential-resolve-timed-out>) (default: `60000`). Raise it when a step in your chain legitimately needs longer, such as a browser-based SSO sign-in with MFA through a wrapper like `aws-vault`. Applies wherever Claude Code signs with the default chain: [Amazon Bedrock](</docs/en/amazon-bedrock#credential-caching-and-resolution-timeout>), [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), and the [Mantle endpoint](</docs/en/amazon-bedrock#use-the-mantle-endpoint>). Requires Claude Code v2.1.207 or later
+`CLAUDE_CODE_BASH_EDIT_DIFF`| Set to `0` to turn off the [diff of the files a Bash command changed](</docs/en/hooks#bash>), or `1` to record it in every permission mode. Takes precedence over the [`bashEditDiffEnabled`](</docs/en/settings-reference#basheditdiffenabled>) setting. Requires Claude Code v2.1.269 or later
`CLAUDE_CODE_BRIDGE_SESSION_ID`| Set automatically in Bash tool and [hook command](</docs/en/hooks>) subprocesses while the session has an active [Remote Control](</docs/en/remote-control>) connection, and removed when the connection ends. The value is the session’s ID in `session_` form, the same identifier that appears in the session’s `claude.ai/code` URL, so a script can link back to the session that ran it. Requires Claude Code v2.1.199 or later. In [cloud sessions](</docs/en/claude-code-on-the-web>), read `CLAUDE_CODE_REMOTE_SESSION_ID` instead
`CLAUDE_CODE_BS_AS_CTRL_BACKSPACE`| Set to `0` to make Claude Code read the `0x08` byte, also written `^H`, as plain Backspace, or `1` to read it as Ctrl+Backspace. Either value replaces the platform default. By default, Claude Code reads it as Ctrl+Backspace on Windows, except when `TERM_PROGRAM` is `mintty` or `TERM` is `cygwin`, and as plain Backspace on macOS and Linux. Set `0` in a Windows terminal where [Backspace deletes a whole word](</docs/en/terminal-config#fix-backspace-deleting-a-whole-word-on-windows>)
`CLAUDE_CODE_CERT_STORE`| Comma-separated list of CA certificate sources for TLS connections. `bundled` is the Mozilla CA set shipped with Claude Code. `system` is the operating system trust store, read only on runtimes with `tls.getCACertificates`: the native binary, or Node 22.15 or later for npm installs. See [CA certificate store](</docs/en/network-config#ca-certificate-store>). Default is `bundled,system`
@@ -327,7 +328,7 @@
`CLAUDE_CODE_SCRIPT_CAPS`| JSON object limiting how many times specific scripts may be invoked per session when `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB` is set. Keys are substrings matched against the command text; values are integer call limits. For example, `{"deploy.sh": 2}` allows `deploy.sh` to be called at most twice. Matching is substring-based so shell-expansion tricks like `./scripts/deploy.sh $(evil)` still count against the cap. Runtime fan-out via `xargs` or `find -exec` is not detected; this is a defense-in-depth control
`CLAUDE_CODE_SCROLL_SPEED`| Set the mouse wheel scroll multiplier in [fullscreen rendering](</docs/en/fullscreen#mouse-wheel-scrolling>). Accepts any positive value up to 20, including fractional values below 1 such as `0.5` to slow accelerated trackpad and wheel scrolling in terminals that already amplify wheel events. Set to `3` to match `vim` if your terminal sends one wheel event per notch without amplification. Ignored in the JetBrains IDE terminal, where Claude Code uses its own scroll handling
`CLAUDE_CODE_SEND_FEEDBACK`| Set to `0` to turn off [Claude-drafted feedback](</docs/en/tools-reference#sendfeedback-tool-behavior>) for a session. Set to `1` to turn it on where your account already has access; the variable can’t grant access itself, and the other switches that turn feedback off, such as `DISABLE_FEEDBACK_COMMAND` and the [`feedbackDrafts`](</docs/en/settings-reference#feedbackdrafts>) setting’s `off` value, still apply
-`CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS`| Override the time budget in milliseconds for [SessionEnd](</docs/en/hooks#sessionend>) hooks. Applies to session exit, `/clear`, and switching sessions via interactive `/resume`. By default the budget is 1.5 seconds, automatically raised to the highest per-hook `timeout` configured in settings files, up to 60 seconds. Timeouts on plugin-provided hooks do not raise the budget
+`CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS`| Override the time budget in milliseconds for [SessionEnd](</docs/en/hooks#sessionend>) hooks. The value is also the timeout for each hook that sets no `timeout` of its own. Applies to session exit, `/clear`, and switching sessions via interactive `/resume`. By default the budget is 1.5 seconds, automatically raised to the highest per-hook `timeout` configured in settings files, up to 60 seconds. Timeouts on plugin-provided hooks do not raise the budget
`CLAUDE_CODE_SESSION_ID`| Set automatically to the current session ID in Bash and PowerShell tool subprocesses, [hook command](</docs/en/hooks>) subprocesses, and stdio [MCP server](</docs/en/mcp>) subprocesses. For Bash, PowerShell, and hooks this matches the `session_id` field in the hook JSON input and is updated on `/clear`. An MCP server subprocess retains the ID it was spawned with. On `--resume <session-id>` it receives the resumed ID, matching hooks and Bash. On `--continue` or `--resume` without an explicit ID it may receive the initial startup ID instead. Use to correlate scripts and external tools with the Claude Code session that launched them
`CLAUDE_CODE_SHELL`| Set the shell Claude Code uses to run Bash tool commands. Accepts a path to a `bash` or `zsh` binary, for example `/opt/homebrew/bin/bash`. Other shells such as `fish` are not supported. If the value is not a working `bash` or `zsh` path, Claude Code ignores it and falls back to auto-detection. Auto-detection uses your `$SHELL` when it points to `bash` or `zsh`, otherwise it picks the first working `zsh` then `bash` found on your `PATH` and standard install locations
`CLAUDE_CODE_SHELL_PREFIX`| Command prefix that wraps shell commands Claude Code spawns: Bash tool calls, [hook](</docs/en/hooks>) commands, [status line](</docs/en/statusline>) commands, and stdio [MCP server](</docs/en/mcp>) startup commands. PowerShell hooks and exec-form hooks run without the prefix. Useful for logging or auditing. Setting a bare executable path such as `/path/to/logger.sh` runs each command as `/path/to/logger.sh '<command>'`. The wrapper receives the command line as a single shell-quoted argument in `$1`, so the wrapper must re-evaluate `$1` with a shell, for example `exec bash -c "$1"`. Treating `$1` as a bare executable path breaks stdio MCP servers that pass arguments such as `npx -y <package>`. For Bash tool calls, `$1` contains the full shell invocation Claude Code assembles, including environment setup, not only the command Claude ran
@@ -346,10 +347,10 @@
`CLAUDE_CODE_SUBAGENT_MODEL`| The default model for [subagents](</docs/en/sub-agents#choose-a-model>), [agent team](</docs/en/agent-teams#specify-teammates-and-models>) teammates, and [workflow](</docs/en/workflows>) agents that aren’t assigned a model another way. Accepts an alias such as `haiku` or a full model name. Two sources take precedence over it: a model Claude passes when it spawns the agent, and a `model` field in the agent’s definition, including `inherit`. To change that, set [`CLAUDE_CODE_SUBAGENT_MODEL_FORCE`](</docs/en/sub-agents#run-every-subagent-on-one-model>). See [Choose a model](</docs/en/sub-agents#choose-a-model>) for the full order. Setting it to `inherit` is the same as leaving it unset. Before v2.1.251, this variable overrode both the per-invocation model and the definition’s `model` field
`CLAUDE_CODE_SUBAGENT_MODEL_FORCE`| Set to `1` to force one model onto subagents, teammates, and workflow agents. [Run every subagent on one model](</docs/en/sub-agents#run-every-subagent-on-one-model>) says which model that is. Requires Claude Code v2.1.257 or later
`CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL`| Set `5m` or `1h`, the only values Claude Code accepts, to choose the [prompt cache TTL](</docs/en/prompt-caching#cache-lifetime>) for requests outside the main conversation, such as [subagents](</docs/en/sub-agents>), workflows, and background work. Takes precedence over the `subagentPromptCacheTtl` setting and over `ENABLE_PROMPT_CACHING_1H`, and `FORCE_PROMPT_CACHING_5M` overrides it. The API bills 1-hour cache writes at a higher rate. Requires Claude Code v2.1.242 or later
-`CLAUDE_CODE_SUBPROCESS_ENV_SCRUB`| Set to `1` to strip credentials from subprocess environments (Bash tool, hooks, MCP stdio servers): Anthropic and cloud provider credentials, any other variable that Claude Code recognizes as a credential, and credentials embedded in package registry URLs. The parent Claude process keeps these credentials for API calls, but child processes cannot read them, reducing exposure to prompt injection attacks that attempt to exfiltrate secrets via shell expansion. On Linux, this also runs Bash subprocesses in an isolated PID namespace so they cannot read host process environments via `/proc`; as a side effect, `ps`, `pgrep`, and `kill` cannot see or signal host processes. `claude-code-action` sets this automatically when `allowed_non_write_users` is configured
+`CLAUDE_CODE_SUBPROCESS_ENV_SCRUB`| Set to `1` to strip credentials from subprocess environments (Bash tool, hooks, MCP stdio servers): Anthropic and cloud provider credentials, any other variable that Claude Code recognizes as a credential, and credentials embedded in package registry URLs. The parent Claude process keeps these credentials for API calls, but child processes cannot read them, reducing exposure to prompt injection attacks that attempt to exfiltrate secrets via shell expansion. On v2.1.251 or later, the scrub also removes Claude Code’s own configuration-store pointer variables (such as `CLAUDE_CONFIG_DIR`), so a child process cannot locate a relocated configuration directory. Leave the scrub unset if a subprocess needs these variables. On Linux, this also runs Bash subprocesses in an isolated PID namespace so they cannot read host process environments via `/proc`; as a side effect, `ps`, `pgrep`, and `kill` cannot see or signal host processes. `claude-code-action` sets this automatically when `allowed_non_write_users` is configured
`CLAUDE_CODE_SYNC_PLUGIN_INSTALL`| Set to `1` in non-interactive mode (the `-p` flag) to wait for plugin installation to complete before the first query. Without this, plugins install in the background and may not be available on the first turn. Combine with `CLAUDE_CODE_SYNC_PLUGIN_INSTALL_TIMEOUT_MS` to bound the wait
`CLAUDE_CODE_SYNC_PLUGIN_INSTALL_TIMEOUT_MS`| Timeout in milliseconds for synchronous plugin installation. When exceeded, Claude Code proceeds without plugins and logs an error. No default: without this variable, synchronous installation waits until complete
-`CLAUDE_CODE_SYNC_SKILLS`| Set to `1` to download your enabled claude.ai skills into `~/.claude/skills/synced/` and resync every 10 minutes. Before it runs the first query, Claude Code waits up to `CLAUDE_CODE_SYNC_SKILLS_WAIT_TIMEOUT_MS` for the list of your skills. The downloads themselves finish in the background, and Claude waits for a skill’s download when it invokes that skill. The `synced` folder name is [reserved for this download](</docs/en/skills#where-skills-live>). Before v2.1.227, the skills downloaded into `~/.claude/skills/` directly. Applies only in non-interactive mode with the `-p` flag. Requires claude.ai authentication. [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions receive your enabled claude.ai skills automatically; you don’t need to set this there. Claude Code applies [extra rules to the downloaded skills](</docs/en/skills#how-synced-skills-behave>), such as not running their `!` commands on your machine
+`CLAUDE_CODE_SYNC_SKILLS`| Set to `1` to download your enabled claude.ai skills into `~/.claude/skills/synced/` and resync every 10 minutes. Before it runs the first query, Claude Code waits up to `CLAUDE_CODE_SYNC_SKILLS_WAIT_TIMEOUT_MS` for the list of your skills. The downloads themselves finish in the background, and Claude waits for a skill’s download when it invokes that skill. The `synced` folder name is [reserved for this download](</docs/en/skills#where-skills-live>). Before v2.1.227, the skills downloaded into `~/.claude/skills/` directly. Applies only in non-interactive mode with the `-p` flag. Requires claude.ai authentication. [Cloud sessions](</docs/en/claude-code-on-the-web>) receive your enabled claude.ai skills automatically; you don’t need to set this there. Claude Code applies [extra rules to the downloaded skills](</docs/en/skills#how-synced-skills-behave>), such as not running their `!` commands on your machine
`CLAUDE_CODE_SYNC_SKILLS_INSTALL_TIMEOUT_MS`| Timeout in milliseconds for a mid-session skills resync when `CLAUDE_CODE_SYNC_SKILLS` is set (default: 30000). Bounds the download triggered when the host requests a skill reload during the session. When exceeded, the resync stops and remaining downloads continue in the background
`CLAUDE_CODE_SYNC_SKILLS_WAIT_TIMEOUT_MS`| Timeout in milliseconds for the first query to wait for the initial skill list when `CLAUDE_CODE_SYNC_SKILLS` is set (default: 5000). When exceeded, the first query runs with whichever skills have arrived. The downloads finish in the background either way, and Claude waits for a skill’s download when it invokes that skill
`CLAUDE_CODE_SYNTAX_HIGHLIGHT`| Set to `false` to disable syntax highlighting in diff output. Useful when colors interfere with your terminal setup. To also disable highlighting in code blocks and file previews, use the [`syntaxHighlightingDisabled`](</docs/en/settings-reference#syntaxhighlightingdisabled>) setting
Show diff (296 lines)
--- a/errors.md
+++ b/errors.md
@@ -1,4 +1,4 @@
-This page lists runtime errors Claude Code displays and how to recover from each one, plus what to check when responses seem off without an error. For installation errors such as `command not found` or TLS failures during setup, see [Troubleshoot installation and login](</docs/en/troubleshoot-install>). Except for Wrapper and IDE errors, which the launching program prints rather than Claude Code itself, these errors and recovery commands apply across the CLI, the [Desktop app](</docs/en/desktop>), and [Claude Code on the web](</docs/en/claude-code-on-the-web>), since all three wrap the same Claude Code CLI. For other surface-specific issues, see the troubleshooting section on that surface’s page.
+This page lists runtime errors Claude Code displays and how to recover from each one, plus what to check when responses seem off without an error. For installation errors such as `command not found` or TLS failures during setup, see [Troubleshoot installation and login](</docs/en/troubleshoot-install>). Except for Wrapper and IDE errors, which the launching program prints rather than Claude Code itself, these errors and recovery commands apply across the CLI, the [Desktop app](</docs/en/desktop>), and [cloud sessions](</docs/en/claude-code-on-the-web>), since all three wrap the same Claude Code CLI. For other surface-specific issues, see the troubleshooting section on that surface’s page.
Claude Code calls the Claude API for model responses, so most runtime errors map to an underlying API error code. This page covers what each error means inside Claude Code and how to recover. For the raw HTTP status code definitions, see the [Claude Platform error reference](<https://platform.claude.com/docs/en/api/errors>).
@@ -141,6 +141,8 @@
`Download timed out: exceeded the total deadline`| Installation errors
`--bg and --print conflict`| Command-line errors
`Cloud sessions cannot be created from a --restricted session`| Command-line errors
+`Cloud sessions are disabled by your organization's policy`| Command-line errors
+`Couldn't verify your organization's policy for cloud sessions`| Command-line errors
`Error: --json-schema is not a valid JSON Schema`| Command-line errors
`Error: Invalid --agents configuration:`| Command-line errors
`Error: Settings file exceeds the 2MiB limit`| Command-line errors
@@ -157,6 +159,7 @@
`Server rejected the Authorization header minted by the configured headersHelper`| Command-line errors
`Error: MCP tool <name> (passed via --permission-prompt-tool) not found`| Command-line errors
`OAuth callback port <port> is already in use — another process may be holding it`| Command-line errors
+`No available ports for OAuth redirect`| Command-line errors
`Shell command failed for pattern "..."`, from `/security-review` or any skill that injects dynamic context| Command-line errors
`Shell command permission check failed for pattern "..."`, from a skill that injects dynamic context| Command-line errors
`Skill <name> requires bash (`shell: bash` in frontmatter) but Git Bash was not found`| Command-line errors
@@ -171,6 +174,7 @@
`Ultrareview clones <owner>/<repo> in the cloud with the GitHub account connected to your Claude account, and none is connected`| Command-line errors
`Your connected GitHub account can't see <owner>/<repo>`| Command-line errors
`The GitHub App preflight failed transiently (network or service hiccup) — retry in a moment to start from GitHub instead`| Command-line errors
+`GitHub isn't connected to your Claude account, so this repository can't be cloned in the cloud`| Command-line errors
`Failed to resume the conversation`| Command-line errors
`No conversation found with session ID: <session-id>`| Command-line errors
`Cannot switch renderers in this session`| Command-line errors
@@ -197,6 +201,7 @@
`pkill: refusing to run`| Tool errors
`Failed to write to <name>'s inbox — nothing was sent`| Tool errors
`Failed to write the plan approval request to the lead's inbox — plan not submitted`| Tool errors
+`Its agent definition was not restored: the folder its definition file came from is not trusted`| Tool errors
`Message too large for cross-session delivery`| Tool errors
`Too many messages to this session just now`| Tool errors
`Refusing to send: reply target is a symlink` / `Refusing to send: cannot vet reply target`| Tool errors
@@ -211,6 +216,9 @@
`Command killed: its output file was replaced or could no longer be verified`| Tool errors
`the source file is not valid UTF-8 text` / `the source file is not valid UTF-16 text`| Tool errors
`the source file has the replacement character U+FFFD`| Tool errors
+`Reading a local file from outside this session's connected folders, or through a link, needs the approval card`| Tool errors
+`cannot read file_path (...) — the file could not be examined, and no one can answer the approval card`| Tool errors
+`WebFetch cannot fetch localhost or other hostnames without a dot`| Tool errors
`Can't open MCP settings while no terminal is attached to this background session`| Background session errors
`Can't open MCP settings in a background session`| Background session errors
`blocked because the path is spelled in a form that cannot be safely resolved`| Background session errors
@@ -219,6 +227,7 @@
`Can't open — this session is running in another terminal`| Background session errors
`This conversation is already open in another running Claude session`| Background session errors
`This session's saved conversation is no longer on disk`| Background session errors
+`kept <id> — its worktree is still at <path>`| Background session errors
`kept <id> — <n> unpushed commits on <branch>`| Background session errors
`kept <id> — worktree has commits that are not pushed anywhere`| Background session errors
`terminal host process died — press Enter to restart` / `This session's terminal host process died`| Background session errors
@@ -544,14 +553,16 @@
The selected model uses the 1M-token extended context window, and your plan only includes it through usage credits.
- API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard context
+ API Error: Usage credits required for 1M context · run /usage-credits to turn them on (they take effect after you restart Claude Code), or /model to switch to standard context
This is an entitlement check, not a quota exhaustion. It fires even when your session and weekly allowances have capacity remaining. See [Extended context](</docs/en/model-config#extended-context>) for which plans include 1M context directly and which require usage credits. Claude Code runs this check when you pick the model with `/model`, and only on a direct connection to the Anthropic API; if you point `ANTHROPIC_BASE_URL` at an [LLM gateway](</docs/en/llm-gateway>), `/model` allows the `[1m]` selection and the gateway decides whether the request succeeds. When this error appears mid-conversation because the context grew past 200K tokens, Claude Code automatically compacts the conversation back under the standard context limit and keeps the session at that limit afterward, so no action is needed. On versions before v2.1.172, the error repeated on every subsequent request including `/compact`; run `/clear` on those versions to recover. The steps below apply when you explicitly selected a `[1m]` model. **What to do:**
* Run `/model` and select the variant without the `[1m]` suffix to fall back to the standard context window
- * Where the message names `/usage-credits`, run it to turn on metered billing for the 1M variant on Pro and Max, or to request usage credits from your admin on Team and Enterprise
+ * Where the message names `/usage-credits`, run it to turn on metered billing for the 1M variant on Pro and Max, or to request usage credits from your admin on Team and Enterprise. Restart Claude Code once usage credits are on. Until you restart, the session stays at the standard context limit.
* If the error persists after `/model`, a 1M model ID may be set elsewhere. See [Setting your model](</docs/en/model-config#setting-your-model>) for the configuration locations to check in priority order.
* To remove 1M variants from the model picker entirely, set [`CLAUDE_CODE_DISABLE_1M_CONTEXT=1`](</docs/en/env-vars>)
+
+Before v2.1.268, the message ended with `run /usage-credits to turn them on, or /model to switch to standard context` and didn’t mention restarting.
###
@@ -1738,7 +1749,7 @@
**What to do:**
* Run `/model` and select a model your plan includes
- * If you upgraded your plan recently and still see this, run `/logout` then `/login`. The stored token reflects your plan at the time you signed in, so upgrading on the web does not take effect in an existing session until you re-authenticate.
+ * If you upgraded your plan recently and still see this, run `/logout` then `/login`. The stored token reflects your plan at the time you signed in, so upgrading on claude.ai does not take effect in an existing session until you re-authenticate.
* See [claude.com/pricing](<https://claude.com/pricing>) for which models each plan includes
###
@@ -1767,7 +1778,7 @@
Model is restricted by your organization’s settings
-Your organization admin has disabled this model in the claude.ai admin console, or it is excluded by an [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist in managed settings. When the restricted model was set with `--model`, `ANTHROPIC_MODEL`, or the `model` setting, Claude Code substitutes an allowed model and continues. Typing `/model <name>` for a restricted model is rejected with `Run /model to choose a different model.` and the session keeps its current model.
+Your organization admin has disabled this model in the claude.ai admin console, or it is excluded by an [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist in managed settings. When the restricted model was set with `--model`, `ANTHROPIC_MODEL`, or the `model` setting, Claude Code substitutes an allowed model and continues. Typing `/model <name>` for a restricted model is rejected with `Run /model to choose a different model.` and the session keeps its current model. The substitution notice can also appear mid-session after an admin disables the model a session is running on in the claude.ai admin console.
Model "claude-opus-4-8" is restricted by your organization's settings. Using claude-sonnet-4-6 instead.
@@ -2019,7 +2030,7 @@
Cloud sessions cannot be created from a —restricted session
-When you start a session with [`--restricted`](</docs/en/cli-reference#cli-flags>), Claude Code refuses to create [cloud sessions](</docs/en/claude-code-on-the-web#from-terminal-to-web>) from it, because the new session would run outside the restricted process and wouldn’t enforce restricted mode. Claude Code refuses on the client, before contacting the server, so no cloud session is created:
+When you start a session with [`--restricted`](</docs/en/cli-reference#cli-flags>), Claude Code refuses to create [cloud sessions](</docs/en/claude-code-on-the-web#from-terminal-to-cloud>) from it, because the new session would run outside the restricted process and wouldn’t enforce restricted mode. Claude Code refuses on the client, before contacting the server, so no cloud session is created:
Cloud sessions cannot be created from a --restricted session: they would not enforce it.
@@ -2029,6 +2040,21 @@
* If you control how the session was launched, start a new `claude` session without `--restricted` and create the cloud session from there
Before v2.1.248, Claude Code had no `--restricted` flag; earlier versions reject the flag itself with an unknown-option error.
+
+###
+
+
+
+Cloud sessions are disabled by your organization’s policy
+
+Your organization’s `allow_remote_sessions` policy is off, so [cloud sessions](</docs/en/claude-code-on-the-web>) and the commands that use them aren’t available:
+
+ Cloud sessions are disabled by your organization's policy. Contact your organization admin to enable them.
+
+The message appears when you [create a cloud session from the terminal](</docs/en/claude-code-on-the-web#from-terminal-to-cloud>) and when you submit a command that needs cloud sessions, such as `/teleport`, `/remote-env`, or `/web-setup`. Before v2.1.268, submitting one of those commands returned `Unknown command` instead. This is a server-side organization policy, so it can’t be overridden from local settings, environment variables, or CLI flags. If Claude Code hasn’t loaded your organization’s policy yet or can’t fetch it, those commands answer `Couldn't verify your organization's policy for cloud sessions. Check your network connection, then restart Claude Code and try again.` instead. **What to do:**
+
+ * Ask an [Owner](</docs/en/server-managed-settings#access-control>) in your organization to enable cloud sessions in the Claude Code admin settings at [claude.ai/admin-settings/claude-code](<https://claude.ai/admin-settings/claude-code>)
+ * If the message says it couldn’t verify the policy, check your network connection, then restart Claude Code and try again
###
@@ -2272,6 +2298,21 @@
* Run the command from the message to find the process holding the port, and stop it or wait for it to finish
* If another program needs that port permanently, register a different redirect URI with the server and set its port with `MCP_OAUTH_CALLBACK_PORT` or `--callback-port`, whichever you use
+ * Then start the sign-in again, for example by selecting the server in `/mcp`
+
+###
+
+
+
+No available ports for OAuth redirect
+
+When you sign in to a remote MCP server with [OAuth](</docs/en/mcp#authenticate-with-remote-mcp-servers>), Claude Code starts a local listener to receive the sign-in callback. The sign-in fails with this message when Claude Code can’t bind a local port for it. Something on the machine is preventing it from listening on `127.0.0.1`, for example security software or a sandbox policy that denies local listeners.
+
+ No available ports for OAuth redirect
+
+Before v2.1.268, Claude Code didn’t fall back to an operating-system-assigned port, so the message also appeared when only its self-picked ports couldn’t be bound. That can happen on Windows hosts where Hyper-V reserves port ranges that cover the ports Claude Code picks from. **What to do:**
+
+ * Check whether security software or a sandbox policy blocks processes from listening on `127.0.0.1`, and allow Claude Code to bind a local port
* Then start the sign-in again, for example by selecting the server in `/mcp`
###
@@ -2287,9 +2328,15 @@
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
-The quoted command varies between runs: the review starts several `git` commands against `origin/HEAD` at once and reports whichever fails first, so you may see `git log` or a different `git diff` in its place. Git creates the ref only when the remote’s default branch is both advertised by the remote and covered by your fetch refspec. A full `git clone` of a remote with commits meets both conditions. Single-branch and CI checkouts fetch too narrow a refspec, a server-side HEAD left pointing at a branch nobody pushed advertises no default, and a repository with no `origin` remote, or one you never fetched, provides neither. Claude Code shows the same error for any skill that [injects dynamic context](</docs/en/skills#when-an-injected-command-fails>). A failed injected command aborts that skill’s invocation. Two sibling strings fire before the command runs at all:
-
- * `Shell command permission check failed for pattern "..."`: the command’s permission check returned something other than allow. Injected commands never prompt, so the invocation aborts without asking you. Pre-approve commands that no rule matches with [`allowed-tools`](</docs/en/skills#pre-approve-tools-for-a-skill>). A matching ask or deny rule still aborts the invocation regardless of `allowed-tools`
+The message may quote `git log` or a different `git diff` instead. Git creates `origin/HEAD` only when the remote advertises a default branch and your fetch refspec covers it, which a full `git clone` of a remote with commits does. The ref is missing in these setups:
+
+ * A single-branch or CI checkout, which fetches too narrow a refspec
+ * A remote whose server-side HEAD points at a branch nobody pushed
+ * A repository with no `origin` remote, or one you never fetched
+
+Claude Code shows the same error for any skill that [injects dynamic context](</docs/en/skills#when-an-injected-command-fails>), and a failed injected command aborts that skill’s invocation. Two sibling strings fire before the command runs at all:
+
+ * `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>)
**What to do:**
@@ -2356,7 +2403,7 @@
Claude Code suggests the closest command name or alias that the menu lists in this session. When nothing is close, the message ends after the name. The cause is usually one of the following:
* A typo, such as `/hepl` for `/help`. [How the command menu matches what you type](</docs/en/commands#how-the-command-menu-matches-what-you-type>) covers picking a close match before you submit
- * A command that exists but isn’t available in this session because a requirement isn’t met, such as your platform, plan, or authentication method. The troubleshooting entries for [`/web-setup`](</docs/en/web-quickstart#web-setup-shows-no-commands-match-or-unknown-command>) and [`/schedule`](</docs/en/routines#schedule-returns-unknown-command>) walk through two common cases. Some commands answer with their own message when your organization’s policy disables them
+ * A command that exists but isn’t available in this session because a requirement isn’t met, such as your platform, plan, or authentication method. The troubleshooting entries for [`/web-setup`](</docs/en/web-quickstart#web-setup-shows-no-commands-match-or-unknown-command>) and [`/schedule`](</docs/en/routines#schedule-returns-unknown-command>) walk through two common cases. Some commands answer with their own message when your organization’s policy disables them, such as `Cloud sessions are disabled by your organization's policy`
* A command from a [plugin](</docs/en/plugins>) or [MCP server](</docs/en/mcp#use-mcp-prompts-as-commands>) that isn’t installed or connected in this session
Claude Code doesn’t treat every prompt that starts with `/` as a command. It sends the prompt to Claude as a normal message when the first word after the `/` starts with punctuation, such as the `/--` that opens a Lean doc comment, or is a path such as `/var/log/syslog`. Before v2.1.236, if you pressed `Enter` while the command menu listed a near match for the name you typed, Claude Code ran that match, so a typo such as `/hepl` ran `/help` instead of producing this message. **What to do:**
@@ -2464,6 +2511,23 @@
* If retries keep failing, the start of the message names what stopped the upload. When that cause is something you can fix, fix it so the session can start from your local repository instead
Before v2.1.251, Claude Code ended the message with `Please set up GitHub on https://claude.ai/code` even when the GitHub check failed only transiently, and setup advice can’t clear a transient failure.
+
+###
+
+
+
+GitHub isn’t connected to your Claude account
+
+You started a [cloud session](</docs/en/claude-code-on-the-web>) from your local repository, for example with `/autofix-pr`. No GitHub account is connected to your Claude account, or the connection expired, so Claude Code refuses the launch:
+
+ GitHub isn't connected to your Claude account, so this repository can't be cloned in the cloud. Run /web-setup to connect with your GitHub CLI login, or connect on the web at https://claude.ai/connect-github
+
+When you create a routine with [`/schedule`](</docs/en/routines>), the same message appears as a setup note that names the repository; the note doesn’t block creating the routine. **What to do:**
+
+ * Run `/web-setup` to connect your GitHub CLI login to your Claude account, or connect an account at [claude.ai/connect-github](<https://claude.ai/connect-github>). See [GitHub authentication options](</docs/en/claude-code-on-the-web#github-authentication-options>) for how the two differ.
+ * Rerun the command a minute after connecting
+
+Before v2.1.268, Claude Code reported this as a temporary failure of the Claude GitHub App check and suggested retrying or installing the app; neither connects a GitHub account.
###
@@ -2687,7 +2751,7 @@
Claude Code asked the operating system whether a plugin path exists and got an error other than “not found”, so it doesn’t load what the path names. How much of the plugin loads depends on which path failed:
- * One of a plugin’s [default component folders](</docs/en/plugins-reference#file-locations-reference>), such as `skills/` or `commands/`: the plugin’s other components still load
+ * One of a plugin’s [default component locations](</docs/en/plugins-reference#file-locations-reference>), such as the `skills/` folder, the `monitors/monitors.json` file, or a [`SKILL.md` at the plugin root](</docs/en/plugins-reference#skills>): the plugin’s other components still load
* The plugin’s own directory: nothing from that plugin loads
You don’t see this error for a path that doesn’t exist at all. In `/plugin`, the error appears under the plugin and names the path and the code the operating system returned:
@@ -2871,6 +2935,21 @@
* Ask the sender to resend the message; contention for the inbox lock is transient and clears on retry
* Check free disk space, and check that `~/.claude/teams` and the files under it are writable by your user
+
+###
+
+
+
+Teammate’s agent definition was not restored
+
+Claude messaged a stopped [agent team](</docs/en/agent-teams>) teammate, and Claude Code brought it back without re-applying the [subagent definition](</docs/en/agent-teams#use-subagent-definitions-for-teammates>) it was spawned from, because its definition file came from a folder with no saved trust. The notice follows the resume report in the sending agent’s tool result:
+
+ Its agent definition was not restored: the folder its definition file came from is not trusted (source: projectSettings), so the teammate is running with the team-essential tools and no custom instructions. To restore it, the user needs to run Claude Code in that folder once and accept the trust dialog (the --debug log names the folder); do not change trust settings on the user's behalf.
+
+The check applies to a definition in the `.claude/agents/` directory of the project or of an `--add-dir` directory, and accepting the trust dialog for a parent folder doesn’t satisfy it. **What to do:**
+
+ * Run `claude` in the folder the [debug log](</docs/en/debug-your-config>) names and accept the trust dialog. The definition is re-applied the next time Claude Code brings the teammate back; you don’t need to restart the lead session
+ * Or set the `hasTrustDialogAccepted` entry to `true` in `~/.claude.json`, using the exact `projects["<path>"]` key the debug log prints
###
@@ -3006,6 +3085,39 @@
Before v2.1.267, Claude Code uploaded such a file without checking it, and the server refused the publish instead.
+###
+
+
+
+Reading a local file from outside the connected folders in a Cowork session
+
+In a [Cowork](<https://claude.com/docs/cowork/overview>) session running on your machine in the Claude Desktop app, Claude named a local file for an [artifact](</docs/en/artifacts>). Claude Code couldn’t confirm the file is a plain file inside the session’s connected folders: the path sits outside those folders, passes through a symbolic link, or is spelled in a way that can name a different file than it appears to. Reading such a file needs your approval, and in a session that can’t show you the approval card, such as one set to skip all approvals, Claude Code refuses the read. The refusal appears in the Artifact tool result; when the file couldn’t be examined at all, it names that failure instead:
+
+ Reading a local file from outside this session's connected folders, or through a link, needs the approval card, and no one can answer it in this Cowork session. Use a plain file inside the connected folders; do not retry this file in this session.
+
+ cannot read file_path (ENOENT) — the file could not be examined, and no one can answer the approval card in this Cowork session. Check that the file exists as a plain file inside the connected folders, then retry with that path.
+
+**What to do:**
+
+ * Usually nothing: the message tells Claude to use a plain file inside the connected folders instead
+ * To put that exact file in the artifact, copy it into one of the session’s connected folders as a regular file, not a symlink, and ask again
+
+###
+
+
+
+WebFetch cannot fetch localhost
+
+Claude called [WebFetch](</docs/en/tools-reference#webfetch-tool-behavior>) with a URL whose hostname has no dot, such as `http://localhost:3000` or a bare intranet name like `http://wiki/`. WebFetch refuses these URLs before making any request:
+
+ WebFetch cannot fetch localhost or other hostnames without a dot. To reach a local server, use Bash with curl instead.
+
+**What to do:**
+
+ * Usually nothing: the message points Claude at `curl` through the Bash tool, which can reach local and intranet servers
+
+Before v2.1.268, WebFetch reported these URLs with a generic `Invalid URL` error.
+
##
@@ -3120,17 +3232,17 @@
You tried to delete a [background session](</docs/en/agent-view#what-deleting-a-session-removes>) whose worktree holds commits Claude Code can’t confirm are saved elsewhere. Claude Code keeps the worktree and the session row rather than destroy the commits unseen. `claude rm` names the branch and the unpushed commits, and says how to proceed:
- kept 7c5dcf5d — 2 unpushed commits on claude/fix-login (a1b2c3d Fix login flow, … and 1 more)
- worktree: /home/you/project/.claude/worktrees/fix-login
- push them, or discard the worktree and its commits: claude rm 7c5dcf5d --discard-unpushed a1b2c3d000000000000000000000000000000000@0123456789abcdef0123456789abcdef
-
-When Claude Code can’t summarize the commits, the message reads `worktree has commits that are not pushed anywhere` instead. In [agent view](</docs/en/agent-view>), the session’s row shows `not deleted` with the same reason. Commits on a remote don’t block the delete. Neither do commits on the local copy of your `origin` remote’s default branch, as long as that branch is checked out in your main checkout, the repository directory itself rather than a worktree. **What to do:**
+ kept 7c5dcf5d — its worktree is still at “/home/you/project/.claude/worktrees/fix-login”
+ 2 unpushed commits on “claude/fix-login”: a1b2c3d “Fix login flow” and 1 more. They exist on no remote, so deleting the worktree would lose them.
+ push them and run 'claude rm 7c5dcf5d' again, or discard the worktree and its commits: claude rm 7c5dcf5d --discard-unpushed a1b2c3d000000000000000000000000000000000@0123456789abcdef0123456789abcdef
+
+When Claude Code can’t summarize the commits, the detail line reads `The worktree has unpushed commits` instead. In [agent view](</docs/en/agent-view>), the session’s row shows `not deleted` with the same reason. Commits on a remote don’t block the delete. Neither do commits on the local copy of your `origin` remote’s default branch, as long as that branch is checked out in your main checkout, the repository directory itself rather than a worktree. **What to do:**
* To keep the commits, push the worktree’s branch, or merge it into the default branch checked out in your main checkout, then delete the session again
* To discard the commits, run the `claude rm <id> --discard-unpushed` command the message printed, or press `Ctrl+X` twice on the session’s row in agent view again. This removes the session and the worktree along with its branch, the unpushed commits, and any uncommitted changes. If the worktree has gained a commit since the refusal, Claude Code keeps it again and shows the updated state
* When the message says the worktree is also recorded by another finished session, deleting again doesn’t discard it: push the commits, then delete the session again
-Before v2.1.260, the message didn’t name the branch or the commits, and deleting again was refused the same way: deleting the session without pushing meant removing the worktree yourself with `git worktree remove --force <path>`, then running `claude rm <id>` again. Before v2.1.248, the default branch checked out in your main checkout didn’t count: a branch you had already merged there still triggered this refusal until its commits reached a remote.
+Before v2.1.268, `claude rm` put the commit summary on the `kept` line itself. When `claude rm` couldn’t summarize the commits, the `kept` line read `worktree has commits that are not pushed anywhere` in place of the summary. Before v2.1.260, the message didn’t name the branch or the commits, and deleting again was refused the same way: deleting the session without pushing meant removing the worktree yourself with `git worktree remove --force <path>`, then running `claude rm <id>` again. Before v2.1.248, the default branch checked out in your main checkout didn’t count: a branch you had already merged there still triggered this refusal until its commits reached a remote.
###
--- a/feature-availability.md
+++ b/feature-availability.md
@@ -47,7 +47,7 @@
These require signing in with a claude.ai account and are not reachable with an Anthropic Console API key or from a third-party provider:
- * [Claude Code on the web](</docs/en/claude-code-on-the-web>), Claude Code on mobile, and [Claude Code in Slack](</docs/en/slack>)
+ * [Cloud sessions](</docs/en/claude-code-on-the-web>), Claude Code on mobile, and [Claude Code in Slack](</docs/en/slack>)
* [Claude Code Desktop](</docs/en/desktop>)
* [Routines](</docs/en/routines>) (`/schedule`)
* [Ultrareview](</docs/en/ultrareview>)
@@ -92,7 +92,7 @@
2 On these providers, auto mode supports only Claude Sonnet 5, Opus 4.7 or later, and the Fable models. See [Auto mode configuration](</docs/en/auto-mode-config>). The built-in starting permission mode on these providers is Manual. See [which mode a session starts in](</docs/en/permission-modes#which-mode-a-session-starts-in>). In v2.1.158 through v2.1.206, auto mode on these providers also required setting `CLAUDE_CODE_ENABLE_AUTO_MODE=1`; v2.1.207 removed the requirement.
3 Subject to your agreement with the cloud provider.
4 Dashboard and API only. [Contribution metrics](</docs/en/analytics#enable-contribution-metrics>) requires a claude.ai Team or Enterprise organization.
-5 Requires Claude Code v2.1.224 or later on macOS and Linux, including Linux inside WSL 2. On native Windows, requires Claude Code v2.1.234 or later. With API key authentication, messaging is same-machine only. On Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, and Microsoft Foundry, messaging is same-machine only and requires Claude Code v2.1.248 or later. Claude can find your [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions and your sessions on other machines only from a session that is connected to [Remote Control](</docs/en/remote-control>). To connect, you need a claude.ai sign-in and the other [Remote Control requirements](</docs/en/remote-control#requirements>). See [Message sessions on other machines](</docs/en/cross-session-messaging#message-sessions-on-other-machines>).
+5 Requires Claude Code v2.1.224 or later on macOS and Linux, including Linux inside WSL 2. On native Windows, requires Claude Code v2.1.234 or later. With API key authentication, messaging is same-machine only. On Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, and Microsoft Foundry, messaging is same-machine only and requires Claude Code v2.1.248 or later. Claude can find your [cloud sessions](</docs/en/claude-code-on-the-web>) and your sessions on other machines only from a session that is connected to [Remote Control](</docs/en/remote-control>). To connect, you need a claude.ai sign-in and the other [Remote Control requirements](</docs/en/remote-control#requirements>). See [Message sessions on other machines](</docs/en/cross-session-messaging#message-sessions-on-other-machines>).
If you authenticate through an [LLM gateway](</docs/en/llm-gateway>), feature availability matches the underlying provider the gateway forwards to, except for the features Claude Code itself turns off. Whenever `ANTHROPIC_BASE_URL` points at a host other than `api.anthropic.com`, Claude Code turns off features such as [Remote Control](</docs/en/remote-control#requirements>) and [server-managed settings](</docs/en/server-managed-settings#platform-availability>), whatever the gateway forwards. Some Anthropic-only features such as the [Advisor](</docs/en/advisor>) work only if the gateway forwards requests intact to the Anthropic API.
@@ -161,7 +161,7 @@
Feature| Pro| Max| Team| Enterprise
---|---|---|---|---
-[Claude Code on the web](</docs/en/claude-code-on-the-web>)| ✓| ✓| ✓| ✓ 6
+[Cloud sessions](</docs/en/claude-code-on-the-web>)| ✓| ✓| ✓| ✓ 6
[Routines](</docs/en/routines>)| ✓| ✓| ✓| ✓
[Remote Control](</docs/en/remote-control>)| ✓| ✓| Admin-enabled| Admin-enabled
[Channels](</docs/en/channels>)| ✓| ✓| Admin-enabled| Admin-enabled
@@ -177,7 +177,7 @@
[Compliance API](<https://platform.claude.com/docs/en/api/compliance>)| ✗| ✗| ✗| ✓
[Zero Data Retention](</docs/en/zero-data-retention>)| ✗| ✗| ✗| ✓ 7
-6 On Enterprise, requires a premium seat or a Chat + Claude Code seat. See [Claude Code on the web](</docs/en/claude-code-on-the-web>).
+6 On Enterprise, requires a premium seat or a Chat + Claude Code seat. See [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>).
7 Not included in the standard Enterprise plan. Requires separate enablement by Anthropic for qualified accounts. See [Zero Data Retention](</docs/en/zero-data-retention>). For pricing and the full plan comparison, see [Team plans](<https://support.claude.com/en/articles/9266767-what-is-the-team-plan>) and [Enterprise plans](<https://support.claude.com/en/articles/9797531-what-is-the-enterprise-plan>).
##
--- a/features-overview.md
+++ b/features-overview.md
@@ -230,7 +230,7 @@
Keep CLAUDE.md under 200 lines. Move reference material to skills, which load on demand. To get [trim proposals for a checked-in CLAUDE.md](</docs/en/memory#my-claude-md-is-too-large>), run `/doctor`.
-Skills are extra capabilities in Claude’s toolkit. They can be reference material (like an API style guide) or invocable workflows you trigger with `/<name>` (like `/deploy`). Claude Code includes [bundled skills](</docs/en/commands>) like `/code-review`, `/batch`, and `/debug` that work out of the box. You can also create your own.**When:** Depends on the skill’s configuration. By default, descriptions load at session start and full content loads when used. For user-only skills (`disable-model-invocation: true`), nothing loads until you invoke them.**What loads:** For model-invocable skills, Claude sees names and descriptions in every request. When you invoke a skill with `/<name>` or Claude loads it automatically, the full content loads into your conversation.**How Claude chooses skills:** Claude matches your task against skill descriptions to decide which are relevant. If descriptions are vague or overlap, Claude may load the wrong skill or miss one that would help. To tell Claude to use a specific skill, invoke it with `/<name>`. Skills with `disable-model-invocation: true` are invisible to Claude until you invoke them.**Context cost:** Low until used. User-only skills have zero cost until invoked.**In subagents:** Skills work differently in subagents. Instead of on-demand loading, skills listed in the subagent’s `skills` field are fully preloaded into its context at launch. Subagents can still discover and invoke unlisted project, user, and plugin skills through the Skill tool.
+Skills are extra capabilities in Claude’s toolkit. They can be reference material (like an API style guide) or invocable workflows you trigger with `/<name>` (like `/deploy`). Claude Code includes [bundled skills](</docs/en/commands>) like `/code-review`, `/batch`, and `/debug` that work without setup. You can also create your own.**When:** Depends on the skill’s configuration. By default, descriptions load at session start and full content loads when used. For user-only skills (`disable-model-invocation: true`), nothing loads until you invoke them.**What loads:** For model-invocable skills, Claude sees names and descriptions in every request. When you invoke a skill with `/<name>` or Claude loads it automatically, the full content loads into your conversation.**How Claude chooses skills:** Claude matches your task against skill descriptions to decide which are relevant. If descriptions are vague or overlap, Claude may load the wrong skill or miss one that would help. To tell Claude to use a specific skill, invoke it with `/<name>`. Skills with `disable-model-invocation: true` are invisible to Claude until you invoke them.**Context cost:** Low until used. User-only skills have zero cost until invoked.**In subagents:** Skills work differently in subagents. Instead of on-demand loading, skills listed in the subagent’s `skills` field are fully preloaded into its context at launch. Subagents can still discover and invoke unlisted project, user, and plugin skills through the Skill tool.
Use `disable-model-invocation: true` for skills with side effects. This saves context and ensures only you trigger them.
--- a/file-checkpointing.md
+++ b/file-checkpointing.md
@@ -165,7 +165,7 @@
Capture checkpoint UUID and session ID
-With the `replay-user-messages` option set (shown above), each user message in the response stream has a UUID that serves as a checkpoint.For most use cases, capture the first user message UUID (`message.uuid`); rewinding to it restores the tracked files to their original state. To store multiple checkpoints and rewind to intermediate states, see Multiple restore points.Capturing the session ID (`message.session_id`) is optional; you only need it if you want to rewind later, after the stream completes. If you’re calling `rewindFiles()` immediately while still processing messages (as the example in Checkpoint before risky operations does), you can skip capturing the session ID.
+With the `replay-user-messages` option set, each user message in the response stream has a UUID that serves as a checkpoint.For most use cases, capture the first user message UUID (`message.uuid`); rewinding to it restores the tracked files to their original state. To store multiple checkpoints and rewind to intermediate states, see Multiple restore points.Capturing the session ID (`message.session_id`) is optional; you only need it if you want to rewind later, after the stream completes. If you’re calling `rewindFiles()` immediately while still processing messages (as the example in Checkpoint before risky operations does), you can skip capturing the session ID.
Python
--- a/github-actions.md
+++ b/github-actions.md
@@ -1,7 +1,7 @@
[Claude Code GitHub Actions](<https://github.com/anthropics/claude-code-action>) is a GitHub Action that runs Claude Code inside your repository’s workflows. Mention `@claude` in a pull request or issue comment to have Claude analyze code, implement changes, and push commits. You can also give the Claude Code GitHub Action a prompt to run automatically on any GitHub event. Use it to turn issues into pull requests, fix bugs from a comment, or automate recurring tasks. Several products share the Claude Code name. This page covers the `claude-code-action` workflow integration, which you configure with workflow files in your repository. For the related products, see:
* [Code Review](</docs/en/code-review>): automatic review on every pull request, without writing a workflow
- * [Claude Code on the web](</docs/en/claude-code-on-the-web>): Claude Code sessions from your browser or phone
+ * [Claude Code in the cloud](</docs/en/claude-code-on-the-web>): Claude Code sessions that run on cloud infrastructure instead of your machine
* [Claude Agent SDK](</docs/en/agent-sdk/overview>): custom automation outside GitHub Actions. The Claude Code GitHub Action is built on the SDK
* [GitHub Enterprise Server](</docs/en/github-enterprise-server>): Claude Code with self-hosted GitHub
@@ -119,7 +119,7 @@
GitHub App permissions
-The [Claude GitHub App](<https://github.com/apps/claude>) is shared by every Claude feature that integrates with GitHub, including the Claude Code GitHub Action, [Code Review](</docs/en/code-review>), and [auto-fix for pull requests](</docs/en/claude-code-on-the-web#auto-fix-pull-requests>) on Claude Code on the web. A GitHub App has a single permission set covering all of its features, so the set includes some permissions that the Claude Code GitHub Action doesn’t use. When you install the app, you grant the following permissions:
+The [Claude GitHub App](<https://github.com/apps/claude>) is shared by every Claude feature that integrates with GitHub, including the Claude Code GitHub Action, [Code Review](</docs/en/code-review>), and [auto-fix for pull requests](</docs/en/claude-code-on-the-web#auto-fix-pull-requests>) in cloud sessions. A GitHub App has a single permission set covering all of its features, so the set includes some permissions that the Claude Code GitHub Action doesn’t use. When you install the app, you grant the following permissions:
Permission| Access
---|---
--- a/github-actions-cloud-providers.md
+++ b/github-actions-cloud-providers.md
@@ -37,7 +37,7 @@
Set up the integration
-Beyond the prerequisites, you create four things: a GitHub identity for the Claude Code GitHub Action, the cloud-side trust configuration, the repository secrets, and the workflow file. The steps below walk through each.
+Beyond the prerequisites, you create a GitHub identity for the Claude Code GitHub Action, the cloud-side trust configuration, the repository secrets, and the workflow file. The steps below walk through each.
1
@@ -46,7 +46,7 @@
The Claude Code GitHub Action pushes commits and posts comments through a GitHub identity. The [quick setup](</docs/en/github-actions#quick-setup>) installs the official Claude GitHub App for this. With a cloud provider, you choose the identity yourself:
* **Official[Claude GitHub App](<https://github.com/apps/claude>)**: install it on the repository, or skip to the next step if it’s already installed
- * **Custom GitHub App** : create your own app, described below, when you want only the three permissions the Claude Code GitHub Action uses rather than the [official app’s full set](</docs/en/github-actions#github-app-permissions>)
+ * **Custom GitHub App** : create your own app when you want only the three permissions the Claude Code GitHub Action uses rather than the [official app’s full set](</docs/en/github-actions#github-app-permissions>)
* **GitHub’s automatic`GITHUB_TOKEN`**: no app to create or install, but GitHub doesn’t trigger your CI workflows on commits made with it
The workflow examples in the fourth step authenticate with a custom app. That step also says what to change for the other two options.To create a custom app, [register a new GitHub App](<https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app>) with webhooks disabled, since this integration doesn’t use them. Grant it three repository permissions:
--- a/github-enterprise-server.md
+++ b/github-enterprise-server.md
@@ -1,6 +1,6 @@
GitHub Enterprise Server support is available for Team and Enterprise plans.
-GitHub Enterprise Server (GHES) support lets your organization use Claude Code with repositories hosted on your self-managed GitHub instance instead of github.com. Once an Owner connects your GHES instance, developers can run web sessions and get automated code reviews without any per-repository configuration. Plugin marketplaces hosted on your instance are also supported; credential requirements vary by surface, as described in Plugin marketplaces on GHES. For repositories on github.com, see [Claude Code on the web](</docs/en/claude-code-on-the-web>) and [Code Review](</docs/en/code-review>). To run Claude in your own CI infrastructure, see [GitHub Actions](</docs/en/github-actions>).
+GitHub Enterprise Server (GHES) support lets your organization use Claude Code with repositories hosted on your self-managed GitHub instance instead of github.com. Once an Owner connects your GHES instance, developers can run cloud sessions and get automated code reviews without any per-repository configuration. Plugin marketplaces hosted on your instance are also supported; credential requirements vary by surface, as described in Plugin marketplaces on GHES. For repositories on github.com, see [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>) and [Code Review](</docs/en/code-review>). To run Claude in your own CI infrastructure, see [GitHub Actions](</docs/en/github-actions>).
##
@@ -12,10 +12,10 @@
Feature| GHES support| Notes
---|---|---
-Claude Code on the web| ✅ Supported| An Owner connects the GHES instance once; developers use `claude --cloud` or [claude.ai/code](<https://claude.ai/code>) as usual
+Cloud sessions| ✅ Supported| An Owner connects the GHES instance once; developers use `claude --cloud` or [claude.ai/code](<https://claude.ai/code>) as usual
Code Review| ✅ Supported| Same automated PR reviews as github.com
Claude Security| ✅ Supported| Available in public beta for Enterprise plans at [claude.ai/security](<https://claude.ai/security>)
-Teleport sessions| ✅ Supported| Move sessions between web and terminal with `--teleport`
+Teleport sessions| ✅ Supported| Move sessions between cloud and terminal with `--teleport`
Plugin marketplaces| ✅ Supported| Credential requirements differ by surface. See Plugin marketplaces on GHES
Contribution metrics| ✅ Supported| Delivered via webhooks to the [analytics dashboard](</docs/en/analytics>)
GitHub Actions| ✅ Supported| Requires manual workflow setup; `/install-github-app` is github.com only
@@ -65,7 +65,7 @@
GitHub App permissions
-The manifest configures the GitHub App with the permissions and webhook events below, which together cover web sessions, Code Review, Claude Security, plugin marketplaces, and contribution metrics:
+The manifest configures the GitHub App with the permissions and webhook events below, which together cover cloud sessions, Code Review, Claude Security, plugin marketplaces, and contribution metrics:
Permission| Access| Used for
---|---|---
@@ -108,11 +108,11 @@
git clone git@github.example.com:platform/api-service.git
cd api-service
-Then start a web session. Claude detects the GHES host from your git remote and routes the session through your organization’s configured instance:
+Then start a cloud session. Claude detects the GHES host from your git remote and routes the session through your organization’s configured instance:
claude --cloud "Add retry logic to the payment webhook handler"
-The session clones your repository from GHES and pushes changes back to a branch. Monitor progress at [claude.ai/code](<https://claude.ai/code>). See [Claude Code on the web](</docs/en/claude-code-on-the-web>) for the full cloud session workflow including diff review, auto-fix, and routines.
+The session clones your repository from GHES and pushes changes back to a branch. Monitor progress at [claude.ai/code](<https://claude.ai/code>). See [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>) for the full cloud session workflow including diff review, auto-fix, and routines.
###
@@ -120,7 +120,7 @@
Teleport sessions to your terminal
-Pull a web session into your local terminal with `claude --teleport`. Teleport verifies you’re in a checkout of the same GHES repository before fetching the branch and loading the session history. See [teleport requirements](</docs/en/claude-code-on-the-web#teleport-requirements>) for details.
+Pull a cloud session into your local terminal with `claude --teleport`. Teleport verifies you’re in a checkout of the same GHES repository before fetching the branch and loading the session history. See [teleport requirements](</docs/en/claude-code-on-the-web#teleport-requirements>) for details.
##
@@ -136,7 +136,7 @@
Managed settings (`extraKnownMarketplaces`)| Claude Code registers the entry and clones the repository using the machine’s existing git credentials| Git access to your GHES host from their machine
claude.ai organization plugin settings| An Owner selects the GHES instance as the source; Anthropic’s backend fetches and syncs the repository using the GitHub App from admin setup| Nothing per user once added. The Owner adding it needs their own GitHub Enterprise account connected as an access check, and the GitHub App must be installed on the marketplace repository
claude.ai user settings| Anthropic’s backend fetches the repository using the submitting user’s GitHub Enterprise connection| Their own GitHub Enterprise account connected to Claude
-Claude Code on the web| Cloud sessions clone marketplaces inside the session sandbox. The sandbox can reach your GHES instance only when the session’s repository is on that same instance, and its git credentials are scoped to the session’s repositories| Not reliable for GHES-hosted marketplaces: a different host than the session’s repository is not reachable, and even same-instance installs can fail. Use the CLI, managed settings, or claude.ai instead
+Cloud sessions| Cloud sessions clone marketplaces inside the session sandbox. The sandbox can reach your GHES instance only when the session’s repository is on that same instance, and its git credentials are scoped to the session’s repositories| Not reliable for GHES-hosted marketplaces: a different host than the session’s repository is not reachable, and even same-instance installs can fail. Use the CLI, managed settings, or claude.ai instead
GitHub Enterprise connections on claude.ai are per user when a marketplace is added from user settings. The admin setup connects your GHES instance to your organization, but it does not connect individual user accounts: each user who adds a GHES marketplace from their own settings must first connect their own GitHub Enterprise account, and one user’s connection, including the Owner’s, does not cover anyone else. Marketplaces added by an Owner in the organization plugin settings do not put this requirement on users, because ongoing fetches use the organization’s GitHub App. The Owner adding the marketplace still needs their own GitHub Enterprise account connected at add time.
@@ -222,7 +222,7 @@
-Web session fails to clone repository
+Cloud session fails to clone repository
If `claude --cloud` fails with a clone error, verify that an Owner has completed setup for your GHES instance and that the GitHub App is installed on the repository you’re working in. Ask the Owner who connected the instance to confirm that the hostname registered in Claude settings matches the hostname in your git remote.
@@ -248,7 +248,7 @@
GHES instance not reachable
-If reviews or Anthropic-hosted web sessions time out, your GHES instance may not be reachable from Anthropic infrastructure. Confirm your firewall allows inbound connections from Anthropic’s [outbound IP addresses](<https://platform.claude.com/docs/en/api/ip-addresses#outbound-ip-addresses>). Sessions in a [self-hosted environment](</docs/en/self-hosted-environments>) reach GHES from inside your network, so for them check the runner’s own network path and the [SCM connector](</docs/en/self-hosted-environments-reference#scm-connector-flags>) instead.
+If reviews or Anthropic-hosted cloud sessions time out, your GHES instance may not be reachable from Anthropic infrastructure. Confirm your firewall allows inbound connections from Anthropic’s [outbound IP addresses](<https://platform.claude.com/docs/en/api/ip-addresses#outbound-ip-addresses>). Sessions in a [self-hosted environment](</docs/en/self-hosted-environments>) reach GHES from inside your network, so for them check the runner’s own network path and the [SCM connector](</docs/en/self-hosted-environments-reference#scm-connector-flags>) instead.
###
@@ -256,7 +256,7 @@
Session start fails with `Unable to get organization UUID`
-Web sessions require a Team or Enterprise organization. Sign in with `/login` using your organization account. If you authenticate with an API key instead, web sessions fail earlier with a message asking you to run `/login`.
+Cloud sessions require a Team or Enterprise organization. Sign in with `/login` using your organization account. If you authenticate with an API key instead, cloud sessions fail earlier with a message asking you to run `/login`.
##
@@ -266,7 +266,7 @@
These pages cover the features referenced throughout this guide in more depth:
- * [Claude Code on the web](</docs/en/claude-code-on-the-web>): run Claude Code sessions on cloud infrastructure
+ * [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>): run Claude Code sessions on cloud infrastructure
* [Code Review](</docs/en/code-review>): automated PR reviews
* [Plugin marketplaces](</docs/en/plugin-marketplaces>): build and distribute plugin catalogs
* [Analytics](</docs/en/analytics>): track usage and contribution metrics
--- a/glossary.md
+++ b/glossary.md
@@ -121,6 +121,14 @@
CLAUDE.md
A markdown file of persistent instructions you write for Claude, loaded at the start of every session as a user message after the system prompt. Put project conventions, architecture notes, and “always do X” rules here. Project-root CLAUDE.md survives compaction and is re-read fresh from disk afterward. You can place CLAUDE.md at project scope in `./CLAUDE.md` or `./.claude/CLAUDE.md`, at user scope in `~/.claude/CLAUDE.md`, or as managed policy for your organization. All discovered files are concatenated into context rather than overriding each other, ordered from broadest scope to most specific. Learn more: [CLAUDE.md files](</docs/en/memory#claude-md-files>)
+
+###
+
+
+
+Cloud session
+
+A Claude Code session that keeps running after you close your laptop, because it runs on cloud infrastructure instead of your machine: Anthropic-managed by default, or a [self-hosted environment](</docs/en/self-hosted-environments>) your organization operates. You start one from claude.ai/code, the Claude mobile app, the Desktop app with **Cloud** selected, `claude --cloud`, or a [routine](</docs/en/routines>). A session in your terminal, IDE, or the Desktop app with **Local** selected is a local session; to reach a local session from another device, use Remote Control. Learn more: [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>)
###
@@ -342,7 +350,7 @@
Remote Control
-A way to continue a local Claude Code session from your phone or browser via claude.ai. Your code execution and files stay on your machine; the interface is remote. Different from Claude Code on the web, which runs in a cloud sandbox. Learn more: [Remote Control](</docs/en/remote-control>)
+A way to continue a local Claude Code session from your phone or browser via claude.ai. Your code execution and files stay on your machine; the interface is remote. Different from a [cloud session](</docs/en/claude-code-on-the-web>), which runs in a cloud sandbox. Learn more: [Remote Control](</docs/en/remote-control>)
###
@@ -418,7 +426,7 @@
Teleport
-A command, `/teleport`, that pulls a cloud Claude Code session into your local terminal. Claude fetches the branch, loads the conversation history, and resumes from the web session’s last state. The reverse direction is `--cloud`, which sends a local task to run on the web. Learn more: [From web to terminal](</docs/en/claude-code-on-the-web#from-web-to-terminal>)
+A command, `/teleport`, that pulls a cloud Claude Code session into your local terminal. Claude fetches the branch, loads the conversation history, and resumes from the cloud session’s last state. The reverse direction is `--cloud`, which sends a local task to run in the cloud. Learn more: [From cloud to terminal](</docs/en/claude-code-on-the-web#from-cloud-to-terminal>)
###
@@ -477,5 +485,6 @@
Old term| Now called| Notes
---|---|---
Headless mode| Non-interactive mode| Same `-p` flag, same behavior
+Web session; “Claude Code on the web” as the name for any cloud session| Cloud session| ”Claude Code on the web” now names only the browser surface at claude.ai/code
Custom commands| Skills| `.claude/commands/` files still work
Slash commands| Commands| ”Slash” dropped from product copy
--- a/goal.md
+++ b/goal.md
@@ -49,7 +49,7 @@
Write an effective condition
-The evaluator judges your condition against what Claude has surfaced in the conversation. It doesn’t run commands or read files independently, so write the condition as something Claude’s own output can demonstrate. “All tests in `test/auth` pass” works because Claude runs the tests and the result lands in the transcript for the evaluator to read. A condition that holds up across many turns usually has:
+The evaluator judges your condition against what Claude has surfaced in the conversation. It doesn’t run commands or read files independently, so write the condition as something Claude’s own output can demonstrate. “All tests in `test/auth` pass” works because Claude runs the tests and the result appears in the transcript for the evaluator to read. A condition that holds up across many turns usually has:
* **One measurable end state** : a test result, a build exit code, a file count, an empty queue
* **A stated check** : how Claude should prove it, such as “`npm test` exits 0” or “`git status` is clean”
--- a/google-vertex-ai.md
+++ b/google-vertex-ai.md
@@ -82,7 +82,7 @@
Request access to Claude models in Google Cloud’s Agent Platform:
- 1. Navigate to the [Google Cloud’s Agent Platform Model Garden](<https://console.cloud.google.com/vertex-ai/model-garden>)
+ 1. Go to the [Google Cloud’s Agent Platform Model Garden](<https://console.cloud.google.com/vertex-ai/model-garden>)
2. Search for “Claude” models
3. Request access to desired Claude models (for example, Claude Sonnet 4.6)
4. Wait for approval (may take 24-48 hours)
--- a/hooks.md
+++ b/hooks.md
@@ -816,16 +816,17 @@
Hook timeout
-Claude Code runs each callback with a timeout, which you set in seconds with the `timeout` field on its `HookMatcher`. When you don’t set one, Claude Code uses the event’s default: 600 seconds for most events, 30 seconds for `UserPromptSubmit`, `PreModelSwitch`, and `PostModelSwitch`, and 10 seconds for `MessageDisplay`. Claude Code runs `SessionEnd` callbacks during shutdown under the shorter [SessionEnd timeout budget](</docs/en/hooks#sessionend-input>), 1.5 seconds by default. When a callback exceeds its timeout, Claude Code cancels it and treats it as a failed hook: it discards the callback’s output and the session continues rather than hanging. What happens next depends on the event:
+Claude Code runs each callback with a timeout, which you set in seconds with the `timeout` field on its `HookMatcher`. When you don’t set one, Claude Code uses the event’s default: 600 seconds for most events, 30 seconds for `UserPromptSubmit`, `PreModelSwitch`, and `PostModelSwitch`, and 10 seconds for `MessageDisplay`. Claude Code runs `SessionEnd` callbacks during shutdown under the shorter [SessionEnd timeout budget](</docs/en/hooks#sessionend-input>), 1.5 seconds by default. When a callback exceeds its timeout, Claude Code cancels it and discards its output, and the session continues rather than hanging. What happens next depends on the event:
* `PreToolUse`: Claude Code doesn’t run the tool call, Claude receives a tool result stating the hook didn’t respond before its timeout, and the turn continues. If another `PreToolUse` hook returned an explicit deny, Claude receives that denial instead of the timeout error. Before v2.1.210, Claude Code reported the timeout to Claude as a user rejection, which made unattended sessions stop and wait for input.
* `PostToolUse` and `PostToolUseFailure`: Claude Code keeps the tool result and the turn continues.
* `UserPromptSubmit` and [`UserPromptExpansion`](</docs/en/hooks#userpromptexpansion>): Claude Code blocks the prompt with a message naming the hook and the timeout, and the session continues. Because a callback on these events can act as a policy gate, Claude Code never lets a timed-out prompt through unscreened. Before v2.1.208, Claude Code ended the query with `error_during_execution` when a callback on these events timed out.
- * `Stop` and `SubagentStop`: Claude Code shows a warning and the agent stops normally.
+ * `Stop` and `SubagentStop`: the timed-out callback counts as returning no decision. The agent or subagent stops as if that callback had allowed it, and a decision from your other hooks on the event still applies. Before Claude Code v2.1.273, a timed-out `Stop` or `SubagentStop` callback counted as a failed hook run, and Claude Code discarded the decisions of your other hooks on the event.
+ * `SessionStart`: the timed-out callback counts as returning no output, and the session continues with the output of your other `SessionStart` hooks.
* `PreModelSwitch`: Claude Code blocks the model switch. A hook that doesn’t answer hasn’t approved the switch.
* Other events, such as `Notification`, `PreCompact`, and `PostModelSwitch`: Claude Code logs the failure and continues.
-If you interrupt the query while a callback is pending, Claude Code cancels the pending tool call. Before v2.1.208, the tool call could still proceed if you interrupted during a pending `PreToolUse` callback. If your callback needs more time, set a higher `timeout` on its `HookMatcher`. In TypeScript, use the `AbortSignal` from the third callback argument to handle cancellation gracefully when the timeout fires.
+The first time a `Stop` or `SessionStart` callback times out in the main session, Claude Code also adds an [`SDKInformationalMessage`](</docs/en/agent-sdk/typescript#sdkinformationalmessage>) to the message stream saying the app driving the session didn’t respond. Later timeouts don’t repeat that message while your app stays unresponsive. If you interrupt the query while a callback is pending, Claude Code cancels the pending tool call. Before v2.1.208, the tool call could still proceed if you interrupted during a pending `PreToolUse` callback. If your callback needs more time, set a higher `timeout` on its `HookMatcher`. In TypeScript, use the `AbortSignal` from the third callback argument to handle cancellation gracefully when the timeout fires.
###
--- a/hosting.md
+++ b/hosting.md
@@ -119,7 +119,7 @@
declare const userInput: string;
declare const sessionId: string; // looked up from your database by user
- declare const sessionStore: SessionStore; // S3, Redis, Postgres, or your own adapter
+ declare const sessionStore: SessionStore; // an object store, key-value store, database, or your own adapter
for await (const message of query({
prompt: userInput,
@@ -133,7 +133,7 @@
user_input: str = ...
session_id: str = ... # looked up from your database by user
- session_store: SessionStore = ... # S3, Redis, Postgres, or your own adapter
+ session_store: SessionStore = ... # an object store, key-value store, database, or your own adapter
async def main():
async for message in query(
@@ -220,7 +220,7 @@
Session and state persistence
-Default local disk is lost on restart, scale-down, or a move to a different node. For any session a user expects to resume, mirror the transcript to durable storage with a [`SessionStore` adapter](</docs/en/agent-sdk/session-storage>). See [Reference implementations](</docs/en/agent-sdk/session-storage#reference-implementations>) for S3, Redis, and Postgres adapters and a conformance suite for your own. Three things to know about how `SessionStore` behaves:
+Default local disk is lost on restart, scale-down, or a move to a different node. For any session a user expects to resume, mirror the transcript to durable storage with a [`SessionStore` adapter](</docs/en/agent-sdk/session-storage>). See [Reference implementations](</docs/en/agent-sdk/session-storage#reference-implementations>) for example adapters for an object store, a key-value store, and a database, and a conformance suite for your own. Three things to know about how `SessionStore` behaves:
* **Transcripts only** : `SessionStore` mirrors transcripts, not `CLAUDE.md` memory files or other working-directory artifacts. Mount a shared volume or sync those separately.
* **Mirror, not replacement** : the subprocess writes to local disk first, and the SDK forwards a copy of each batch to the store. A fresh session’s local transcript outlives the run; a run resumed from the store deletes its local copy at the end, so the store holds the only durable copy. See [Dual-write architecture](</docs/en/agent-sdk/session-storage#dual-write-architecture>).
--- a/how-claude-code-works.md
+++ b/how-claude-code-works.md
@@ -66,7 +66,7 @@
Environments and interfaces
-The agentic loop, tools, and capabilities described above are the same everywhere you use Claude Code. What changes is where the code executes and how you interact with it.
+The agentic loop, tools, and capabilities are the same everywhere you use Claude Code. What changes is where the code executes and how you interact with it.
###
--- a/index.md
+++ b/index.md
@@ -48,7 +48,7 @@
August 10–14, 2026
-**Auto-continue after a usage limit on Desktop** : when you hit your session limit in Claude Code Desktop, check **Auto-continue when limits reset** on the limit card and the app retries the interrupted turn once the limit resets.Also this week: **fork mode** is on by default in interactive sessions, so Claude can hand a side task to a subagent that inherits the full conversation; **GitLab** merge request URLs work with `--worktree` and the `claude agents` view, and marketplaces clone bare `gitlab.com` URLs; and typing **`@`** in the prompt mentions another Claude session by name.[Read the Week 33 digest →](</docs/en/whats-new/2026-w33>)
+**Auto-continue after a usage limit on Desktop** : when you hit your session limit in Claude Code Desktop, check **Auto-continue when limits reset** on the limit card and the app retries the interrupted turn once the limit resets.Also this week: **fork mode** is on by default in interactive sessions, so Claude can delegate a side task to a subagent that inherits the full conversation; **GitLab** merge request URLs work with `--worktree` and the `claude agents` view, and marketplaces clone bare `gitlab.com` URLs; and typing **`@`** in the prompt mentions another Claude session by name.[Read the Week 33 digest →](</docs/en/whats-new/2026-w33>)
--- a/jetbrains.md
+++ b/jetbrains.md
@@ -251,7 +251,7 @@
Security considerations
-When Claude Code runs in a JetBrains IDE in [`acceptEdits` permission mode](</docs/en/permission-modes#auto-approve-file-edits-with-acceptedits-mode>), it may be able to modify IDE configuration files that can be automatically executed by your IDE. This may increase the risk of running Claude Code in `acceptEdits` mode and allow bypassing Claude Code’s permission prompts for bash execution. When running in JetBrains IDEs, consider:
+When Claude Code runs in a JetBrains IDE in [`acceptEdits` permission mode](</docs/en/permission-modes#auto-approve-file-edits-with-acceptedits-mode>), it may be able to modify IDE configuration files that can be automatically executed by your IDE. This may increase the risk of running Claude Code in `acceptEdits` mode and allow bypassing Claude Code’s permission prompts for Bash execution. When running in JetBrains IDEs, consider:
* Using Manual mode for edits, because `acceptEdits` and auto mode both approve edits inside your working directory without asking, except in [protected paths](</docs/en/permission-modes#protected-paths>)
* Taking extra care to ensure Claude is only used with trusted prompts
--- a/llm-gateway-connect.md
+++ b/llm-gateway-connect.md
@@ -272,9 +272,9 @@
-Slack, web, and Remote Control
-
-[Claude Code in Slack](</docs/en/slack>) and [Claude Code on the web](</docs/en/claude-code-on-the-web>) are Anthropic-hosted products that always use Anthropic’s API; they aren’t part of a gateway deployment. Gateway variables set in a cloud session’s environment configuration are not applied. If your traffic must stay on the gateway, don’t enable these surfaces for those users. [Remote Control](</docs/en/remote-control>) and [voice dictation](</docs/en/voice-dictation>) both rely on a claude.ai identity: Remote Control to pair a live session with your account, and voice dictation to reach the claude.ai transcription endpoint. They are unavailable while `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, or an `apiKeyHelper` is active. Remote Control is also disabled while `ANTHROPIC_BASE_URL` points at a non-Anthropic host, so signing in with claude.ai isn’t enough on its own. Before v2.1.196, a non-Anthropic base URL didn’t block Remote Control. To restore either feature, log in with claude.ai and unset the gateway variables that feature checks. The Remote Control section of `claude doctor` names what is currently blocking Remote Control.
+Slack, cloud sessions, and Remote Control
+
+[Claude Code in Slack](</docs/en/slack>) and [cloud sessions](</docs/en/claude-code-on-the-web>) always use Anthropic’s API; they aren’t part of a gateway deployment. Gateway variables set in a cloud session’s environment configuration are not applied. If your traffic must stay on the gateway, don’t enable these surfaces for those users. [Remote Control](</docs/en/remote-control>) and [voice dictation](</docs/en/voice-dictation>) both rely on a claude.ai identity: Remote Control to pair a live session with your account, and voice dictation to reach the claude.ai transcription endpoint. They are unavailable while `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, or an `apiKeyHelper` is active. Remote Control is also disabled while `ANTHROPIC_BASE_URL` points at a non-Anthropic host, so signing in with claude.ai isn’t enough on its own. Before v2.1.196, a non-Anthropic base URL didn’t block Remote Control. To restore either feature, log in with claude.ai and unset the gateway variables that feature checks. The Remote Control section of `claude doctor` names what is currently blocking Remote Control.
* Voice dictation: unset the gateway credential
* Remote Control: unset the gateway credential and `ANTHROPIC_BASE_URL`
@@ -515,6 +515,7 @@
`400` errors naming `context_management`, `Extra inputs are not permitted`, or other unrecognized fields| The gateway forwards requests to an upstream that rejects fields Claude Code sends to Anthropic-format endpoints| Set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`, which suppresses most pre-release fields; see [feature pass-through](</docs/en/llm-gateway-protocol#feature-pass-through>). Some betas aren’t gated by this flag; for those, set the matching `CLAUDE_CODE_USE_*` provider variable so Claude Code sends only what that provider accepts
`400` errors naming `thinking` or `adaptive`, such as `Input tag 'adaptive' found`| The upstream model build doesn’t accept adaptive reasoning, which Claude Code requests for Claude 4.6 and later models| Upgrade the gateway’s upstream. On Opus 4.6 and Sonnet 4.6, `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1` works instead. The [model configuration](</docs/en/model-config>) capability variables apply only to the provider configurations, such as `CLAUDE_CODE_USE_BEDROCK` and `CLAUDE_CODE_USE_VERTEX`, not behind an `ANTHROPIC_BASE_URL` gateway
`400` errors stating a context or token limit in the gateway’s own words, such as `ContextWindowExceededError` or `prompt token count of N exceeds the limit of M`| The gateway enforces a smaller context than the model’s native window and rewrites the upstream error, so Claude Code doesn’t recognize it as a [too-long error](</docs/en/errors#prompt-is-too-long>) and doesn’t compact and retry automatically| Run `/compact` to recover the session. To prevent it, set `CLAUDE_CODE_AUTO_COMPACT_WINDOW` to the gateway’s limit; Claude Code clamps the value to at least 100,000 tokens and at most the model’s context window, so you can’t match a gateway limit below 100,000, and `/compact` remains the recovery there. Also set `CLAUDE_CODE_MAX_OUTPUT_TOKENS` below the gateway model’s output limit
+`400` errors on every request, in the gateway’s own words rejecting a tool’s input schema or its `pattern`, on Claude Code v2.1.265 through v2.1.267| In a gradual rollout on those versions, the [Artifact tool](</docs/en/artifacts#availability>) schema carries a regular expression with `\p{...}` Unicode character classes. The Anthropic API accepts it, but a gateway or upstream that checks each tool schema’s `pattern` with its own regex engine rejects the whole request| Update to v2.1.268 or later, which doesn’t send the regular expression. On an affected version, [turn artifacts off](</docs/en/artifacts#disable-artifacts>), which removes the tool and its schema from requests
Models missing from the `/model` picker| Gateway model names aren’t in Claude Code’s built-in list, or Claude Code is showing a [`modelPicker`](</docs/en/settings-reference#modelpicker>) lineup that replaces the built-in options| Enable gateway model discovery or add names with the [model configuration](</docs/en/model-config>) variables. If Claude Code shows a replacing `modelPicker` lineup, add the gateway models to it, or ask your administrator to add them when managed settings supply it
`/fast` reports `Fast mode unavailable due to network connectivity issues` while inference requests work| The [fast mode](</docs/en/fast-mode>) availability check goes directly to `api.anthropic.com` and doesn’t follow `ANTHROPIC_BASE_URL`, so blocked direct egress fails the check. The same message appears on an open network when the check presents a gateway-issued key from `ANTHROPIC_API_KEY` or an `apiKeyHelper` and Anthropic rejects it| Allowlist `api.anthropic.com` if egress is blocked, or set a skip variable; for a rejected gateway key only the skip variables help. See [use fast mode behind proxies and LLM gateways](</docs/en/fast-mode#use-fast-mode-behind-proxies-and-llm-gateways>)
`/fast` reports `Fast mode has been disabled by your organization` in a session authenticated with `ANTHROPIC_AUTH_TOKEN`, even though the organization has fast mode enabled| The availability check requires a claude.ai login or an Anthropic API key; with only a bearer token, Claude Code treats fast mode as disabled without sending the check| Set `CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK=1`; see [use fast mode behind proxies and LLM gateways](</docs/en/fast-mode#use-fast-mode-behind-proxies-and-llm-gateways>)
--- a/llm-gateway-protocol.md
+++ b/llm-gateway-protocol.md
@@ -91,7 +91,7 @@
`x-claude-code-agent-id`| Identifier of the [subagent](</docs/en/sub-agents>) that issued the request, present only on requests from an agent Claude Code spawned inside the session. Use it with the session ID to attribute cost to parallel agents
`x-claude-code-parent-agent-id`| Identifier of the agent that spawned the requesting agent, present only for nested agents
-Subagent IDs are generated fresh for each spawn. Teammate agents, the named members of an [agent team](</docs/en/agent-teams>), reuse a stable name-based ID across reconnections. In both cases the ID identifies an agent, not a person or a device, so don’t treat the agent ID header as a user identifier. If your developers set `ANTHROPIC_CUSTOM_HEADERS`, those headers appear on requests as well.
+Subagent IDs are generated fresh each time Claude Code spawns a subagent. Teammate agents, the named members of an [agent team](</docs/en/agent-teams>), reuse a stable name-based ID across reconnections. In both cases the ID identifies an agent, not a person or a device, so don’t treat the agent ID header as a user identifier. If your developers set `ANTHROPIC_CUSTOM_HEADERS`, those headers appear on requests as well.
###
--- a/llm-gateway-rollout.md
+++ b/llm-gateway-rollout.md
@@ -147,7 +147,7 @@
Distribute the configuration
-Every developer machine needs the gateway address and a credential. You can distribute them centrally through [managed settings](</docs/en/managed-settings#delivery-mechanisms>), so developers configure nothing, or hand developers the values to set themselves.
+Every developer machine needs the gateway address and a credential. You can distribute them centrally through [managed settings](</docs/en/managed-settings#delivery-mechanisms>), so developers configure nothing, or give developers the values to set themselves.
####
--- a/managed-mcp.md
+++ b/managed-mcp.md
@@ -524,6 +524,6 @@
* [Decide what to enforce](</docs/en/admin-setup#decide-what-to-enforce>): MCP restrictions alongside permission rules, sandboxing, and the other admin controls
* [Connect Claude Code to tools via MCP](</docs/en/mcp>): the full MCP reference, including transports, scopes, and authentication
* [Settings](</docs/en/settings>): the settings hierarchy and how managed settings take precedence
- * [Server-managed settings](</docs/en/server-managed-settings>): deliver `allowedMcpServers` and `deniedMcpServers` from the Claude.ai admin console
+ * [Server-managed settings](</docs/en/server-managed-settings>): deliver `allowedMcpServers` and `deniedMcpServers` from the claude.ai admin console
* [Security](</docs/en/security>): the threat model these controls defend against
* [Claude Enterprise Administrator Guide](<https://claude.com/resources/tutorials/claude-enterprise-administrator-guide>): SSO, SCIM, seat management, and rollout playbook
--- a/managed-settings.md
+++ b/managed-settings.md
@@ -54,7 +54,7 @@
The file in the steps above is one of four ways to get managed settings onto a machine. Every mechanism carries the same policy keys as a `settings.json` file, so the [settings reference](</docs/en/settings-reference>) applies to all of them. A few keys are tied to particular sources, and each entry’s Scope line says which:
* **Delivery controls** : [`policyHelper`](</docs/en/settings-reference#policyhelper>), [`wslInheritsWindowsSettings`](</docs/en/settings-reference#wslinheritswindowssettings>), and [`managedSourcesBehavior`](</docs/en/settings-reference#managedsourcesbehavior>)
- * **Gateway login keys** : [`forceLoginGatewayUrl`](</docs/en/settings-reference#forcelogingatewayurl>) and the `"gateway"` value of [`forceLoginMethod`](</docs/en/settings-reference#forceloginmethod>)
+ * **Gateway login keys** : [`forceLoginGatewayUrl`](</docs/en/settings-reference#forcelogingatewayurl>), [`gatewayInternalNetworks`](</docs/en/settings-reference#gatewayinternalnetworks>), and the `"gateway"` value of [`forceLoginMethod`](</docs/en/settings-reference#forceloginmethod>)
A managed settings file, an MDM profile, or the claude.ai console applies one policy to everyone it reaches. To give one group of developers a different policy, deploy a different file or profile to that group; the claude.ai console [can’t target a group yet](</docs/en/server-managed-settings#current-limitations>), while a self-hosted [Claude apps gateway](</docs/en/claude-apps-gateway>) delivers managed settings per IdP group. When more than one mechanism delivers a policy to the same machine, Claude Code by default uses one and ignores the others. How Claude Code combines managed sources gives the order and the opt-in that applies every source. The MDM and file rows are together called endpoint-managed settings, because the policy is stored on the developer’s device, as opposed to the server-managed row, where Claude Code fetches it. Pick a mechanism by how you already manage devices, using the table below.
@@ -128,7 +128,7 @@
* **`"first-wins"`, the default**: Claude Code uses the highest-ranked source that delivers at least one policy key and ignores the rest rather than merging them, apart from the keys in Keys read from every admin source. Claude Code shows no warning for the sources it skips; `/status` names the source it used and the ones it skipped.
* **`"merge"`** : Claude Code applies every admin source that delivers a policy key and combines them by kind of key: on most keys the higher-ranked source’s value applies, lists union, and locks take the strictest value. Compose every managed source says where to set the key and how each kind of key combines. Requires Claude Code v2.1.242 or later.
-Both settings rank the sources the same way. Two terms recur in this section:
+Both settings rank the sources the same way. These terms recur in this section:
* **Policy key** : any settings key other than the two control keys, [`wslInheritsWindowsSettings`](</docs/en/settings-reference#wslinheritswindowssettings>) and [`managedSourcesBehavior`](</docs/en/settings-reference#managedsourcesbehavior>). A managed settings file or MDM policy that contains only those doesn’t count, and Claude Code moves on to the next source.
* **Admin source** : one of the first three sources below. The HKCU registry is user-writable and isn’t one.
@@ -162,7 +162,7 @@
* [`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, [`forceLoginGatewayUrl`](</docs/en/settings-reference#forcelogingatewayurl>) and the `"gateway"` value of [`forceLoginMethod`](</docs/en/settings-reference#forceloginmethod>), 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.
+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.
###
@@ -236,7 +236,7 @@
What a developer can change
-A developer’s own settings files, `--settings` values, and project files never override a managed value; the [exceptions](</docs/en/settings#exceptions-to-managed-settings-precedence>) only let a stricter lower-level value count. Four things sit outside that rule:
+A developer’s own settings files, `--settings` values, and project files never override a managed value; the [exceptions](</docs/en/settings#exceptions-to-managed-settings-precedence>) only let a stricter lower-level value count. These cases sit outside that rule:
* **The model for a session** : a managed `model` is a default, not a lock. `--model` and `ANTHROPIC_MODEL` still pick the model for that session, so deploy [`availableModels`](</docs/en/settings-reference#availablemodels>) to restrict the choice.
* **Local admin rights** : a developer who is an administrator on the machine can edit the managed source itself, which is why MDM tooling can redeploy the profile or file on a schedule and why the HKLM registry and the macOS managed preferences domain exist.
@@ -316,6 +316,7 @@
`availableModels`| Enforced as an empty allowlist until fixed, so only the Default model is available; a non-string entry is stripped and the valid subset enforced.
`enforceAvailableModels`| Treated as `true`.
`forceLoginOrgUUID`| No organization is permitted to log in until the value is fixed.
+`gatewayInternalNetworks`| When the invalid value comes from the highest managed source on the machine, `/login` refuses every new [cloud gateway](</docs/en/claude-apps-gateway#allow-a-gateway-on-public-address-space-you-own>) sign-in on that machine until the value is fixed.
`crossSessionInbound`| Treated as `refuse`, the most restrictive value, so inbound [cross-session messages](</docs/en/cross-session-messaging#control-inbound-messages>) are refused until the value is fixed. The developer sees [a warning](</docs/en/errors#crosssessioninbound-must-be-one-of-accept-hold-refuse>).
`deniedMcpServers`| An individual invalid entry is stripped and the valid subset is enforced. A wholly invalid value is dropped with a warning, since denying every server would block servers the policy never named.
`sandbox.credentials`| A recoverable invalid entry is degraded to `mode: "deny"` with a warning; an unrecoverable one is stripped; valid entries stay enforced. See [invalid credential entries](</docs/en/settings-reference#invalid-credential-entries-in-managed-settings>)
@@ -354,7 +355,7 @@
[`strictPluginOnlyCustomization`](</docs/en/settings-reference#strictpluginonlycustomization>)| Block skills, agents, hooks, and MCP servers from user and project sources; `true` locks all four, an array names which
[`wslInheritsWindowsSettings`](</docs/en/settings-reference#wslinheritswindowssettings>)| When set in the HKLM registry or a file under `C:\Program Files\ClaudeCode`, have WSL read the Windows policy chain, and read `/etc/claude-code` only when no managed settings file or drop-in under that directory delivers a policy key; the entry gives the order
-On Team and Enterprise plans, an Owner enables or disables [Remote Control](</docs/en/remote-control>) and [web sessions](</docs/en/claude-code-on-the-web>) organization-wide in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>). Remote Control can additionally be disabled per device with the [`disableRemoteControl`](</docs/en/settings-reference#disableremotecontrol>) setting. Web sessions have no per-device managed settings key.To check whether these organization settings reached a given machine, run `claude doctor` there and read the `Organization policy` line, which says where Claude Code loaded the policy from or why it didn’t load. Requires Claude Code v2.1.261 or later. In a running session, `/status` shows the same line when the policy didn’t load.
+On Team and Enterprise plans, an Owner enables or disables [Remote Control](</docs/en/remote-control>) and [cloud sessions](</docs/en/claude-code-on-the-web>) organization-wide in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>). Remote Control can additionally be disabled per device with the [`disableRemoteControl`](</docs/en/settings-reference#disableremotecontrol>) setting. Cloud sessions have no per-device managed settings key.To check whether these organization settings reached a given machine, run `claude doctor` there and read the `Organization policy` line, which says where Claude Code loaded the policy from or why it didn’t load. Requires Claude Code v2.1.261 or later. In a running session, `/status` shows the same line when the policy didn’t load.
##
--- a/mcp-quickstart.md
+++ b/mcp-quickstart.md
@@ -98,7 +98,7 @@
`claude mcp add` works the same in every shell, including PowerShell and Command Prompt. Inside a `claude` session, use the `/mcp` command to check and manage servers you’ve already added.
-There are other ways to add a server, each covered later on this page:
+There are other ways to add a server, each with its own section:
* Add a local server: run a program on your machine instead of connecting to a URL.
* Edit `.mcp.json` directly: write the JSON entry yourself instead of using the command.
@@ -280,7 +280,7 @@
* **Claude Code desktop app** : add servers through the [Connectors UI](</docs/en/desktop#connect-external-tools>).
* **Claude Desktop chat app** : a separate app from Claude Code. To copy servers from its `claude_desktop_config.json` into the CLI, run `claude mcp add-from-claude-desktop` on macOS or WSL.
* **VS Code** : see [Connect to external tools with MCP](</docs/en/vs-code#connect-to-external-tools-with-mcp>).
- * **Claude Code on the web** : reads `.mcp.json` from your repository. See Edit .mcp.json directly.
+ * **Cloud sessions** : commit a `.mcp.json` to your repository. See Edit .mcp.json directly.
* **Claude.ai** : connectors you add at [claude.ai/customize/connectors](<https://claude.ai/customize/connectors>) load automatically in the CLI when you sign in with that account. See [Use MCP servers from Claude.ai](</docs/en/mcp#use-mcp-servers-from-claude-ai>).
##
--- a/microsoft-foundry.md
+++ b/microsoft-foundry.md
@@ -26,7 +26,7 @@
First, create a Claude resource in Azure:
- 1. Navigate to the [Microsoft Foundry portal](<https://ai.azure.com/>)
+ 1. Go to the [Microsoft Foundry portal](<https://ai.azure.com/>)
2. Create a new resource, noting your resource name
3. Create deployments for the Claude models, noting the deployment name you give each; you’ll set these names as the model variables in step 4:
* Claude Opus
--- a/mobile.md
+++ b/mobile.md
@@ -38,7 +38,7 @@
Feature| What you connect to| When to use
---|---|---
-[Claude Code on the web](</docs/en/claude-code-on-the-web>)| A cloud session on cloud infrastructure, Anthropic-managed by default| Your repository is on GitHub and the task should keep running after you put your phone away. See the [web quickstart](</docs/en/web-quickstart>) to set up.
+[Cloud sessions](</docs/en/claude-code-on-the-web>)| A session on cloud infrastructure, Anthropic-managed by default| Your repository is on GitHub and the task should keep running after you put your phone away. See the [cloud quickstart](</docs/en/web-quickstart>) to set up.
[Remote Control](</docs/en/remote-control>)| A Claude Code session running on your computer| The work needs your local filesystem, tools, or MCP servers.
[Dispatch](</docs/en/desktop#sessions-from-dispatch>)| The Desktop app on your computer| You want to message a task and let Dispatch decide how to run it. Requires a Pro or Max plan.
@@ -50,7 +50,7 @@
Start and monitor cloud sessions
-Claude Code on the web runs tasks on cloud infrastructure, Anthropic-managed by default, so a session continues after you put your phone away. From the Code tab, select a repository and branch, describe the task, and submit it. Sessions persist across devices: a task you start on your laptop is ready to review from your phone, and one you start from your phone is waiting when you’re back at your desk. Open a session in the app to check progress, answer Claude’s questions, or steer it in a new direction. You can also tell Claude to [watch a pull request](</docs/en/claude-code-on-the-web#auto-fix-pull-requests>) and fix CI failures or review comments as they arrive. To connect GitHub and set up your environment, follow the [web quickstart](</docs/en/web-quickstart>), and see [Claude Code on the web](</docs/en/claude-code-on-the-web>) for everything cloud sessions can do.
+Cloud sessions run tasks on cloud infrastructure, Anthropic-managed by default, so a session continues after you put your phone away. From the Code tab, select a repository and branch, describe the task, and submit it. Sessions persist across devices: a task you start on your laptop is ready to review from your phone, and one you start from your phone is waiting when you’re back at your desk. Open a session in the app to check progress, answer Claude’s questions, or steer it in a new direction. You can also tell Claude to [watch a pull request](</docs/en/claude-code-on-the-web#auto-fix-pull-requests>) and fix CI failures or review comments as they arrive. To connect GitHub and set up your environment, follow the [cloud quickstart](</docs/en/web-quickstart>), and see [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>) for everything cloud sessions can do.
###
@@ -92,7 +92,7 @@
Related resources
* [Platforms and integrations](</docs/en/platforms>): compare every surface Claude Code runs on
- * [Claude Code on the web](</docs/en/claude-code-on-the-web>): how cloud sessions run and how to move work to and from your terminal
+ * [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>): how cloud sessions run and how to move work to and from your terminal
* [Configure cloud environments](</docs/en/cloud-environments>): network access levels, environment variables, and setup scripts for cloud sessions
* [Remote Control](</docs/en/remote-control>): continue a local session from any device
* [Sessions from Dispatch](</docs/en/desktop#sessions-from-dispatch>): how Dispatch tasks become Code sessions in the Desktop app
--- a/model-config.md
+++ b/model-config.md
@@ -220,12 +220,12 @@
[Server-managed settings](</docs/en/server-managed-settings>) from the admin console| Enforced| Enforced| Enforced| Enforced| Not delivered
[MDM or managed settings files](</docs/en/managed-settings#delivery-mechanisms>)| Enforced| Enforced| Not delivered in Anthropic-hosted environments; in [self-hosted environments](</docs/en/self-hosted-environments>), enforced from the runner image per [how Claude Code combines managed sources](</docs/en/managed-settings#how-claude-code-combines-managed-sources>)| Enforced| Enforced where deployed
- * Cloud sessions, on [Claude Code on the web](</docs/en/claude-code-on-the-web>) or in the Desktop app, run on Anthropic-managed VMs by default: settings deployed to your device do not reach them, so deliver the allowlist through server-managed settings. Sessions your organization routes to a [self-hosted environment](</docs/en/self-hosted-environments>) run on your own compute and also read the managed settings file in the runner image. [How Claude Code combines managed sources](</docs/en/managed-settings#how-claude-code-combines-managed-sources>) says when that file applies. A mid-session model switch in a cloud session is rejected when the requested model is excluded by the allowlist. Server-side rejection at session creation applies to organization model restrictions, not the `availableModels` settings key.
+ * [Cloud sessions](</docs/en/claude-code-on-the-web>), including those you start from the Desktop app, run on Anthropic-managed VMs by default: settings deployed to your device do not reach them, so deliver the allowlist through server-managed settings. Sessions your organization routes to a [self-hosted environment](</docs/en/self-hosted-environments>) run on your own compute and also read the managed settings file in the runner image. [How Claude Code combines managed sources](</docs/en/managed-settings#how-claude-code-combines-managed-sources>) says when that file applies. A mid-session model switch in a cloud session is rejected when the requested model is excluded by the allowlist. When the `availableModels` list in your server-managed settings is non-empty, the server rejects a user’s request to start a cloud session on a model the list excludes.
* Cowork, the agentic-work tab in the Claude Desktop app, runs its sessions on Claude Code but, by design, does not receive server-managed settings from the claude.ai admin console. A managed settings file applies to Cowork sessions when it is present where the session runs; remote Cowork sessions run on Anthropic-managed VMs, where a device-deployed file is not present.
* Sessions on [third-party providers](</docs/en/server-managed-settings#platform-availability>) such as Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>) do not receive server-managed settings, so deliver the allowlist through MDM or managed settings files there.
* Server-managed delivery also requires the session to authenticate with an [eligible login or key](</docs/en/server-managed-settings#platform-availability>). Fleets that generate keys only through an [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>) script should deliver the allowlist through MDM or managed settings files.
* The Desktop Code tab also hosts [SSH sessions](</docs/en/desktop#ssh-sessions>), which read the managed settings file from the remote host they run on. See [Desktop managed settings](</docs/en/desktop#managed-settings>).
- * The model pickers on claude.ai and in the Desktop app hide or grey out models excluded by your organization’s allowlist. The picker state is a convenience for users; enforcement happens in the session.
+ * The model pickers on claude.ai and in the Desktop app hide or grey out models excluded by your organization’s allowlist. The picker state is a convenience for users; it doesn’t enforce the allowlist.
###
@@ -298,7 +298,7 @@
Organization model restrictions
-Organization admins on Claude Enterprise plans restrict which models members can run by disabling individual models in the claude.ai admin console. This restriction is delivered with the account’s entitlements when Claude Code authenticates, separate from any `availableModels` list in settings, and the server enforces the same restriction independently when a session is created. Requires Claude Code v2.1.187 or later. The restriction applies when a member signs in or uses their own API key. Organization-scoped credentials, such as organization service keys, are not tied to a user, so the restriction does not apply to them. The Claude Console has no model restriction control. Organizations without a Claude Enterprise plan, including those whose members authenticate through the Anthropic API, restrict models with `availableModels` in [managed settings](</docs/en/managed-settings>) instead, adding `enforceAvailableModels` to cover the Default option. These settings are enforced by Claude Code itself, not by the server. A restricted model is hidden from the `/model` picker. Selecting it by name with `--model`, the `ANTHROPIC_MODEL` environment variable, or the `model` setting shows the notice `Model "<name>" is restricted by your organization's settings. Using <model> instead.` and the session starts on an allowed model. Typing `/model <name>` for a restricted model is rejected with `Model '<name>' is restricted by your organization's settings. Run /model to choose a different model.` and the session keeps its current model. A model family alias such as `opus` resolves to its usual model when the organization permits it. When the organization restricts that model, Claude Code substitutes the newest version of the family that the organization permits, with the same substitution notice. `/model <alias>` is rejected only when every version of its family is restricted; an alias set with `--model`, `ANTHROPIC_MODEL`, or the `model` setting is still replaced at startup in that case. Before v2.1.205, a family alias was substituted or rejected based on its newest released version alone, even when an older version was allowed. Restrictions apply org-wide or per role:
+Organization admins on Claude Enterprise plans restrict which models members can run by disabling individual models in the claude.ai admin console. This restriction is delivered with the account’s entitlements when Claude Code authenticates, separate from any `availableModels` list in settings, and the server enforces the same restriction independently when a session is created. Requires Claude Code v2.1.187 or later. The restriction applies when a member signs in or uses their own API key. Organization-scoped credentials, such as organization service keys, are not tied to a user, so the restriction does not apply to them. The Claude Console has no model restriction control. Organizations without a Claude Enterprise plan, including those whose members authenticate through the Anthropic API, restrict models with `availableModels` in [managed settings](</docs/en/managed-settings>) instead, adding `enforceAvailableModels` to cover the Default option. Surface coverage says how each surface receives and enforces these settings. A restricted model is hidden from the `/model` picker. Selecting it by name with `--model`, the `ANTHROPIC_MODEL` environment variable, or the `model` setting shows the notice `Model "<name>" is restricted by your organization's settings. Using <model> instead.` and the session starts on an allowed model. Typing `/model <name>` for a restricted model is rejected with `Model '<name>' is restricted by your organization's settings. Run /model to choose a different model.` and the session keeps its current model. A model family alias such as `opus` resolves to its usual model when the organization permits it. When the organization restricts that model, Claude Code substitutes the newest version of the family that the organization permits, with the same substitution notice. `/model <alias>` is rejected only when every version of its family is restricted; an alias set with `--model`, `ANTHROPIC_MODEL`, or the `model` setting is still replaced at startup in that case. Before v2.1.205, a family alias was substituted or rejected based on its newest released version alone, even when an older version was allowed. Restrictions apply org-wide or per role:
* Disabling a model at the organization level removes it for every member.
* Role-level access grants different models to different custom roles, and a member who holds several roles can use any model that one of their roles grants.
@@ -423,7 +423,7 @@
* When the flagged category has no fallback model, such as a biology flag on Opus 5, Claude Code doesn’t show the prompt and the request ends with the refusal.
* If both models flag the same request, you can edit the prompt and retry, or start a new session.
- * On mobile [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions, editing and retrying is not supported. Switch models, or continue the session from a desktop browser or the desktop app.
+ * In [cloud sessions](</docs/en/claude-code-on-the-web>) on the mobile app, editing and retrying is not supported. Switch models, or continue the session from a desktop browser or the desktop app.
* In [non-interactive mode](</docs/en/cli-reference#cli-flags>) and SDK integrations that can’t show the prompt, a flagged request ends the turn with a refusal instead.
* When the fallback target is blocked by `availableModels`, Claude Code doesn’t show the prompt. The flagged request ends with the refusal, the same as automatic fallback when the target is blocked.
--- a/network-config.md
+++ b/network-config.md
@@ -226,7 +226,7 @@
GitHub allow lists and firewalls
-[Claude Code on the web](</docs/en/claude-code-on-the-web>) in Anthropic-hosted environments and [Code Review](</docs/en/code-review>) connect to your repositories from Anthropic-managed infrastructure; sessions in a [self-hosted environment](</docs/en/self-hosted-environments>) connect from inside your network, unless the runner opts into the [Anthropic git proxy](</docs/en/self-hosted-environments-deploy#use-the-anthropic-git-proxy>), which fetches from Anthropic’s side. If your GitHub Enterprise Cloud organization restricts access by IP address, enable [IP allow list inheritance for installed GitHub Apps](<https://docs.github.com/en/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization#allowing-access-by-github-apps>) and also [add an allow list entry](<https://docs.github.com/en/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization#adding-an-allowed-ip-address>) for Anthropic’s [outbound IP addresses](<https://platform.claude.com/docs/en/api/ip-addresses#outbound-ip-addresses>). Inheritance covers only the requests the Claude GitHub App makes as an installation, not the requests it makes on your users’ behalf. For other firewalls, see the [Anthropic API IP addresses](<https://platform.claude.com/docs/en/api/ip-addresses>). For self-hosted [GitHub Enterprise Server](</docs/en/github-enterprise-server>) instances behind a firewall, allowlist Anthropic’s [outbound IP addresses](<https://platform.claude.com/docs/en/api/ip-addresses#outbound-ip-addresses>) so Anthropic infrastructure can reach your GHES host to clone repositories and post review comments. Sessions in a [self-hosted environment](</docs/en/self-hosted-environments-deploy#configure-git>) reach your GHES host from inside your network instead, so that exposure applies only to Anthropic-hosted sessions, to hosted pre-session flows such as the repository picker, and to self-hosted runners that opt into the [Anthropic git proxy](</docs/en/self-hosted-environments-deploy#use-the-anthropic-git-proxy>), which fetches from Anthropic’s side. For a GHES host that’s only routable inside your network, the [SCM connector](</docs/en/self-hosted-environments-reference#scm-connector-flags>) carries the hosted pre-session flows over an outbound connection instead, so the allowlist isn’t needed for them.
+[Cloud sessions](</docs/en/claude-code-on-the-web>) in Anthropic-hosted environments and [Code Review](</docs/en/code-review>) connect to your repositories from Anthropic-managed infrastructure; sessions in a [self-hosted environment](</docs/en/self-hosted-environments>) connect from inside your network, unless the runner opts into the [Anthropic git proxy](</docs/en/self-hosted-environments-deploy#use-the-anthropic-git-proxy>), which fetches from Anthropic’s side. If your GitHub Enterprise Cloud organization restricts access by IP address, enable [IP allow list inheritance for installed GitHub Apps](<https://docs.github.com/en/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization#allowing-access-by-github-apps>) and also [add an allow list entry](<https://docs.github.com/en/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization#adding-an-allowed-ip-address>) for Anthropic’s [outbound IP addresses](<https://platform.claude.com/docs/en/api/ip-addresses#outbound-ip-addresses>). Inheritance covers only the requests the Claude GitHub App makes as an installation, not the requests it makes on your users’ behalf. For other firewalls, see the [Anthropic API IP addresses](<https://platform.claude.com/docs/en/api/ip-addresses>). For self-hosted [GitHub Enterprise Server](</docs/en/github-enterprise-server>) instances behind a firewall, allowlist Anthropic’s [outbound IP addresses](<https://platform.claude.com/docs/en/api/ip-addresses#outbound-ip-addresses>) so Anthropic infrastructure can reach your GHES host to clone repositories and post review comments. Sessions in a [self-hosted environment](</docs/en/self-hosted-environments-deploy#configure-git>) reach your GHES host from inside your network instead, so that exposure applies only to Anthropic-hosted sessions, to hosted pre-session flows such as the repository picker, and to self-hosted runners that opt into the [Anthropic git proxy](</docs/en/self-hosted-environments-deploy#use-the-anthropic-git-proxy>), which fetches from Anthropic’s side. For a GHES host that’s only routable inside your network, the [SCM connector](</docs/en/self-hosted-environments-reference#scm-connector-flags>) carries the hosted pre-session flows over an outbound connection instead, so the allowlist isn’t needed for them.
###
Show diff (179 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -17,7 +17,7 @@
`dontAsk`| Reads and pre-approved tools; anything that would prompt is denied| Locked-down CI and scripts
`bypassPermissions`| Everything| Isolated containers and VMs only
-The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. The Manual label and the `manual` alias require Claude Code v2.1.200 or later. The desktop app’s label doesn’t depend on your CLI version. Writes to protected paths are never auto-approved except in `bypassPermissions` mode and in plan-mode sessions where bypass permissions are available, meaning sessions started in a way that puts `bypassPermissions` in the mode cycle. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules block in every mode, including `bypassPermissions`. Deny and ask rules don’t apply to [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) as long as Claude still has at least one other tool it can call. Allow rules have no effect in `bypassPermissions`.
+The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. The Manual label and the `manual` alias require Claude Code v2.1.200 or later. The desktop app’s label doesn’t depend on your CLI version. Writes to protected paths are never auto-approved except in `bypassPermissions` mode and in plan-mode sessions where bypass permissions are available, meaning interactive terminal sessions started in a way that puts `bypassPermissions` in the mode cycle. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules block in every mode, including `bypassPermissions`. Deny and ask rules don’t apply to [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) as long as Claude still has at least one other tool it can call. Allow rules have no effect in `bypassPermissions`.
###
@@ -32,7 +32,7 @@
* Tools that require user interaction: the built-in `AskUserQuestion` tool and MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>)
* `rm` and `rmdir` removals targeting a critical path, which no allow rule or `PreToolUse` hook `"allow"` approves
* The cross-session messaging safeguards
- * Reads outside the working directories while [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is on: recognized file-reading Bash commands and any [unsandboxed retry](</docs/en/sandboxing#the-unsandboxed-retry-escape-hatch>) that needs approval to run outside the sandbox prompt even in auto mode and `bypassPermissions` mode. Requires Claude Code v2.1.257 or later
+ * Reads outside the working directories while [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is on: recognized file-reading Bash commands prompt even in auto mode and `bypassPermissions` mode, and so does any [unsandboxed retry](</docs/en/sandboxing#the-unsandboxed-retry-escape-hatch>) that needs approval to run outside the sandbox. Requires Claude Code v2.1.257 or later. A command the shell parser can’t trace, such as one that changes directory more than once or runs a subshell, prompts the same way even when it names no outside path. This prompt doesn’t apply when the command runs in the [sandbox](</docs/en/sandboxing>) and the sandbox enforces the block.
##
@@ -48,10 +48,10 @@
Iterate locally with fewer prompts, without a classifier| Manual mode plus the Bash sandbox in [auto-allow mode](</docs/en/sandboxing#sandbox-modes>): `claude --permission-mode default`, then run `/sandbox` and select auto-allow| The built-in Bash sandbox, on macOS, Linux, and WSL2| Deny rules still apply, and ask rules that name a command, such as `Bash(git push *)`, still prompt. To turn the sandbox on from a settings file instead, set [`sandbox.enabled`](</docs/en/settings-reference#sandbox-enabled>) to `true`
Explore before changing anything| `claude --permission-mode plan`| None| Claude Code blocks edits until you approve a plan
Work hands-off in auto mode| `claude --permission-mode auto`, the built-in starting permission mode on Pro, Max, and Team| None; a sandbox or container adds defense in depth| Requires a supported model, and your organization can turn auto mode off
-Run in CI with an exact allowlist| `claude -p "run the test suite" --permission-mode dontAsk --allowedTools "Bash(npm test)" "Read"`| None beyond what your CI runner provides| [Claude Code on the web](</docs/en/claude-code-on-the-web>) ignores `dontAsk` from settings files
-Run fully unattended inside a container| `claude -p "<prompt>" --dangerously-skip-permissions`| Required: a container, VM, or the [sandbox runtime](</docs/en/sandbox-environments#sandbox-runtime>); on Linux and macOS, run it as a non-root user| Claude Code on the web ignores this mode from settings files. In this `-p` run, the few calls that would still prompt are denied instead
-
-The Bash sandbox and auto mode work independently and combine, except in plan mode, where [auto-allow doesn’t widen approvals](</docs/en/sandboxing#sandbox-modes>). For the full interaction, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>) and [How isolation relates to permission modes](</docs/en/sandbox-environments#how-isolation-relates-to-permission-modes>).
+Run in CI with an exact allowlist| `claude -p "run the test suite" --permission-mode dontAsk --allowedTools "Bash(npm test)" "Read"`| None beyond what your CI runner provides| [Cloud sessions](</docs/en/claude-code-on-the-web>) ignore `dontAsk` from settings files
+Run fully unattended inside a container| `claude -p "<prompt>" --dangerously-skip-permissions`| Required: a container, VM, or the [sandbox runtime](</docs/en/sandbox-environments#sandbox-runtime>); on Linux and macOS, run it as a non-root user| Cloud sessions ignore this mode from settings files. In this `-p` run, the few calls that would still prompt are denied instead
+
+The Bash sandbox and auto mode work independently and combine, with the exceptions listed under [Sandbox modes](</docs/en/sandboxing#sandbox-modes>). For the full interaction, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>) and [How isolation relates to permission modes](</docs/en/sandbox-environments#how-isolation-relates-to-permission-modes>).
##
@@ -169,7 +169,7 @@
Use the mode dropdown next to the prompt box on [claude.ai/code](<https://claude.ai/code>) or in the mobile app. Permission prompts appear in claude.ai for approval. Which modes appear depends on where the session runs:
- * **Cloud sessions** on [Claude Code on the web](</docs/en/claude-code-on-the-web>): Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: cloud sessions pre-approve file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions isn’t available.
+ * **[Cloud sessions](</docs/en/claude-code-on-the-web>)** : Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: cloud sessions pre-approve file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions isn’t available.
* **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, and Plan. You can’t select Auto or Bypass permissions from the app.
* Except for Bypass permissions, the dropdown shows the permission mode the local session is in, including one set from the terminal. It updates when the permission mode changes in the app or in the terminal. The session never reports Bypass permissions to claude.ai, so switching into it from the terminal doesn’t change what the dropdown shows.
* Sessions hosted by the [desktop app](</docs/en/desktop>) or the [VS Code extension](</docs/en/vs-code>) report permission mode changes to claude.ai as they happen, the same as sessions hosted in a terminal.
@@ -195,7 +195,7 @@
Analyze before you edit with plan mode
-Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Except in sessions with bypass permissions available, edits stay blocked until you approve the plan. When [auto mode](</docs/en/auto-mode-config>) is available and the `useAutoModeDuringPlan` setting is on, which it is by default, the classifier reviews shell commands during planning instead of prompting you. Approved commands run, and rejected ones are blocked. Otherwise, commands outside the [built-in read-only set](</docs/en/permissions#read-only-commands>) prompt for approval, including when the sandbox’s [auto-allow mode](</docs/en/sandboxing#sandbox-modes>) is enabled. In sessions with bypass permissions available, neither the classifier nor a prompt applies to planning commands; Skip all checks with bypassPermissions mode covers the few things that still prompt there. In v2.1.212 through v2.1.217, sessions without bypass permissions prompted for every command outside the read-only set, whether or not auto mode was available. Enter plan mode by pressing `Shift+Tab` or prefixing a single prompt with `/plan`. You can also start in plan mode from the CLI:
+Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Except in interactive terminal sessions with bypass permissions available, edits stay blocked until you approve the plan. When [auto mode](</docs/en/auto-mode-config>) is available and the `useAutoModeDuringPlan` setting is on, which it is by default, the classifier reviews shell commands during planning instead of prompting you. Approved commands run, and rejected ones are blocked. Otherwise, commands outside the [built-in read-only set](</docs/en/permissions#read-only-commands>) prompt for approval, including when the sandbox’s [auto-allow mode](</docs/en/sandboxing#sandbox-modes>) is enabled. In interactive terminal sessions with bypass permissions available, neither the classifier nor a prompt applies to planning commands; Skip all checks with bypassPermissions mode covers the few things that still prompt there. In v2.1.212 through v2.1.217, sessions without bypass permissions prompted for every command outside the read-only set, whether or not auto mode was available. Enter plan mode by pressing `Shift+Tab` or prefixing a single prompt with `/plan`. You can also start in plan mode from the CLI:
claude --permission-mode plan
@@ -249,6 +249,14 @@
Auto mode on Bedrock, Agent Platform, or Foundry
On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the permission mode a session starts in: on these providers, terminal sessions start in your [`defaultMode`](</docs/en/settings-reference#permissions-defaultmode>), which is Manual unless you change it, and conversations in the [VS Code extension](</docs/en/vs-code>) start in Manual unless `claudeCode.initialPermissionMode` or a mode you picked in the extension sets one. Only Claude Sonnet 5, Opus 4.7 or later, and the Fable models are supported on these providers. To make auto mode the default starting permission mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. In sessions the VS Code extension starts, select **Auto** from the mode indicator instead. Switch permission modes covers what outranks that pick. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
+
+####
+
+
+
+Server-side classifier review
+
+On Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, Claude Code reviews auto mode actions with its own classifier requests by default. To have the platform’s server-side classifier review the actions that go to the classifier as part of the session’s model requests instead, set [`CLAUDE_CODE_AUTO_MODE_SERVER=1`](</docs/en/env-vars>). Where the platform runs the classifier, its verdicts decide those actions; where it doesn’t, Claude Code falls back to its own classifier requests. In v2.1.271 and v2.1.272, asking the platform was the default on these providers.
###
@@ -266,7 +274,7 @@
* Modifying shared infrastructure
* Irreversibly destroying files that existed before the session
* Force push
- * Committing or pushing a change that would send secrets or sensitive data outside the repository when it runs, or widen what a deploy exposes. This covers a CI workflow or deploy configuration that hands a secret to a destination that doesn’t already receive it, a script or setup step that reads a secret store and sends the data out, and a config change that widens what a deploy publishes, such as a registry, visibility, artifact, or sourcemap setting. The check applies on any branch, applies even when the repository is public, and fires when the change lands, whether or not that landing triggers the pipeline; clearing it requires naming the execution effect, not only the commit or push. Before v2.1.211, this check was scoped to the default branch instead: a push there was blocked when it carried sensitive content, changes concealed or misdescribed relative to what you asked for, content ported in from outside the repository, or routed around a review you asked for
+ * Committing or pushing a change that would send secrets or sensitive data outside the repository when it runs, or widen what a deploy exposes. This covers a CI workflow or deploy configuration that passes a secret to a destination that doesn’t already receive it, a script or setup step that reads a secret store and sends the data out, and a config change that widens what a deploy publishes, such as a registry, visibility, artifact, or sourcemap setting. The check applies on any branch, applies even when the repository is public, and fires when the change is committed or pushed, whether or not that commit or push triggers the pipeline; clearing it requires naming the execution effect, not only the commit or push. Before v2.1.211, this check was scoped to the default branch instead: a push there was blocked when it carried sensitive content, changes concealed or misdescribed relative to what you asked for, content ported in from outside the repository, or routed around a review you asked for
* `git reset --hard`, `git checkout -- .`, `git restore .`, `git clean -fd`, `git stash drop`, or `git stash clear`, which the classifier presumes would discard uncommitted changes
* `git commit --amend` when the commit at HEAD was not created in this session
* From v2.1.198, `git commit --amend` when the commit at HEAD has already been pushed. A message-only reword is not blocked: `--amend -m` with nothing newly staged, on a commit that Claude created during this session
@@ -341,14 +349,7 @@
* Sending data to the trusted domains, buckets, and services you list in [`environment`](</docs/en/auto-mode-config#define-trusted-infrastructure>). This covers data flow only, not destructive or credential operations on the same infrastructure
* [Claude in Chrome](</docs/en/chrome>) navigation to a trusted internal domain, localhost, or a URL you named
-Sandbox network access requests are routed through the classifier rather than allowed by default. As of v2.1.198, the classifier reuses its verdict for a network host and port instead of re-running on every connection:
-
- * An allow is reused until new content enters the conversation, at which point that host is checked again
- * Claude Code v2.1.234 and later reuse a deny caused by the conversation outgrowing the classifier’s context window until new content enters the conversation, or until [compaction](</docs/en/costs#reduce-token-usage>) shrinks what the classifier reads. Claude Code then checks the host again
- * A deny that the classifier reached by evaluating the request lasts for the turn in the interactive CLI. In [non-interactive mode](</docs/en/headless>) and Agent SDK sessions, Claude Code reuses that deny for the rest of the run, because those sessions have no turn boundary
- * Changing your permission mode or rules drops all cached verdicts
-
-Run `claude auto-mode defaults` to print the full rule lists as JSON. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>). Pushing to any branch of the repository you’re working in and creating a pull request that matches your request run without a prompt, unless the push or pull request falls under the blocked list, such as secrets or sensitive data leaving the repository, or a pull request that targets a different repository or organization. To require a human checkpoint before these commands while staying in auto mode, add `permissions.ask` rules, which match the command [as written](</docs/en/permissions#bash-rule-limits>): see [Common boundaries](</docs/en/auto-mode-config#common-boundaries>).
+Sandboxed commands don’t get network access by default. Claude names the hosts a command needs on the command itself, the classifier reviews them with the command, and an approved list opens those hosts for that one command alone. [Per-command allowed domains](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) covers what a list can and can’t open and what happens when a command reaches for an unlisted host. Run `claude auto-mode defaults` to print the full rule lists as JSON. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>). Pushing to any branch of the repository you’re working in and creating a pull request that matches your request run without a prompt, unless the push or pull request falls under the blocked list, such as secrets or sensitive data leaving the repository, or a pull request that targets a different repository or organization. To require a human checkpoint before these commands while staying in auto mode, add `permissions.ask` rules, which match the command [as written](</docs/en/permissions#bash-rule-limits>): see [Common boundaries](</docs/en/auto-mode-config#common-boundaries>).
###
@@ -389,7 +390,11 @@
Each action goes through a fixed decision order. The first matching step wins:
- 1. Actions matching your [allow, ask, or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately. Writes to protected paths route to the classifier even when an allow rule matches, and so do `rm` and `rmdir` removals targeting a critical path in Claude Code v2.1.218 and later. MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) prompt you directly even when an allow rule matches, and so do connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. Ask rules that match on a command’s content, such as `Bash(git push *)`, fall back to a permission prompt
+ 1. Actions matching your [allow, ask, or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately, with these exceptions:
+ * Writes to protected paths route to the classifier even when an allow rule matches, and so do `rm` and `rmdir` removals targeting a critical path in Claude Code v2.1.218 and later
+ * MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) prompt you directly even when an allow rule matches, and so do connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code
+ * A shell command that carries [per-command allowed domains](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) also routes to the classifier even when an allow rule matches, because a rule approves the command, not its hosts
+ * Ask rules that match on a command’s content, such as `Bash(git push *)`, fall back to a permission prompt
2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths and the first read outside the working directories, which prompts you
3. Everything else goes to the classifier. The connector tools and `requiresUserInteraction` MCP tools that prompt you directly in step 1 never reach the classifier, so neither an org-required approval nor a consent step is auto-approved
4. If the classifier blocks, Claude receives the reason and tries an alternative. In most sessions the reason names the rule the classifier matched, such as `[Data Exfiltration]`, rather than giving a written explanation; see [Review denials](</docs/en/auto-mode-config#review-denials>)
@@ -402,7 +407,7 @@
* `Agent` allow rules
* [`Monitor`](</docs/en/tools-reference#monitor-tool>) allow rules, because Claude Code runs Monitor commands through the shell
-Narrow rules like `Bash(npm test)` stay in effect. Claude Code restores the dropped rules when you leave auto mode. Before v2.1.236, Claude Code left `Monitor` allow rules in effect in auto mode, so a rule that matched the whole tool approved Monitor commands without classifier review.Claude Code also runs `git status` itself before a command that would discard uncommitted work, such as `git reset --hard` or `rm -rf`, and shows the classifier whether staged, modified, or untracked work is present. Claude Code reports untracked files in that check even when the repository’s git configuration sets `status.showUntrackedFiles=no`.The classifier sees user messages, tool calls other than read-only lookups such as file reads and searches, and your CLAUDE.md content. Tool results are stripped, so hostile content in a file or web page can’t manipulate it directly. You can annotate a call’s result with a [PostToolUse hook’s `classifierContext` field](</docs/en/hooks#annotate-a-result-for-the-auto-mode-classifier>), which the classifier reads as application-provided context.A separate server-side probe scans incoming tool results and flags suspicious content before Claude reads it. For more on how these layers work together, see the [auto mode announcement](<https://claude.com/blog/auto-mode>) and the [engineering deep dive](<https://www.anthropic.com/engineering/claude-code-auto-mode>).
+Narrow rules like `Bash(npm test)` stay in effect. Claude Code restores the dropped rules when you leave auto mode. Before v2.1.236, Claude Code left `Monitor` allow rules in effect in auto mode, so a rule that matched the whole tool approved Monitor commands without classifier review.Claude Code also runs `git status` itself before a command that would discard uncommitted work, such as `git reset --hard` or `rm -rf`, and shows the classifier whether staged, modified, or untracked work is present. Claude Code reports untracked files in that check even when the repository’s git configuration sets `status.showUntrackedFiles=no`.In the classifier requests sent by Claude Code itself, the classifier sees user messages, tool calls other than read-only lookups such as file reads and searches, and your CLAUDE.md content. Tool results are stripped from those requests, so hostile content in a file or web page can’t manipulate the classifier directly.You can annotate a call’s result with a [PostToolUse hook’s `classifierContext` field](</docs/en/hooks#annotate-a-result-for-the-auto-mode-classifier>), which the classifier reads as application-provided context. The field requires Claude Code v2.1.236 or later.A separate server-side probe scans incoming tool results and flags suspicious content before Claude reads it. For more on how these layers work together, see the [auto mode announcement](<https://claude.com/blog/auto-mode>) and the [engineering deep dive](<https://www.anthropic.com/engineering/claude-code-auto-mode>).
How auto mode handles subagents
@@ -410,13 +415,13 @@
1. Before a subagent starts, the delegated task description is evaluated, so a dangerous-looking task is blocked at spawn time.
2. While the subagent runs, each of its actions goes through the classifier with the same rules as the parent session, and any `permissionMode` in the subagent’s frontmatter is ignored.
- 3. When the subagent finishes, the classifier reviews its full action history; if that return check flags a concern, a security warning is prepended to the subagent’s results. When a separate API safety check refuses the review request itself, Claude Code still returns the subagent’s results, prepended with a warning that the work is unreviewed and should be treated as untrusted.
+ 3. When the subagent finishes, the classifier reviews its work and its final report before the parent reads the report. When the classifier flags the subagent’s work or report, or a separate API safety check refuses the review, the report is still delivered, prepended with a security warning. When the classifier is unavailable for the review, the report arrives with a note to verify the subagent’s work before acting on it.
Step 1 requires Claude Code v2.1.178 or later. Earlier versions applied the classifier at steps 2 and 3, but did not evaluate the task description before the subagent started.
Cost and latency
-The classifier runs on Claude Sonnet 5 by default rather than on your `/model` selection. A classifier model that Anthropic configures server-side takes precedence over that default. When your session’s model is Claude Sonnet 4.6, or when [`availableModels`](</docs/en/model-config#restrict-model-selection>) excludes Sonnet 5, the classifier runs on the session’s model instead, or on an Opus model when the session runs on a [Fable model](</docs/en/model-config#work-with-fable>); on providers other than the Anthropic API, that Opus fallback is the provider’s default Opus model.The session’s first auto-mode request validates the Sonnet 5 default: if the request succeeds, Sonnet 5 stays the session’s classifier model, and if it fails because the model isn’t available, the session uses the fallback instead. After that validation settles, the classifier’s model doesn’t change for the session.On Enterprise plans and on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations.The classifier reuses a sandbox network verdict for a host and port, so repeated connections to the same host don’t each add a check. What the classifier blocks by default describes how long an allow and a deny last.
+The classifier runs on Claude Sonnet 5 by default rather than on your `/model` selection. A classifier model that Anthropic configures server-side takes precedence over that default. When your session’s model is Claude Sonnet 4.6, or when [`availableModels`](</docs/en/model-config#restrict-model-selection>) excludes Sonnet 5, the classifier runs on the session’s model instead, or on an Opus model when the session runs on a [Fable model](</docs/en/model-config#work-with-fable>); on providers other than the Anthropic API, that Opus fallback is the provider’s default Opus model.The session’s first auto-mode request validates the Sonnet 5 default: if the request succeeds, Sonnet 5 stays the session’s classifier model, and if it fails because the model isn’t available, the session uses the fallback instead. After that validation settles, the classifier’s model doesn’t change for the session.On Enterprise plans and on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations. On Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, you can move the review into the session’s model requests instead; see Server-side classifier review.Sandboxed network access adds no per-connection classifier requests. The classifier judges [the hosts a command names](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) together with the command in one review, and Claude Code checks each connection against the approved list without calling the classifier again.
##
@@ -424,7 +429,7 @@
Allow only pre-approved tools with dontAsk mode
-If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you. Claude still runs actions that need no approval in Manual mode, such as file reads inside your working directories and [read-only Bash commands](</docs/en/permissions#read-only-commands>), plus actions matching your `permissions.allow` rules and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>). Use this mode for CI pipelines or restricted environments where you pre-define what Claude may do; the session never waits for input. The status bar shows `⏵⏵ don't ask on` while this mode is active. Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>) rather than prompting. It also denies the built-in `AskUserQuestion` tool even if your allow rules match it, and does the same to connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. It denies MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) the same way, because their approval card needs an answer this mode never collects; this requires Claude Code v2.1.199 or later. `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` and `rm -rf ~`, are denied even when an allow rule matches them or a `PreToolUse` hook allows them. Cloud sessions on [Claude Code on the web](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
+If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you. Claude still runs actions that need no approval in Manual mode, such as file reads inside your working directories and [read-only Bash commands](</docs/en/permissions#read-only-commands>), plus actions matching your `permissions.allow` rules and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>). Use this mode for CI pipelines or restricted environments where you pre-define what Claude may do; the session never waits for input. The status bar shows `⏵⏵ don't ask on` while this mode is active. Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>) rather than prompting. It also denies the built-in `AskUserQuestion` tool even if your allow rules match it, and does the same to connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. It denies MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) the same way, because their approval card needs an answer this mode never collects; this requires Claude Code v2.1.199 or later. `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` and `rm -rf ~`, are denied even when an allow rule matches them or a `PreToolUse` hook allows them. [Cloud sessions](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
claude --permission-mode dontAsk
@@ -434,12 +439,12 @@
Skip all checks with bypassPermissions mode
-`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. The actions no mode auto-approves still prompt in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in plan-mode sessions where bypass permissions are available:
+`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. The actions no mode auto-approves still prompt in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in interactive terminal plan-mode sessions where bypass permissions are available:
* The [`isolatePeerMachines`](</docs/en/settings-reference#isolatepeermachines>) approval prompt for messages to your sessions beyond this machine still appears.
* When no [`crossSessionInbound`](</docs/en/cross-session-messaging#control-inbound-messages>) value applies, Claude Code holds an inbound message from another of your sessions for your approval, and delivers without asking only when the sending session identifies itself as also bypassing permission prompts. If you leave the permission mode while messages are held, Claude Code re-applies the inbound rules and delivers any held message they now accept.
-In sessions with bypass permissions available, Claude Code also doesn’t enforce plan mode’s blocks. Claude is still instructed to plan without editing, but a file edit or shell command it attempts during planning runs without prompting. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and `rm` and `rmdir` removals targeting a critical path still prompt.
+In interactive terminal sessions with bypass permissions available, Claude Code also doesn’t enforce plan mode’s blocks. Claude is still instructed to plan without editing, but a file edit or shell command it attempts during planning runs without prompting. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and `rm` and `rmdir` removals targeting a critical path still prompt. Plan mode keeps its blocks wherever Claude Code runs without an interactive terminal, including [non-interactive runs](</docs/en/headless>) with `-p`, [Agent SDK](</docs/en/agent-sdk/permissions#plan-mode-plan>) sessions, and conversations in the [VS Code extension](</docs/en/vs-code>)’s chat panel. There, `--allow-dangerously-skip-permissions` makes `bypassPermissions` selectable later.
Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system.
@@ -451,7 +456,7 @@
--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons
-The check is skipped automatically inside a recognized sandbox. To run autonomously in a container, use the [dev container](</docs/en/devcontainer>) configuration, which runs Claude Code as a non-root user. [Claude Code on the web](</docs/en/claude-code-on-the-web>) does not honor `defaultMode: "bypassPermissions"` or `"dontAsk"` from your settings files, so a repository’s checked-in settings cannot start a cloud session in bypass-permissions mode. The setting is ignored silently and the session starts in the permission mode shown in the mode dropdown instead. See Switch permission modes for which modes cloud sessions offer.
+The check is skipped automatically inside a recognized sandbox. To run autonomously in a container, use the [dev container](</docs/en/devcontainer>) configuration, which runs Claude Code as a non-root user. [Cloud sessions](</docs/en/claude-code-on-the-web>) don’t honor `defaultMode: "bypassPermissions"` or `"dontAsk"` from your settings files, so a repository’s checked-in settings can’t start a cloud session in bypass-permissions mode. The setting is ignored silently and the session starts in the permission mode shown in the mode dropdown instead. See Switch permission modes for which modes cloud sessions offer.
`bypassPermissions` offers no protection against prompt injection or unintended actions. For background safety checks with far fewer permission prompts, use auto mode instead. Administrators can block this mode by setting `permissions.disableBypassPermissionsMode` to `"disable"` in [managed settings](</docs/en/managed-settings>).
@@ -461,12 +466,12 @@
Protected paths
-Writes to a small set of paths are never auto-approved, except in `bypassPermissions` mode and in planning sessions with bypass permissions available. This prevents accidental corruption of repository state and Claude’s own configuration.
+Writes to a small set of paths are never auto-approved, except in `bypassPermissions` mode and in interactive terminal sessions in plan mode with bypass permissions available. This prevents accidental corruption of repository state and Claude’s own configuration.
Mode| Protected-path writes
---|---
`default`, `acceptEdits`| Prompted
-`plan`| Allowed in sessions with bypass permissions available. Otherwise, routed to the classifier when auto mode is available during planning, and prompted when it isn’t
+`plan`| Allowed in interactive terminal sessions with bypass permissions available. Otherwise, routed to the classifier when auto mode is available during planning, and prompted when it isn’t
`auto`| Routed to the classifier
`dontAsk`| Denied
`bypassPermissions`| Allowed
--- a/permissions.md
+++ b/permissions.md
@@ -271,7 +271,7 @@
Plan mode (`plan`)
-Claude explores the codebase and produces a plan without editing your source files. Read-only tools run as they do in the `default` permission mode. File edits are never auto-approved in plan mode, even when an allow rule matches. They prompt through your `canUseTool` callback instead. On Claude Code v2.1.212 or later, shell commands that modify files, such as `touch` and `rm`, reach your `canUseTool` callback the same way. Claude may use `AskUserQuestion` to clarify requirements before finalizing the plan. See [Handle approvals and user input](</docs/en/agent-sdk/user-input#handle-clarifying-questions>) for handling these prompts. **Use when:** you want Claude to propose changes without executing them, such as during code review or when you need to approve changes before they’re made.
+Claude explores the codebase and produces a plan without editing your source files. Read-only tools run as they do in the `default` permission mode. File edits are never auto-approved in plan mode, even when an allow rule matches. They prompt through your `canUseTool` callback instead. On Claude Code v2.1.212 or later, shell commands that modify files, such as `touch` and `rm`, reach your `canUseTool` callback the same way. If you set `allowDangerouslySkipPermissions: true` alongside `permissionMode: 'plan'`, file edits and shell commands that modify files still reach your `canUseTool` callback. The option lets you switch to `bypassPermissions` later with `setPermissionMode()`. Claude may use `AskUserQuestion` to clarify requirements before finalizing the plan. See [Handle approvals and user input](</docs/en/agent-sdk/user-input#handle-clarifying-questions>) for handling these prompts. **Use when:** you want Claude to propose changes without executing them, such as during code review or when you need to approve changes before they’re made.
##
--- a/platforms.md
+++ b/platforms.md
@@ -73,7 +73,7 @@
* [Desktop](</docs/en/desktop>): visual diff review, parallel sessions, computer use, and Dispatch
* [VS Code](</docs/en/vs-code>): the Claude Code extension inside your editor
* [JetBrains](</docs/en/jetbrains>): the extension for IntelliJ, PyCharm, and other JetBrains IDEs
- * [Claude Code on the web](</docs/en/claude-code-on-the-web>): cloud sessions that keep running when you disconnect
+ * [Web](</docs/en/claude-code-on-the-web>): cloud sessions from your browser at claude.ai/code that keep running when you disconnect
* [Mobile](</docs/en/mobile>): the Claude app for [iOS](<https://apps.apple.com/us/app/claude-by-anthropic/id6473753684>) and [Android](<https://play.google.com/store/apps/details?id=com.anthropic.claude>) for starting and monitoring tasks while away from your computer
###
--- a/plugin-dependencies.md
+++ b/plugin-dependencies.md
@@ -27,7 +27,7 @@
]
}
-An entry can be a bare string with only the plugin name, like `"audit-logger"` in the example above, which depends on whatever version that plugin’s marketplace provides. For more control, use an object with these fields:
+An entry can be a bare string with only the plugin name, like `"audit-logger"` in the `deploy-kit` manifest, which depends on whatever version that plugin’s marketplace provides. For more control, use an object with these fields:
Field| Type| Description
---|---|---
Show diff (129 lines)
--- a/plugin-marketplaces.md
+++ b/plugin-marketplaces.md
@@ -68,7 +68,7 @@
}
}
-Setting `version` means users only receive updates when you change this field, so bump it on every release. A plugin with a `command` source isn’t pinned by this field. If you omit `version`, the version comes from the next source in [version management](</docs/en/plugins-reference#version-management>).
+Setting `version` means users only receive updates when you change this field, so bump it on every release. A plugin with a `command` source isn’t pinned by this field. Neither is a plugin [loaded in place](</docs/en/plugins-reference#plugin-caching-and-file-resolution>) from a marketplace added as a local directory. If you omit `version`, the version comes from the next source in [version management](</docs/en/plugins-reference#version-management>).
4
@@ -111,7 +111,7 @@
To learn more about what plugins can do, including hooks, agents, MCP servers, and LSP servers, see [Plugins](</docs/en/plugins>).
-**How plugins are installed** : when users install a plugin, Claude Code copies the plugin directory to a cache location, except for a `command` source in link mode, which is used in place. Copied plugins can’t reference files outside their directory using paths like `../shared-utils`, because those files won’t be copied.If you need to share files across plugins, use symlinks. See [Plugin caching and file resolution](</docs/en/plugins-reference#plugin-caching-and-file-resolution>) for details.
+**How plugins are installed** : when users install a plugin, Claude Code copies the plugin directory to a cache location, unless the plugin loads in place. A `command` source in link mode loads in place, and so does a relative path source in a marketplace added from a local directory. Copied plugins can’t reference files outside their directory using paths like `../shared-utils`, because those files won’t be copied.If you need to share files across plugins, use symlinks. See [Plugin caching and file resolution](</docs/en/plugins-reference#plugin-caching-and-file-resolution>) for details.
##
@@ -163,8 +163,8 @@
Field| Type| Description| Example
---|---|---|---
`name`| string| Marketplace identifier in kebab-case, with no spaces, control characters, or bidirectional-formatting characters. This is public-facing: users see it when installing plugins (for example, `/plugin install my-tool@your-marketplace`). Each user can register only one marketplace per name: when they add a second marketplace with the same name, Claude Code replaces the first. To publish multiple plugins under one marketplace name, list them all in a single `marketplace.json`.| `"acme-tools"`
-`owner`| object| Marketplace maintainer information (see fields below)|
-`plugins`| array| List of available plugins| See below
+`owner`| object| Marketplace maintainer information. See Owner fields|
+`plugins`| array| List of available plugins| See Plugin entries
**Reserved names** : the following marketplace names are reserved for official Anthropic use and can’t be used by third-party marketplaces: `claude-code-marketplace`, `claude-code-plugins`, `claude-plugins-official`, `claude-plugins-community`, `claude-community`, `anthropic-marketplace`, `anthropic-plugins`, `agent-skills`, `anthropic-agent-skills`, `knowledge-work-plugins`, `life-sciences`, `claude-for-legal`, `claude-for-financial-services`, `financial-services-plugins`, `first-party-plugins`, `claude-tag-plugins`, `healthcare`. Names that impersonate official marketplaces, such as `official-claude-plugins` or `anthropic-plugins-v2`, are also blocked. Reserving these names prevents a third-party marketplace from presenting itself as an Anthropic-published source.Claude Code re-checks reserved names every time it loads a marketplace, not only when you add one. A marketplace that was registered under one of these names before the name became reserved stops loading and reports that it is [registered from an untrusted source](</docs/en/errors#marketplace-is-registered-from-an-untrusted-source>). Remove that marketplace and re-add it from the official Anthropic source. A third-party marketplace affected by a newly reserved name loads again as soon as you re-add it under a different name. Before v2.1.205, `first-party-plugins` and `healthcare` weren’t reserved, and a marketplace already registered under a reserved name kept loading. Before v2.1.265, `claude-tag-plugins` wasn’t reserved.
@@ -228,7 +228,7 @@
---|---|---
`displayName`| string| Human-readable name shown in UI surfaces. When neither the entry nor the plugin’s `plugin.json` sets one, users see the plugin’s `name`. May contain spaces and any casing. Not used for namespacing or lookup.
`description`| string| Brief plugin description
-`version`| string| Plugin version. If set (here or in `plugin.json`), the plugin is pinned to this string and users only receive updates when it changes. A plugin with a `command` source isn’t pinned by either field. If set in neither place, the version comes from the next source in [version management](</docs/en/plugins-reference#version-management>).
+`version`| string| Plugin version. If set (here or in `plugin.json`), the plugin is pinned to this string and users only receive updates when it changes. A plugin with a `command` source isn’t pinned by either field. Neither is a plugin [loaded in place](</docs/en/plugins-reference#plugin-caching-and-file-resolution>) from a marketplace added as a local directory. If set in neither place, the version comes from the next source in [version management](</docs/en/plugins-reference#version-management>).
`author`| object| Plugin author information (`name` required; `email` and `url` optional)
`homepage`| string| Plugin homepage or documentation URL
`repository`| string| Source code repository URL
@@ -270,7 +270,7 @@
Plugin sources
-Plugin sources tell Claude Code where to get each individual plugin listed in your marketplace. These are set in the `source` field of each plugin entry in `marketplace.json`. Claude Code copies each installed plugin into the local versioned plugin cache at `~/.claude/plugins/cache`, except for a `command` source in link mode, which Claude Code uses in place. Claude Code also [installs the plugin’s eligible Node.js package dependencies](</docs/en/plugins-reference#node-js-package-dependencies>) into the cached copy.
+Plugin sources tell Claude Code where to get each individual plugin listed in your marketplace. These are set in the `source` field of each plugin entry in `marketplace.json`. Claude Code copies each installed plugin into the local versioned plugin cache at `~/.claude/plugins/cache`, unless the plugin loads in place. A `command` source in link mode loads in place, and so does a relative path source in a marketplace added from a local directory. Claude Code also [installs the plugin’s eligible Node.js package dependencies](</docs/en/plugins-reference#node-js-package-dependencies>) into the cached copy. See [Plugin caching and file resolution](</docs/en/plugins-reference#plugin-caching-and-file-resolution>) for how a plugin loaded in place from a local-directory marketplace picks up your edits.
Source| Type| Fields| Notes
---|---|---|---
@@ -304,7 +304,7 @@
"source": "./plugins/my-plugin"
}
-Paths resolve relative to the marketplace root, which is the directory containing `.claude-plugin/`. In the example above, `./plugins/my-plugin` points to `<repo>/plugins/my-plugin`, even though `marketplace.json` lives at `<repo>/.claude-plugin/marketplace.json`. Don’t use `../` to reference paths outside the marketplace root. On macOS and Linux, Claude Code refuses an entry path with a backslash anywhere past the leading `./`, so write the separators as `/` on every platform. A bare name is a single directory name with no `/`, such as `"formatter"`. To write bare names instead of `./` paths, set `metadata.pluginRoot` to the directory they resolve under. With `"pluginRoot": "./plugins"`, Claude Code resolves `"source": "formatter"` to `./plugins/formatter`. Requires Claude Code v2.1.239 or later. `metadata.pluginRoot` must itself be a relative path inside the marketplace. Claude Code ignores it for a source that already starts with `./`. A source that contains a `/`, such as `team-a/formatter`, isn’t a bare name and still needs the `./` prefix, even when `metadata.pluginRoot` is set.
+Paths resolve relative to the marketplace root, which is the directory containing `.claude-plugin/`. The source `./plugins/my-plugin` therefore points to `<repo>/plugins/my-plugin`, even though `marketplace.json` lives at `<repo>/.claude-plugin/marketplace.json`. Don’t use `../` to reference paths outside the marketplace root. On macOS and Linux, Claude Code refuses an entry path with a backslash anywhere past the leading `./`, so write the separators as `/` on every platform. A bare name is a single directory name with no `/`, such as `"formatter"`. To write bare names instead of `./` paths, set `metadata.pluginRoot` to the directory they resolve under. With `"pluginRoot": "./plugins"`, Claude Code resolves `"source": "formatter"` to `./plugins/formatter`. Requires Claude Code v2.1.239 or later. `metadata.pluginRoot` must itself be a relative path inside the marketplace. Claude Code ignores it for a source that already starts with `./`. A source that contains a `/`, such as `team-a/formatter`, isn’t a bare name and still needs the `./` prefix, even when `metadata.pluginRoot` is set.
Claude Code resolves relative paths against a local copy of the marketplace, so they work when users add your marketplace from a git source or a local directory. If users add your marketplace via a direct URL to the `marketplace.json` file, relative paths won’t resolve, because Claude Code downloads only that file. For URL-based distribution, use any other plugin source instead. See Troubleshooting for details.
@@ -787,7 +787,7 @@
Private repositories
-Claude Code supports installing plugins from private repositories. If you distribute your marketplace through [**Organization settings > Plugins**](<https://claude.ai/admin-settings/plugins>) instead, your git credentials aren’t involved: organization sync reads the marketplace repository through the Claude GitHub App or your organization’s GitHub Enterprise App, and a plugin source it can’t authenticate to must be public. See Distribute through organization settings for the full rules.
+Claude Code supports installing plugins from private repositories. If you distribute your marketplace through [**Organization settings > Plugins**](<https://claude.ai/admin-settings/plugins>) instead, your git credentials aren’t involved: organization sync reads the marketplace repository through your organization’s GitHub or GitLab connection on claude.ai. See Distribute through organization settings for which plugin sources can be private.
####
@@ -832,12 +832,16 @@
If you distribute plugins through [**Organization settings > Plugins**](<https://claude.ai/admin-settings/plugins>) on a Team or Enterprise plan, these source rules apply:
- * The marketplace repository must be private or internal. Organization sync reads it through the Claude GitHub App or your organization’s GitHub Enterprise App.
+ * On github.com and gitlab.com, the marketplace repository must be private or internal. Organization sync reads the repository through the connection that matches its host:
+ * **github.com** : the Claude GitHub App
+ * **Your GitHub Enterprise Server host** : your organization’s [GitHub Enterprise App](</docs/en/github-enterprise-server#admin-setup>)
+ * **gitlab.com or your self-managed GitLab instance** : the access token in your organization’s GitLab configuration for that host
* Each plugin source must be of type `github`, `url`, or `git-subdir`, or a relative path that starts with `./`. If you list a plugin by bare name under `metadata.pluginRoot`, organization sync rejects it as an unsupported source, so write the path out, such as `./plugins/deploy-tools`.
- * A plugin source can be private in two cases:
+ * A plugin source can be private in three cases:
* A github.com source that shares the marketplace repository’s owner
* A source on your organization’s GitHub Enterprise host with the GHE App installed on the repository
- * Organization sync fetches every other source without credentials, so github.com repositories under a different owner and repositories on other hosts, such as GitLab or Bitbucket, must be public.
+ * A `url` or `git-subdir` source on the same GitLab host as the marketplace repository. On gitlab.com, the source must also be under the same top-level group or user namespace as the marketplace repository.
+ * Any other plugin source must be a public repository on github.com, gitlab.com, or bitbucket.org, which organization sync fetches without credentials. Organization sync rejects plugin sources on hosts these rules don’t cover.
See [Manage plugins for your organization](<https://support.claude.com/en/articles/13837433>) for the admin workflow. To include private plugins, place the plugin folders inside the marketplace repository and reference them with a relative path. Organization sync packages each plugin during distribution, so users never need access to a separate source repository. For example, this `marketplace.json` plugin entry references a plugin you committed at `plugins/deploy-tools` in the marketplace repository:
@@ -845,6 +849,14 @@
"name": "deploy-tools",
"source": "./plugins/deploy-tools"
}
+
+####
+
+
+
+Sync a GitLab-hosted marketplace
+
+To sync a marketplace from gitlab.com or a self-managed GitLab instance, an [Owner](</docs/en/server-managed-settings#access-control>) first adds a GitLab configuration for that host at [**Organization settings > Claude Code**](<https://claude.ai/admin-settings/claude-code>). GitLab configurations are in public beta and apply only to plugin marketplace sync. Adding one doesn’t make GitLab repositories available to [cloud sessions](</docs/en/claude-code-on-the-web#limitations>). See [Manage plugins for your organization](<https://support.claude.com/en/articles/13837433>) for the setup steps. When you add the marketplace, enter the project’s HTTPS URL, such as `https://gitlab.example.com/platform/claude-plugins`. Projects in nested subgroups work. Organization sync reads the project’s default branch. If you turn on **Sync automatically** , only pushes to the default branch start a sync.
####
@@ -1039,7 +1051,7 @@
Plugin versions determine cache paths and update detection: if the resolved version matches what a user already has, `/plugin update` and auto-update skip the plugin. For git-based sources, if you omit `version`, Claude Code uses the source’s resolved commit SHA, so users get an update whenever that commit changes; this is the simplest setup for internal or actively developed plugins. See [Version management](</docs/en/plugins-reference#version-management>) for the full resolution order, including `archive` sources.
-Setting `version` pins the plugin for every source type except `command`, whose version always includes a hash of what the command produced. If you declare `"version": "1.0.0"` in `plugin.json` and push new commits without changing that string, existing users of those sources keep the cached copy, because Claude Code sees the same version. Bump the field on every release, or omit it to fall back to the resolved version.Avoid setting `version` in both `plugin.json` and the marketplace entry. Claude Code always uses the `plugin.json` value without warning, so a stale manifest version can mask a version you set in `marketplace.json`.
+Setting `version` pins the plugin for every source type except `command`, whose version always includes a hash of what the command produced. A plugin [loaded in place](</docs/en/plugins-reference#plugin-caching-and-file-resolution>) from a marketplace added as a local directory isn’t pinned either. If you declare `"version": "1.0.0"` in `plugin.json` and push new commits without changing that string, existing users of those sources keep the cached copy, because Claude Code sees the same version. Bump the field on every release, or omit it to fall back to the resolved version.Avoid setting `version` in both `plugin.json` and the marketplace entry. Claude Code always uses the `plugin.json` value without warning, so a stale manifest version can mask a version you set in `marketplace.json`.
####
@@ -1329,7 +1341,7 @@
`No manifest found in directory. Expected .claude-plugin/marketplace.json or .claude-plugin/plugin.json`| The directory you named has no `.claude-plugin/marketplace.json` or `plugin.json`, and no skill, agent, or command files to check| Run from the marketplace root, or create `.claude-plugin/marketplace.json` with the required fields
`Invalid JSON syntax: Unexpected token...`| JSON syntax error in marketplace.json| Check for missing commas, extra commas, or unquoted strings
`Duplicate plugin name "x" found in marketplace`| Two plugins share the same name| Give each plugin a unique `name` value
-`plugins[0].source: Path contains ".."`| Source path contains `..`| Use paths relative to the marketplace root without `..`. See Relative paths
+`plugins[0].source: Path contains ".."`| A segment of the source path is `..`| Use paths relative to the marketplace root without `..` segments. See Relative paths
`Marketplace name cannot contain control or bidirectional-formatting characters`| The marketplace `name` contains a Unicode bidirectional-formatting character or a control character, such as an escape or a newline| Remove the character from the name. Before v2.1.247, these characters produced the `Marketplace name impersonates an official Anthropic/Claude marketplace` error
`Plugin name cannot contain control or bidirectional-formatting characters`| A plugin `name` contains a Unicode bidirectional-formatting character or a control character, such as an escape or a newline| Remove the character from the name. Before v2.1.247, Claude Code didn’t run this check
@@ -1469,7 +1481,7 @@
Files not found after installation
-**Symptoms** : Plugin installs but references to files fail, especially files outside the plugin directory **Cause** : Plugins are copied to a cache directory rather than used in place, except for a `command` source in link mode. Paths that reference files outside a copied plugin’s directory (such as `../shared-utils`) won’t work because those files aren’t copied. **Solutions** : See [Plugin caching and file resolution](</docs/en/plugins-reference#plugin-caching-and-file-resolution>) for workarounds including symlinks and directory restructuring. For additional debugging tools and common issues, see [Debugging and development tools](</docs/en/plugins-reference#debugging-and-development-tools>).
+**Symptoms** : Plugin installs but references to files fail, especially files outside the plugin directory **Cause** : Claude Code copies installed plugins to a cache directory, unless the plugin loads in place. A `command` source in link mode loads in place, and so does a relative path source in a marketplace added from a local directory. Paths that reference files outside a copied plugin’s directory (such as `../shared-utils`) won’t work because those files aren’t copied. **Solutions** : See [Plugin caching and file resolution](</docs/en/plugins-reference#plugin-caching-and-file-resolution>) for workarounds including symlinks and directory restructuring. For additional debugging tools and common issues, see [Debugging and development tools](</docs/en/plugins-reference#debugging-and-development-tools>).
##
--- a/plugins.md
+++ b/plugins.md
@@ -1,4 +1,4 @@
-Plugins allow you to extend Claude Code with custom functionality that can be shared across projects. Through the Agent SDK, you can programmatically load plugins from local directories to add capabilities to your agent sessions. A plugin can include:
+Plugins let you extend Claude Code with custom functionality that can be shared across projects. Through the Agent SDK, you can programmatically load plugins from local directories to add capabilities to your agent sessions. A plugin can include:
* **Skills** : capabilities Claude invokes autonomously when relevant. You can also invoke a plugin skill directly with `/plugin-name:skill-name`.
* **Agents** : specialized subagents for specific tasks
--- a/plugins-reference.md
+++ b/plugins-reference.md
@@ -24,7 +24,7 @@
└── code-reviewer/
└── SKILL.md
-Skills and commands are automatically discovered when the plugin is installed. If a plugin has no `skills/` directory and no `skills` manifest field, a `SKILL.md` at the plugin root is loaded as a single skill. Set the frontmatter `name` field to control the skill’s invocation name. Without it, Claude Code falls back to the install directory name, which for marketplace-installed plugins is a version string that changes on every update. For plugins that ship more than one skill, use the `skills/` directory layout shown above. In plugin skills and commands, Boolean frontmatter fields such as `disable-model-invocation` accept `yes`, `no`, `on`, `off`, `1`, and `0` in any letter case, in addition to `true` and `false`. Before v2.1.218, Claude Code recognized only `true` and `false`. For complete details, see [Skills](</docs/en/skills>).
+Skills and commands are automatically discovered when the plugin is installed. If a plugin has no `skills/` directory and no `skills` manifest field, a `SKILL.md` at the plugin root is loaded as a single skill. Set the frontmatter `name` field to control the skill’s invocation name. Without it, Claude Code falls back to the install directory name. For a plugin copied into the cache, that name is a version string that changes on every update. For plugins that ship more than one skill, use the `skills/` directory layout shown above. In plugin skills and commands, Boolean frontmatter fields such as `disable-model-invocation` accept `yes`, `no`, `on`, `off`, `1`, and `0` in any letter case, in addition to `true` and `false`. Before v2.1.218, Claude Code recognized only `true` and `false`. For complete details, see [Skills](</docs/en/skills>).
###
@@ -460,7 +460,7 @@
---|---|---|---
`$schema`| string| JSON Schema URL for editor autocomplete and validation. Claude Code ignores this field at load time.| `"https://json.schemastore.org/claude-code-plugin-manifest.json"`
`displayName`| string| Human-readable name shown in the `/plugin` picker and other UI surfaces. For a marketplace-installed plugin, a `displayName` on the [marketplace entry](</docs/en/plugin-marketplaces#optional-plugin-fields>) takes precedence over this value. When no display name is set in either place, users see `name`. Unlike `name`, may contain spaces and any casing. Not used for namespacing or lookup.| `"Deployment Tools"`
-`version`| string| Optional. Semantic version. Setting this pins the plugin to that version string, so users only receive updates when you bump it, except for a [`command` source](</docs/en/plugin-marketplaces#command-sources>); see Version management. If also set in the marketplace entry, `plugin.json` wins. If omitted, the version comes from the next source in Version management.| `"2.1.0"`
+`version`| string| Optional. Semantic version. Setting this pins the plugin to that version string, so users only receive updates when you bump it, except for a [`command` source](</docs/en/plugin-marketplaces#command-sources>) or a plugin loaded in place; see Version management. If also set in the marketplace entry, `plugin.json` wins. If omitted, the version comes from the next source in Version management.| `"2.1.0"`
`description`| string| Brief explanation of plugin purpose| `"Deployment automation tools"`
`author`| object| Author information| `{"name": "Dev Team", "email": "dev@company.com"}`
`homepage`| string| Documentation URL| `"https://docs.example.com"`
@@ -476,7 +476,7 @@
Default enablement
-Set `defaultEnabled: false` in `plugin.json` to ship a plugin that installs disabled. The user turns it on with `claude plugin enable <plugin>` or the `/plugin` interface. Use this for plugins that add cost or scope a user should opt into, such as one that connects to an external service. `defaultEnabled` is the fallback when nothing else has decided the plugin’s state. Two things take precedence over it:
+Set `defaultEnabled: false` in `plugin.json` to ship a plugin that installs disabled. The user turns it on with `claude plugin enable <plugin>` or the `/plugin` interface. Use this for plugins that add cost or scope a user should opt into, such as one that connects to an external service. `defaultEnabled` is the fallback when nothing else has decided the plugin’s state. The user’s setting and a dependency requirement take precedence over it:
* **The user’s setting** : an entry for the plugin in `enabledPlugins` at any settings scope. Once written, it persists across plugin updates and reinstalls, so changing `defaultEnabled` in a later release does not flip an existing user.
* **A dependency requirement** : when a plugin is required by another one that is active, Claude Code writes `true` for it at install or enable time. That gives it an explicit setting, so its own default no longer applies. See [Enable or disable a plugin with dependencies](</docs/en/plugin-dependencies#enable-or-disable-a-plugin-with-dependencies>).
@@ -502,8 +502,8 @@
`experimental.themes`| string|array| Color theme files/directories (replaces default `themes/`). See Themes| `"./themes/"`
`experimental.monitors`| string|array| Background [Monitor](</docs/en/tools-reference#monitor-tool>) configurations that start automatically when the plugin is active. See Monitors| `"./monitors.json"`
`experimental.evals`| string|array| Directory below the plugin root that holds the plugin’s [eval cases](</docs/en/plugin-evals#use-a-different-eval-directory>), when it isn’t the default `evals/`. `claude plugin eval --eval-dir` overrides it| `"quality/evals"`
-`userConfig`| object| User-configurable values prompted at enable time. See User configuration| See below
-`channels`| array| Channel declarations for message injection (Telegram, Slack, Discord style). See Channels| See below
+`userConfig`| object| User-configurable values prompted at enable time. See User configuration|
+`channels`| array| Channel declarations for message injection (Telegram, Slack, Discord style). See Channels|
`dependencies`| array| Other plugins this plugin requires, optionally with semver version constraints. See [Constrain plugin dependency versions](</docs/en/plugin-dependencies>)| `[{ "name": "secrets-vault", "version": "~2.1.0" }]`
###
@@ -649,7 +649,7 @@
`${CLAUDE_PLUGIN_DATA}`| Persistent directory that survives plugin updates, created on first reference| Installed dependencies such as `node_modules` or Python virtual environments, generated code, and caches
`${CLAUDE_PROJECT_DIR}`| The project root| Project-local scripts and config files
-All three are exported as environment variables to hook processes and to MCP and LSP server subprocesses. Which fields substitute them inline depends on the plugin component:
+All three are exported as environment variables to hook processes and to MCP and LSP server subprocesses. They aren’t present in the environment of commands Claude runs through the Bash tool, in the main session or in a subagent. In plugin content, write the placeholder instead, and Claude Code substitutes the path inline when it loads the content. Which fields substitute them inline depends on the plugin component:
Plugin component| Fields where placeholders resolve
---|---
@@ -676,7 +676,7 @@
}
}
-`${CLAUDE_PLUGIN_ROOT}` changes when the plugin updates. The previous version’s directory remains on disk for a grace period after an update, but treat it as ephemeral and don’t write state there. See plugin caching for cleanup semantics. When a plugin updates mid-session, hook commands, monitors, MCP servers, and LSP servers keep using the previous version’s path. Run `/reload-plugins` to switch hooks, MCP servers, and LSP servers to the new path; monitors require a session restart. In a session without an interactive terminal, the reload leaves plugin MCP servers on the old path until the next session. For a plugin with a `command` source, Claude Code [can reload the plugin itself](</docs/en/plugin-marketplaces#when-claude-code-re-runs-the-command>). MCP servers can also call the `roots/list` request to read the session’s working directories at runtime. See [what `roots/list` returns and when Claude Code notifies the server of changes](</docs/en/mcp#option-3-add-a-local-stdio-server>).
+For a copied plugin, `${CLAUDE_PLUGIN_ROOT}` changes when the plugin updates. The previous version’s directory remains on disk for a grace period after an update, but treat it as ephemeral and don’t write state there. For a plugin loaded in place from a local-directory marketplace, the variable points at the stable source directory. See plugin caching for which plugins are copied and for cleanup semantics. When a copied plugin updates mid-session, hook commands, monitors, MCP servers, and LSP servers keep using the previous version’s path. Run `/reload-plugins` to switch hooks, MCP servers, and LSP servers to the new path; monitors require a session restart. In a session without an interactive terminal, the reload leaves plugin MCP servers on the old path until the next session. For a plugin with a `command` source, Claude Code [can reload the plugin itself](</docs/en/plugin-marketplaces#when-claude-code-re-runs-the-command>). MCP servers can also call the `roots/list` request to read the session’s working directories at runtime. See [what `roots/list` returns and when Claude Code notifies the server of changes](</docs/en/mcp#option-3-add-a-local-stdio-server>).
####
@@ -730,7 +730,7 @@
* Through `claude --plugin-dir` or `claude --plugin-url`, for the duration of a session.
* Through a marketplace, installed for future sessions.
-For security and verification purposes, Claude Code copies _marketplace_ plugins to the user’s local **plugin cache** (`~/.claude/plugins/cache`) rather than using them in place, except for [`command` sources in link mode](</docs/en/plugin-marketplaces#copy-mode-and-link-mode>), which Claude Code uses in place through links in the cache entry. For copied plugins, each installed version is a separate directory in the cache, grouped by marketplace and plugin and named for the resolved version, with its own copy of the plugin’s files and Node.js package dependencies. A dependency resolved from a [release tag](</docs/en/plugin-dependencies#tag-plugin-releases-for-version-resolution>) gets a directory name with a commit-SHA suffix. When you update or uninstall a plugin, Claude Code marks the previous version directory as orphaned and removes it in a background sweep roughly 14 days later. The grace period lets concurrent Claude Code sessions that already loaded the old version keep running without errors. Claude Code runs the sweep only while at least one plugin is installed; after you uninstall your last plugin, orphaned directories stay on disk until you install a plugin again. Claude Code removes a plugin or marketplace folder from the cache only when it no longer contains any directory or symlink. If you symlink a development checkout into the cache as a plugin’s version entry, Claude Code never marks the link as orphaned and never removes it or the folders that hold it. Claude Code also never writes its version-tracking files inside the linked checkout. Claude’s Glob and Grep tools skip orphaned version directories during searches, so file results don’t include outdated plugin code.
+For security and verification purposes, Claude Code copies _marketplace_ plugins to the user’s local **plugin cache** (`~/.claude/plugins/cache`), unless the plugin loads in place. A [`command` source in link mode](</docs/en/plugin-marketplaces#copy-mode-and-link-mode>) loads in place through links in the cache entry. A [relative path source](</docs/en/plugin-marketplaces#relative-paths>) in a marketplace added from a local directory loads in place from the marketplace folder. For a plugin loaded in place from a local-directory marketplace, your edits to the source directory take effect at the next session start or `/reload-plugins`. You don’t need a version bump. The plugin’s hook processes and MCP and LSP servers receive a `CLAUDE_PLUGIN_ROOT` that points at the source directory. Claude Code doesn’t install the plugin’s Node.js package dependencies into the source directory. Install them there yourself, or from a hook into the persistent data directory. For copied plugins, each installed version is a separate directory in the cache, grouped by marketplace and plugin and named for the resolved version, with its own copy of the plugin’s files and Node.js package dependencies. A dependency resolved from a [release tag](</docs/en/plugin-dependencies#tag-plugin-releases-for-version-resolution>) gets a directory name with a commit-SHA suffix. When you update or uninstall a plugin, Claude Code marks the previous version directory as orphaned and removes it in a background sweep roughly 14 days later. The grace period lets concurrent Claude Code sessions that already loaded the old version keep running without errors. Claude Code runs the sweep only while at least one plugin is installed; after you uninstall your last plugin, orphaned directories stay on disk until you install a plugin again. Claude Code removes a plugin or marketplace folder from the cache only when it no longer contains any directory or symlink. If you symlink a development checkout into the cache as a plugin’s version entry, Claude Code never marks the link as orphaned and never removes it or the folders that hold it. Claude Code also never writes its version-tracking files inside the linked checkout. Claude’s Glob and Grep tools skip orphaned version directories during searches, so file results don’t include outdated plugin code.
###
@@ -1384,7 +1384,7 @@
Version management
-Claude Code uses the plugin’s version as the cache key that determines whether an update is available. When you run `/plugin update` or auto-update fires, Claude Code computes the current version and skips the update if it matches what’s already installed. For every source type except `command`, Claude Code resolves the version from the first of these that is set:
+Claude Code uses the plugin’s version as the cache key that determines whether an update is available. When you run `/plugin update` or auto-update fires, Claude Code computes the current version and skips the update if it matches what’s already installed. A plugin loaded in place from a local-directory marketplace loads its current source files at every session start, whatever its version string says. For every source type except `command`, Claude Code resolves the version from the first of these that is set:
1. The `version` field in the plugin’s `plugin.json`
2. The `version` field in the plugin’s marketplace entry in `marketplace.json`
@@ -1396,7 +1396,7 @@
Approach| How| Update behavior| Best for
---|---|---|---
-**Explicit version**| Set `"version": "2.1.0"` in `plugin.json`| Users get updates only when you bump this field. Pushing new commits without bumping it has no effect, and `/plugin update` reports “already at the latest version”.| Published plugins with stable release cycles
+**Explicit version**| Set `"version": "2.1.0"` in `plugin.json`| Users get updates only when you bump this field. Pushing new commits without bumping it has no effect, and `/plugin update` reports “already at the latest version”. For a plugin loaded in place, the new content loads anyway.| Published plugins with stable release cycles
**Commit-SHA version**| Omit `version` from both `plugin.json` and the marketplace entry| Users get updates whenever the source’s resolved commit changes| Internal or team plugins under active development
**Digest version**| Use an [`archive` source](</docs/en/plugin-marketplaces#zip-archives>) and omit `version` from both `plugin.json` and the marketplace entry| With a `sha256` pin, users get updates when you change the pin. Without one, users get updates whenever the hosted zip file’s bytes change| Plugins published as zip files to a static server or artifact repository
--- a/python.md
+++ b/python.md
@@ -122,7 +122,7 @@
---|---|---
`name`| `str`| Unique identifier for the tool
`description`| `str`| Human-readable description of what the tool does
-`input_schema`| `type | dict[str, Any]`| Schema defining the tool’s input parameters (see below)
+`input_schema`| `type | dict[str, Any]`| Schema defining the tool’s input parameters. See Input schema options
`annotations`| `ToolAnnotations`` | None`| Optional MCP tool annotations providing behavioral hints to clients
####
@@ -551,7 +551,7 @@
`receive_response()`| Receive messages until and including a ResultMessage
`interrupt()`| Send interrupt signal (only works in streaming mode)
`set_permission_mode(mode)`| Change the permission mode for the current session
-`set_model(model)`| Change the model for the current session. Pass `None` to reset to default
+`set_model(model)`| Change the model for the current session. Pass `None` to reset to [Claude Code’s default model](</docs/en/model-config>)
`rewind_files(user_message_id)`| Restore files to their state at the specified user message. Requires `enable_file_checkpointing=True`. See [File checkpointing](</docs/en/agent-sdk/file-checkpointing>)
`get_mcp_status()`| Get the status of all configured MCP servers. Returns `McpStatusResponse`
`reconnect_mcp_server(server_name)`| Retry connecting to an MCP server that failed or was disconnected
@@ -902,17 +902,17 @@
`resume`| `str | None`| `None`| Session ID to resume
`session_id`| `str | None`| `None`| Use a specific session ID instead of an auto-generated one. Must be a valid UUID. Can’t be combined with `continue_conversation` or `resume` unless `fork_session` is also set
`max_turns`| `int | None`| `None`| Maximum agentic turns (tool-use round trips)
-`max_budget_usd`| `float | None`| `None`| Stop the query when the client-side cost estimate reaches this USD value. Compared against the same estimate as `total_cost_usd`; see [Track cost and usage](</docs/en/agent-sdk/cost-tracking>) for accuracy caveats
+`max_budget_usd`| `float | None`| `None`| Stop the query when the client-side cost estimate reaches this USD value. Compared against the same estimate as `total_cost_usd`. For accuracy caveats and reset behavior, see [Track cost and usage](</docs/en/agent-sdk/cost-tracking>)
`disallowed_tools`| `list[str]`| `[]`| Tools to deny. A bare name such as `"Bash"` removes the tool from Claude’s context. A scoped rule such as `"Bash(rm *)"` leaves the tool available and denies matching calls in every permission mode, including `bypassPermissions`, for the command [as written](</docs/en/permissions#bash-rule-limits>). See [Permissions](</docs/en/agent-sdk/permissions#allow-and-deny-rules>)
`enable_file_checkpointing`| `bool`| `False`| Enable file change tracking for rewinding. See [File checkpointing](</docs/en/agent-sdk/file-checkpointing>)
`model`| `str | None`| `None`| Claude model alias or full model name. See [accepted values and provider-specific IDs](</docs/en/model-config#available-models>)
-`fallback_model`| `str | None`| `None`| Fallback model to use if the primary model fails
+`fallback_model`| `str | None`| `None`| Fallback model to use if the primary model fails. Accepts a comma-separated list. For guidance, see [Choose a model](</docs/en/agent-sdk/configuration#choose-a-model>)
`betas`| `list[SdkBeta]`| `[]`| Beta features to enable. See `SdkBeta` for available options
`output_format`| `dict[str, Any] | None`| `None`| Output format for structured responses (e.g., `{"type": "json_schema", "schema": {...}}`). See [Structured outputs](</docs/en/agent-sdk/structured-outputs>) for details
`permission_prompt_tool_name`| `str | None`| `None`| MCP tool name for permission prompts
`cwd`| `str | Path | None`| `None`| Current working directory
`cli_path`| `str | Path | None`| `None`| Custom path to the Claude Code CLI executable
-`settings`| `str | None`| `None`| Path to settings file
+`settings`| `str | None`| `None`| Path to a settings file or an inline JSON string
`add_dirs`| `list[str | Path]`| `[]`| Additional directories Claude can access. The SDK passes each entry to Claude Code as `--add-dir`, so with the `project` setting source Claude Code also [loads the directory’s skills, commands, and subagents](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>)
`env`| `dict[str, str]`| `{}`| Environment variables merged on top of the inherited process environment. See [Environment variables](</docs/en/env-vars>) for variables the underlying CLI reads, and Handle slow or stalled API responses for timeout-related variables
`extra_args`| `dict[str, str | None]`| `{}`| Additional CLI arguments to pass directly to the CLI
@@ -931,7 +931,7 @@
`agents`| `dict[str, AgentDefinition] | None`| `None`| Programmatically defined subagents
`plugins`| `list[SdkPluginConfig]`| `[]`| Load custom plugins from local paths. See [Plugins](</docs/en/agent-sdk/plugins>) for details
`sandbox`| `SandboxSettings` ` | None`| `None`| Configure sandbox behavior programmatically. See Sandbox settings for details
-`setting_sources`| `list[SettingSource] | None`| `None` (CLI defaults: all sources)| Control which filesystem settings to load. Pass `[]` to disable user, project, and local settings. Endpoint-managed policy loads regardless; server-managed settings are fetched when the session authenticates with an organization credential on an [eligible configuration](</docs/en/server-managed-settings#platform-availability>). See [Use Claude Code features](</docs/en/agent-sdk/claude-code-features#what-settingsources-does-not-control>)
+`setting_sources`| `list[SettingSource] | None`| `None` (CLI defaults: all sources)| Control which filesystem settings to load. Pass `[]` to disable user, project, and local settings. With `skills` set and this field unset, only user and project sources load. Set `setting_sources` explicitly to keep local settings. Endpoint-managed policy loads regardless; server-managed settings are fetched when the session authenticates with an organization credential on an [eligible configuration](</docs/en/server-managed-settings#platform-availability>). For inputs read regardless of this option, see [What settingSources does not control](</docs/en/agent-sdk/claude-code-features#what-settingsources-does-not-control>)
`skills`| `list[str] | Literal["all"] | None`| `None`| Skills available to the session. Pass `"all"` to enable every discovered skill, or a list of skill names. Pass exact names only. The SDK rejects malformed and wildcard-form names with a `ValueError` before starting the Claude Code process; this check requires Python Agent SDK 0.2.129 or later. When set, the SDK adds the Skill tool to `allowed_tools` automatically. If you also pass `tools`, include `"Skill"` in that list. See [Skills](</docs/en/agent-sdk/skills>)
`max_thinking_tokens`| `int | None`| `None`| _Deprecated_ \- Maximum tokens for thinking blocks. Use `thinking` instead
`thinking`| `ThinkingConfig` ` | None`| `None`| Controls extended thinking behavior. Takes precedence over `max_thinking_tokens`
@@ -1043,7 +1043,7 @@
Default behavior
-When `setting_sources` is omitted or `None`, `query()` loads the same filesystem settings as the Claude Code CLI: user, project, and local. Endpoint-managed policy is loaded in all cases; server-managed settings are fetched when the session authenticates with an organization credential on an [eligible configuration](</docs/en/server-managed-settings#platform-availability>). See [What settingSources does not control](</docs/en/agent-sdk/claude-code-features#what-settingsources-does-not-control>) for inputs that are read regardless of this option, and how to disable them.
+When `setting_sources` is omitted or `None` and `skills` is not set, `query()` loads the same filesystem settings as the Claude Code CLI: user, project, and local. With `skills` set, the `setting_sources` row describes the current default. Endpoint-managed policy is loaded in all cases; server-managed settings are fetched when the session authenticates with an organization credential on an [eligible configuration](</docs/en/server-managed-settings#platform-availability>). For more information, see [What settingSources does not control](</docs/en/agent-sdk/claude-code-features#what-settingsources-does-not-control>).
####
@@ -1126,7 +1126,7 @@
2. Project settings (`.claude/settings.json`)
3. User settings (`~/.claude/settings.json`)
-Programmatic options such as `agents` and `allowed_tools` override user, project, and local filesystem settings. Managed policy settings take precedence over programmatic options.
+Programmatic options such as `agents`, `allowed_tools`, and `settings` override user, project, and local filesystem settings. Managed policy settings take precedence over programmatic options.
###
@@ -2581,7 +2581,7 @@
Hook Usage Example
-This example registers two hooks: one that blocks dangerous bash commands like `rm -rf /`, and another that logs all tool usage for auditing. The security hook only runs on Bash commands (via the `matcher`), while the logging hook runs on all tools.
+This example registers two hooks: one that blocks dangerous Bash commands like `rm -rf /`, and another that logs all tool usage for auditing. The security hook only runs on Bash commands (via the `matcher`), while the logging hook runs on all tools.
import asyncio
from claude_agent_sdk import query, ClaudeAgentOptions, HookMatcher, HookContext
@@ -2722,14 +2722,14 @@
{
"status": "remote_launched",
- "taskId": str, # ID of the remote task
- "sessionUrl": str, # Link to the remote cloud session
+ "taskId": str, # ID of the dispatched task
+ "sessionUrl": str, # Link to the cloud session
"description": str, # The task description
"prompt": str, # The prompt the agent runs
"outputFile": str, # File path where the agent's output is written
}
-Returns the result from the subagent. The output is discriminated on the `status` field: `"completed"` for finished tasks, `"async_launched"` for background tasks, and `"remote_launched"` for tasks Claude Code dispatched to a remote cloud session, where `sessionUrl` links to that session and `taskId` identifies it. If Claude Code [kept the subagent’s isolated worktree](</docs/en/worktrees#isolate-subagents-with-worktrees>), `worktreePath` on the `completed` variant is where to find it, and `worktreeBranch` is its branch when Claude Code created the worktree with git. On the `completed` variant, `resolvedModel` names the model the subagent started on, which can differ from the requested `model` input when [`availableModels`](</docs/en/model-config#restrict-model-selection>) or another override applies. This field requires Claude Code v2.1.174 or later. On the `async_launched` variant, `resolvedModel` names the model in use when the agent moved to the background, so a swap that happened before backgrounding is reflected there. The `modelsUsed` field on both variants lists the models used in order, with consecutive repeats collapsed; it’s set only when the model was swapped mid-run. `modelsUsed` and the backgrounding-time `resolvedModel` behavior require Claude Code v2.1.212 or later. Claude Code fills `usage` and `totalTokens` from the subagent’s final API request, not from the whole run. When present, `thinking_tokens` under `output_tokens_details` in `usage` is the number of that request’s output tokens that were thinking tokens. The `output_tokens_details` key requires Python SDK v0.2.136 or later, which bundles Claude Code v2.1.228.
+Returns the result from the subagent. The output is discriminated on the `status` field: `"completed"` for finished tasks, `"async_launched"` for background tasks, and `"remote_launched"` for tasks Claude Code dispatched to a cloud session, where `sessionUrl` links to that session and `taskId` identifies it. If Claude Code [kept the subagent’s isolated worktree](</docs/en/worktrees#isolate-subagents-with-worktrees>), `worktreePath` on the `completed` variant is where to find it, and `worktreeBranch` is its branch when Claude Code created the worktree with git. On the `completed` variant, `resolvedModel` names the model the subagent started on, which can differ from the requested `model` input when [`availableModels`](</docs/en/model-config#restrict-model-selection>) or another override applies. This field requires Claude Code v2.1.174 or later. On the `async_launched` variant, `resolvedModel` names the model in use when the agent moved to the background, so a swap that happened before backgrounding is reflected there. The `modelsUsed` field on both variants lists the models used in order, with consecutive repeats collapsed; it’s set only when the model was swapped mid-run. `modelsUsed` and the backgrounding-time `resolvedModel` behavior require Claude Code v2.1.212 or later. Claude Code fills `usage` and `totalTokens` from the subagent’s final API request, not from the whole run. When present, `thinking_tokens` under `output_tokens_details` in `usage` is the number of that request’s output tokens that were thinking tokens. The `output_tokens_details` key requires Python SDK v0.2.136 or later, which bundles Claude Code v2.1.228.
###
--- a/quickstart.md
+++ b/quickstart.md
@@ -56,7 +56,7 @@
[tsx](<https://tsx.hirok.io>) runs TypeScript files directly. If your project uses CommonJS, name your agent script `agent.mts` instead of `agent.ts`. The `.mts` extension makes tsx treat the file as an ES module, so top-level `await` works without converting your whole project to ES modules. Use `agent.mts` in place of `agent.ts` in the create and run steps later in this quickstart.
-[uv](<https://docs.astral.sh/uv/>) is a fast Python package manager that handles virtual environments automatically:
+[Install uv](<https://docs.astral.sh/uv/>), a fast Python package manager that handles virtual environments automatically. Then initialize a project and add the SDK:
uv init
uv add claude-agent-sdk
@@ -303,7 +303,7 @@
}
};
-With `Bash` enabled, try: `"Write unit tests for utils.py, run them, and fix any failures"`
+With `Bash` enabled, try: `"Write unit tests for utils.py, run them, and fix any failures"` Each of these snippets sets fields on the same options object. For more information, see [Configure your agent](</docs/en/agent-sdk/configuration>).
##
@@ -329,6 +329,7 @@
Now that you’ve created your first agent, learn how to extend its capabilities and tailor it to your use case:
+ * **[Configure your agent](</docs/en/agent-sdk/configuration>)** : compose the options object and find the page that covers each setting
* **[Permissions](</docs/en/agent-sdk/permissions>)** : control what your agent can do and when it needs approval
* **[Hooks](</docs/en/agent-sdk/hooks>)** : run custom code before or after tool calls
* **[Sessions](</docs/en/agent-sdk/sessions>)** : build multi-turn agents that maintain context
--- a/remote-control.md
+++ b/remote-control.md
@@ -7,7 +7,7 @@
* **Send images and files from your phone or browser** : attach a photo or file in the Claude app or at claude.ai/code, with or without a caption. Claude sees attached photos directly as part of your message. Claude Code downloads other files to your machine and passes them to Claude as `@` file references.
* **Survive interruptions** : if your laptop sleeps or your network drops, Claude Code reconnects automatically when your machine comes back online. While the connection is rebuilding, Claude Code queues messages, permission prompts, and status updates from subagents and workflows, and delivers them once the connection recovers.
-Unlike [Claude Code on the web](</docs/en/claude-code-on-the-web>), which runs on cloud infrastructure, Remote Control sessions run directly on your machine and interact with your local filesystem. The web and mobile interfaces are a window into that local session. This page covers setup, how to start and connect to sessions, and how Remote Control compares to Claude Code on the web.
+Unlike [cloud sessions](</docs/en/claude-code-on-the-web>), which run on cloud infrastructure, Remote Control sessions run directly on your machine and interact with your local filesystem. The web and mobile interfaces are a window into that local session. This page covers setup, how to start and connect to sessions, and how Remote Control compares to cloud sessions.
##
@@ -42,7 +42,7 @@
* VS Code
-Navigate to your project directory and run:
+In your project directory, run:
claude remote-control
@@ -150,8 +150,8 @@
* **Compaction and`/clear`**: while Claude Code [compacts the conversation](</docs/en/context-window#what-survives-compaction>), connected devices show the progress and then where the conversation was compacted. When you run `/clear`, the conversation resets on connected devices too.
* **Switching conversations with`/resume`**: the connected device doesn’t receive the switched-to conversation’s title or earlier history, but new messages in both directions go to and from whichever conversation is open in your terminal. To work on the original conversation from the device again, run `/resume` in your terminal and switch back to it.
- * **Pulling a session with`/teleport`**: when you pull a [Claude Code on the web session](</docs/en/claude-code-on-the-web#from-web-to-terminal>) into your terminal with `/teleport`, the connected device doesn’t receive the pulled conversation’s earlier history. New messages in both directions go to and from the pulled conversation, which is now the one open in your terminal.
- * **Messages from your other sessions** : with [cross-session messaging](</docs/en/cross-session-messaging>), the same connection carries messages between your own sessions on different machines and from your [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions, through Anthropic servers like the rest of Remote Control traffic. [Message sessions on other machines](</docs/en/cross-session-messaging#message-sessions-on-other-machines>) covers the delivery rules and [Control inbound messages](</docs/en/cross-session-messaging#control-inbound-messages>) covers the inbound controls. Requires Claude Code v2.1.224 or later.
+ * **Pulling a session with`/teleport`**: when you pull a [cloud session](</docs/en/claude-code-on-the-web#from-cloud-to-terminal>) into your terminal with `/teleport`, the connected device doesn’t receive the pulled conversation’s earlier history. New messages in both directions go to and from the pulled conversation, which is now the one open in your terminal.
+ * **Messages from your other sessions** : with [cross-session messaging](</docs/en/cross-session-messaging>), the same connection carries messages between your own sessions on different machines and from your [cloud sessions](</docs/en/claude-code-on-the-web>), through Anthropic servers like the rest of Remote Control traffic. [Message sessions on other machines](</docs/en/cross-session-messaging#message-sessions-on-other-machines>) covers the delivery rules and [Control inbound messages](</docs/en/cross-session-messaging#control-inbound-messages>) covers the inbound controls. Requires Claude Code v2.1.224 or later.
* **Prompts you send mid-turn** : when you send a prompt from a connected device before the current turn ends, Claude Code queues it and keeps it in the device’s transcript after that turn finishes.
* **Diff of your changes** : when the session’s directory is in a git repository, a connected device’s diff pane shows the diff of your uncommitted changes. The device requests the diff over the connection, and Claude Code computes it on your machine. When your working tree is clean, Claude Code instead serves your branch’s changes since it diverged from the default branch. Before v2.1.247, Claude Code reported the diff to connected devices only in sessions served by `claude remote-control`.
* **Model** : when you pick a [model](</docs/en/model-config>) from a connected device, Claude Code runs the session on that model. The terminal’s `/model` picker, `/status`, and `/config` show that model. Requires Claude Code v2.1.238 or later.
@@ -268,9 +268,9 @@
-Remote Control vs Claude Code on the web
-
-Remote Control and [Claude Code on the web](</docs/en/claude-code-on-the-web>) both use the claude.ai/code interface. The key difference is where the session runs: Remote Control executes on your machine, so your local MCP servers, tools, and project configuration stay available. Claude Code on the web executes in the cloud. Use Remote Control when you’re in the middle of local work and want to keep going from another device. Use Claude Code on the web when you want to kick off a task without any local setup, work on a repo you don’t have cloned, or run multiple tasks in parallel.
+Remote Control vs cloud sessions
+
+Remote Control and [cloud sessions](</docs/en/claude-code-on-the-web>) both use the claude.ai/code interface. The key difference is where the session runs: Remote Control executes on your machine, so your local MCP servers, tools, and project configuration stay available. A cloud session executes on cloud infrastructure, Anthropic-managed by default. Use Remote Control when you’re in the middle of local work and want to keep going from another device. Use a cloud session when you want to start a task without any local setup, work on a repo you don’t have cloned, or run multiple tasks in parallel.
##
@@ -351,7 +351,7 @@
You’re not signed in with a claude.ai account, or another credential is taking precedence over your login. The message takes one of these forms:
- * Signed out, from `/remote-control` or `--remote-control`: `Remote Control requires a claude.ai subscription.`
+ * Signed out, from `/remote-control` or `--remote-control`: `Remote Control requires a claude.ai subscription.` or `/remote-control requires a claude.ai subscription.`
* Signed out, from `claude remote-control`: `You must be logged in to use Remote Control. Remote Control is only available with claude.ai subscriptions.`
* Signed in, but an API key or token is in use: `Remote Control requires claude.ai subscription auth.` followed by the credential in use, such as `ANTHROPIC_API_KEY is set, so this session is using API-key auth`. An `apiKeyHelper` setting and `ANTHROPIC_AUTH_TOKEN` are named the same way.
@@ -509,11 +509,11 @@
Related resources
- * [Claude Code on the web](</docs/en/claude-code-on-the-web>): run sessions in the cloud instead of your machine, configured through [cloud environments](</docs/en/cloud-environments>)
- * [Cross-session messaging](</docs/en/cross-session-messaging>): let Claude message your sessions on other machines or on [Claude Code on the web](</docs/en/claude-code-on-the-web>)
+ * [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>): run sessions in the cloud instead of your machine, configured through [cloud environments](</docs/en/cloud-environments>)
+ * [Cross-session messaging](</docs/en/cross-session-messaging>): let Claude message your sessions on other machines or your [cloud sessions](</docs/en/claude-code-on-the-web>)
* [Channels](</docs/en/channels>): forward Telegram, Discord, or iMessage into a session so Claude reacts to messages while you’re away
* [Dispatch](</docs/en/desktop#sessions-from-dispatch>): message a task from your phone and it can spawn a Desktop session to handle it
* [Authentication](</docs/en/authentication>): set up `/login` and manage credentials for claude.ai
* [CLI reference](</docs/en/cli-reference>): full list of flags and commands including `claude remote-control`
* [Security](</docs/en/security>): how Remote Control sessions fit into the Claude Code security model
- * [Data usage](</docs/en/data-usage>): what data flows through the Anthropic API during local and remote sessions
+ * [Data usage](</docs/en/data-usage>): what data flows through the Anthropic API during local, Remote Control, and cloud sessions
--- a/routines.md
+++ b/routines.md
@@ -120,7 +120,7 @@
Schedule a one-off run
-A one-off schedule fires the routine a single time at a specific timestamp. Use it to remind yourself later in the week, to open a cleanup PR after a rollout finishes, or to kick off a follow-up task when an upstream change lands. After the routine fires, it auto-disables and the web UI marks it as **Ran**. To run it again, edit the routine and set a new one-off time. Create a one-off run from the CLI by describing the time in natural language. Claude resolves the phrase against the current time and confirms the absolute timestamp before saving.
+A one-off schedule fires the routine a single time at a specific timestamp. Use it to remind yourself later in the week, to open a cleanup PR after a rollout finishes, or to start a follow-up task after an upstream change ships. After the routine fires, it auto-disables and the web UI marks it as **Ran**. To run it again, edit the routine and set a new one-off time. Create a one-off run from the CLI by describing the time in natural language. Claude resolves the phrase against the current time and confirms the absolute timestamp before saving.
/schedule tomorrow at 9am, summarize yesterday's merged PRs
@@ -389,22 +389,15 @@
`/schedule` returns “Unknown command”
-The CLI hides `/schedule` when one of its requirements isn’t met: the command menu shows `No commands match "/schedule"` while you type, and submitting it returns `Unknown command: /schedule` in every case below except a Console API key or an Anthropic profile with feature-flag fetching enabled. The cause is usually one of the following:
-
- * You are authenticated with a Console API key, an [Anthropic profile or federation credential](</docs/en/authentication#anthropic-profiles-and-federation-credentials>), or a cloud provider such as Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. `/schedule` requires a claude.ai subscription login. With a Console API key or a profile, submitting `/schedule` instead shows `/schedule is available with Claude for Enterprise — ask your admin about migrating from API-key access`. With a cloud-provider login, you still see `Unknown command: /schedule`. If `ANTHROPIC_API_KEY` or `ANTHROPIC_AUTH_TOKEN` is set in your shell, or `apiKeyHelper` is set in `settings.json`, remove it first, since these take precedence over a claude.ai login. A profile or federation credential takes precedence too, so switch that off as well
- * You are inside a Claude Code on the web session. Manage routines from the [web UI](<https://claude.ai/code/routines>) instead
- * Your organization’s policy disables [Claude Code on the web](</docs/en/claude-code-on-the-web>), which routines run on
+The CLI hides `/schedule` when one of its requirements isn’t met: the command menu shows `No commands match "/schedule"` while you type. Submitting it returns `Unknown command: /schedule`, except in the cases below that note a different answer. The cause is usually one of the following:
+
+ * You are authenticated with a Console API key, an [Anthropic profile or federation credential](</docs/en/authentication#anthropic-profiles-and-federation-credentials>), or a cloud provider such as Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. `/schedule` requires a claude.ai subscription login. With a Console API key or a profile, and feature-flag fetching enabled, submitting `/schedule` instead shows `/schedule is available with Claude for Enterprise — ask your admin about migrating from API-key access`. With a cloud-provider login, you still see `Unknown command: /schedule`. If `ANTHROPIC_API_KEY` or `ANTHROPIC_AUTH_TOKEN` is set in your shell, or `apiKeyHelper` is set in `settings.json`, remove it first, since these take precedence over a claude.ai login. A profile or federation credential takes precedence too, so switch that off as well
+ * You are fully signed out, with no API key or other credential. With feature-flag fetching enabled, submitting `/schedule` shows `/schedule requires a claude.ai subscription. Run /login to sign in with your claude.ai account.` Before v2.1.268, a signed-out session showed the same Claude for Enterprise message as a Console API key
+ * You are inside a cloud session. Manage routines from the [web UI](<https://claude.ai/code/routines>) instead
+ * Your organization’s policy disables [cloud sessions](</docs/en/claude-code-on-the-web>), which routines require. In this case, submitting `/schedule` answers [`Cloud sessions are disabled by your organization's policy`](</docs/en/errors#cloud-sessions-are-disabled-by-your-organizations-policy>) instead. Before v2.1.268, it returned `Unknown command: /schedule`
* An Owner turned off routines for your Team or Enterprise organization. Before v2.1.227, the command still appeared in this case, and claude.ai rejected the routine when Claude tried to create or run it
-Unless your organization’s policy disables routines or Claude Code on the web, you can create and manage routines at [claude.ai/code/routines](<https://claude.ai/code/routines>) regardless of how the CLI is configured.
-
-###
-
-
-
-`/schedule` asks you to authenticate
-
-If `/schedule` runs but Claude responds that you need to authenticate with a claude.ai account first, the CLI has no stored claude.ai login. API accounts aren’t supported for routines. Run `/login`, sign in with your claude.ai account, then run `/schedule` again.
+Unless your organization’s policy disables routines or cloud sessions, you can create and manage routines at [claude.ai/code/routines](<https://claude.ai/code/routines>) regardless of how the CLI is configured.
###
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -12,12 +12,12 @@
Approach| What is isolated| Requires Docker| Setup effort
---|---|---|---
-Sandboxed Bash tool| Bash commands and their child processes| No| Minimal on macOS; low on Linux and WSL2
+Sandboxed Bash tool| Bash, PowerShell, and Monitor commands and their child processes| No| Minimal on macOS; low on Linux and WSL2
Sandbox runtime| The whole Claude Code process, including file tools, MCP servers, and hooks| No| Low
Dev container| Full development environment| Yes| Medium
Custom container| Full development environment| Yes| Medium to high
Virtual machine| Full operating system| No| High
-Claude Code on the web| Full operating system, hosted by Anthropic| No| None; requires a Claude subscription, and GitHub when you launch from the web interface
+Cloud sessions| Full operating system, hosted by Anthropic| No| None; requires a Claude subscription, and a connected GitHub account unless you launch with `claude --cloud`
The [sandboxed Bash tool](</docs/en/sandboxing>) is built into Claude Code and restricts Bash commands. Built-in file tools, MCP servers, and hooks still run directly on your host. Every other approach in the table puts the whole Claude Code process inside the isolation boundary, so file tools, MCP servers, and hooks are restricted too.
@@ -36,9 +36,9 @@
Reduce permission prompts during everyday work on your own machine| The [sandboxed Bash tool](</docs/en/sandboxing>), configured with `/sandbox`
Let Claude work unattended with `--dangerously-skip-permissions` or auto mode| The preconfigured [dev container](</docs/en/devcontainer>), any container or VM, or the sandbox runtime
Isolate MCP servers and hooks as well as Bash, without Docker| The sandbox runtime
-Work on an untrusted repository| A dedicated virtual machine, or [Claude Code on the web](</docs/en/claude-code-on-the-web>) if you have a Claude subscription; GitHub is only required when you launch from the web interface
+Work on an untrusted repository| A dedicated virtual machine, or a [cloud session](</docs/en/claude-code-on-the-web>) if you have a Claude subscription; GitHub is not required when you launch with `claude --cloud`
Standardize a sandboxed environment across a team| The preconfigured [dev container](</docs/en/devcontainer>), copied into your repository
-Use Claude Code from a device with no local setup| [Claude Code on the web](</docs/en/claude-code-on-the-web>), which requires a Claude subscription and a connected GitHub account
+Use Claude Code from a device with no local setup| A [cloud session](</docs/en/claude-code-on-the-web>), which requires a Claude subscription and a connected GitHub account
Require isolation for every developer in your organization| Enforce isolation across an organization
Work on a native Windows host| A container or VM, or run the Bash sandbox inside WSL2
@@ -48,7 +48,7 @@
How isolation relates to permission modes
-[Permission modes](</docs/en/permission-modes>) decide whether a tool call runs and whether you are prompted first. Isolation restricts what a command can access once it runs. The two work together: when a permission mode lets actions run without asking you, an isolation boundary limits what those actions can reach. When you pass `--dangerously-skip-permissions`, Claude acts without asking you first. The [actions no mode auto-approves](</docs/en/permission-modes#actions-no-mode-auto-approves>) still apply. With no prompts to catch mistakes, the isolation boundary you choose is what protects your system. Always run `--dangerously-skip-permissions` sessions inside a container, a VM, or the sandbox runtime, so that file tools, MCP servers, and hooks are also inside the boundary. On Linux and macOS, Claude Code refuses to start with this flag when running as root, so run the container, VM, or sandbox runtime as a non-root user. [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) replaces the prompt with a classifier that reviews actions. The classifier is a per-action control, not an isolation boundary, so an isolation boundary still adds defense in depth for unattended runs, and is not required the way it is for `--dangerously-skip-permissions`. The sandboxed Bash tool on its own constrains only Bash, so it is not sufficient for fully unattended runs in either mode. You can layer approaches: running the sandboxed Bash tool inside a container or VM gives you OS-level command restrictions on top of the outer environment boundary. For how the Bash sandbox itself interacts with permission rules and modes, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>).
+[Permission modes](</docs/en/permission-modes>) decide whether a tool call runs and whether you are prompted first. Isolation restricts what a command can access once it runs. The two work together: when a permission mode lets actions run without asking you, an isolation boundary limits what those actions can reach. When you pass `--dangerously-skip-permissions`, Claude acts without asking you first. The [actions no mode auto-approves](</docs/en/permission-modes#actions-no-mode-auto-approves>) still apply. With no prompts to catch mistakes, the isolation boundary you choose is what protects your system. Always run `--dangerously-skip-permissions` sessions inside a container, a VM, or the sandbox runtime, so that file tools, MCP servers, and hooks are also inside the boundary. On Linux and macOS, Claude Code refuses to start with this flag when running as root, so run the container, VM, or sandbox runtime as a non-root user. [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) replaces the prompt with a classifier that reviews actions. The classifier is a per-action control, not an isolation boundary, so an isolation boundary still adds defense in depth for unattended runs, and is not required the way it is for `--dangerously-skip-permissions`. The sandboxed Bash tool on its own constrains only shell commands, so it is not sufficient for fully unattended runs in either mode. You can layer approaches: running the sandboxed Bash tool inside a container or VM gives you OS-level command restrictions on top of the outer environment boundary. For how the Bash sandbox itself interacts with permission rules and modes, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>).
##
@@ -58,7 +58,7 @@
This option does not support native Windows. On Windows hosts, use WSL2 or one of the container or VM approaches below.
-The sandboxed Bash tool is built into Claude Code. It uses operating system primitives to restrict the filesystem and network access of every Bash command Claude runs. Run the `/sandbox` command to open the sandbox panel and choose a mode. The [Sandboxing](</docs/en/sandboxing>) guide covers the approval modes, the default boundary, and how to widen or narrow it. The per-command sandbox does not cover everything that runs in a session:
+The sandboxed Bash tool is built into Claude Code. It uses operating system primitives to restrict the filesystem and network access of every Bash, PowerShell, or Monitor command Claude runs. Run the `/sandbox` command to open the sandbox panel and choose a mode. The [Sandboxing](</docs/en/sandboxing>) guide covers the approval modes, the default boundary, and how to widen or narrow it. The per-command sandbox does not cover everything that runs in a session:
* Other [built-in tools](</docs/en/tools-reference>) such as Read, Edit, and WebFetch run inside the Claude Code process and do not spawn arbitrary code. [Permission rules](</docs/en/permissions>) for path or domain gate them instead.
* [MCP](</docs/en/mcp>) servers and [command hooks](</docs/en/hooks#command-hook-fields>) are separate processes that run unconstrained on the host.
@@ -71,7 +71,7 @@
Sandbox runtime
-The [`@anthropic-ai/sandbox-runtime`](<https://github.com/anthropic-experimental/sandbox-runtime>) package wraps an entire process in the same Seatbelt or bubblewrap isolation that the built-in Bash sandbox uses. Running Claude Code through the runtime constrains every tool, hook, and MCP server in the session, not only Bash. The runtime is a beta research preview, and its configuration format may change as the package evolves. This section covers what you configure and what the runtime enforces on its own. For deploying the runtime in Agent SDK applications, see the [secure deployment guide](</docs/en/agent-sdk/secure-deployment#sandbox-runtime>).
+The [`@anthropic-ai/sandbox-runtime`](<https://github.com/anthropic-experimental/sandbox-runtime>) package wraps an entire process in the same Seatbelt or bubblewrap isolation that the built-in Bash sandbox uses. Running Claude Code through the runtime constrains every tool, hook, and MCP server in the session, not only shell commands. The runtime is a beta research preview, and its configuration format may change as the package evolves. This section covers what you configure and what the runtime enforces on its own. For deploying the runtime in Agent SDK applications, see the [secure deployment guide](</docs/en/agent-sdk/secure-deployment#sandbox-runtime>).
###
@@ -153,9 +153,9 @@
-Claude Code on the web
+Cloud sessions
-[Claude Code on the web](</docs/en/claude-code-on-the-web>) runs each session in an isolated, Anthropic-managed virtual machine. A network proxy enforces a default allowlist, and a separate proxy holds your GitHub token outside the sandbox while issuing scoped credentials for repository access inside it. Sessions your organization routes to a [self-hosted environment](</docs/en/self-hosted-environments>) run on infrastructure you provision instead, where isolation, egress control, and git credentials are your deployment’s responsibility. Use this approach when you want full VM isolation without provisioning infrastructure yourself, or when you are delegating tasks from a device that does not have a local development environment. It requires a Claude subscription. When you launch a session from the web interface, you also need a connected GitHub account so the sandbox can clone your repository. When you launch from the CLI with `--cloud`, Claude Code can [bundle and upload your local repository](</docs/en/claude-code-on-the-web#send-local-repositories-without-github>) instead. See [Claude Code on the web](</docs/en/claude-code-on-the-web>) for plan availability and GitHub authentication options.
+A [cloud session](</docs/en/claude-code-on-the-web>) runs in an isolated, Anthropic-managed virtual machine. A network proxy enforces a default allowlist, and a separate proxy holds your GitHub token outside the sandbox while issuing scoped credentials for repository access inside it. Sessions your organization routes to a [self-hosted environment](</docs/en/self-hosted-environments>) run on infrastructure you provision instead, where isolation, egress control, and git credentials are your deployment’s responsibility. Use this approach when you want full VM isolation without provisioning infrastructure yourself, or when you are delegating tasks from a device that does not have a local development environment. It requires a Claude subscription. Unless you launch from the CLI, you also need a connected GitHub account so the sandbox can clone your repository. When you launch from the CLI with `--cloud`, Claude Code can [bundle and upload your local repository](</docs/en/claude-code-on-the-web#send-local-repositories-without-github>) instead. See [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>) for plan availability and GitHub authentication options.
##
--- a/sandboxing.md
+++ b/sandboxing.md
@@ -1,4 +1,4 @@
-The Bash sandbox lets Claude run most shell commands without stopping to ask permission. Instead of approving each command, you define which files and network domains commands can touch, and the operating system enforces that boundary for every Bash command and its child processes.
+The Bash sandbox lets Claude run most shell commands without stopping to ask permission. Instead of approving each command, you define which files and network domains commands can touch, and the operating system enforces that boundary for every Bash, PowerShell, or Monitor command and its child processes.
To compare other isolation approaches such as dev containers, custom containers, and virtual machines, see [Sandbox environments](</docs/en/sandbox-environments>). To reduce permission prompts for tools other than Bash, see [permission modes](</docs/en/permission-modes>).
@@ -36,7 +36,7 @@
Run a Bash command
-Ask Claude to run a command, such as a build or a test suite. By default, commands inside the sandbox can write to the working directory, the session temp directory, and any [directories you’ve added](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) with `--add-dir`, `/add-dir`, or `permissions.additionalDirectories`. The first time a command needs a new network domain, Claude Code prompts for approval, or in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) sends the request to the classifier.Commands that can’t run sandboxed fall back to the regular permission flow. Claude Code titles their permission prompt “Bash command (unsandboxed)” instead of “Bash command”, so you can tell which commands ran outside the sandbox. To widen or narrow what the sandbox allows, see Configure sandboxing.If sandboxed commands fail with `Operation not permitted` inside a container, see the Bubblewrap entry under Troubleshooting.
+Ask Claude to run a command, such as a build or a test suite. By default, commands inside the sandbox can write to the working directory, the session temp directory, and any [directories you’ve added](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) with `--add-dir`, `/add-dir`, or `permissions.additionalDirectories`.The first time a command needs a new network domain, Claude Code prompts for approval; in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), Claude instead names the hosts a command needs on the command itself for the classifier to review with it.Commands that can’t run sandboxed fall back to the regular permission flow. Claude Code titles their permission prompt “Bash command (unsandboxed)” instead of “Bash command”, so you can tell which commands ran outside the sandbox. To widen or narrow what the sandbox allows, see Configure sandboxing.If sandboxed commands fail with `Operation not permitted` inside a container, see the Bubblewrap entry under Troubleshooting.
When you select a mode in the panel, Claude Code saves it to your project’s local settings at `.claude/settings.local.json`, which apply to the current project. Claude Code adds that file to your global gitignore when it saves a setting there. To enable the sandbox across all of your projects, set [`sandbox.enabled`](</docs/en/settings-reference#sandbox-enabled>) to `true` in your user settings at `~/.claude/settings.json`. To enforce sandboxing for every developer in an organization, use managed settings. To change the sandbox for one session without writing to a settings file, start Claude Code with [`--settings`](</docs/en/settings#change-a-setting-for-one-session>). For example, this command starts a sandboxed session in which Claude can’t retry a blocked command outside the sandbox:
@@ -110,7 +110,7 @@
* Content-scoped [ask rules](</docs/en/permissions>) like `Bash(git push *)` still force a prompt even for sandboxed commands
* A bare `Bash` ask rule, or the equivalent `Bash(*)` form, is skipped for commands that run sandboxed; it still applies to commands that fall back to the regular permission flow. In [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>), the rule isn’t skipped: it prompts for sandboxed commands too, including read-only ones. Before v2.1.212, the skip applied in plan mode as well
-Auto-allow mode works independently of your permission mode setting, with one exception: [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>). Even if you’re not in “accept edits” mode, sandboxed Bash commands run automatically when auto-allow is enabled. This means Bash commands that modify files within the sandbox boundaries execute without prompting, even in Manual mode, where the file edit tools would prompt.In plan mode, auto-allow doesn’t widen approvals; see [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>) for how Claude Code gates commands while you plan. Before v2.1.212, auto-allow ran sandboxed commands without a prompt in plan mode too.
+Auto-allow mode works independently of your permission mode setting, except in [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>) and, in auto mode, for a command that carries per-command allowed domains. Even if you’re not in “accept edits” mode, sandboxed Bash commands run automatically when auto-allow is enabled. This means Bash commands that modify files within the sandbox boundaries execute without prompting, even in Manual mode, where the file edit tools would prompt.In plan mode, auto-allow doesn’t widen approvals; see [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>) for how Claude Code gates commands while you plan. Before v2.1.212, auto-allow ran sandboxed commands without a prompt in plan mode too.
####
@@ -166,7 +166,7 @@
`~/`| Relative to home directory| `~/.kube` becomes `$HOME/.kube`
`./` or no prefix| Relative to the project root for project settings, or to `~/.claude` for user settings| `./output` in `.claude/settings.json` resolves to `<project-root>/output`
-This syntax differs from [Read and Edit permission rules](</docs/en/permissions#read-and-edit>), which use `//path` for absolute and `/path` for project-relative. Sandbox filesystem paths use standard conventions: `/tmp/build` is absolute. For how Claude Code treats a trailing slash or a wildcard in these paths, see [Sandbox path prefixes](</docs/en/settings-reference#sandbox-path-prefixes>). You can also deny write or read access using `sandbox.filesystem.denyWrite` and `sandbox.filesystem.denyRead`, and re-allow specific paths within a denied region using `sandbox.filesystem.allowRead`. When read rules overlap, the more specific path wins:
+This syntax differs from [Read and Edit permission rules](</docs/en/permissions#read-and-edit>), which use `//path` for absolute and `/path` for project-relative. Sandbox filesystem paths use standard conventions: `/tmp/build` is absolute. For how Claude Code treats a trailing slash or a wildcard in these paths, see [Sandbox path prefixes](</docs/en/settings-reference#sandbox-path-prefixes>). You can also deny write or read access using `sandbox.filesystem.denyWrite` and `sandbox.filesystem.denyRead`, and re-allow specific paths within a denied region using `sandbox.filesystem.allowRead`. When read rules overlap, the rule with the narrower path applies:
Example rules| Result
---|---
@@ -459,7 +459,9 @@
Network access is controlled through a proxy server running outside the sandbox:
- * **Domain restrictions** : Claude Code pre-allows no domains by default. The first time a command needs a new domain, Claude Code prompts for approval, or in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) sends the request to the classifier. If you choose Yes when prompted, Claude Code allows the host for the rest of the current session and doesn’t prompt again for later connections to the same host. If you choose “Yes, and don’t ask again”, Claude Code saves a `WebFetch(domain:...)` allow rule to your [local settings](</docs/en/permissions#permission-system>), so the host stays allowed in future sessions. Pre-allow domains with [`allowedDomains`](</docs/en/settings-reference#sandbox-network-alloweddomains>) to avoid the prompt entirely. Claude Code also pre-allows domains from `WebFetch(domain:...)` allow rules, as described in Permission rules.
+ * **Domain restrictions** : Claude Code pre-allows no domains by default. The first time a command needs a new domain, Claude Code prompts for approval; in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), Claude instead names the hosts a command needs on the command itself, per Per-command allowed domains.
+ * **Approval choices** : if you choose Yes when prompted, Claude Code allows the host for the rest of the current session and doesn’t prompt again for later connections to the same host. If you choose “Yes, and don’t ask again”, Claude Code saves a `WebFetch(domain:...)` allow rule to your [local settings](</docs/en/permissions#permission-system>), so the host stays allowed in future sessions.
+ * **Pre-allowed domains** : pre-allow domains with [`allowedDomains`](</docs/en/settings-reference#sandbox-network-alloweddomains>) to avoid the prompt entirely. Claude Code also pre-allows domains from `WebFetch(domain:...)` allow rules, as described in Permission rules.
* **Strict allowlist** : if you set [`strictAllowlist`](</docs/en/settings-reference#sandbox-network-strictallowlist>) to `true` in user, managed, or CLI `--settings` settings, Claude Code denies sandboxed commands access to any host outside the allowlist instead of prompting. The allowlist is the same one the sandbox otherwise prompts against: `allowedDomains` plus domains from `WebFetch(domain:...)` allow rules, or only the managed settings entries when `allowManagedDomainsOnly` is set. Claude Code enforces this for sandboxed commands only; in-process tools such as `WebFetch` still follow their permission rules. Setting it in a repository’s `.claude/settings.json` or `.claude/settings.local.json` has no effect. Requires Claude Code v2.1.219 or later.
* **Managed lockdown** : if [`allowManagedDomainsOnly`](</docs/en/settings-reference#sandbox-network-allowmanageddomainsonly>) is set in managed settings, non-allowed domains are blocked automatically instead of prompting, and only `allowedDomains` and `WebFetch(domain:...)` allow rules from managed settings are honored.
* **Corporate proxy** : when your network requires outbound traffic to go through a corporate proxy, set `HTTPS_PROXY`, `HTTP_PROXY`, and `NO_PROXY` as [proxy configuration](</docs/en/network-config#proxy-configuration>) describes, in the `env` block of your settings so that [background agents](</docs/en/network-config#set-network-variables-in-settings-not-the-shell>) get them too, or in the environment you launch Claude Code from. Claude Code enforces the domain allowlist and then tunnels allowed connections through that upstream proxy.
@@ -474,6 +476,14 @@
+Per-command allowed domains in auto mode
+
+In [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) with sandboxing on, Claude names the hosts a command needs on the command itself instead of triggering a network approval for each connection. Each Bash, PowerShell, or [Monitor](</docs/en/tools-reference#monitor-tool>) command that runs in the sandbox can carry a list of hosts beyond the sandbox’s allowlist: a domain such as `registry.npmjs.org`, a wildcard such as `*.pythonhosted.org`, or an IP address, each with an optional `:port`. The classifier reviews the hosts together with the command. Requires Claude Code v2.1.271 or later. An approved list opens those hosts for that one command alone, for as long as it runs. Nothing is added to your session’s allowed hosts or your settings; the next command names its own hosts. A command that carries hosts goes to the classifier instead of being approved by a permission rule or the sandbox’s auto-allow mode. If an [ask rule](</docs/en/permissions#manage-permissions>) forces a prompt for the command, the permission dialog in your terminal lists the hosts beside it, and approving there covers both. A per-command list widens only what the sandbox denies by default. [`deniedDomains`](</docs/en/settings-reference#sandbox-network-denieddomains>) entries still block. When [`strictAllowlist`](</docs/en/settings-reference#sandbox-network-strictallowlist>) or [`allowManagedDomainsOnly`](</docs/en/settings-reference#sandbox-network-allowmanageddomainsonly>) locks the allowlist, Claude Code refuses per-command lists. While per-command lists apply, Claude Code refuses a connection to a host that no approved command listed, without a prompt or a classifier check. The refusal names the host in the command’s result, and Claude re-runs the command with the host added.
+
+####
+
+
+
IPv6 addresses in domain lists
The sandbox’s domain lists are `allowedDomains`, `deniedDomains`, and the `WebFetch(domain:...)` rules that feed them. To match an IPv6 address in any of them, write the literal in brackets: `"[::1]"` matches that address on every port, and `"[::1]:443"` matches it on port 443 only. Write the port as a number from 1 to 65535 with no leading zeros. The bracketed form requires Claude Code v2.1.229 or later. Before v2.1.229, when the text after an unbracketed entry’s last colon was a port number, Claude Code read it as one, so `::1:443` named the address `::1` on port 443. When you choose “Yes, and don’t ask again” at the network approval prompt for an IPv6 address, Claude Code saves the `WebFetch(domain:...)` rule with the address bracketed, so the rule keeps matching the address in future sessions. An unbracketed entry with two or more colons is ambiguous: `::1:443` is both a complete IPv6 address and an address followed by a port. Claude Code enforces ambiguous spellings conservatively instead of guessing which reading you meant:
@@ -514,7 +524,7 @@
Permission rules and sandboxing control different things:
* **Permission rules** control which tools Claude Code can use and are evaluated before any tool runs. They apply to every tool: Bash, Read, Edit, WebFetch, MCP, and others, except that a deny or ask rule can’t block [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) while any other tool remains.
- * **Sandboxing** provides OS-level enforcement that restricts what Bash commands can access at the filesystem and network level. It applies only to Bash commands and their child processes.
+ * **Sandboxing** provides OS-level enforcement that restricts what shell commands can access at the filesystem and network level. It applies only to Bash, PowerShell, and [Monitor](</docs/en/tools-reference#monitor-tool>) commands and their child processes.
The two layers also differ in how they are enforced. Claude Code evaluates permission decisions before a command runs, based on the command string and, in auto mode, a separate classifier’s judgment about whether the command is safe. The operating system enforces the sandbox boundary on the running process, so it holds regardless of what the model chose to run and even if an allowed command does more than its name suggests. Filesystem and network restrictions are configured through both sandbox settings and permission rules:
@@ -546,7 +556,7 @@
[Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>)| Whether each tool call runs| A classifier that reviews actions
`--dangerously-skip-permissions`| Whether each tool call runs| Nothing. [Protected path](</docs/en/permission-modes#protected-paths>) checks are also skipped; the [actions no mode auto-approves](</docs/en/permission-modes#actions-no-mode-auto-approves>) still apply
-The sandbox’s auto-allow mode is separate from [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>): auto-allow approves Bash commands because the sandbox boundary contains them, while auto mode uses a classifier to review actions. The two work independently and can be combined. To choose an isolation boundary for unattended runs, see [Sandbox environments](</docs/en/sandbox-environments#how-isolation-relates-to-permission-modes>). For a table of common permission mode and sandbox pairings with the flags that start each one, see [Common setups](</docs/en/permission-modes#common-setups>).
+The sandbox’s auto-allow mode is separate from [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>): auto-allow approves Bash commands because the sandbox boundary contains them, while auto mode uses a classifier to review actions. The two work independently and can be combined, with the exceptions listed under Sandbox modes. To choose an isolation boundary for unattended runs, see [Sandbox environments](</docs/en/sandbox-environments#how-isolation-relates-to-permission-modes>). For a table of common permission mode and sandbox pairings with the flags that start each one, see [Common setups](</docs/en/permission-modes#common-setups>).
##
@@ -562,7 +572,7 @@
Enforce sandboxing with managed settings
-To require the sandbox for every developer, deliver the `sandbox` keys through [managed settings](</docs/en/managed-settings#delivery-mechanisms>), either as a file managed by your MDM or through [server-managed settings](</docs/en/server-managed-settings>) on Claude.ai. The following managed settings configuration enables the sandbox, refuses to start Claude Code if the sandbox cannot initialize, and prevents the model from retrying commands outside the sandbox:
+To require the sandbox for every developer, deliver the `sandbox` keys through [managed settings](</docs/en/managed-settings#delivery-mechanisms>), either as a file managed by your MDM or through [server-managed settings](</docs/en/server-managed-settings>) on claude.ai. The following managed settings configuration enables the sandbox, refuses to start Claude Code if the sandbox cannot initialize, and prevents the model from retrying commands outside the sandbox:
{
"sandbox": {
--- a/scheduled-tasks.md
+++ b/scheduled-tasks.md
@@ -145,7 +145,7 @@
cancel the deploy check job
-Under the hood, Claude uses these tools:
+These are the underlying tools Claude uses:
Tool| Purpose
---|---
--- a/security.md
+++ b/security.md
@@ -124,7 +124,7 @@
Cloud execution security
-When using [Claude Code on the web](</docs/en/claude-code-on-the-web>), additional security controls are in place. Sessions your organization routes to a [self-hosted environment](</docs/en/self-hosted-environments>) run on your own infrastructure, where isolation, network egress, and git credentials are your deployment’s responsibility. In Anthropic-hosted environments:
+When you use [cloud sessions](</docs/en/claude-code-on-the-web>), additional security controls are in place. Sessions your organization routes to a [self-hosted environment](</docs/en/self-hosted-environments>) run on your own infrastructure, where isolation, network egress, and git credentials are your deployment’s responsibility. In Anthropic-hosted environments:
* **Isolated virtual machines** : Each cloud session runs in an isolated, Anthropic-managed VM
* **Network access controls** : Network access is limited by default and can be configured to be disabled or allow only specific domains
@@ -133,7 +133,7 @@
* **Audit logging** : All operations in cloud sessions are logged for compliance and audit purposes
* **Automatic cleanup** : Session VMs are reclaimed after a period of inactivity
-For more details on cloud execution, see [Claude Code on the web](</docs/en/claude-code-on-the-web>); to configure network access for cloud sessions, see [Configure cloud environments](</docs/en/cloud-environments#network-access>). [Remote Control](</docs/en/remote-control>) sessions work differently: the web interface connects to a Claude Code process running on your local machine. All code execution and file access stays local, and session traffic travels through the Anthropic API over TLS; while connected, the session transcript is stored on Anthropic servers to sync the conversation across devices, as described in [Connection and security](</docs/en/remote-control#connection-and-security>). No cloud VMs or sandboxing are involved. The connection uses multiple short-lived, narrowly scoped credentials, each limited to a specific purpose and expiring independently, to limit the blast radius of any single compromised credential.
+For more details on cloud execution, see [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>); to configure network access for cloud sessions, see [Configure cloud environments](</docs/en/cloud-environments#network-access>). [Remote Control](</docs/en/remote-control>) sessions work differently: the web interface connects to a Claude Code process running on your local machine. All code execution and file access stays local, and session traffic travels through the Anthropic API over TLS; while connected, the session transcript is stored on Anthropic servers to sync the conversation across devices, as described in [Connection and security](</docs/en/remote-control#connection-and-security>). No cloud VMs or sandboxing are involved. The connection uses multiple short-lived, narrowly scoped credentials, each limited to a specific purpose and expiring independently, to limit the blast radius of any single compromised credential.
##
--- a/security-guidance.md
+++ b/security-guidance.md
@@ -24,7 +24,7 @@
`/plugin` opens an interactive panel and is available only in the terminal CLI. If Claude replies that `/plugin` isn’t available in this environment, install another way:
* **Claude desktop app, local or SSH session** : open the [plugin browser](</docs/en/desktop#install-plugins>) by clicking the **+** button next to the prompt, then **Plugins** , then **Add plugin**
- * **Claude Code on the web or a desktop cloud session** : declare the plugin in `.claude/settings.json` as shown under Enable in cloud sessions
+ * **Cloud sessions** : declare the plugin in `.claude/settings.json` as shown under Enable in cloud sessions
The terminal install prompts for a scope. Choose user scope to write the plugin to your user settings, so it loads in every new local session you start on this machine. If the install fails, match the message Claude Code reports:
@@ -39,7 +39,7 @@
Enable in cloud sessions and shared repositories
-User-scoped plugins do not carry into [Claude Code on the web](</docs/en/claude-code-on-the-web>), because those sessions run in the cloud rather than on your machine. To enable the plugin there, or to turn it on for everyone who clones a repository, declare it in the project’s checked-in settings:
+User-scoped plugins do not carry into [cloud sessions](</docs/en/claude-code-on-the-web>), because those sessions don’t run on your machine. To enable the plugin there, or to turn it on for everyone who clones a repository, declare it in the project’s checked-in settings:
.claude/settings.json
--- a/self-hosted-environments.md
+++ b/self-hosted-environments.md
@@ -1,6 +1,6 @@
Self-hosted environments are in public beta on Team and Enterprise plans and are off by default. See Availability and limitations for the enablement path and what’s excluded.
-A self-hosted environment executes Claude Code cloud sessions on infrastructure your organization operates. A [cloud session](</docs/en/claude-code-on-the-web>) is any session that runs somewhere other than the developer’s machine: developers start them from claude.ai, the mobile and desktop apps, the terminal with [`claude --cloud`](</docs/en/claude-code-on-the-web#from-terminal-to-web>), and [scheduled routines](</docs/en/routines>), and by default they execute on Anthropic’s infrastructure. In a self-hosted environment, those same sessions execute inside your network, and the developer experience is otherwise the same apart from the differences in Availability and limitations and the deploy page’s [known issues](</docs/en/self-hosted-environments-deploy#known-issues-and-limitations>). If your team doesn’t use cloud sessions, there’s nothing here to configure: sessions in a terminal or IDE always run on the developer’s own machine. If you want to run Claude Code on your own always-on machine and drive it from other devices, use [Remote Control](</docs/en/remote-control>), which is also available on Pro and Max plans. When you’re ready to set up, go straight to the [quickstart](</docs/en/self-hosted-environments-quickstart>); to review the security posture first, start with [Deploy to production](</docs/en/self-hosted-environments-deploy>). The rest of this page explains how self-hosting works and when to choose it.
+A self-hosted environment executes Claude Code cloud sessions on infrastructure your organization operates. A [cloud session](</docs/en/claude-code-on-the-web>) is any session that runs somewhere other than the developer’s machine: developers start them from claude.ai, the mobile and desktop apps, the terminal with [`claude --cloud`](</docs/en/claude-code-on-the-web#from-terminal-to-cloud>), and [scheduled routines](</docs/en/routines>), and by default they execute on Anthropic’s infrastructure. In a self-hosted environment, those same sessions execute inside your network, and the developer experience is otherwise the same apart from the differences in Availability and limitations and the deploy page’s [known issues](</docs/en/self-hosted-environments-deploy#known-issues-and-limitations>). If your team doesn’t use cloud sessions, there’s nothing here to configure: sessions in a terminal or IDE always run on the developer’s own machine. If you want to run Claude Code on your own always-on machine and drive it from other devices, use [Remote Control](</docs/en/remote-control>), which is also available on Pro and Max plans. When you’re ready to set up, go straight to the [quickstart](</docs/en/self-hosted-environments-quickstart>); to review the security posture first, start with [Deploy to production](</docs/en/self-hosted-environments-deploy>). The rest of this page explains how self-hosting works and when to choose it.
##
@@ -26,10 +26,10 @@
Check these before planning a rollout:
- * **Plans** : public beta for Team and Enterprise organizations. Self-hosted environments are off by default; an [Owner](</docs/en/cloud-environments#organization-shared-environments>) turns on **Allow self-hosted environments** on the [**Cloud environments** admin page](<https://claude.ai/admin-settings/cloud-environments>), which requires [Claude Code on the web](</docs/en/claude-code-on-the-web>) to be enabled for the organization.
+ * **Plans** : public beta for Team and Enterprise organizations. Self-hosted environments are off by default; an [Owner](</docs/en/cloud-environments#organization-shared-environments>) turns on **Allow self-hosted environments** on the [**Cloud environments** admin page](<https://claude.ai/admin-settings/cloud-environments>), which requires [cloud sessions](</docs/en/claude-code-on-the-web>) to be enabled for the organization.
* **Zero Data Retention** : unavailable for organizations with [Zero Data Retention](</docs/en/zero-data-retention>) enabled.
* **Model inference** : sessions use the Anthropic API, and inference can’t be routed through [Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry](</docs/en/third-party-integrations>), or an [LLM gateway](</docs/en/llm-gateway>).
- * **Surfaces** : sessions started from [Claude Code on the web](</docs/en/claude-code-on-the-web>), the mobile and desktop apps, [scheduled routines](</docs/en/routines>), and the terminal, with [`claude --cloud`](</docs/en/claude-code-on-the-web#from-terminal-to-web>) or an [`--environment` dispatch](</docs/en/self-hosted-environments-testing#run-the-test-loop>), can run in self-hosted environments. [Claude Tag](<https://claude.com/docs/claude-tag/overview>) sessions can run in them too, but Claude can’t use [Access bundles](<https://claude.com/docs/claude-tag/concepts/glossary#access-bundle>) in those sessions yet. [Claude Security](</docs/en/claude-security>) and [Code Review](</docs/en/code-review>) sessions don’t route to them yet. Support for those two surfaces follows separately.
+ * **Surfaces** : sessions started from [claude.ai/code](<https://claude.ai/code>), the mobile and desktop apps, [scheduled routines](</docs/en/routines>), and the terminal, with [`claude --cloud`](</docs/en/claude-code-on-the-web#from-terminal-to-cloud>) or an [`--environment` dispatch](</docs/en/self-hosted-environments-testing#run-the-test-loop>), can run in self-hosted environments. [Claude Tag](<https://claude.com/docs/claude-tag/overview>) sessions can run in them too, but Claude can’t use [Access bundles](<https://claude.com/docs/claude-tag/concepts/glossary#access-bundle>) in those sessions yet. [Claude Security](</docs/en/claude-security>) and [Code Review](</docs/en/code-review>) sessions don’t route to them yet. Support for those two surfaces follows separately.
* **Repositories** : sessions check out repositories from GitHub; see [GitHub authentication options](</docs/en/claude-code-on-the-web#github-authentication-options>).
* **Billing** : sessions in a self-hosted environment consume your organization’s Claude Code usage the same way sessions in Anthropic-hosted environments do.
--- a/self-hosted-environments-configuration.md
+++ b/self-hosted-environments-configuration.md
@@ -19,11 +19,11 @@
`CLAUDE_CODE_SESSION_ACCESS_TOKEN`| The session JWT, prefixed `sk-ant-cc-`. Its `act` claim identifies the session creator, with the creator’s email and upstream identity-provider subject when the creating surface recorded them. The value is the token at spawn time; refreshes arrive over the child’s stdin, so a wrapper sees only the initial value. See [Verify session identity](</docs/en/self-hosted-environments-identity>).
`CCR_SESSION_ACCOUNT_EMAIL`| The session creator’s email, pre-extracted by the runner from the token’s `act.email` claim without signature verification. Suitable for labelling, such as commit trailers. When the email gates credential issuance, verify the token and read the claim from it instead; see Provision credentials scoped to the session creator. Unset when the token carries no creator email. Treat as personally identifiable information.
`CLAUDE_RUNNER_CLIENT_PLATFORM`| The client surface that created the session, such as `web_claude_ai`, `desktop_app`, `ios`, `claude_code_cli`, or `scheduled_trigger`. Anthropic records the value once at session creation, so the wrapper and every lifecycle hook see the same value. Use it for adoption analytics and labelling only, not as an authorization signal. Unset when the session has no recorded or recognized surface, so reference it as `${CLAUDE_RUNNER_CLIENT_PLATFORM:-}` under `set -u`. Requires Claude Code v2.1.229 or later.
-`CLAUDE_RUNNER_CLAUDE_BIN`| Absolute path to the runner’s own Claude Code binary. End your wrapper with `exec "$CLAUDE_RUNNER_CLAUDE_BIN" "$@"` to hand off to the pinned binary without hardcoding an install path.
+`CLAUDE_RUNNER_CLAUDE_BIN`| Absolute path to the runner’s own Claude Code binary. End your wrapper with `exec "$CLAUDE_RUNNER_CLAUDE_BIN" "$@"` to pass control to the pinned binary without hardcoding an install path.
`CLAUDE_CODE_REMOTE_SESSION_ID`| Session ID in the tagged `cse_...` form. This is the same session the lifecycle hooks see as `CLAUDE_RUNNER_SESSION_ID` in `session_...` form; the UUID variables match across both, and substituting the `cse_` prefix with `session_` yields the ID shown in the session URL.
`CLAUDE_CODE_REMOTE_SESSION_UUID`| The same session ID in canonical UUID form, for systems that key on UUIDs.
`CLAUDE_SESSION_INGRESS_TOKEN_FILE`| Absolute path to a per-session file holding the current session JWT, kept fresh across token refreshes. Shell subprocesses read it for their `Authorization` header when downloading attachments the user added to the session. `exec` preserves the variable automatically; a wrapper that rebuilds the child’s environment must carry the variable over, or attachment downloads silently stop working.
-`CLAUDE_CONFIG_DIR`| Per-session Claude config directory, written at session start from the snapshot of the runner host’s config that the runner captures at startup; see Permissions and tool approval. Writes here are isolated to this session.
+`CLAUDE_CONFIG_DIR`| Per-session Claude config directory, written at session start from the snapshot of the runner host’s config that the runner captures at startup; see Permissions and tool approval. Writes here are isolated to this session. The directory stays under `<base-dir>/_sessions/` after the session ends unless you start the runner with [`--remove-session-state`](</docs/en/self-hosted-environments-reference#runner-cli-flags>); see [Reuse a pre-warmed checkout](</docs/en/self-hosted-environments-deploy#reuse-a-pre-warmed-checkout>).
`ANTHROPIC_BASE_URL`| The API base URL the child will use, delivered by the control plane per session and normally `https://api.anthropic.com`. Don’t override it: the session’s inference credential is an Anthropic-issued OAuth token that other providers don’t accept, so inference in self-hosted environments isn’t routable elsewhere.
`CLAUDE_CODE_OAUTH_TOKEN`| The short-lived OAuth access token the child uses for model inference, scoped to model inference and file upload only, with a lifetime of about 30 minutes. The runner re-mints it before expiry and delivers the rotation over the child’s stdin, so a wrapper that doesn’t keep stdin attached sees only the initial value. Don’t rely on your organization’s IP allowlist to bound this token’s use: treat it as a bearer credential that stays usable for roughly 30 minutes if it leaks, and don’t log it, write it to disk, or forward it outside the session container.
--- a/self-hosted-environments-deploy.md
+++ b/self-hosted-environments-deploy.md
@@ -408,6 +408,8 @@
* **Any clone shape works** : a full, shallow, or single-branch clone at the path is used as-is. The runner never passes `--depth` when fetching into an existing clone, so a full pre-warm keeps its full history and a shallow one stays shallow. `CLAUDE_RUNNER_FETCH_DEPTH` (`full`, `0`, or a number; default 50) controls only the cold clone the runner makes when no clone exists yet.
* **Tracked changes reset, untracked files persist** : each session starts from a hard reset that wipes the previous session’s tracked modifications, but the runner never runs `git clean`, so untracked files from the locked owner’s earlier sessions stay in the tree.
+ * **Per-session directories persist too** : alongside the checkout, the runner creates per-session entries under `<base-dir>/_sessions/` for every session it runs. The session’s Claude config directory holds a local copy of the conversation transcript. Next to it sit the session’s uploaded files, when the session has any. The session directory sits there too: it holds any per-session worktrees and `checkout` hook checkouts while the session runs, and it keeps whatever else Claude wrote in it. By default the runner leaves these in place when the session ends, so on a disk that outlives the runner process they accumulate. Every session runs as the runner’s own user, so any later session that disk serves can read them. If you keep a persistent `--base-dir`, size the volume for that growth. The same applies to any setup that restarts the runner on the same filesystem, including the Docker Compose recipe.
+ * **With`--remove-session-state`, per-session directories don’t persist**: start the runner with [`--remove-session-state`](</docs/en/self-hosted-environments-reference#runner-cli-flags>) to have it delete each session’s per-session directories as the session ends. The deletion is best-effort: the directories stay when the runner is killed before its cleanup runs. The canonical clone and files a session wrote elsewhere on the host, such as the temporary directory, stay regardless.
* **With the git proxy, the reset becomes a checkout** : with `--use-anthropic-git-proxy`, the runner sanitizes the clone’s `.git/` before each session, keeping the object store, refs, and shallow state but deleting the index, so each session pays a full working-tree checkout instead of a near-instant reset; it still never re-clones. Submodule pre-warms aren’t supported under the proxy.
* **Long clones need no workaround** : the runner bounds each git operation with a 120-second no-progress watchdog and a 30-minute hard cap, not a flat timeout, so a slow cold clone that keeps reporting progress completes.
@@ -510,7 +512,7 @@
* **Sessions take minutes to start** : the initial clone usually dominates. Watch the `claude_code_self_hosted_runner_session_init_duration_seconds` [metric](</docs/en/self-hosted-environments-reference#prometheus-metrics>) to confirm, and cut the clone with a pre-warmed checkout or a smaller `CLAUDE_RUNNER_FETCH_DEPTH`.
* **Pod is killed mid-drain** : raise `terminationGracePeriodSeconds` to at least the value the runner logs at startup. See Shutdown timing.
-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 startup 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 preserves the log, prints the log’s path in the runner log, and surfaces the log’s tail alongside the session in claude.ai/code.
+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 startup 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-identity.md
+++ b/self-hosted-environments-identity.md
@@ -1,6 +1,6 @@
Self-hosted environments are in public beta on Team and Enterprise plans; an [Owner](</docs/en/cloud-environments#organization-shared-environments>) enables them by turning on **Allow self-hosted environments** on the [**Cloud environments** admin page](<https://claude.ai/admin-settings/cloud-environments>). This page covers session identity verification; see the [quickstart](</docs/en/self-hosted-environments-quickstart>) for setup and [Deploy to production](</docs/en/self-hosted-environments-deploy>) for the fleet recipes.
-A [self-hosted environment](</docs/en/self-hosted-environments>) lets [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions run on infrastructure you operate instead of on Anthropic’s. Because the session runs inside your network, Claude can call your internal services directly. Those services need a way to confirm that a request came from a Claude Code session in your environment, and to identify the user or service identity that created that session. Every session in a self-hosted environment receives a signed JSON Web Token (JWT) in the `CLAUDE_CODE_SESSION_ACCESS_TOKEN` environment variable. A session presents the token like any bearer credential; for example, a script Claude runs can call your service with `curl -H "Authorization: Bearer $CLAUDE_CODE_SESSION_ACCESS_TOKEN"`. Anthropic signs the token and publishes the verification keys at a public JWKS endpoint. Your services fetch those keys, verify the signature, and read the claims to decide what access to grant.
+A [self-hosted environment](</docs/en/self-hosted-environments>) lets Claude Code [cloud sessions](</docs/en/claude-code-on-the-web>) run on infrastructure you operate instead of on Anthropic’s. Because the session runs inside your network, Claude can call your internal services directly. Those services need a way to confirm that a request came from a Claude Code session in your environment, and to identify the user or service identity that created that session. Every session in a self-hosted environment receives a signed JSON Web Token (JWT) in the `CLAUDE_CODE_SESSION_ACCESS_TOKEN` environment variable. A session presents the token like any bearer credential; for example, a script Claude runs can call your service with `curl -H "Authorization: Bearer $CLAUDE_CODE_SESSION_ACCESS_TOKEN"`. Anthropic signs the token and publishes the verification keys at a public JWKS endpoint. Your services fetch those keys, verify the signature, and read the claims to decide what access to grant.
##
--- a/self-hosted-environments-reference.md
+++ b/self-hosted-environments-reference.md
@@ -40,6 +40,7 @@
`--proxy-authorization-file <path>`| `SELF_HOSTED_RUNNER_PROXY_AUTHORIZATION_FILE`| unset| File the runner reads for every connection to your egress proxy, using its trimmed contents as the `Proxy-Authorization` header value. Use this flag for a token another process rotates in place. Carries the same requirements as `--proxy-authorization-command`, and can’t be combined with it. See [Authenticate to an egress proxy](</docs/en/self-hosted-environments-deploy#authenticate-to-an-egress-proxy>). Requires Claude Code v2.1.238 or later.
`--push-outcome-on-release`| `SELF_HOSTED_RUNNER_PUSH_OUTCOME_ON_RELEASE`| off| On a runner-initiated session end such as a drain or idle release, push tracked outcome branches to `origin` before deleting the workspace, so in-flight commits survive a restart. Best-effort; adds 30 seconds to the shutdown budget, and requires git 2.29 or newer to resume from the pushed branch. Restrict push access to `claude/*` refs before enabling; see [Resumed sessions lose unpushed work](</docs/en/self-hosted-environments-deploy#additional-limitations>). Repositories checked out via a `checkout` lifecycle hook aren’t pushed; snapshot those from the [`post-session` hook](</docs/en/self-hosted-environments-configuration#post-session>) instead.
`--release-idle-session-min <n>`| `SELF_HOSTED_RUNNER_SESSION_IDLE_MS`| `0`| Release a session slot after N minutes of inactivity once a turn finishes or the session waits for the user’s action. A session that’s still mid-turn, including one holding a never-finishing background task or an approval requested from inside a running tool call, doesn’t count as idle; pair with `--kill-session-after-min` as the hard backstop. After a session’s background task finishes, the runner considers the session busy until the follow-up turn that reads the result starts, for at most the `SELF_HOSTED_RUNNER_BG_RESULT_GRACE_MS` window. Until the runner receives a shutdown signal or reaches its retire time, a release that leaves the runner with no active sessions starts the same exit path as a normal drain, governed by `--drain-grace-sec`. After a first signal you deferred with [`--defer-shutdown-max-min`](</docs/en/self-hosted-environments-deploy#defer-the-drain-past-the-first-signal>), the runner exits as soon as a release leaves it holding no sessions. `0` disables.
+`--remove-session-state [bool]`| `SELF_HOSTED_RUNNER_REMOVE_SESSION_STATE`| off| Remove a session’s per-session directories under `<base-dir>/_sessions/` when the session ends on this runner, whatever the outcome. [Reuse a pre-warmed checkout](</docs/en/self-hosted-environments-deploy#reuse-a-pre-warmed-checkout>) describes what they hold and who can read them when they stay. The removal is best-effort: the per-session directories stay in place when the runner is killed or reaches its drain deadline before cleanup runs. With the flag on, a failed or interrupted session’s debug log isn’t kept on disk. Requires Claude Code v2.1.268 or later.
`--retire-at <epoch-seconds>`| `SELF_HOSTED_RUNNER_RETIRE_AT`| unset| Retire the runner at an absolute Unix timestamp in seconds, for infrastructure that kills the runner at a known time; [Runner lifecycle](</docs/en/self-hosted-environments#runner-lifecycle>) describes the release sequence and how to size the margin. Values before 2001 or after the year 5138 are rejected by the flag and ignored by the environment variable.
`--session-stop-grace-sec <n>`| `SELF_HOSTED_RUNNER_SESSION_STOP_GRACE_MS`| `5`| How long to wait for the Claude process to exit cleanly after a session ends, before force-killing it. Raise the value if the child’s own `SessionEnd` hooks need more time.
`--startup-timeout-min <n>`| `SELF_HOSTED_RUNNER_STARTUP_TIMEOUT_MS`| `15`| Release a session slot if the child hasn’t signaled that it initialized within N minutes of spawn. Cleared by the child’s init signal on the [activity channel](</docs/en/self-hosted-environments-configuration#keep-stdin-and-file-descriptor-3-attached>), not by ordinary output, after which `--release-idle-session-min` takes over. `0` disables.
--- a/self-hosted-environments-testing.md
+++ b/self-hosted-environments-testing.md
@@ -64,7 +64,7 @@
Before you start the runner
-Two things the hook depends on:
+The hook has these requirements:
* Install it before you start the runner. The runner snapshots `~/.claude/` once at startup, so a hook added to a running runner takes effect only after a restart.
* Export `E2E_REPLY_DIR` to the runner process. The hook is a no-op when the variable is unset or the directory doesn’t exist, so set it wherever you start the runner, such as the systemd unit, pod spec, or CI step. The test script below requires it too.
@@ -210,7 +210,7 @@
Ephemeral CI runners
-There is no long-lived CI token for this today. The scope that grants remote-session control, `user:sessions:claude_code`, is capped server-side at 30 days, so `claude setup-token`, which mints a one-year inference-only token, doesn’t cover it. The [environment secret](</docs/en/self-hosted-environments-quickstart#set-up-an-environment-and-runner>) isn’t accepted either, since it only authorizes a runner to register with the environment, not to create sessions. To provision a stored login onto an ephemeral runner, set [`CLAUDE_CODE_OAUTH_REFRESH_TOKEN` and `CLAUDE_CODE_OAUTH_SCOPES`](</docs/en/env-vars#variables>) so `claude auth login` exchanges the token without a browser; the same 30-day cap applies to the refresh grant. Contact your Anthropic account team if you need a machine-identity path that isn’t bound to a human account.
+There is no long-lived CI token for this today. The scope that grants cloud-session control, `user:sessions:claude_code`, is capped server-side at 30 days, so `claude setup-token`, which mints a one-year inference-only token, doesn’t cover it. The [environment secret](</docs/en/self-hosted-environments-quickstart#set-up-an-environment-and-runner>) isn’t accepted either, since it only authorizes a runner to register with the environment, not to create sessions. To provision a stored login onto an ephemeral runner, set [`CLAUDE_CODE_OAUTH_REFRESH_TOKEN` and `CLAUDE_CODE_OAUTH_SCOPES`](</docs/en/env-vars#variables>) so `claude auth login` exchanges the token without a browser; the same 30-day cap applies to the refresh grant. Contact your Anthropic account team if you need a machine-identity path that isn’t bound to a human account.
##
--- a/server-managed-settings.md
+++ b/server-managed-settings.md
@@ -27,7 +27,7 @@
**Server-managed settings**| Organizations without MDM, or users on unmanaged devices| Settings that Claude Code fetches from Anthropic’s servers at startup and refreshes hourly during the session
**[Endpoint-managed settings](</docs/en/managed-settings#delivery-mechanisms>)**| Organizations with MDM or endpoint management| Settings deployed to devices via MDM configuration profiles, registry policies, or managed settings files
-If your devices are enrolled in an MDM or endpoint management solution, endpoint-managed settings provide stronger security guarantees because the settings file can be protected from user modification at the OS level. Endpoint-managed settings don’t reach [cloud sessions](</docs/en/model-config#surface-coverage>) in Anthropic-hosted environments, so organizations using Claude Code on the web should configure server-managed settings as well. Sessions in a [self-hosted environment](</docs/en/self-hosted-environments>) also read the managed settings file in the runner image. The settings precedence below says when that file applies.
+If your devices are enrolled in an MDM or endpoint management solution, endpoint-managed settings provide stronger security guarantees because the settings file can be protected from user modification at the OS level. Endpoint-managed settings don’t reach [cloud sessions](</docs/en/model-config#surface-coverage>) in Anthropic-hosted environments, so organizations whose developers run cloud sessions should configure server-managed settings as well. Sessions in a [self-hosted environment](</docs/en/self-hosted-environments>) also read the managed settings file in the runner image. The settings precedence below says when that file applies.
##
--- a/session-storage.md
+++ b/session-storage.md
@@ -1,7 +1,7 @@
-By default, the SDK writes session transcripts to JSONL files under `~/.claude/projects/` on the local filesystem. A `SessionStore` adapter lets you mirror those transcripts to your own backend, such as S3, Redis, or a database, so a session created on one host can be resumed on another host running from a matching working directory. Common reasons to use a session store:
+By default, the SDK writes session transcripts to JSONL files under `~/.claude/projects/` on the local filesystem. A `SessionStore` adapter lets you mirror those transcripts to your own backend, such as an object store, a key-value store, or a database, so a session created on one host can be resumed on another host running from a matching working directory. Common reasons to use a session store:
* **Multi-host deployments.** Serverless functions, autoscaled workers, and CI runners don’t share a filesystem. A shared store lets replicas resume each other’s sessions.
- * **Durability.** Local containers are ephemeral. A store backed by S3 or a database survives restarts and redeploys.
+ * **Durability.** Local containers are ephemeral. An external store survives restarts and redeploys.
* **Compliance and audit.** Keep transcripts in storage you already govern, with your own retention rules, encryption, and access controls.
##
@@ -177,7 +177,7 @@
Write your own adapter
-Implement `append` and `load` against your backend. Add `listSessions`, `listSessionSummaries`, `delete`, and `listSubkeys` if you want `listSessions()`, one-call metadata reads, `deleteSession()`, and subagent resume to work against the store. Entries passed to `append` are typed as `SessionStoreEntry` (a `{ type: string; ... }` object). Treat them as opaque JSON-safe values: persist them in order and return them from `load` in the same order. `load` must return entries that are deep-equal to what was appended; byte-equal serialization is not required, so backends like Postgres `jsonb` that reorder object keys are fine.
+Implement `append` and `load` against your backend. Add `listSessions`, `listSessionSummaries`, `delete`, and `listSubkeys` if you want `listSessions()`, one-call metadata reads, `deleteSession()`, and subagent resume to work against the store. Entries passed to `append` are typed as `SessionStoreEntry` (a `{ type: string; ... }` object). Treat them as opaque JSON-safe values: persist them in order and return them from `load` in the same order. `load` must return entries that are deep-equal to what was appended; byte-equal serialization is not required, so a backend that reorders object keys, such as a binary JSON column type, is fine.
##
@@ -185,15 +185,15 @@
Reference implementations
-The TypeScript SDK repository includes runnable reference adapters for S3, Redis, and Postgres under [`examples/session-stores/`](<https://github.com/anthropics/claude-agent-sdk-typescript/tree/main/examples/session-stores>). They are not published to npm; copy the `src/` file you need into your project and install the corresponding backend client.
-
-Adapter| Backend client| Storage model
+Both SDK repositories include runnable reference adapters under [`examples/session-stores/`](<https://github.com/anthropics/claude-agent-sdk-typescript/tree/main/examples/session-stores>) in TypeScript and [`examples/session_stores/`](<https://github.com/anthropics/claude-agent-sdk-python/tree/main/examples/session_stores>) in Python. There is one adapter per storage type, and each shows how `append` and `load` map onto that kind of backend. They are not published as packages; copy the adapter for the type closest to your backend into your project, install your backend’s client, and adapt it.
+
+Storage type| Storage model| Example adapter
---|---|---
-[`S3SessionStore`](<https://github.com/anthropics/claude-agent-sdk-typescript/tree/main/examples/session-stores/s3>)| `@aws-sdk/client-s3`| One JSONL part file per `append()`; `load()` lists, sorts, and concatenates.
-[`RedisSessionStore`](<https://github.com/anthropics/claude-agent-sdk-typescript/tree/main/examples/session-stores/redis>)| `ioredis`| `RPUSH`/`LRANGE` list per transcript, plus a sorted-set session index.
-[`PostgresSessionStore`](<https://github.com/anthropics/claude-agent-sdk-typescript/tree/main/examples/session-stores/postgres>)| `pg`| One row per entry in a `jsonb` table, ordered by `BIGSERIAL`.
-
-Each adapter takes a pre-configured client instance, so you control credentials, TLS, region, and pooling. For example, with S3:
+Object store| One part file per `append()`; `load()` lists the parts, sorts them, and concatenates.| S3 ([TypeScript](<https://github.com/anthropics/claude-agent-sdk-typescript/tree/main/examples/session-stores/s3>), [Python](<https://github.com/anthropics/claude-agent-sdk-python/blob/main/examples/session_stores/s3_session_store.py>))
+Key-value store| One list per transcript that `append()` pushes to and `load()` reads in range, plus a sorted index of sessions.| Redis ([TypeScript](<https://github.com/anthropics/claude-agent-sdk-typescript/tree/main/examples/session-stores/redis>), [Python](<https://github.com/anthropics/claude-agent-sdk-python/blob/main/examples/session_stores/redis_session_store.py>))
+Relational database or document store| One row or document per entry, stored as JSON and ordered by a key assigned on insert.| Postgres ([TypeScript](<https://github.com/anthropics/claude-agent-sdk-typescript/tree/main/examples/session-stores/postgres>), [Python](<https://github.com/anthropics/claude-agent-sdk-python/blob/main/examples/session_stores/postgres_session_store.py>))
+
+Each adapter takes a pre-configured client instance, so you control credentials, TLS, region, and pooling. The following example wires the object-store adapter into `query()` and then resumes from it on another host:
TypeScript
@@ -329,7 +329,7 @@
Retention
-The SDK never deletes from your store on its own. Retention is the adapter’s responsibility: implement TTLs, S3 lifecycle policies, or scheduled cleanup according to your compliance requirements. Local transcripts under `CLAUDE_CONFIG_DIR` are swept independently by the `cleanupPeriodDays` setting, following the [retention sweep rules](</docs/en/claude-directory#cleaned-up-automatically>). A run resumed from the store leaves no local transcript, so for those runs your store’s retention is the only retention there is.
+The SDK never deletes from your store on its own. Retention is the adapter’s responsibility: use your backend’s expiry or lifecycle mechanism, or run scheduled cleanup, according to your compliance requirements. Local transcripts under `CLAUDE_CONFIG_DIR` are swept independently by the `cleanupPeriodDays` setting, following the [retention sweep rules](</docs/en/claude-directory#cleaned-up-automatically>). A run resumed from the store leaves no local transcript, so for those runs your store’s retention is the only retention there is.
##
@@ -362,4 +362,4 @@
* [Work with sessions](</docs/en/agent-sdk/sessions>): Continue, resume, and fork without a custom store
* [Host the SDK](</docs/en/agent-sdk/hosting>): Deployment patterns for multi-host environments
* [TypeScript `Options`](</docs/en/agent-sdk/typescript#options>): Full option reference
- * [`examples/session-stores/`](<https://github.com/anthropics/claude-agent-sdk-typescript/tree/main/examples/session-stores>): Runnable S3, Redis, and Postgres reference adapters
+ * Reference implementations: Runnable example adapters for an object store, a key-value store, and a database, in both SDK repositories
--- a/settings.md
+++ b/settings.md
@@ -4,7 +4,7 @@
Claude Code reads settings from JSON settings files such as `~/.claude/settings.json`. It looks for them in a few locations, and the file it reads a setting from decides who the setting applies to. This page covers those files: which one to put a setting in, how to change a setting and confirm it applied, and which value Claude Code uses when the same key is set in more than one file. [Configure permissions](</docs/en/permissions>) covers what Claude Code can run without asking and how to write `allow`, `ask`, and `deny` rules.
-This page covers Claude Code running on your machine: the terminal, the [VS Code](</docs/en/vs-code>) and [JetBrains](</docs/en/jetbrains>) extensions, and the [desktop app](</docs/en/desktop>), which all read the same settings files. A cloud session on [Claude Code on the web](</docs/en/claude-code-on-the-web>) runs on a different machine and reads only some of them; see Settings in cloud sessions.
+This page covers Claude Code running on your machine: the terminal, the [VS Code](</docs/en/vs-code>) and [JetBrains](</docs/en/jetbrains>) extensions, and the [desktop app](</docs/en/desktop>), which all read the same settings files. A [cloud session](</docs/en/claude-code-on-the-web>) runs on a different machine and reads only some of them; see Settings in cloud sessions.
##
@@ -66,7 +66,7 @@
Keep personal settings out of a repository
-To change a setting for yourself in one project without changing it for your teammates, save it in `.claude/settings.local.json` inside the project. Claude Code applies that file over the committed `.claude/settings.json`, so if your team’s file sets `"model": "claude-sonnet-5"` and you want Opus, put `"model": "claude-opus-4-8"` in your local file and only your sessions change. Three things to know about the local file:
+To change a setting for yourself in one project without changing it for your teammates, save it in `.claude/settings.local.json` inside the project. Claude Code applies that file over the committed `.claude/settings.json`, so if your team’s file sets `"model": "claude-sonnet-5"` and you want Opus, put `"model": "claude-opus-4-8"` in your local file and only your sessions change. Claude Code also writes to this file, keeps it out of your commits, and applies its allow rules without the trust step:
* **Claude Code writes it too.** When Claude asks permission to run a Bash command and you choose “Yes, and don’t ask again”, Claude Code saves that [permission approval](</docs/en/permissions#permission-system>) here as an `allow` rule.
* **You don’t need to gitignore it yourself, unless you created it by hand.** The first time Claude Code writes the file in a git repository that doesn’t already ignore it, it adds `**/.claude/settings.local.json` to your global git excludes file, so the file stays out of your commits in every repository. That file is `core.excludesFile` when your global git config sets it to an absolute or `~`-prefixed path; otherwise it’s `$XDG_CONFIG_HOME/git/ignore`, or `~/.config/git/ignore` when `XDG_CONFIG_HOME` is unset. If you created the file by hand and Claude Code hasn’t written to it yet, add it to `.gitignore` yourself.
@@ -313,7 +313,7 @@
Two things keep a key in `.claude/settings.json` from applying for everyone who clones it:
- * **Claude Code ignores the key in a repository file.** Look for `User, local, or managed`, `User or managed`, `Managed`, or `Global config` in the Scope column of the [settings index](</docs/en/settings-reference#settings-index>); those keys never apply from the shared file, apart from [`autoContinueAtUsageLimit`](</docs/en/settings-reference#autocontinueatusagelimit>), which a repository file can still switch off: while the file sets the key and no user, `--settings`, or managed value does, Claude Code reads the setting as off. `Global config` keys apply only from `~/.claude.json`.
+ * **Claude Code ignores the key in a repository file.** Look for `User, local, or managed`, `User or managed`, `Managed`, or `Global config` in the Scope column of the [settings index](</docs/en/settings-reference#settings-index>). Those keys never apply from the shared file, apart from a few that a repository file can still switch off. Each of those entries says so on its Scope line. `Global config` keys apply only from `~/.claude.json`.
* **The key waits for trust.** `permissions.allow` rules, `permissions.additionalDirectories`, `extraKnownMarketplaces`, and most [`env`](</docs/en/settings-reference#env>) values apply only after each teammate [trusts the folder](</docs/en/permissions#project-allow-rules-and-workspace-trust>). Until then they still see prompts and don’t get plugins from a marketplace the file declares. `deny` and `ask` rules apply right away.
####
@@ -352,12 +352,12 @@
Settings in cloud sessions
-A cloud session, on [Claude Code on the web](</docs/en/claude-code-on-the-web>) or from [`claude --cloud`](</docs/en/claude-code-on-the-web#from-terminal-to-web>), runs in a [cloud environment](</docs/en/cloud-environments>) on a fresh clone of your repository, not on your machine. That changes which settings reach it:
+A [cloud session](</docs/en/claude-code-on-the-web>) runs in a [cloud environment](</docs/en/cloud-environments>) on a fresh clone of your repository, not on your machine. That changes which settings reach it:
* **Shared project settings** (`.claude/settings.json`): read, because the file is part of the clone. Commit a setting there to apply it in cloud sessions.
* **User and project local settings** (`~/.claude/settings.json` and `.claude/settings.local.json`): not read. Both stay on your machine, and the local file isn’t in the clone.
* **Managed settings** : only [server-managed settings](</docs/en/server-managed-settings>) reach a cloud session; a `managed-settings.json` file or MDM profile on your device doesn’t. A [self-hosted environment](</docs/en/self-hosted-environments>) also reads the managed settings file in its runner image. [How Claude Code combines managed sources](</docs/en/managed-settings#how-claude-code-combines-managed-sources>) says when that file applies.
- * **`/config`** : on the web, opens the Claude Code section of your claude.ai settings instead of changing a value. To change a setting for a cloud session, set an [environment variable](</docs/en/cloud-environments#set-environment-variables>) on the environment or commit the key to the repository’s `.claude/settings.json`.
+ * **`/config`** : in your browser at claude.ai/code, opens the Claude Code section of your claude.ai settings instead of changing a value. To change a setting for a cloud session, set an [environment variable](</docs/en/cloud-environments#set-environment-variables>) on the environment or commit the key to the repository’s `.claude/settings.json`.
[What carries over from your setup](</docs/en/cloud-environments#what-carries-over-from-your-setup>) lists the rest: `CLAUDE.md`, skills, MCP servers, plugins, and credentials.
--- a/settings-example.md
+++ b/settings-example.md
@@ -88,7 +88,7 @@
One team’s shared settings, committed to the repository so everyone who clones it gets the same permissions, hooks, telemetry, and plugin marketplace. Save a file like this at `.claude/settings.json` at the top of the repository. What to know before you commit one:
- * **Cloud sessions read it too.** A [cloud session](</docs/en/settings#settings-in-cloud-sessions>) on Claude Code on the web starts from a clone of the repository, so the committed file applies there as well.
+ * **Cloud sessions read it too.** A [cloud session](</docs/en/settings#settings-in-cloud-sessions>) starts from a clone of the repository, so the committed file applies there as well.
* **Allow rules wait for trust.** Allow rules and `extraKnownMarketplaces` entries take effect after each person [trusts this folder itself](</docs/en/permissions#project-allow-rules-and-workspace-trust>), not only a parent folder; deny and ask rules apply in every session, trusted or not.
* **The hook is a script in the repo.** This file’s hook runs `.claude/hooks/block-rm.sh`; [How a hook resolves](</docs/en/hooks#how-a-hook-resolves>) walks through writing it.
* **Rules match the command and path as written.** `Bash(git push *)` doesn’t match [`git -C . push`](</docs/en/permissions#bash-rule-limits>). `Read(./.env)` on its own stops the file tools and commands that name the file, such as `cat .env`, but not [`grep -r` run over the directory](</docs/en/permissions#read-and-edit>); the `sandbox` block in this file closes that gap, because the sandbox [adds your `Read` deny paths](</docs/en/settings-reference#sandbox-filesystem-denyread>) to what every sandboxed command can’t read.
Show diff (149 lines)
--- a/settings-reference.md
+++ b/settings-reference.md
@@ -43,6 +43,7 @@
`awsAuthRefresh`| Refresh expired [Bedrock credentials](</docs/en/amazon-bedrock#advanced-credential-configuration>) in `.aws` with your own command| Authentication and providers| Any file
`awsCredentialExport`| Supply [Bedrock credentials](</docs/en/amazon-bedrock#advanced-credential-configuration>) as JSON from your own command| Authentication and providers| Any file
`axScreenReader`| Render [screen-reader friendly output](</docs/en/accessibility>)| Interface and terminal| Any file
+`bashEditDiffEnabled`| Record the [files a Bash command changed](</docs/en/hooks#bash>) in every permission mode| Interface and terminal| User or managed
`bashOutputMaxChars`| Set how much of a successful command’s [output](</docs/en/tools-reference#output-limits>) Claude receives inline| Memory and context| Any file
`blockedMarketplaces`| Block [plugin marketplace](</docs/en/plugin-marketplaces>) sources for your organization| Plugins and skills| Managed
`browserExternalPageTools`| Keep Claude’s tools off external pages in the [desktop](</docs/en/desktop>) Browser pane| Tools| Managed
@@ -98,6 +99,7 @@
`forceLoginMethod`| [Restrict login](</docs/en/authentication#restrict-login-to-your-organization>) to claude.ai, Claude Console, or a [cloud gateway](</docs/en/claude-apps-gateway>)| Authentication and providers| Any file
`forceLoginOrgUUID`| [Pin claude.ai logins to your organization](</docs/en/authentication#restrict-login-to-your-organization>); only a managed source enforces it| Authentication and providers| Any file
`forceRemoteSettingsRefresh`| Block startup until [server-managed settings](</docs/en/server-managed-settings>) are freshly fetched| Enterprise and managed settings| Managed
+`gatewayInternalNetworks`| Let `/login` reach a [cloud gateway](</docs/en/claude-apps-gateway#allow-a-gateway-on-public-address-space-you-own>) on public IPv4 space your organization uses internally| Authentication and providers| Managed
`gcpAuthRefresh`| Refresh [Google Cloud credentials](</docs/en/google-vertex-ai#advanced-credential-configuration>) with your own command| Authentication and providers| Any file
`hooks`| Run your own commands as [hooks](</docs/en/hooks>) at points in Claude Code’s lifecycle| Hooks and automation| Any file
`httpHookAllowedEnvVars`| Limit which env vars [HTTP hooks](</docs/en/hooks>) can put in headers| Hooks and automation| Any file
@@ -804,7 +806,7 @@
`allowManagedPermissionRulesOnly`
-Make managed settings the only settings source of permission rules. Claude Code then ignores `allow`, `ask`, and `deny` rules in user, project, local, and `--settings` files, ignores `--allowedTools`, hides the always-allow choices in permission prompts, and stops saving new rules. When [parent settings from an embedding host](</docs/en/managed-settings#let-an-embedding-host-add-policy>) apply, Claude Code treats them as part of the managed tier: it keeps their `deny` and `ask` rules and drops their `allow` rules and `additionalDirectories`. `--disallowedTools` rules and the current session’s `deny` and `ask` rules still apply, including after Claude Code reloads settings mid-session. They only restrict, so they can’t widen what the managed rules grant. Before v2.1.257, Claude Code dropped those command-line and session rules at the first settings reload.
+Make managed settings the only settings source of permission rules. Claude Code then ignores `allow`, `ask`, and `deny` rules in user, project, local, and `--settings` files, ignores `--allowedTools`, hides the always-allow choices in permission prompts, and stops saving new rules. When [parent settings from an embedding host](</docs/en/managed-settings#let-an-embedding-host-add-policy>) apply, Claude Code treats them as part of the managed tier. It drops their `allow` rules and `additionalDirectories`, and keeps their `deny` and `ask` rules except `Read` and `Edit` rules whose pattern starts with `!`. A host can’t carve paths out of the managed rules with a `!` rule, whether or not you set this key. `--disallowedTools` rules and the current session’s `deny` and `ask` rules still apply, including after Claude Code reloads settings mid-session. They only restrict, so they can’t widen what the managed rules grant. Before v2.1.257, Claude Code dropped those command-line and session rules at the first settings reload. For what a `!` pattern in a `--disallowedTools` or session rule can carve out, see [Read and Edit rules](</docs/en/permissions#read-and-edit>).
* **Scope** : `Managed`
* **Type** : Boolean
@@ -850,12 +852,12 @@
`autoMode.classifyAllShell`
-Send every Bash and PowerShell command through the auto mode classifier while auto mode is active. By default, auto mode suspends only allow rules that could run arbitrary code: tool-wide and wildcard rules such as `Bash(*)`, and interpreter or shell-wrapper prefixes such as `Bash(python *)`. A command that any other allow rule matches, such as `Bash(npm test)`, skips the classifier, and a destructive argument the rule’s prefix didn’t anticipate can get through unseen. Setting this key suspends every shell allow rule for the session so the classifier sees every command. Requires Claude Code v2.1.193 or later.
+Send every Bash and PowerShell command through the auto mode classifier while auto mode is active. By default, auto mode suspends only allow rules that could run arbitrary code: tool-wide and wildcard rules such as `Bash(*)`, and interpreter or shell-wrapper prefixes such as `Bash(python *)`. A command that any other allow rule matches, such as `Bash(npm test)`, skips the classifier unless it carries [per-command allowed domains](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>). When it skips, a destructive argument the rule’s prefix didn’t anticipate can get through unseen. Setting this key suspends every shell allow rule for the session so the classifier sees every command. Requires Claude Code v2.1.193 or later.
* **Scope** : `User or managed`. Read wherever `autoMode` is read.
* **Type** : Boolean
* `true`: while auto mode is active, Claude Code sends every Bash and PowerShell command through the classifier and suspends your shell allow rules; outside auto mode the rules still apply
- * `false`: auto mode suspends only allow rules that could run arbitrary code, such as `Bash(*)` and `Bash(python *)`; a command that any other allow rule matches skips the classifier, and every other shell command goes through it
+ * `false`: auto mode suspends only allow rules that could run arbitrary code, such as `Bash(*)` and `Bash(python *)`; a command that any other allow rule matches skips the classifier unless it carries [per-command allowed domains](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>), and every other shell command goes through it
* **Default** : `false`
settings.json
@@ -1001,7 +1003,7 @@
`permissions.deny`
-List the tool uses Claude Code blocks. Use it for files that hold API keys, secrets, or environment values: Claude Code excludes matching files from file discovery and search results, denies reads of them, and blocks the [Edit and Write tools](</docs/en/permissions#read-and-edit>) on the matching paths. Read and Edit deny rules apply to Claude’s built-in file tools, to file commands Claude Code recognizes in Bash, such as `cat`, `head`, `tail`, and `sed`, and to the targets of Bash [redirections](</docs/en/permissions#redirections>) such as `> file` and `< file`; they don’t apply to a command that reads files without naming them, such as `grep -r pattern .`, or to arbitrary subprocesses, so for OS-level enforcement [enable the sandbox](</docs/en/sandboxing>).
+List the tool uses Claude Code blocks. Use it for files that hold API keys, secrets, or environment values: Claude Code excludes matching files from file discovery and search results, denies reads of them, and blocks the [Edit and Write tools](</docs/en/permissions#read-and-edit>) on the matching paths. Read and Edit deny rules apply to Claude’s built-in file tools, to file commands Claude Code recognizes in Bash, such as `cat`, `head`, `tail`, `sed`, and `tee`, and to the targets of Bash [redirections](</docs/en/permissions#redirections>) such as `> file` and `< file`; they don’t apply to a command that reads files without naming them, such as `grep -r pattern .`, or to arbitrary subprocesses, so for OS-level enforcement [enable the sandbox](</docs/en/sandboxing>).
* **Scope** : `Any file`
* **Type** : array of permission rule strings
@@ -1055,7 +1057,7 @@
`permissions.blockReadsOutsideWorkingDirectories`
-Stop Claude from reading paths outside the session’s [working directories](</docs/en/permissions#working-directories>) with the Read, Grep, Glob, and LSP tools, in every permission mode including `bypassPermissions`. A Bash command that reads a matching path through a file command Claude Code recognizes, such as `cat`, prompts you even in auto mode and `bypassPermissions` mode. Requires Claude Code v2.1.257 or later. Claude Code also writes `true` here when you choose to block such reads on [auto mode’s prompt before the first read outside the working directories](</docs/en/permission-modes#first-read-outside-the-working-directories>).
+Stop Claude from reading paths outside the session’s [working directories](</docs/en/permissions#working-directories>) with the Read, Grep, Glob, and LSP tools, in every permission mode including `bypassPermissions`. A Bash command that reads a matching path through a file command Claude Code recognizes, such as `cat`, prompts you even in auto mode and `bypassPermissions` mode. Requires Claude Code v2.1.257 or later. A Bash command the shell parser can’t trace, such as one that changes directory more than once or runs a subshell, prompts you even in auto mode and `bypassPermissions` mode. The prompt appears even when the command names no path outside the working directories. This prompt doesn’t apply when the command runs in the [sandbox](</docs/en/sandboxing>) and the sandbox enforces the block. Claude Code also writes `true` here when you choose to block such reads on [auto mode’s prompt before the first read outside the working directories](</docs/en/permission-modes#first-read-outside-the-working-directories>).
* **Scope** : `Any file`. If any settings source sets `true`, the block applies, so a repository’s checked-in file can turn the block on for a project but can’t lift a block you set.
* **Type** : Boolean
@@ -1101,7 +1103,7 @@
}
}
-Permission rules layer on top of every mode: `deny` rules block in every mode, including `bypassPermissions`. See [Permission modes](</docs/en/permission-modes>). `manual` names the permission mode labeled Manual in the CLI and the VS Code extension; the alias requires Claude Code v2.1.200 or later. In Claude Code on the web, Claude Code honors only `acceptEdits`, `plan`, `default`, and `auto` from this key. For conversations the VS Code extension starts, see [which setting the extension reads for the starting permission mode](</docs/en/permission-modes#switch-permission-modes>).
+Permission rules layer on top of every mode: `deny` rules block in every mode, including `bypassPermissions`. See [Permission modes](</docs/en/permission-modes>). `manual` names the permission mode labeled Manual in the CLI and the VS Code extension; the alias requires Claude Code v2.1.200 or later. In cloud sessions, Claude Code honors only `acceptEdits`, `plan`, `default`, and `auto` from this key. For conversations the VS Code extension starts, see [which setting the extension reads for the starting permission mode](</docs/en/permission-modes#switch-permission-modes>).
###
@@ -2163,7 +2165,7 @@
* **Scope** : `User or managed`. A repository can’t turn it on or off.
* **Type** : Boolean
* `true`: Claude Code denies sandboxed commands access to hosts outside the allowlist
- * `false`: unless another trusted settings file sets `true`, Claude Code decides a host outside the allowlist by permission mode instead of denying it outright: it runs the classifier in auto mode, denies in `dontAsk` mode, allows in `bypassPermissions` mode and in plan mode when bypass is available, and otherwise asks you
+ * `false`: unless another trusted settings file sets `true`, Claude Code decides a host outside the allowlist by permission mode instead of denying it outright: in auto mode it checks the host against the command’s [per-command allowed domains](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>), in `dontAsk` mode it denies, in `bypassPermissions` mode and in interactive terminal plan-mode sessions where bypass is available it allows, and otherwise it asks you
* **Default** : `false`
settings.json
@@ -2691,6 +2693,25 @@
}
Requires Claude Code v2.1.181 or later.
+
+###
+
+
+
+`bashEditDiffEnabled`
+
+Choose whether Claude Code records the files a Bash command changes in a Git repository. When it records them, you see their diff in the terminal after the command, and your [PostToolUse Bash hooks](</docs/en/hooks#bash>) receive the changed-file list. Set the key to `true` to record them in every permission mode. Requires Claude Code v2.1.269 or later.
+
+ * **Scope** : `User or managed`. A `true` counts only from your user settings, JSON passed with `--settings`, or [managed settings](</docs/en/managed-settings>), so a `true` in a repository’s `.claude/settings.json` or `.claude/settings.local.json` can’t turn the recording on. A `false` in either repository file still turns it off unless a [higher-precedence](</docs/en/settings#settings-precedence>) file sets `true`.
+ * **Type** : Boolean
+ * **Default** : unset, so Claude Code records changes in auto mode and `bypassPermissions` mode when it directs Claude to edit files through Bash
+ * **Per-session overrides** : [`CLAUDE_CODE_BASH_EDIT_DIFF`](</docs/en/env-vars>) takes precedence over this key for one session
+
+settings.json
+
+ {
+ "bashEditDiffEnabled": true
+ }
###
@@ -5490,6 +5511,26 @@
+`gatewayInternalNetworks`
+
+Declare the public IPv4 blocks that your organization numbers its internal network from, so `/login` accepts a [cloud gateway](</docs/en/claude-apps-gateway>) there. Requires Claude Code v2.1.268 or later. Without this key, `/login` connects to any gateway on a private address and nothing else. With it, `/login` also accepts a gateway inside a listed block, over a direct connection only. The machine’s own address on that connection must also be inside the same block.
+
+ * **Scope** : `Managed`. Read only from a source on the machine: `managed-settings.json`, the macOS plist or Windows HKLM registry, or a policy helper. Claude Code ignores it in HKCU and server-managed settings.
+ * **Type** : array of strings, at most four IPv4 CIDR blocks, each `/8` to `/32`, not overlapping one another, and none overlapping private space.
+ * **Default** : unset, so `/login` accepts only gateways on private addresses
+
+managed-settings.json
+
+ {
+ "gatewayInternalNetworks": ["203.0.113.0/24"]
+ }
+
+Replace the documentation range in the example with your own block. Claude Code refuses the documentation ranges, the ranges that VPN and NAT64 clients use locally, and reserved space that no network is numbered from, such as multicast. If an entry is invalid, or the value isn’t a list of strings, `/login` names the problem and refuses every new gateway sign-in on the machine until you fix the value. Existing sign-ins keep working. See [Allow a gateway on public address space you own](</docs/en/claude-apps-gateway#allow-a-gateway-on-public-address-space-you-own>) for the full rules and what developers see.
+
+###
+
+
+
`gcpAuthRefresh`
Run your own command to refresh Google Cloud Application Default Credentials when Claude Code finds they’ve expired or can’t be loaded, so [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>) requests keep working without you re-authenticating by hand.
@@ -5832,7 +5873,7 @@
"disableSideloadFlags": true
}
-Claude Code still accepts a `--mcp-config` whose servers are all in-process `type: "sdk"` entries, so the Agent SDK and VS Code extension keep working. Users can still add servers with `claude mcp add` or a `.mcp.json` file; for per-server control, set [`allowedMcpServers`](</docs/en/managed-mcp>) as well. Requires Claude Code v2.1.193 or later. In cloud sessions, Claude Code also ignores server-delivered mid-session MCP updates, the path behind cloud session configuration and SDK `setMcpServers()` on remote workers. In-process `type: "sdk"` entries stay exempt there too. Before v2.1.239, a server-delivered `--mcp-config` blocked a cloud session from starting.
+Claude Code still accepts a `--mcp-config` whose servers are all in-process `type: "sdk"` entries, so the Agent SDK and VS Code extension keep working. Users can still add servers with `claude mcp add` or a `.mcp.json` file; for per-server control, set [`allowedMcpServers`](</docs/en/managed-mcp>) as well. Requires Claude Code v2.1.193 or later. In cloud sessions, Claude Code also ignores server-delivered mid-session MCP updates, the path behind cloud session configuration and SDK `setMcpServers()` calls that reach those sessions. In-process `type: "sdk"` entries stay exempt there too. Before v2.1.239, a server-delivered `--mcp-config` blocked a cloud session from starting.
###
@@ -5893,7 +5934,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` and the `"gateway"` value of `forceLoginMethod`**: Claude Code never reads either 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.
+ * **`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.
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/setup.md
+++ b/setup.md
@@ -146,7 +146,7 @@
Authenticate
-Claude Code requires a Pro, Max, Team, Enterprise, or Console account. The free Claude.ai plan does not include Claude Code access. You can also use Claude Code with a third-party API provider like [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), or [Microsoft Foundry](</docs/en/microsoft-foundry>). After installing, log in by running `claude` and following the browser prompts. If the `ANTHROPIC_API_KEY` environment variable is set, Claude Code prompts you once to approve the key instead of opening a browser. See [Authentication](</docs/en/authentication>) for all account types and team setup options.
+Claude Code requires a Pro, Max, Team, Enterprise, or Console account. The free claude.ai plan does not include Claude Code access. You can also use Claude Code with a third-party API provider like [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), or [Microsoft Foundry](</docs/en/microsoft-foundry>). After installing, log in by running `claude` and following the browser prompts. If the `ANTHROPIC_API_KEY` environment variable is set, Claude Code prompts you once to approve the key instead of opening a browser. See [Authentication](</docs/en/authentication>) for all account types and team setup options.
##
--- a/skills.md
+++ b/skills.md
@@ -110,7 +110,7 @@
* **Your skills** : prompt artifacts that you author, each a directory holding a `SKILL.md` file. A user-invocable skill’s name joins the surface automatically, so dispatching your own `/security-check` and running a built-in work the same way
* **Custom command files** : an older artifact form with the same behavior, flat Markdown files in `.claude/commands/` whose filenames become command names. Skills are their recommended successor
-By default, both you and Claude can invoke any skill. You can restrict either path through the skill’s [frontmatter](</docs/en/skills#control-who-invokes-a-skill>). For a definition of the two terms, see the glossary’s [Command](</docs/en/glossary#command>) and [Skill](</docs/en/glossary#skill>) entries. See [Commands in Claude Code](</docs/en/commands>) for every built-in and [Extend Claude with skills](</docs/en/skills>) for the complete guide to both artifact forms.
+By default, both you and Claude can invoke any skill. You can restrict either path through the skill’s [frontmatter](</docs/en/skills#control-who-invokes-a-skill>). For definitions of command and skill, see the glossary’s [Command](</docs/en/glossary#command>) and [Skill](</docs/en/glossary#skill>) entries. See [Commands in Claude Code](</docs/en/commands>) for every built-in and [Extend Claude with skills](</docs/en/skills>) for the complete guide to both artifact forms.
###
Show diff (136 lines)
--- a/slack.md
+++ b/slack.md
@@ -3,7 +3,7 @@
* **Team and Enterprise plans:** Anthropic is retiring this version in favor of [Claude Tag](<https://claude.com/product/tag>), which runs @Claude as your organization’s shared identity with admin-configured access. Your existing Slack app and @Claude handle stay, and your Anthropic account team can tell you the cutover date. [Set up Claude Tag](<https://claude.com/docs/claude-tag/overview>) for a new workspace; to move one that already uses this version, see [Migrate from the earlier Claude in Slack](<https://claude.com/docs/claude-tag/admins/migrate-from-earlier>).
* **Pro and Max plans:** Claude Tag isn’t available on individual plans, so this page remains the setup path.
-Claude Code in Slack brings the power of Claude Code directly into your Slack workspace. When you mention `@Claude` with a coding task, Claude automatically detects the intent and creates a Claude Code session on the web, allowing you to delegate development work without leaving your team conversations. This integration is built on the existing Claude for Slack app but adds intelligent routing to Claude Code on the web for coding-related requests. Each session runs under your own Claude account, using your connected repositories and your plan limits.
+Claude Code in Slack brings the power of Claude Code directly into your Slack workspace. When you mention `@Claude` with a coding task, Claude automatically detects the intent and creates a Claude Code cloud session, allowing you to delegate development work without leaving your team conversations. This integration is built on the existing Claude for Slack app but adds intelligent routing to Claude Code cloud sessions for coding-related requests. Each session runs under your own Claude account, using your connected repositories and your plan limits.
##
@@ -27,8 +27,8 @@
Requirement| Details
---|---
Claude Plan| Pro, Max, Team, or Enterprise with Claude Code access (premium seats or Chat + Claude Code seats)
-Claude Code on the web| Access to [Claude Code on the web](</docs/en/claude-code-on-the-web>) must be enabled
-GitHub Account| Connected to Claude Code on the web with at least one repository authenticated
+Cloud sessions| [Cloud sessions](</docs/en/claude-code-on-the-web>) are enabled for your account
+GitHub Account| Connected at [claude.ai/code](<https://claude.ai/code>) with at least one repository authenticated
Slack Authentication| Your Slack account linked to your Claude account via the Claude app
##
@@ -50,15 +50,15 @@
After the app is installed, authenticate your individual Claude account:
1. Open the Claude app in Slack by clicking on “Claude” in your Apps section
- 2. Navigate to the App Home tab
+ 2. Open the App Home tab
3. Click “Connect” to link your Slack account with your Claude account
4. Complete the authentication flow in your browser
3
-Configure Claude Code on the web
-
-Ensure your Claude Code on the web is properly configured:
+Configure cloud sessions
+
+Ensure cloud sessions are properly configured for your account:
* Visit [claude.ai/code](<https://claude.ai/code>) and sign in with the same account you connected to Slack
* Connect your GitHub account if not already connected
@@ -68,7 +68,7 @@
Choose your routing mode
-After connecting your accounts, configure how Claude handles your messages in Slack. Navigate to the Claude App Home in Slack to find the **Routing Mode** setting.
+After connecting your accounts, configure how Claude handles your messages in Slack. Open the Claude App Home in Slack to find the **Routing Mode** setting.
Mode| Behavior
---|---
@@ -95,7 +95,7 @@
Automatic detection
-In Code + Chat routing mode, when you mention @Claude in a Slack channel or thread, Claude automatically detects whether your message is a coding task. Coding tasks go to Claude Code on the web. Anything else gets a regular chat reply. In Code only mode, every @mention goes to Claude Code. You can also explicitly tell Claude to handle a request as a coding task, even if it doesn’t automatically detect it.
+In Code + Chat routing mode, when you mention @Claude in a Slack channel or thread, Claude automatically detects whether your message is a coding task. Coding tasks go to a Claude Code cloud session. Anything else gets a regular chat reply. In Code only mode, every @mention goes to Claude Code. You can also explicitly tell Claude to handle a request as a coding task, even if it doesn’t automatically detect it.
Claude Code in Slack only works in channels (public or private). It does not work in direct messages (DMs).
@@ -137,7 +137,7 @@
* **View Session** : Opens the full Claude Code session in your browser where you can see all work performed, continue the session, or make additional requests.
* **Create PR** : Creates a pull request directly from the session’s changes.
* **Retry as Code** : If Claude initially responds as a chat assistant but you wanted a coding session, click this button to retry the request as a Claude Code task.
- * **Change Repo** : Allows you to select a different repository if Claude chose incorrectly.
+ * **Change Repo** : Lets you select a different repository if Claude chose incorrectly.
###
@@ -194,7 +194,7 @@
What’s accessible where
-**In Slack** : You’ll see status updates, completion summaries, and action buttons. The full transcript is preserved and always accessible. **On the web** : The complete Claude Code session with full conversation history, all code changes, and file operations. Sessions stay in your Claude Code history at [claude.ai/code](<https://claude.ai/code>), where you can continue past sessions, reference them, or create pull requests. For Enterprise and Team accounts, sessions created from Claude in Slack are automatically visible to the organization. See [Claude Code on the Web sharing](</docs/en/claude-code-on-the-web#share-sessions>) for more details.
+**In Slack** : You’ll see status updates, completion summaries, and action buttons. The full transcript is preserved and always accessible. **At claude.ai/code** : The complete Claude Code session with full conversation history, all code changes, and file operations. Sessions stay in your Claude Code history at [claude.ai/code](<https://claude.ai/code>), where you can continue past sessions, reference them, or create pull requests. For Enterprise and Team accounts, sessions created from Claude in Slack are automatically visible to the organization. See [cloud session sharing](</docs/en/claude-code-on-the-web#share-sessions>) for more details.
##
@@ -210,7 +210,7 @@
* **Be specific** : Include file names, function names, or error messages when relevant.
* **Provide context** : Mention the repository or project if it’s not clear from the conversation.
- * **Define success** : Explain what “done” looks like—should Claude write tests? Update documentation? Create a PR?
+ * **Define success** : Explain what “done” looks like. Should Claude write tests? Update documentation? Create a PR?
* **Use threads** : Reply in threads when discussing bugs or features so Claude can gather the full context.
###
@@ -219,7 +219,7 @@
When to use Slack vs. web
-**Use Slack when** : Context already exists in a Slack discussion, you want to kick off a task asynchronously, or you’re collaborating with teammates who need visibility. **Use the web directly when** : You need to upload files, want real-time interaction during development, or are working on longer, more complex tasks.
+**Use Slack when** : Context already exists in a Slack discussion, you want to start a task asynchronously, or you’re collaborating with teammates who need visibility. **Use the web directly when** : You need to upload files, want real-time interaction during development, or are working on longer, more complex tasks.
##
@@ -242,7 +242,7 @@
Sessions not starting
1. Verify your Claude account is connected in the Claude App Home
- 2. Check that you have Claude Code on the web access enabled
+ 2. Check that cloud sessions are enabled for your account
3. Ensure you have at least one GitHub repository connected to Claude Code
###
@@ -264,7 +264,7 @@
Repository not showing
- 1. Connect the repository in Claude Code on the web at [claude.ai/code](<https://claude.ai/code>)
+ 1. Connect the repository at [claude.ai/code](<https://claude.ai/code>)
2. Verify your GitHub permissions for that repository
3. Try disconnecting and reconnecting your GitHub account
@@ -295,7 +295,7 @@
* **GitHub only** : repositories must be on GitHub.
* **One PR at a time** : each session can create one pull request.
- * **Web access required** : users need access to Claude Code on the web; without it, Claude replies with standard chat responses.
+ * **Cloud session access required** : users need access to [cloud sessions](</docs/en/claude-code-on-the-web>); without it, Claude replies with standard chat responses.
##
@@ -303,9 +303,9 @@
Related resources
-## Claude Code on the web
-
-Learn more about Claude Code on the web
+## Claude Code in the cloud
+
+Learn more about cloud sessions
## Claude for Slack
--- a/statusline.md
+++ b/statusline.md
@@ -70,7 +70,7 @@
Build a status line step by step
-This walkthrough shows what’s happening under the hood by manually creating a status line that displays the current model, working directory, and context window usage percentage.
+This walkthrough shows what `/statusline` sets up for you by manually creating a status line that displays the current model, working directory, and context window usage percentage.
Running `/statusline` with a description of what you want configures all of this for you automatically.
@@ -319,7 +319,7 @@
* `agent`: appears only when running with the `--agent` flag or agent settings configured
* `pr`: appears only while an open PR or GitLab merge request is found for the current branch, and is removed once it merges or closes. `pr.review_state` and `pr.kind` may be independently absent
* `worktree`: appears only while the session is in a [worktree session](</docs/en/worktrees>). When present, `branch` and `original_branch` may also be absent for hook-based worktrees
- * `rate_limits`: appears only for Claude.ai Pro and Max subscribers, or behind a Claude apps gateway that sets a spend limit for you, and only after the first API response in the session. Each window (`five_hour`, `seven_day`, `spend_limit`) may be independently absent, and Claude Code drops a window once its `resets_at` time passes. Use `jq -r '.rate_limits.five_hour.used_percentage // empty'` to handle absence gracefully.
+ * `rate_limits`: appears only for claude.ai Pro and Max subscribers, or behind a Claude apps gateway that sets a spend limit for you, and only after the first API response in the session. Each window (`five_hour`, `seven_day`, `spend_limit`) may be independently absent, and Claude Code drops a window once its `resets_at` time passes. Use `jq -r '.rate_limits.five_hour.used_percentage // empty'` to handle absence gracefully.
* `prompt_cache`: appears after the main conversation’s first API response. See prompt cache fields
**Fields that may be`null`**:
@@ -804,7 +804,7 @@
Rate limit usage
-Display Claude.ai subscription rate limit usage in the status line. The `rate_limits` object contains a rolling `five_hour` window and a weekly `seven_day` window. Each window provides `used_percentage`, from 0 to 100, and `resets_at`, the Unix epoch seconds when the window resets. Behind a Claude apps gateway with spend limits, `rate_limits` carries `spend_limit` with the same two fields for the spend limit that applies to you, except that its `used_percentage` can go above 100 once you exceed the limit. Requires Claude Code v2.1.251 or later. The `rate_limits` object is only present for Claude.ai Pro and Max subscribers, or behind a Claude apps gateway with spend limits, and only after the first API response. Each script handles the absent field gracefully:
+Display claude.ai subscription rate limit usage in the status line. The `rate_limits` object contains a rolling `five_hour` window and a weekly `seven_day` window. Each window provides `used_percentage`, from 0 to 100, and `resets_at`, the Unix epoch seconds when the window resets. Behind a Claude apps gateway with spend limits, `rate_limits` carries `spend_limit` with the same two fields for the spend limit that applies to you, except that its `used_percentage` can go above 100 once you exceed the limit. Requires Claude Code v2.1.251 or later. The `rate_limits` object is only present for claude.ai Pro and Max subscribers, or behind a Claude apps gateway with spend limits, and only after the first API response. Each script handles the absent field gracefully:
Bash
--- a/sub-agents.md
+++ b/sub-agents.md
@@ -356,7 +356,7 @@
* `WaitForMcpServers`
* `Workflow`
-The second filter applies to subagents running in the background. Apart from `Agent` and `ExitPlanMode`, which follow the first filter’s conditions wherever the subagent runs, a background subagent keeps every MCP tool but only these built-in tools: `Read`, `Grep`, `Glob`, `Bash`, `PowerShell`, `Edit`, `Write`, `NotebookEdit`, `WebFetch`, `WebSearch`, `TodoWrite`, `Skill`, `ToolSearch`, `EnterWorktree`, `ExitWorktree`, `Monitor`, `TaskStop`, `SendMessage`, and `Artifact`. Claude Code removes every other built-in tool from a background subagent, whether inherited or listed in the `tools` field, so the same definition can resolve to different tools in the foreground and the background. The removal reports no error unless it leaves the `tools` list [resolving to nothing](</docs/en/errors#agent-would-be-spawned-with-zero-tools>). [`ListAgents`](</docs/en/cross-session-messaging>) follows these filters like any built-in tool: a foreground subagent inherits it in sessions where cross-session messaging is enabled, and a background subagent doesn’t keep it. Teammates in [agent teams](</docs/en/agent-teams>) additionally keep the task tools and cron tools: `TaskCreate`, `TaskGet`, `TaskList`, `TaskUpdate`, `CronCreate`, `CronDelete`, and `CronList`. In a [session without the Task tools](</docs/en/tools-reference#task-tool-availability>), Claude Code doesn’t provide the task tools to subagents either, even when the subagent runs a different model. An in-process teammate follows your session the same way, while a teammate in its own [split pane](</docs/en/agent-teams#choose-a-display-mode>) runs as a separate Claude Code process, so its own model decides. To restrict tools, use the `tools` field as an allowlist or the `disallowedTools` field as a denylist. This example uses `tools` to allow only Read, Grep, Glob, and Bash. The subagent can’t edit files, write files, or use any MCP tools:
+The second filter applies to subagents running in the background. Apart from `Agent` and `ExitPlanMode`, which follow the first filter’s conditions wherever the subagent runs, a background subagent keeps every MCP tool but only these built-in tools: `Read`, `Grep`, `Glob`, `Bash`, `PowerShell`, `Edit`, `Write`, `NotebookEdit`, `WebFetch`, `WebSearch`, `TodoWrite`, `Skill`, `ToolSearch`, `EnterWorktree`, `ExitWorktree`, `Monitor`, `TaskStop`, `SendMessage`, and `Artifact`, plus [`SubagentHandback`](</docs/en/tools-reference>) for a subagent that reports through it. Claude Code removes every other built-in tool from a background subagent, whether inherited or listed in the `tools` field, so the same definition can resolve to different tools in the foreground and the background. The removal reports no error unless it leaves the `tools` list [resolving to nothing](</docs/en/errors#agent-would-be-spawned-with-zero-tools>). [`ListAgents`](</docs/en/cross-session-messaging>) follows these filters like any built-in tool: a foreground subagent inherits it in sessions where cross-session messaging is enabled, and a background subagent doesn’t keep it. Teammates in [agent teams](</docs/en/agent-teams>) additionally keep the task tools and cron tools: `TaskCreate`, `TaskGet`, `TaskList`, `TaskUpdate`, `CronCreate`, `CronDelete`, and `CronList`. In a [session without the Task tools](</docs/en/tools-reference#task-tool-availability>), Claude Code doesn’t provide the task tools to subagents either, even when the subagent runs a different model. An in-process teammate follows your session the same way, while a teammate in its own [split pane](</docs/en/agent-teams#choose-a-display-mode>) runs as a separate Claude Code process, so its own model decides. To restrict tools, use the `tools` field as an allowlist or the `disallowedTools` field as a denylist. This example uses `tools` to allow only Read, Grep, Glob, and Bash. The subagent can’t edit files, write files, or use any MCP tools:
---
name: safe-researcher
@@ -463,7 +463,7 @@
Set `permissionMode` to choose the permission mode a subagent runs in. Use the modes’ config values, so Manual mode is `default`. If you leave it unset, the subagent inherits the main conversation’s mode, which starts as [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) on Pro, Max, and Team plans unless your settings or your organization change it. The main conversation’s permission mode decides whether Claude Code uses the value you set:
- * When the main conversation is in `bypassPermissions`, `acceptEdits`, or [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), the subagent runs in that same mode and Claude Code ignores the `permissionMode` you set. Under auto mode, the classifier evaluates the subagent’s tool calls with the main conversation’s block and allow rules.
+ * When the main conversation is in `bypassPermissions`, `acceptEdits`, or [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), the subagent runs in that same mode and Claude Code ignores the `permissionMode` you set. Under auto mode, the classifier evaluates the subagent’s tool calls with the main conversation’s block and allow rules. When the subagent finishes, the classifier also reviews its work and its final report before the report is delivered, as [How auto mode handles subagents](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) describes.
* When the main conversation is in `default`, `dontAsk`, or `plan` mode, the subagent runs in the permission mode you set, except `bypassPermissions`. A subagent that declares `bypassPermissions` keeps the main conversation’s mode instead. The `bypassPermissions` exception requires Claude Code v2.1.267 or later.
`permissionMode` accepts these values, and `manual` as an alias for `default`:
@@ -882,7 +882,7 @@
Let subagents spawn their own subagents
-By default, a subagent can spawn subagents of its own, up to three layers below the main conversation. At the depth limit, Claude Code withholds the `Agent` tool from every subagent except a fork, so a subagent at the limit does its delegated work itself and returns one summary. A fork at the limit keeps `Agent` in its inherited tool list, but the tool returns an error instead of spawning. Nested subagents suit a delegated task that itself splits into parallel subtasks, such as a reviewer subagent that dispatches a verifier per finding, so the intermediate output never reaches your main conversation. Only the top-level subagent’s summary returns to you. To change the limit, set [`CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH`](</docs/en/env-vars>) to the number of subagent layers you want below your main conversation. For example, this entry in [`settings.json`](</docs/en/settings>) caps nesting at two layers:
+By default, a subagent can spawn subagents of its own, up to three layers below the main conversation. At the depth limit, Claude Code withholds the `Agent` tool from every subagent except a fork, so a subagent at the limit does its delegated work itself and returns one summary. A fork at the limit keeps `Agent` in its inherited tool list, but the tool returns an error instead of spawning. Nested subagents suit a delegated task that itself splits into parallel subtasks, such as a reviewer subagent that dispatches a verifier per finding. In an interactive session, only the top-level subagent’s summary returns to you and the intermediate output stays out of your main conversation: a subagent that launches background subagents waits for their results before it finishes. In [non-interactive mode](</docs/en/headless>) and the Agent SDK, the launching subagent doesn’t wait, so a nested background subagent that finishes after its launcher has ended reports to your main conversation instead. To change the limit, set [`CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH`](</docs/en/env-vars>) to the number of subagent layers you want below your main conversation. For example, this entry in [`settings.json`](</docs/en/settings>) caps nesting at two layers:
{
"env": {
--- a/subagents.md
+++ b/subagents.md
@@ -609,7 +609,7 @@
---|---|---|---
Depth| [`CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH`](</docs/en/env-vars>)| `3` layers of subagents below your main agent. `1` stops your subagents from spawning any of their own| Leaves a subagent at the bottom layer unable to spawn, so it does its delegated work itself. See [nested subagents](</docs/en/sub-agents#let-subagents-spawn-their-own-subagents>)
Concurrency| [`CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS`](</docs/en/env-vars>)| `20` subagents running at once, counting every subagent Claude spawns with the Agent tool| Refuses to spawn another subagent, returning `Concurrent subagent limit reached`, until the running count drops below the limit. Sessions with [ultracode](</docs/en/model-config#adjust-effort-level>) active are never refused. See the [concurrent subagent limit](</docs/en/sub-agents#concurrent-subagent-limit>)
-Spend| `maxBudgetUsd` in TypeScript, `max_budget_usd` in Python| No limit. Compared against `total_cost_usd`, so subagent requests count| Enforces the cap in three ways: refuses to spawn more subagents, returning `Budget limit reached`, stops background subagents that are still running, and ends the query with the `error_max_budget_usd` result subtype. See [turns and budget](</docs/en/agent-sdk/agent-loop#turns-and-budget>)
+Spend| `maxBudgetUsd` in TypeScript, `max_budget_usd` in Python| No limit. Compared against `total_cost_usd`, so subagent requests count| Enforces the cap in three ways: refuses to spawn more subagents, returning `Budget limit reached`, stops background subagents that are still running, and ends the query with the `error_max_budget_usd` result subtype. For how the caps behave across a session, see [turns and budget](</docs/en/agent-sdk/agent-loop#turns-and-budget>)
The two SDKs treat the `env` option differently: the TypeScript SDK replaces the subprocess environment with it, so spread `process.env` into it to keep variables like `PATH`, while the Python SDK merges it into the inherited environment. This example turns nesting off, allows at most five subagents at a time, and stops the query once the estimated spend reaches $5:
--- a/terminal-config.md
+++ b/terminal-config.md
@@ -110,7 +110,7 @@
Configure tmux
-When Claude Code runs inside tmux, two things break by default: Shift+Enter submits instead of inserting a newline, and desktop notifications and the [progress bar](</docs/en/settings-reference#terminalprogressbarenabled>) never reach the outer terminal. Add these lines to `~/.tmux.conf`, then run `tmux source-file ~/.tmux.conf` to apply them to the running server:
+When Claude Code runs inside tmux, by default Shift+Enter submits instead of inserting a newline, and desktop notifications and the [progress bar](</docs/en/settings-reference#terminalprogressbarenabled>) never reach the outer terminal. Add these lines to `~/.tmux.conf`, then run `tmux source-file ~/.tmux.conf` to apply them to the running server:
~/.tmux.conf
--- a/third-party-integrations.md
+++ b/third-party-integrations.md
@@ -6,14 +6,14 @@
Compare deployment options
-For most organizations, Claude for Teams or Claude for Enterprise provides the best experience. Team members get access to both Claude Code and Claude on the web with a single subscription, centralized billing, and no infrastructure setup required. **Claude for Teams** is self-service and includes collaboration features, admin tools, and billing management. Best for smaller teams that need to get started quickly. **Claude for Enterprise** adds SSO and domain capture, role-based permissions, compliance API access, and managed policy settings for deploying organization-wide Claude Code configurations. Best for larger organizations with security and compliance requirements. Learn more about [Team plans](<https://support.claude.com/en/articles/9266767-what-is-the-team-plan>) and [Enterprise plans](<https://support.claude.com/en/articles/9797531-what-is-the-enterprise-plan>). The deployment options compared below cover where model inference runs. To run [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions on compute your organization operates, see [self-hosted environments](</docs/en/self-hosted-environments>). If your organization has specific infrastructure requirements, compare the options below: Feature| Claude for Teams/Enterprise| Anthropic Console| Amazon Bedrock| Claude Platform on AWS| Google Cloud’s Agent Platform, formerly Vertex AI| Microsoft Foundry
+For most organizations, Claude for Teams or Claude for Enterprise provides the best experience. Team members get access to both Claude Code and Claude on the web with a single subscription, centralized billing, and no infrastructure setup required. **Claude for Teams** is self-service and includes collaboration features, admin tools, and billing management. Best for smaller teams that need to get started quickly. **Claude for Enterprise** adds SSO and domain capture, role-based permissions, compliance API access, and managed policy settings for deploying organization-wide Claude Code configurations. Best for larger organizations with security and compliance requirements. Learn more about [Team plans](<https://support.claude.com/en/articles/9266767-what-is-the-team-plan>) and [Enterprise plans](<https://support.claude.com/en/articles/9797531-what-is-the-enterprise-plan>). The deployment options compared below cover where model inference runs. To run Claude Code [cloud sessions](</docs/en/claude-code-on-the-web>) on compute your organization operates, see [self-hosted environments](</docs/en/self-hosted-environments>). If your organization has specific infrastructure requirements, compare the options below: Feature| Claude for Teams/Enterprise| Anthropic Console| Amazon Bedrock| Claude Platform on AWS| Google Cloud’s Agent Platform, formerly Vertex AI| Microsoft Foundry
---|---|---|---|---|---|---
Best for| Most organizations (recommended)| Individual developers| AWS-native deployments| AWS Marketplace billing with Claude API features| GCP-native deployments| Azure-native deployments
Billing| **Teams:** $150/seat (Premium) with PAYG available
**Enterprise:** [Contact Sales](<https://claude.com/contact-sales?utm_source=claude_code&utm_medium=docs&utm_content=third_party_enterprise>)| PAYG| PAYG through AWS| PAYG through AWS Marketplace| PAYG through GCP| PAYG through Azure
Regions| Supported [countries](<https://www.anthropic.com/supported-countries>)| Supported [countries](<https://www.anthropic.com/supported-countries>)| Multiple AWS [regions](<https://docs.aws.amazon.com/bedrock/latest/userguide/models-regions.html>)| Multiple AWS regions| Multiple GCP [regions](<https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations>)| Multiple Azure [regions](<https://azure.microsoft.com/en-us/explore/global-infrastructure/products-by-region/>)
Prompt caching| Enabled by default| Enabled by default| Enabled by default| Enabled by default| Enabled by default| Enabled by default
-Authentication| Claude.ai SSO or email| API key or a [Console sign-in without one](</docs/en/authentication#sign-in-without-an-api-key>)| API key or AWS credentials| API key or AWS credentials| GCP credentials| API key or Microsoft Entra ID
+Authentication| claude.ai SSO or email| API key or a [Console sign-in without one](</docs/en/authentication#sign-in-without-an-api-key>)| API key or AWS credentials| API key or AWS credentials| GCP credentials| API key or Microsoft Entra ID
Cost tracking| Usage dashboard| Usage dashboard| AWS Cost Explorer| AWS Cost Explorer| GCP Billing| Azure Cost Management
Includes Claude on web| Yes| No| No| No| No| No
Enterprise features| Team management, SSO, usage monitoring| None| IAM policies, CloudTrail| IAM policies, CloudTrail| IAM roles, Cloud Audit Logs| RBAC policies, Azure Monitor
--- a/tools-reference.md
+++ b/tools-reference.md
@@ -19,7 +19,7 @@
`ExitWorktree`| Exits a worktree session and returns to the original directory. Not available to subagents that already run in their own working directory, such as with [`isolation: worktree`](</docs/en/sub-agents#supported-frontmatter-fields>)| No
`Glob`| Finds files based on pattern matching. Absent by default on macOS, Linux, and WSL. See Glob tool behavior| No
`Grep`| Searches for patterns in file contents. Absent by default on macOS, Linux, and WSL. See Grep tool behavior| No
-`ListAgents`| Lists the agents Claude can message with `SendMessage`: subagents in the session, [agent team](</docs/en/agent-teams>) teammates, your other local Claude Code sessions, and, while this session is connected to [Remote Control](</docs/en/remote-control>), your [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions and your Remote Control sessions on other machines. Backs the `/list-agents` command. See [cross-session messaging](</docs/en/cross-session-messaging>). Requires Claude Code v2.1.224 or later, and appears only in sessions where [cross-session messaging is enabled](</docs/en/cross-session-messaging#availability>). Teammate rows and the first line showing this session’s own name require v2.1.239 or later| No
+`ListAgents`| Lists the agents Claude can message with `SendMessage`: subagents in the session, [agent team](</docs/en/agent-teams>) teammates, your other local Claude Code sessions, and, while this session is connected to [Remote Control](</docs/en/remote-control>), your [cloud sessions](</docs/en/claude-code-on-the-web>) and your Remote Control sessions on other machines. Backs the `/list-agents` command. See [cross-session messaging](</docs/en/cross-session-messaging>). Requires Claude Code v2.1.224 or later, and appears only in sessions where [cross-session messaging is enabled](</docs/en/cross-session-messaging#availability>). Teammate rows and the first line showing this session’s own name require v2.1.239 or later| No
`ListMcpResourcesTool`| Lists resources exposed by connected [MCP servers](</docs/en/mcp>)| No
`LSP`| Code intelligence via language servers: jump to definitions, find references, report type errors and warnings. See LSP tool behavior| No
`Monitor`| Runs a command in the background and feeds each output line back to Claude, so it can react to log entries, file changes, or polled status mid-conversation. Can also open a WebSocket and treat each incoming message as an event. See Monitor tool| Yes
@@ -33,9 +33,10 @@
`ScheduleWakeup`| Reschedules the next iteration of a [self-paced `/loop`](</docs/en/scheduled-tasks#let-claude-choose-the-interval>). Claude calls this at the end of each iteration to pick when the next one runs, between one minute and one hour out; you don’t call it directly. To end the loop instead, Claude calls it with `stop: true`, which cancels the pending wakeup. The `stop` field requires Claude Code v2.1.202 or later. The pending wakeup appears in `session_crons` in [Stop hook input](</docs/en/hooks#stop-input>)| No
`SendFeedback`| Drafts a feedback report about Claude Code, covering a product problem or Claude’s own behavior in the session, and queues it on your machine for you to review. Claude Code sends nothing until you choose to send the draft. See SendFeedback tool behavior. Requires Claude Code v2.1.238 or later| No
`SendMessage`| Sends a message to another agent: an [agent team](</docs/en/agent-teams>) teammate, a [subagent it resumes](</docs/en/sub-agents#resume-subagents>) by agent ID or name, or one of your other Claude Code sessions, on this machine or beyond it. Messaging other sessions requires Claude Code v2.1.224 or later. [Cross-session messaging](</docs/en/cross-session-messaging>) covers which sessions Claude can reach, [what a message looks like when it arrives](</docs/en/cross-session-messaging#what-a-message-looks-like>), and [how Claude gets a notice when another session goes idle](</docs/en/cross-session-messaging#get-a-notice-when-another-session-goes-idle>). Claude can include an optional `summary` input, typically 5-10 words, that Claude Code shows as a one-line preview. When Claude omits it on a [plain-text message](</docs/en/cross-session-messaging#limitations>), Claude Code uses the first line of the message as the summary. Claude Code truncates a summary longer than 200 characters with an ellipsis| No
-`SendUserFile`| Sends files from the session to you with an optional caption, so a generated report, diagram, screenshot, or built artifact reaches your device instead of only being mentioned in the transcript. As of v2.1.196, the optional `display` input controls presentation: `render` opens the file inline in the client, `attach` shows a download card only, and when unset the client decides by file type. Available when a [Remote Control](</docs/en/remote-control>) client is connected or the session runs in a managed cloud environment such as [Claude Code on the web](</docs/en/claude-code-on-the-web>). Delivery runs through Anthropic-hosted infrastructure, so the tool is not available on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry| No
+`SendUserFile`| Sends files from the session to you with an optional caption, so a generated report, diagram, screenshot, or built artifact reaches your device instead of only being mentioned in the transcript. As of v2.1.196, the optional `display` input controls presentation: `render` opens the file inline in the client, `attach` shows a download card only, and when unset the client decides by file type. Available when a [Remote Control](</docs/en/remote-control>) client is connected or in a [cloud session](</docs/en/claude-code-on-the-web>). Delivery runs through Anthropic-hosted infrastructure, so the tool is not available on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry| No
`ShareOnboardingGuide`| Uploads `ONBOARDING.md` and returns a share link teammates can open in Claude Code. Called from `/team-onboarding` after the guide is written. Available to claude.ai subscribers on Pro, Max, Team, and Enterprise plans| Yes
`Skill`| Executes a [skill](</docs/en/skills#control-who-invokes-a-skill>) within the main conversation| Yes
+`SubagentHandback`| Delivers a subagent’s final report to whichever conversation receives that subagent’s result. Provided only in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), to subagents that the Agent tool runs locally other than [forks](</docs/en/sub-agents#fork-the-current-conversation>), and available in the terminal CLI, IDE extensions, cloud sessions, and the Agent SDK; the classifier reviews the report before it’s delivered. Requires Claude Code v2.1.271 or later| No
`TaskCreate`| Creates a new task in the task list. Provided by default only on the models listed under Task tool availability, and on other models when you opt in| No
`TaskGet`| Retrieves full details for a specific task. Provided by default only on the models listed under Task tool availability, and on other models when you opt in| No
`TaskList`| Lists all tasks with their current status. Provided by default only on the models listed under Task tool availability, and on other models when you opt in| No
@@ -85,14 +86,14 @@
Agent tool behavior
-The Agent tool spawns a subagent in a separate context window. The subagent works through its task autonomously, then returns a single text result to the parent conversation. The parent doesn’t see the subagent’s intermediate tool calls or outputs, only that final result. With [agent teams](</docs/en/agent-teams>) enabled, a call that carries a `name` can launch a [teammate](</docs/en/agent-teams#how-claude-starts-agent-teams>) instead, which reports back through team messages rather than by returning a result. To cap how many turns a subagent runs, set `maxTurns` in the [subagent definition](</docs/en/sub-agents#supported-frontmatter-fields>). When the subagent reaches the limit, Claude Code marks the returned result as partial output, and Claude can [resume the subagent](</docs/en/sub-agents#resume-subagents>) to continue. The same Agent tool also launches [forked subagents](</docs/en/sub-agents#fork-the-current-conversation>) wherever [fork mode](</docs/en/sub-agents#turn-fork-mode-on-or-off>) is on. A fork inherits the full parent conversation instead of starting fresh, runs in the background apart from the [cases that stay in the foreground](</docs/en/sub-agents#run-subagents-in-foreground-or-background>), and still surfaces permission prompts in your terminal. The rest of this section describes non-fork subagents. Which tools a non-fork subagent can use depends on the `tools` and `disallowedTools` fields in the [subagent definition](</docs/en/sub-agents>):
+The Agent tool spawns a subagent in a separate context window. The subagent works through its task autonomously, then returns its result to the parent conversation. The parent doesn’t see the subagent’s intermediate tool calls or outputs, only that final result. With [agent teams](</docs/en/agent-teams>) enabled, a call that carries a `name` can launch a [teammate](</docs/en/agent-teams#how-claude-starts-agent-teams>) instead, which reports back through team messages rather than by returning a result. To cap how many turns a subagent runs, set `maxTurns` in the [subagent definition](</docs/en/sub-agents#supported-frontmatter-fields>). When the subagent reaches the limit, Claude Code marks the returned result as partial output, and Claude can [resume the subagent](</docs/en/sub-agents#resume-subagents>) to continue. The same Agent tool also launches [forked subagents](</docs/en/sub-agents#fork-the-current-conversation>) wherever [fork mode](</docs/en/sub-agents#turn-fork-mode-on-or-off>) is on. A fork inherits the full parent conversation instead of starting fresh, runs in the background apart from the [cases that stay in the foreground](</docs/en/sub-agents#run-subagents-in-foreground-or-background>), and still surfaces permission prompts in your terminal. The rest of this section describes non-fork subagents. Which tools a non-fork subagent can use depends on the `tools` and `disallowedTools` fields in the [subagent definition](</docs/en/sub-agents>):
* **Neither field set** : the subagent inherits every [tool available to subagents](</docs/en/sub-agents#available-tools>).
* **`tools` only**: the subagent gets only the listed tools.
* **`disallowedTools` only**: the subagent gets every parent tool except the listed ones.
* **Both set** : `disallowedTools` takes precedence. A tool listed in both is removed.
-In every case, the resolved set is limited to the [tools available to subagents](</docs/en/sub-agents#available-tools>): a tool that isn’t available to subagents is never granted, even when listed in `tools`. If every entry in a subagent’s `tools` list fails to match a usable tool, the Agent tool usually returns an error naming the entries instead of launching the subagent; see [Agent would be spawned with zero tools](</docs/en/errors#agent-would-be-spawned-with-zero-tools>) for the message and how to fix each entry. Launching the subagent doesn’t itself prompt for permission. Claude Code checks the subagent’s own tool calls against your permission rules as it runs. Where you see a subagent’s permission prompts depends on whether it runs in the foreground or the background. Claude Code runs subagents in the background by default, apart from the [cases that run in the foreground](</docs/en/sub-agents#run-subagents-in-foreground-or-background>).
+In every case, the resolved set is limited to the [tools available to subagents](</docs/en/sub-agents#available-tools>): a tool that isn’t available to subagents is never granted, even when listed in `tools`. Where the conditions in the `SubagentHandback` tools-table entry hold, Claude Code also gives the subagent that tool, even if you leave it out of `tools` or list it in `disallowedTools`. If every entry in a subagent’s `tools` list fails to match a usable tool, the Agent tool usually returns an error naming the entries instead of launching the subagent; see [Agent would be spawned with zero tools](</docs/en/errors#agent-would-be-spawned-with-zero-tools>) for the message and how to fix each entry. Launching the subagent doesn’t itself prompt for permission. Claude Code checks the subagent’s own tool calls against your permission rules as it runs. Where you see a subagent’s permission prompts depends on whether it runs in the foreground or the background. Claude Code runs subagents in the background by default, apart from the [cases that run in the foreground](</docs/en/sub-agents#run-subagents-in-foreground-or-background>).
* **Foreground subagents** show the same permission prompts you would see in the main conversation, at the moment each tool call happens.
* **Background subagents** surface permission prompts in your main session as of v2.1.186. The prompt names which subagent is asking, and pressing Esc denies that one tool call without stopping the subagent. Before v2.1.186, background subagents auto-denied any tool call that would otherwise prompt and continued without that tool.
@@ -230,7 +231,7 @@
* as a last resort against sustained abusive input, after attempts to redirect the conversation have failed and after a clear warning in an earlier message
* when you explicitly ask to see the tool demonstrated and confirm that you want the session to end
-General frustration, profanity, or a task going badly don’t qualify, and neither do requests for harmful content, which Claude declines instead of ending the session. Claude Code follows the same approach as claude.ai, which can [end a rare subset of chats](<https://www.anthropic.com/research/end-subset-conversations>). After Claude ends an interactive session, the session locks. New prompts and most commands return `Claude ended this conversation. Start a new session (or /clear) to continue.`, and only `/clear`, `/resume`, `/help`, `/exit`, and `/feedback` still run. Claude Code records the end in the session’s transcript, so resuming an ended session restores the lock; the session’s history isn’t deleted. Resuming an ended session in [non-interactive mode](</docs/en/headless>) with the `-p` flag errors and exits with code 1, so a script doesn’t read the ended run as a success. The tool never prompts for permission, and [PreToolUse hooks](</docs/en/hooks#pretooluse>) don’t run for it. While any other tool remains, you can’t block it either: [deny and ask rules](</docs/en/permissions#tool-specific-permission-rules>) naming `EndConversation` have no effect, and neither `--disallowedTools` nor a `--tools` list can remove it. The exemption is deliberate: the tool does nothing except end the conversation, never reading or modifying files or data, and a safeguard of this kind holds only if the session it applies to can’t turn it off. When your deny rules remove every other tool and also match `EndConversation`, as `"*"` does, Claude Code removes it too rather than leaving it as the only tool, unless an allow rule names `EndConversation` explicitly. A deny list that removes every other tool without matching `EndConversation` leaves it in place. [Subagents](</docs/en/sub-agents>) never get the tool. Background tasks that share the main conversation’s tool list see it, but calling it there ends nothing. The tool appears only when all of the following hold:
+General frustration, profanity, or a task going badly don’t qualify, and neither do requests for harmful content, which Claude declines instead of ending the session. Claude Code follows the same approach as claude.ai, which can [end a rare subset of chats](<https://www.anthropic.com/research/end-subset-conversations>). After Claude ends an interactive session, the session locks. New prompts and most commands return `Claude ended this conversation. Start a new session (or /clear) to continue.`, and only `/clear`, `/resume`, `/help`, `/exit`, and `/feedback` still run. Claude Code records the end in the session’s transcript, so resuming an ended session restores the lock; the session’s history isn’t deleted. Resuming an ended session in [non-interactive mode](</docs/en/headless>) with the `-p` flag errors and exits with code 1, so a script doesn’t read the ended run as a success. The tool never prompts for permission, and [PreToolUse hooks](</docs/en/hooks#pretooluse>) don’t run for it. While any other tool remains, you can’t block it either: [deny and ask rules](</docs/en/permissions#tool-specific-permission-rules>) naming `EndConversation` have no effect, and neither `--disallowedTools` nor a `--tools` list can remove it. The exemption is deliberate: the tool does nothing except end the conversation, never reading or modifying files or data, and a safeguard of this kind holds only if the session it applies to can’t turn it off. When your deny rules remove every other tool and also match `EndConversation`, as `"*"` does, Claude Code removes it too rather than leaving it as the only tool, unless an allow rule names `EndConversation` explicitly. A deny list that removes every other tool without matching `EndConversation` leaves it in place. [Subagents](</docs/en/sub-agents>) never get the tool. Background tasks that share the main conversation’s tool list see it, but calling it there ends nothing. The tool appears only when all of the following are true:
* **Version** : Claude Code v2.1.213 or later.
* **Model** : the session’s model is Claude Opus 4.8, Claude Sonnet 5, Claude Fable 5, or a later version of one of those families.
@@ -239,7 +240,7 @@
* sessions through the [Agent SDK](</docs/en/agent-sdk/overview>) TypeScript and Python packages
* the [VS Code extension](</docs/en/vs-code>) panel, which bundles its own CLI
* [GitHub Actions](</docs/en/github-actions>)
- * [Claude Code on the web](</docs/en/claude-code-on-the-web>)
+ * [cloud sessions](</docs/en/claude-code-on-the-web>)
* **Startup mode** : not a [`--bare`](</docs/en/headless#start-faster-with-bare-mode>) session. Bare mode loads only shell and file tools, so the tool is never registered there.
* **Provider** : not available on [Amazon Bedrock](</docs/en/amazon-bedrock>), [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), or [Microsoft Foundry](</docs/en/microsoft-foundry>), or on sessions signed in through a [cloud gateway](</docs/en/claude-apps-gateway>).
@@ -509,7 +510,7 @@
Claude Code includes the tool in interactive terminal sessions on your own machine that use the Claude API rather than a cloud provider. It leaves the tool out of:
* Non-interactive `-p` runs and [Agent SDK](</docs/en/agent-sdk/overview>) sessions, which have no screen to review the queue on
- * Cloud sessions such as [Claude Code on the web](</docs/en/claude-code-on-the-web>), which can’t write to the queue on your machine
+ * [Cloud sessions](</docs/en/claude-code-on-the-web>), which can’t write to the queue on your machine
* Sessions on [Amazon Bedrock](</docs/en/amazon-bedrock>), [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), or [Microsoft Foundry](</docs/en/microsoft-foundry>)
* Sessions where you set [`CLAUDE_CODE_SEND_FEEDBACK=0`](</docs/en/env-vars>) or [`DISABLE_FEEDBACK_COMMAND=1`](</docs/en/env-vars>), set `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` to any non-empty value, or turned off [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>)
* Organizations that have turned off product feedback, and [organizations with zero data retention](</docs/en/zero-data-retention#features-disabled-under-zdr>)
@@ -527,7 +528,7 @@
* List the tools in [`--tools`](</docs/en/cli-reference#cli-flags>), which restricts the session’s built-in tools to the ones it names. Include the tools you want alongside the other built-in tools you use
* In the Agent SDK, the [`allowedTools` and `tools` options](</docs/en/agent-sdk/todo-tracking#model-availability>) work the same way as the two flags
-In [background sessions](</docs/en/agent-view>) and in [Claude Code on the web](</docs/en/claude-code-on-the-web>), Claude Code provides the same tools on every model, listed or not. Claude Code gives a subagent the tools only when your session has them, even when the subagent runs a different model. An in-process [agent team](</docs/en/agent-teams>) teammate follows your session the same way, while a teammate in its own [split pane](</docs/en/agent-teams#choose-a-display-mode>) runs as a separate Claude Code process, so its own model decides. Without the Task tools, an agent coordinates with its team through messages instead of the [shared task list](</docs/en/agent-teams#assign-and-claim-tasks>). The default set described here applies in Claude Code v2.1.268 and later.
+In [background sessions](</docs/en/agent-view>) and in [cloud sessions](</docs/en/claude-code-on-the-web>), Claude Code provides the same tools on every model, listed or not. Claude Code gives a subagent the tools only when your session has them, even when the subagent runs a different model. An in-process [agent team](</docs/en/agent-teams>) teammate follows your session the same way, while a teammate in its own [split pane](</docs/en/agent-teams#choose-a-display-mode>) runs as a separate Claude Code process, so its own model decides. Without the Task tools, an agent coordinates with its team through messages instead of the [shared task list](</docs/en/agent-teams#assign-and-claim-tasks>). The default set described here applies in Claude Code v2.1.268 and later.
##
--- a/troubleshoot-install.md
+++ b/troubleshoot-install.md
@@ -722,7 +722,7 @@
rm -rf "$(npm root -g)/@anthropic-ai/claude-code"
-Then remove any leftover temp directories. If zsh prints `no matches found`, there were none to remove:
+Then remove any leftover temp directories. If Zsh prints `no matches found`, there were none to remove:
rm -rf "$(npm root -g)/@anthropic-ai/.claude-code-"*
Show diff (137 lines)
--- a/typescript.md
+++ b/typescript.md
@@ -501,7 +501,7 @@
`agent`| `string`| `undefined`| Agent name for the main thread. The agent must be defined in the `agents` option or in settings
`agents`| `Record<string, [`AgentDefinition`](#agentdefinition)>`| `undefined`| Programmatically define subagents
`agentProgressSummaries`| `boolean`| `false`| When `true`, generate one-line progress summaries for subagents and forward them on `task_progress` events via the `summary` field. Applies to foreground and background subagents
-`allowDangerouslySkipPermissions`| `boolean`| `false`| Enable bypassing permissions. Required when using `permissionMode: 'bypassPermissions'`
+`allowDangerouslySkipPermissions`| `boolean`| `false`| Enable bypassing permissions. Required when using `permissionMode: 'bypassPermissions'`, at startup or later through `setPermissionMode()`. See [plan mode](</docs/en/agent-sdk/permissions#plan-mode-plan>) for how it interacts with `permissionMode: 'plan'`
`allowedTools`| `string[]`| `[]`| Tools to auto-approve without prompting. This does not restrict Claude to only these tools. If you name one of the [task-tracking tools](</docs/en/agent-sdk/todo-tracking#model-availability>) here, Claude Code also opts the session in. Other unlisted tools fall through to `permissionMode` and `canUseTool`. Use `disallowedTools` to block tools. See [Permissions](</docs/en/agent-sdk/permissions#allow-and-deny-rules>)
`betas`| `SdkBeta``[]`| `[]`| Enable beta features
`canUseTool`| `CanUseTool`| `undefined`| Custom permission function, invoked only when the [permission flow](</docs/en/agent-sdk/permissions#how-permissions-are-evaluated>) falls through to a prompt. Not invoked for calls auto-approved by `allowedTools`, allow rules, or `permissionMode`. An allow rule doesn’t pre-approve the [actions no mode auto-approves](</docs/en/permission-modes#actions-no-mode-auto-approves>). See `CanUseTool` for details
@@ -516,7 +516,7 @@
`executable`| `'bun' | 'deno' | 'node'`| Auto-detected| JavaScript runtime to use
`executableArgs`| `string[]`| `[]`| Arguments to pass to the executable
`extraArgs`| `Record<string, string | null>`| `{}`| Additional arguments
-`fallbackModel`| `string`| `undefined`| Model to use if primary fails
+`fallbackModel`| `string`| `undefined`| Model to use if the primary model fails. Accepts a comma-separated list. For the order and the cap, see [Fallback model chains](</docs/en/model-config#fallback-model-chains>). For guidance, see [Choose a model](</docs/en/agent-sdk/configuration#choose-a-model>)
`forkSession`| `boolean`| `false`| When resuming with `resume`, fork to a new session ID instead of continuing the original session
`forwardSubagentText`| `boolean`| `false`| Forward subagent text and thinking blocks as assistant and user messages with `parent_tool_use_id` set, so consumers can render a nested transcript. Without this option, Claude Code emits subagent `tool_use` and `tool_result` blocks but not text or thinking. Messages from subagents at every nesting depth are forwarded on Claude Code v2.1.219 and later; before v2.1.219, only messages from depth-1 subagents appeared
`hooks`| `Partial<Record<``HookEvent``, ``HookCallbackMatcher``[]>>`| `{}`| Hook callbacks for events
@@ -524,7 +524,7 @@
`includePartialMessages`| `boolean`| `false`| Include partial message events
`loadTimeoutMs`| `number`| `60000`| _Alpha._ Timeout in milliseconds for each `sessionStore.load()` and `sessionStore.listSubkeys()` call during resume materialization. If the adapter doesn’t settle within this window, the query fails instead of hanging. Ignored when `sessionStore` is not set
`managedSettings`| `Settings`| `undefined`| Policy-tier settings your host process supplies to the spawned session. On machines with admin-deployed managed settings, Claude Code ignores these unless the admin’s highest-priority managed source sets `parentSettingsBehavior: 'merge'`, and never merges them while a [`policyHelper`](</docs/en/settings-reference#policyhelper>) supplies managed settings. Merged values pass through a restrictive-only filter; [Restrict parent settings](</docs/en/claude-apps-gateway#restrict-parent-settings>) covers what the filter admits and the `allowManaged*Only` locks. A host that sets [`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`](</docs/en/env-vars>) has three keys read straight from this payload instead: its [model configuration](</docs/en/model-config#restrict-model-selection>) on Claude Code v2.1.222 or later, [`modelPricing`](</docs/en/settings-reference#modelpricing>) when no managed source sets it on v2.1.246 or later, and its `ENABLE_TOOL_SEARCH` env entry on v2.1.247 or later
-`maxBudgetUsd`| `number`| `undefined`| Stop the query when the client-side cost estimate reaches this USD value. Compared against the same estimate as `total_cost_usd`; see [Track cost and usage](</docs/en/agent-sdk/cost-tracking>) for accuracy caveats
+`maxBudgetUsd`| `number`| `undefined`| Stop the query when the client-side cost estimate reaches this USD value. Compared against the same estimate as `total_cost_usd`. For accuracy caveats and reset behavior, see [Track cost and usage](</docs/en/agent-sdk/cost-tracking>)
`maxThinkingTokens`| `number`| `undefined`| _Deprecated:_ Use `thinking` instead. Maximum tokens for thinking process
`maxTurns`| `number`| `undefined`| Maximum agentic turns (tool-use round trips)
`mcpServers`| `Record<string, [`McpServerConfig`](#mcpserverconfig)>`| `{}`| MCP server configurations
@@ -547,7 +547,7 @@
`sessionId`| `string`| Auto-generated| Use a specific UUID for the session instead of auto-generating one
`sessionStore`| [`SessionStore`](</docs/en/agent-sdk/session-storage#the-sessionstore-interface>)| `undefined`| Mirror session transcripts to an external backend so another host can resume them. See [Persist sessions to external storage](</docs/en/agent-sdk/session-storage>)
`sessionStoreFlush`| `'batched' | 'eager'`| `'batched'`| _Alpha._ Flush mode for `sessionStore`. Ignored when `sessionStore` is not set
-`settings`| `string | Settings`| `undefined`| Inline [settings](</docs/en/settings>) object or path to a settings file. Populates the flag-settings layer in the [precedence order](</docs/en/settings#settings-precedence>). Change at runtime with `applyFlagSettings()`
+`settings`| `string | Settings`| `undefined`| Inline [settings](</docs/en/settings>) object, a settings file path, or an inline JSON string. Populates the flag-settings layer in the [precedence order](</docs/en/settings#settings-precedence>). Change at runtime with `applyFlagSettings()`
`settingSources`| `SettingSource``[]`| CLI defaults (all sources)| Control which filesystem settings to load. Pass `[]` to disable user, project, and local settings. [Endpoint-managed policy](</docs/en/managed-settings#delivery-mechanisms>) loads regardless; server-managed settings are fetched when the session authenticates with an organization credential on an [eligible configuration](</docs/en/server-managed-settings#platform-availability>). See [Use Claude Code features](</docs/en/agent-sdk/claude-code-features#what-settingsources-does-not-control>)
`skills`| `string[] | 'all'`| `undefined`| Skills available to the session. Pass `'all'` to enable every discovered skill, or a list of skill names. Pass exact names only. On Agent SDK v0.3.221 or later, the SDK rejects malformed and wildcard-form names with an error before starting the Claude Code process. When set, the SDK adds the Skill tool to `allowedTools` automatically. If you also pass `tools`, include `'Skill'` in that list. See [Skills](</docs/en/agent-sdk/skills>)
`spawnClaudeCodeProcess`| `(options: SpawnOptions) => SpawnedProcess`| `undefined`| Custom function to spawn the Claude Code process. Use to run Claude Code in VMs, containers, or remote environments
@@ -648,7 +648,7 @@
`interrupt()`| Interrupts the query. Only available in streaming input mode. When the CLI advertises the `interrupt_receipt_v1` capability in `SDKSystemMessage.capabilities`, resolves with an `SDKControlInterruptResponse` listing the messages that were pending when the interrupt arrived. Resolves `undefined` on CLIs before v2.1.205
`rewindFiles(userMessageId, options?)`| Restores files to their state at the specified user message. Pass `{ dryRun: true }` to preview changes. Requires `enableFileCheckpointing: true`. See [File checkpointing](</docs/en/agent-sdk/file-checkpointing>)
`setPermissionMode()`| Changes the permission mode (only available in streaming input mode)
-`setModel()`| Changes the model (only available in streaming input mode). Passing `undefined` or the string `"default"` resets to the session default model
+`setModel()`| Changes the model (only available in streaming input mode). Passing `undefined` or the string `"default"` resets to [Claude Code’s default model](</docs/en/model-config>)
`setMaxThinkingTokens()`| _Deprecated:_ Use the `thinking` option instead. Changes the maximum thinking tokens. Passing `null` resets thinking to the session default: a mid-session override is cleared, and thinking stays off for sessions that have it disabled
`applyFlagSettings(settings)`| Merges settings into the session’s flag settings layer at runtime (only available in streaming input mode). See `applyFlagSettings()`
`updateSettings(source, settings)`| Merges settings into the project’s local settings file, `.claude/settings.local.json`; they take effect on the next request. Accepts only `source: 'localSettings'` and an allowlisted key set, currently `outputStyle`, with string values; deleting a key isn’t supported. Rejects on remote transports and in sessions whose `settingSources` exclude `local`. Requires TypeScript SDK v0.3.257 or later, which bundles Claude Code v2.1.257
@@ -681,7 +681,7 @@
* **Applied during the current turn** : `model`. If you switch `model` while Claude is working on a turn, the response Claude is already generating finishes on the old model, and the rest of the turn, starting with the next call Claude Code makes to the model, uses the new one. Subagents keep their own model. Before v2.1.212, a mid-turn switch waited for the next turn.
* **No effect mid-session** : the system prompt options. These are resolved once at startup, so the running session keeps the original value even though the call succeeds. To change them, start a new session.
-`effortLevel` accepts an [effort level](</docs/en/model-config#adjust-effort-level>) name. It also accepts `"ultracode"`, which requests `xhigh` effort with [ultracode](</docs/en/workflows#let-claude-decide-with-ultracode>) on. `applyFlagSettings()` declares `effortLevel` without that value, so pass the equivalent `{ ultracode: true }` in TypeScript. The `ultracode` value requires Claude Code v2.1.203 or later and is accepted only by `applyFlagSettings()`, not by the `effortLevel` key in a settings file. The values are written to the flag-settings layer, the same layer the inline `settings` option of `query()` populates at startup. This is the same tier the on-page precedence section calls programmatic options. Successive calls shallow-merge top-level keys. A second call with `{ permissions: {...} }` replaces the entire `permissions` object from the prior call rather than deep-merging into it. To clear a key from the flag layer and fall back to lower-precedence sources, pass `null` for that key. Passing `undefined` has no effect because JSON serialization drops it. Only available in streaming input mode, the same constraint as `setModel()` and `setPermissionMode()`. The example below switches the active model mid-session, then clears the override so the model falls back to whatever the user or project settings specify.
+`effortLevel` accepts an [effort level](</docs/en/model-config#adjust-effort-level>) name. It also accepts `"ultracode"`, which requests `xhigh` effort with [ultracode](</docs/en/workflows#let-claude-decide-with-ultracode>) on. `applyFlagSettings()` declares `effortLevel` without that value, so pass the equivalent `{ ultracode: true }` in TypeScript. The `ultracode` value requires Claude Code v2.1.203 or later and is accepted only by `applyFlagSettings()`, not by the `effortLevel` key in a settings file. The values are written to the flag-settings layer, the same layer the inline `settings` option of `query()` populates at startup. This is the same tier the on-page precedence section calls programmatic options. Successive calls shallow-merge top-level keys. A second call with `{ permissions: {...} }` replaces the entire `permissions` object from the prior call rather than deep-merging into it. To clear a key from the flag layer, pass `null` for that key. Most keys then fall back to lower-precedence sources. A cleared `model` resets to [Claude Code’s default model](</docs/en/model-config>), even when a settings file sets `model`. Passing `undefined` has no effect because JSON serialization drops it. Only available in streaming input mode, the same constraint as `setModel()` and `setPermissionMode()`. The example below switches the active model mid-session, then clears the override so the model resets to [Claude Code’s default model](</docs/en/model-config>).
import { query } from "@anthropic-ai/claude-agent-sdk";
@@ -690,7 +690,7 @@
// Override the model for the rest of the session
await q.applyFlagSettings({ model: "claude-opus-4-6" });
- // Later: clear the override and fall back to lower-precedence settings
+ // Later: clear the override; the model resets to Claude Code's default
await q.applyFlagSettings({ model: null });
`applyFlagSettings()` is TypeScript-only. The Python SDK does not expose an equivalent method.
@@ -1846,7 +1846,7 @@
When Claude Code delivers a task notification into a session, it sets `subkind` on the notification’s `origin` only if Anthropic servers verified where that notification came from. `subkind` requires Claude Code v2.1.213 or later, and it takes one of two values:
* `scheduled-trigger`: the notification is a [routine](</docs/en/routines>)’s stored prompt, delivered because one of the routine’s triggers fired: its schedule, its [API trigger](</docs/en/routines#add-an-api-trigger>), its [GitHub trigger](</docs/en/routines#add-a-github-trigger>), or **Run now**. Claude Code frames these to the model as the session’s assigned task, with a different notice from the notice that other task notifications carry.
- * `peer-send-message`: the notification is a message that another of your sessions sent with the server-side `send_message` tool that [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions use to message each other, not the [cross-session `SendMessage` tool](</docs/en/cross-session-messaging>), and Anthropic servers verified that both sessions belong to the same private group of sessions. Requires Claude Code v2.1.224 or later. A `send_message` delivery the servers didn’t verify that way gets no subkind.
+ * `peer-send-message`: the notification is a message that another of your sessions sent with the server-side `send_message` tool that [cloud sessions](</docs/en/claude-code-on-the-web>) use to message each other, not the [cross-session `SendMessage` tool](</docs/en/cross-session-messaging>), and Anthropic servers verified that both sessions belong to the same private group of sessions. Requires Claude Code v2.1.224 or later. A `send_message` delivery the servers didn’t verify that way gets no subkind.
Every other task notification has no `subkind`. That includes [scheduled tasks](</docs/en/scheduled-tasks>) that fire on your own machine, [PR activity](</docs/en/claude-code-on-the-web#how-claude-responds-to-pr-activity>) delivered into a session, and background events such as a finished task. Messages from the [cross-session `SendMessage` tool](</docs/en/cross-session-messaging>) aren’t task notifications at all: whether they come from a session on the same machine or through Anthropic servers from another machine, Claude Code gives them `kind: "peer"` and the peer origin fields.
@@ -1856,7 +1856,7 @@
Peer origin fields
-A `peer` origin identifies which agent sent the message: an in-process [teammate](</docs/en/agent-teams>) sending to `main` with `SendMessage`, or a [cross-session peer](</docs/en/cross-session-messaging>), another of your Claude Code sessions. Cross-session peers require Claude Code v2.1.224 or later on macOS and Linux; see [cross-session messaging availability](</docs/en/cross-session-messaging#availability>) for the native Windows requirement. A cross-session peer can run on the same machine, or on [another of your machines](</docs/en/cross-session-messaging#message-sessions-on-other-machines>) or [Claude Code on the web](</docs/en/claude-code-on-the-web>) when its message arrives through Remote Control. The two kinds of sender fill the fields differently:
+A `peer` origin identifies which agent sent the message: an in-process [teammate](</docs/en/agent-teams>) sending to `main` with `SendMessage`, or a [cross-session peer](</docs/en/cross-session-messaging>), another of your Claude Code sessions. Cross-session peers require Claude Code v2.1.224 or later on macOS and Linux; see [cross-session messaging availability](</docs/en/cross-session-messaging#availability>) for the native Windows requirement. A cross-session peer can run on the same machine, or on [another of your machines](</docs/en/cross-session-messaging#message-sessions-on-other-machines>) or [in the cloud](</docs/en/claude-code-on-the-web>) when its message arrives through Remote Control. The two kinds of sender fill the fields differently:
* `from`: the teammate’s name, or the sender address for a cross-session peer. For a [one-way cross-machine message](</docs/en/cross-session-messaging#message-sessions-on-other-machines>), the sender has no reply address and `from` is `"unknown"`. The value is sender-authored; `verifiedPeerPid` is the verified identity.
* `fromMode`: the sending session’s permission class, `bypass` or `prompting`, declared by a host that relays a peer message between your sessions, such as the [desktop app](</docs/en/desktop#work-across-sessions>). Claude Code reads it in the receiving session when it applies the [inbound controls](</docs/en/cross-session-messaging#control-inbound-messages>). Requires Agent SDK v0.3.234 or later.
@@ -3301,7 +3301,7 @@
};
};
-Manages [Routines](</docs/en/routines>), the scheduled and triggered Claude Code runs hosted in the cloud. This tool backs the `/schedule` command. `trigger_id` is required for the `get`, `update`, `run`, and `list_runs` actions. `body` is required for `create`, `update`, and `create_webhook_trigger`, and optional for `run`. `create_webhook_trigger` attaches an event source to an existing routine, such as a [GitHub event](</docs/en/routines#add-a-github-trigger>) that fires it. The `body` names the source, the events, and the routine to fire. Requires Claude Code v2.1.225 or later. `list_runs` lists a routine’s recent runs, and `get_run_log` reads one run’s log. `session_id` names the run to read, from a `list_runs` result, and `cursor` pages through either action’s results. Both actions require Claude Code v2.1.227 or later. This tool is available only when the session is authenticated with a claude.ai account on a plan with Routines enabled, and is absent when your organization’s policy disables [Claude Code on the web](</docs/en/claude-code-on-the-web>). On Claude Code v2.1.227 or later, the tool is also absent when an Owner has [turned off routines for the organization](</docs/en/routines#routines-are-disabled-by-your-organizations-policy>). Before v2.1.227, a session with only the routines toggle turned off still showed the tool, and the server denied its calls.
+Manages [Routines](</docs/en/routines>), the scheduled and triggered Claude Code runs hosted in the cloud. This tool backs the `/schedule` command. `trigger_id` is required for the `get`, `update`, `run`, and `list_runs` actions. `body` is required for `create`, `update`, and `create_webhook_trigger`, and optional for `run`. `create_webhook_trigger` attaches an event source to an existing routine, such as a [GitHub event](</docs/en/routines#add-a-github-trigger>) that fires it. The `body` names the source, the events, and the routine to fire. Requires Claude Code v2.1.225 or later. `list_runs` lists a routine’s recent runs, and `get_run_log` reads one run’s log. `session_id` names the run to read, from a `list_runs` result, and `cursor` pages through either action’s results. Both actions require Claude Code v2.1.227 or later. This tool is available only when the session is authenticated with a claude.ai account on a plan with Routines enabled, and is absent when your organization’s policy disables [cloud sessions](</docs/en/claude-code-on-the-web>). On Claude Code v2.1.227 or later, the tool is also absent when an Owner has [turned off routines for the organization](</docs/en/routines#routines-are-disabled-by-your-organizations-policy>). Before v2.1.227, a session with only the routines toggle turned off still showed the tool, and the server denied its calls.
###
@@ -3422,7 +3422,7 @@
* `project_info`: returns project metadata and the doc list.
* `project_read`: reads one doc by `path`.
- * `project_search`: queries the project’s knowledge base with `query`. `n` caps the hits and defaults to 5.
+ * `project_search`: queries the project’s knowledge base with `query`. `n` caps the hits and defaults to `5`.
* `project_write`: creates or replaces a doc at `path` from exactly one of `content`, which carries inline text, or `local_path`, which names a file inside the working directory. `present_to_user: true` marks the written doc as the deliverable the user needs to see.
* `project_delete`: deletes a doc by `path`.
@@ -3612,7 +3612,7 @@
outputFile: string;
};
-Returns the result from the subagent. Discriminated on the `status` field: `"completed"` for finished tasks, `"async_launched"` for background tasks, and `"remote_launched"` for tasks Claude Code dispatched to a remote cloud session, where `sessionUrl` links to that session and `taskId` identifies it. On the `completed` variant, `resolvedModel` names the model the subagent started on, which can differ from the requested `model` input when [`availableModels`](</docs/en/model-config#restrict-model-selection>) or another override applies. This field requires Claude Code v2.1.174 or later. On `async_launched`, it names the model in use when the task moved to the background. `modelsUsed` lists the models the subagent used, in order. The field is present only when a mid-run swap happened, and a model appears again when the run swapped back to it. On `async_launched`, the list covers the models used before backgrounding. Both `modelsUsed` and the backgrounding behavior of `resolvedModel` require Claude Code v2.1.212 or later. If Claude Code [kept the subagent’s isolated worktree](</docs/en/worktrees#isolate-subagents-with-worktrees>), `worktreePath` on the `completed` result is where to find it. `worktreeBranch` is its branch, present when Claude Code created the worktree with git. Claude Code fills `usage` and `totalTokens` from the subagent’s final API request, not from the whole run, so `usage.service_tier` is the service tier string the API reported on that request. When present, `usage.output_tokens_details.thinking_tokens` is the number of that request’s output tokens that were thinking tokens. The `output_tokens_details` field requires TypeScript SDK v0.3.228 or later, which bundles Claude Code v2.1.228. `usage.output_tokens_details` matches `Usage.output_tokens_details` in meaning, scoped to that final request, but every level of it is optional here. Guard both the object and the field, for example `usage.output_tokens_details?.thinking_tokens ?? 0`, rather than reading it directly. Before v2.1.207, the published type was narrower. It omitted `worktreePath`, `worktreeBranch`, `citations`, `toolStats.frameCount`, and the `inference_geo`, `speed`, and `iterations` usage fields, and it typed `service_tier` as `"standard" | "priority" | "batch"`. Fields the type marks optional can be absent on results recorded by earlier versions.
+Returns the result from the subagent. Discriminated on the `status` field: `"completed"` for finished tasks, `"async_launched"` for background tasks, and `"remote_launched"` for tasks Claude Code dispatched to a cloud session, where `sessionUrl` links to that session and `taskId` identifies it. On the `completed` variant, `resolvedModel` names the model the subagent started on, which can differ from the requested `model` input when [`availableModels`](</docs/en/model-config#restrict-model-selection>) or another override applies. This field requires Claude Code v2.1.174 or later. On `async_launched`, it names the model in use when the task moved to the background. `modelsUsed` lists the models the subagent used, in order. The field is present only when a mid-run swap happened, and a model appears again when the run swapped back to it. On `async_launched`, the list covers the models used before backgrounding. Both `modelsUsed` and the backgrounding behavior of `resolvedModel` require Claude Code v2.1.212 or later. If Claude Code [kept the subagent’s isolated worktree](</docs/en/worktrees#isolate-subagents-with-worktrees>), `worktreePath` on the `completed` result is where to find it. `worktreeBranch` is its branch, present when Claude Code created the worktree with git. Claude Code fills `usage` and `totalTokens` from the subagent’s final API request, not from the whole run, so `usage.service_tier` is the service tier string the API reported on that request. When present, `usage.output_tokens_details.thinking_tokens` is the number of that request’s output tokens that were thinking tokens. The `output_tokens_details` field requires TypeScript SDK v0.3.228 or later, which bundles Claude Code v2.1.228. `usage.output_tokens_details` matches `Usage.output_tokens_details` in meaning, scoped to that final request, but every level of it is optional here. Guard both the object and the field, for example `usage.output_tokens_details?.thinking_tokens ?? 0`, rather than reading it directly. Before v2.1.207, the published type was narrower. It omitted `worktreePath`, `worktreeBranch`, `citations`, `toolStats.frameCount`, and the `inference_geo`, `speed`, and `iterations` usage fields, and it typed `service_tier` as `"standard" | "priority" | "batch"`. Fields the type marks optional can be absent on results recorded by earlier versions.
###
@@ -3999,7 +3999,7 @@
summary?: string;
transcriptDir?: string;
scriptPath?: string;
- sessionUrl?: string; // set when the workflow launched as a remote session
+ sessionUrl?: string; // set when the workflow launched as a cloud session
warning?: string;
error?: string;
};
@@ -4008,7 +4008,7 @@
Field| Type| Description
---|---|---
-`status`| `"async_launched" | "remote_launched"`| The tool accepted the invocation. `"async_launched"` for in-process runs, `"remote_launched"` for runs dispatched to a remote session instead of running in-process
+`status`| `"async_launched" | "remote_launched"`| The tool accepted the invocation. `"async_launched"` for in-process runs, `"remote_launched"` for runs dispatched to a cloud session instead of running in-process
`taskId`| `string`| Background task identifier for the run
`taskType`| `"local_workflow" | "remote_agent"`| Task type of the registered background task, matching the `status` arm
`workflowName`| `string`| The `meta.name` from the workflow script
@@ -5504,7 +5504,7 @@
---|---|---|---
`enabled`| `boolean`| `false`| Enable sandbox mode for command execution
`failIfUnavailable`| `boolean`| `true`| Stop at startup if `enabled` is `true` but the sandbox can’t start. Set `false` to fall back to unsandboxed execution with a warning on stderr
-`autoAllowBashIfSandboxed`| `boolean`| `true`| Auto-approve bash commands when sandbox is enabled
+`autoAllowBashIfSandboxed`| `boolean`| `true`| Auto-approve Bash commands when sandbox is enabled
`excludedCommands`| `string[]`| `[]`| Commands that always bypass sandbox restrictions (e.g., `['docker']`). These run unsandboxed automatically without model involvement
`allowUnsandboxedCommands`| `boolean`| `true`| Allow the model to request running commands outside the sandbox. When `true`, the model can set `dangerouslyDisableSandbox` in tool input, which falls back to the permissions system
`network`| `SandboxNetworkConfig`| `undefined`| Network-specific sandbox configuration
--- a/typescript-v2-preview.md
+++ b/typescript-v2-preview.md
@@ -1,6 +1,6 @@
The V2 session API is no longer supported. TypeScript Agent SDK 0.3.142 removes `unstable_v2_createSession`, `unstable_v2_resumeSession`, `unstable_v2_prompt`, and the `SDKSession` and `SDKSessionOptions` types.To migrate, use the [`query()` API](</docs/en/agent-sdk/typescript>) and the [session options](</docs/en/agent-sdk/sessions>) it accepts. Pass an `AsyncIterable<SDKUserMessage>` for multi-turn conversations, or `options.resume` to continue a saved session. This page is kept for reference if you maintain code on Agent SDK 0.2.x or earlier.
-V2 was an experimental session API that removed the need for async generators and yield coordination. Instead of managing generator state across turns, each turn was a separate `send()`/`stream()` cycle. The API surface reduced to three concepts:
+V2 was an experimental session API that removed the need for async generators and yield coordination. Instead of managing generator state across turns, each turn was a separate `send()`/`stream()` cycle. The API surface reduced to creating a session, sending a message, and streaming the response:
* `createSession()` / `resumeSession()`: Start or continue a conversation
* `session.send()`: Send a message
--- a/ultrareview.md
+++ b/ultrareview.md
@@ -1,12 +1,12 @@
Ultrareview is a research preview feature. The feature, pricing, and availability may change based on feedback. The command is `/code-review ultra`. When ultrareview is available to your account, `/ultrareview` is an alias.
-Ultrareview is a deep code review that runs on Claude Code on the web infrastructure. When you run `/code-review ultra`, Claude Code launches a fleet of reviewer agents in a remote sandbox to find bugs in your branch or pull request. Compared to a local `/code-review`, ultrareview offers:
+Ultrareview is a deep code review that runs as a [cloud session](</docs/en/claude-code-on-the-web>) on Anthropic’s infrastructure. When you run `/code-review ultra`, Claude Code launches a fleet of reviewer agents in a cloud sandbox to find bugs in your branch or pull request. Compared to a local `/code-review`, ultrareview offers:
* **Higher signal** : every reported finding is independently reproduced and verified, so the results focus on real bugs rather than style suggestions
* **Broader coverage** : a larger fleet of reviewer agents explores the change in parallel, which surfaces issues that a local review can miss
- * **No local resource use** : the review runs entirely in a remote sandbox, so your terminal stays free for other work while it runs
+ * **No local resource use** : the review runs entirely in a cloud sandbox, so your terminal stays free for other work while it runs
-Ultrareview requires authentication with a claude.ai account because it runs on Claude Code on the web infrastructure. If you are signed in with an API key only, run `/login` and authenticate with claude.ai first. Ultrareview is not available when using Claude Code with Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, and it is not available to organizations that have enabled Zero Data Retention. When ultrareview is not available, `/code-review ultra` runs a local review in your session instead.
+Ultrareview requires authentication with a claude.ai account because it runs as a cloud session on Anthropic’s infrastructure. If you are signed in with an API key only, run `/login` and authenticate with claude.ai first. Ultrareview is not available when using Claude Code with Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, and it is not available to organizations that have enabled Zero Data Retention. When ultrareview is not available, `/code-review ultra` runs a local review in your session instead.
##
@@ -18,7 +18,7 @@
/code-review ultra
-Without arguments, ultrareview reviews the diff between your current branch and the default branch, including uncommitted and staged changes. For uncommitted changes to files named like credentials or keys, such as `.env` and `*.tfvars` files, Claude Code follows the rules for [uploading a local repository to a cloud session](</docs/en/claude-code-on-the-web#send-local-repositories-without-github>). For a branch review, Claude Code bundles the repository state and uploads it to a remote sandbox; when you review a pull request, Claude Code uploads nothing from your machine. Before launching, Claude Code shows a confirmation dialog with the review scope, your remaining free runs, and the estimated cost; for a branch review, the scope includes the file and line count. After you confirm, the review continues in the background while you keep using your session. The command runs only when you invoke it with `/code-review ultra`; Claude doesn’t start an ultrareview on its own.
+Without arguments, ultrareview reviews the diff between your current branch and the default branch, including uncommitted and staged changes. For uncommitted changes to files named like credentials or keys, such as `.env` and `*.tfvars` files, Claude Code follows the rules for [uploading a local repository to a cloud session](</docs/en/claude-code-on-the-web#send-local-repositories-without-github>). For a branch review, Claude Code bundles the repository state and uploads it to a cloud sandbox; when you review a pull request, Claude Code uploads nothing from your machine. Before launching, Claude Code shows a confirmation dialog with the review scope, your remaining free runs, and the estimated cost; for a branch review, the scope includes the file and line count. After you confirm, the review continues in the background while you keep using your session. The command runs only when you invoke it with `/code-review ultra`; Claude doesn’t start an ultrareview on its own.
###
@@ -42,7 +42,7 @@
/code-review ultra 1234
-The command also accepts `#1234`, `PR 1234`, and pasted PR URLs; a pasted URL must point to the repository in your current directory. In PR mode, the remote sandbox clones the pull request directly from the host rather than bundling your local working tree. PR mode works with repositories on `github.com` and on [GitHub Enterprise Server](</docs/en/github-enterprise-server>) instances that an Owner has connected to Claude Code. For repositories on `github.com`, the sandbox clones with the GitHub account connected to your Claude account, so the account must be able to read the PR’s repository. Claude Code checks this before creating the cloud session, unless you’ve set [`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`](</docs/en/env-vars#variables>), and refuses the launch when [no account is connected](</docs/en/errors#no-github-account-is-connected-to-your-claude-account>) or [the account can’t see the repository](</docs/en/errors#your-connected-github-account-cant-see-the-repository>); the refusal names the fix. Before v2.1.248, Claude Code didn’t check this before launch. Run [`/web-setup`](</docs/en/web-quickstart#connect-from-your-terminal>) to connect your GitHub CLI login to your Claude account.
+The command also accepts `#1234`, `PR 1234`, and pasted PR URLs; a pasted URL must point to the repository in your current directory. In PR mode, the cloud sandbox clones the pull request directly from the host rather than bundling your local working tree. PR mode works with repositories on `github.com` and on [GitHub Enterprise Server](</docs/en/github-enterprise-server>) instances that an Owner has connected to Claude Code. For repositories on `github.com`, the sandbox clones with the GitHub account connected to your Claude account, so the account must be able to read the PR’s repository. Claude Code checks this before creating the cloud session, unless you’ve set [`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`](</docs/en/env-vars#variables>), and refuses the launch when [no account is connected](</docs/en/errors#no-github-account-is-connected-to-your-claude-account>) or [the account can’t see the repository](</docs/en/errors#your-connected-github-account-cant-see-the-repository>); the refusal names the fix. Before v2.1.248, Claude Code didn’t check this before launch. Run [`/web-setup`](</docs/en/web-quickstart#connect-from-your-terminal>) to connect your GitHub CLI login to your Claude account.
###
@@ -55,7 +55,7 @@
* **Interactive** : in the launch dialog, select **Run and post the findings to the PR as me**. If you add `--post` to the command, as in `/code-review ultra 1234 --post`, Claude Code preselects that choice and still asks before launching.
* **Non-interactive** : run the `claude ultrareview` subcommand with `--post`. You consent to the post by running the subcommand with the flag, so Claude Code posts without asking. In a `claude -p '/code-review ultra'` run, Claude Code exits before the findings arrive, so it posts nothing; use the subcommand instead.
-Claude Code doesn’t post from your machine. It sends the findings to a session on [Claude Code on the web](</docs/en/claude-code-on-the-web>), which posts the comment through the GitHub account you’ve connected to Claude. Posting requires the same claude.ai sign-in as the review itself. Because posting runs through Claude Code on the web, it isn’t available on third-party providers or when you set [`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`](</docs/en/env-vars>). In an interactive session, Claude Code starts the post when the findings arrive, so keep the session open until the review finishes. Claude Code keeps the posting choice only in that session. If the session ends before the review finishes, Claude Code posts nothing, even if you resume the conversation later. When the post can’t start while your session is open, Claude tells you that nothing went to the PR and why, and the findings stay in your terminal so you can post them by hand.
+Claude Code doesn’t post from your machine. It sends the findings to a [cloud session](</docs/en/claude-code-on-the-web>), which posts the comment through the GitHub account you’ve connected to Claude. Posting requires the same claude.ai sign-in as the review itself. Because posting runs through a cloud session, it isn’t available on third-party providers or when you set [`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`](</docs/en/env-vars>). In an interactive session, Claude Code starts the post when the findings arrive, so keep the session open until the review finishes. Claude Code keeps the posting choice only in that session. If the session ends before the review finishes, Claude Code posts nothing, even if you resume the conversation later. When the post can’t start while your session is open, Claude tells you that nothing went to the PR and why, and the findings stay in your terminal so you can post them by hand.
###
@@ -156,7 +156,7 @@
| `/code-review`| `/code-review ultra`
---|---|---
Target| your working diff, a pull request, a branch, or a path| your working diff or a pull request
-Runs| locally in your session| remotely in a cloud sandbox
+Runs| locally in your session| in a cloud sandbox
Depth| scales with the effort argument| multi-agent fleet with independent verification
Duration| seconds to a few minutes| roughly 5 to 10 minutes
Cost| counts toward normal usage| free runs, then roughly $5 to $25 per review as usage credits
@@ -170,5 +170,5 @@
Related resources
- * [Claude Code on the web](</docs/en/claude-code-on-the-web>): learn how cloud sessions and cloud sandboxes work
+ * [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>): learn how cloud sessions and cloud sandboxes work
* [Manage costs effectively](</docs/en/costs>): track usage and set spending limits
--- a/user-input.md
+++ b/user-input.md
@@ -511,7 +511,7 @@
---|---
`question`| The full question text to display
`header`| Short label for the question (max 12 characters)
-`options`| Array of 2-4 choices, each with `label` and `description`. TypeScript: optionally `preview` (see below)
+`options`| Array of 2-4 choices, each with `label` and `description`. TypeScript: optionally `preview`. See Option previews.
`multiSelect`| If `true`, users can select multiple options
The structure your callback receives:
--- a/voice-dictation.md
+++ b/voice-dictation.md
@@ -9,10 +9,10 @@
Voice dictation streams your recorded audio to Anthropic’s servers for transcription. Audio is not processed locally. It needs all of the following:
* **A Claude.ai account** : the speech-to-text service is only available when you authenticate with one, and is not available when Claude Code is configured to use an Anthropic API key directly, Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry.
- * **A local microphone** : voice dictation does not work in remote environments such as [Claude Code on the web](</docs/en/claude-code-on-the-web>) or SSH sessions.
+ * **A local microphone** : voice dictation does not work in [cloud sessions](</docs/en/claude-code-on-the-web>) or SSH sessions.
* **WSLg, if you run Claude Code in WSL** : WSLg is included with WSL2 when installed from the Microsoft Store on Windows 10 or 11. If WSLg is not available, for example on WSL1, run Claude Code in native Windows instead.
-Transcription does not consume Claude messages or tokens and does not count toward the limits shown in `/usage`. See [data usage](</docs/en/data-usage>) for how Anthropic handles your data. Audio recording uses a built-in native module on macOS, Linux, and Windows. On Linux, if the native module cannot load, Claude Code falls back to `arecord` from ALSA utils or `rec` from SoX. If neither is available, `/voice` prints an install command for your package manager. The Claude Code [VS Code extension](</docs/en/vs-code>) also supports voice dictation with the same Claude.ai account requirement. It is not available in VS Code Remote sessions, including SSH, Dev Containers, and Codespaces, because the microphone is on your local machine and the extension runs on the remote host.
+Transcription does not consume Claude messages or tokens and does not count toward the limits shown in `/usage`. See [data usage](</docs/en/data-usage>) for how Anthropic handles your data. Audio recording uses a built-in native module on macOS, Linux, and Windows. On Linux, if the native module cannot load, Claude Code falls back to `arecord` from ALSA utils or `rec` from SoX. If neither is available, `/voice` prints an install command for your package manager. The Claude Code [VS Code extension](</docs/en/vs-code>) also supports voice dictation with the same claude.ai account requirement. It is not available in VS Code Remote sessions, including SSH, Dev Containers, and Codespaces, because the microphone is on your local machine and the extension runs on the remote host.
##
@@ -142,7 +142,7 @@
Common issues when voice dictation does not activate or record:
- * **`Voice mode requires a Claude.ai account`** : you are authenticated with an API key or a third-party provider. Run `/login` to sign in with a Claude.ai account.
+ * **`Voice mode requires a Claude.ai account`** : you are authenticated with an API key or a third-party provider. Run `/login` to sign in with a claude.ai account.
* **`Voice mode is disabled by your organization's policy`** : an administrator policy for your organization turns off voice dictation. Contact your organization administrator to confirm whether voice dictation is available for your organization.
* **`Microphone access is denied`** : grant microphone permission to your terminal in system settings. On macOS, go to System Settings → Privacy & Security → Microphone and enable your terminal app, then run `/voice` again. On Windows, go to Settings → Privacy & security → Microphone and turn on microphone access for desktop apps, then run `/voice` again. If your terminal isn’t listed in the macOS settings, see Terminal not listed in macOS Microphone settings.
* **`Voice mode requires SoX for audio recording` on Linux**: the native audio module could not load and no fallback is installed. Install SoX with the command shown in the error message, for example `sudo apt-get install sox`.
--- a/vs-code.md
+++ b/vs-code.md
@@ -91,7 +91,7 @@
* **Plan** : Claude describes what it will do and waits for approval before making changes. VS Code automatically opens the plan as a full Markdown document where you can add inline comments to give feedback before Claude begins.
* **Edit automatically** : Claude makes edits without asking.
* **Model** : select **Switch model…** from the command menu to change the model mid-session. You can also click the model name at the bottom of the prompt box to open the same picker. When the current model supports [effort levels](</docs/en/model-config#adjust-effort-level>), the picker also shows an **Effort** row and the model name button shows the selected level. The model name button and the **Effort** row require Claude Code v2.1.257 or later.
- * **Command menu** : click `/` or type `/` to open the command menu. Options include attaching files, switching models, and toggling extended thinking. The Customize section provides access to MCP servers, slash commands, output styles, hooks, memory, 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, switching models, and toggling extended thinking. The Customize section provides access to MCP servers, commands, output styles, hooks, memory, permissions, and plugins. Items with a terminal icon open in the integrated terminal.
* To browse commands such as `/usage` or [`/remote-control`](</docs/en/remote-control>), select **Slash commands** in the Customize section. A dialog lists them with a filter box. Pick one to run it. Typing `/` in the prompt box still suggests commands inline. Requires Claude Code v2.1.257 or later.
* Select **Output styles** in the Customize section to pick an [output style](</docs/en/output-styles>), including your custom styles. Requires Claude Code v2.1.257 or later. 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.
@@ -144,7 +144,7 @@
Resume cloud sessions from Claude.ai
-If you use [Claude Code on the web](</docs/en/claude-code-on-the-web>), you can resume those cloud sessions directly in VS Code. This requires signing in with **Claude.ai Subscription** , not Anthropic Console.
+If you run [cloud sessions](</docs/en/claude-code-on-the-web>), you can resume them directly in VS Code. This requires signing in with **Claude.ai Subscription** , not Anthropic Console.
1
@@ -164,7 +164,7 @@
Browse or search your cloud sessions. Click any session to download it and continue the conversation locally.
-Only web sessions started with a GitHub repository appear in the Web tab. Resuming loads the conversation history locally; changes are not synced back to claude.ai.
+Only cloud sessions started with a GitHub repository appear in the Web tab. Resuming loads the conversation history locally; changes are not synced back to claude.ai.
###
@@ -450,7 +450,7 @@
Commands and skills| [All](</docs/en/commands>)| Subset (type `/` to see available)
MCP server config| Yes| Yes (add and manage servers with `/mcp` in the chat panel)
Checkpoints| Yes| Yes
-`!` bash shortcut| Yes| No
+`!` Bash shortcut| Yes| No
Tab completion| Yes| No
###
@@ -580,14 +580,14 @@
The built-in IDE MCP server
-When the extension is active, it runs a local MCP server that the CLI connects to automatically. This is how the CLI opens diffs in VS Code’s native diff viewer, reads your current selection for `@`-mentions, and — when you’re working in a Jupyter notebook — asks VS Code to execute cells. The server is named `ide` and is hidden from `/mcp` because there’s nothing to configure. If your organization uses a `PreToolUse` hook to allowlist MCP tools, though, you’ll need to know it exists. **Selection and open-file context.** While connected, the CLI includes your current editor selection and the path of the active file as context on each prompt you send. The transcript shows a `⧉ Selected N lines from <file>` line when this happens. To exclude a sensitive file such as `.env`, add a [`Read` deny rule](</docs/en/permissions#read-and-edit>) for its path. A matching deny rule prevents both the selected text and the open-file notice for that file from reaching Claude. If you turn off the Attach Open File setting, the CLI receives the active file’s path only while you have text selected in it. **Transport and authentication.** The server binds to `127.0.0.1` on a random port in the range 10000–65535, and the port is not configurable. The transport is unencrypted `ws://`; because the socket is loopback-only, any process that could capture the traffic can also read the token from the lock file, so TLS would not add protection. Each extension activation generates a fresh random auth token, writes it to a lock file at `~/.claude/ide/<port>.lock`, and the CLI must present it as the `X-Claude-Code-Ide-Authorization` header to connect. The lock file has `0600` permissions in a `0700` directory, so only the user running VS Code can read it. If `CLAUDE_CONFIG_DIR` is set, the lock file is written to `$CLAUDE_CONFIG_DIR/ide/` instead. **Tools exposed to the model.** The server hosts a dozen tools, but only two are visible to the model. The rest are internal RPC the CLI uses for its own UI — opening diffs, reading selections, saving files — and are filtered out before the tool list reaches Claude.
+When the extension is active, it runs a local MCP server that the CLI connects to automatically. This is how the CLI opens diffs in VS Code’s native diff viewer, reads your current selection for `@`-mentions, and — when you’re working in a Jupyter notebook — asks VS Code to execute cells. The server is named `ide` and is hidden from `/mcp` because there’s nothing to configure. If your organization uses a `PreToolUse` hook to allowlist MCP tools, though, you’ll need to know it exists. **Selection and open-file context.** While connected, the CLI includes your current editor selection and the path of the active file as context on each prompt you send. The transcript shows a `⧉ Selected N lines from <file>` line when this happens. To exclude a sensitive file such as `.env`, add a [`Read` deny rule](</docs/en/permissions#read-and-edit>) for its path. A matching deny rule prevents both the selected text and the open-file notice for that file from reaching Claude. If you turn off the Attach Open File setting, the CLI receives the active file’s path only while you have text selected in it. **Transport and authentication.** The server binds to `127.0.0.1` on a random port in the range 10000–65535, and the port is not configurable. The transport is unencrypted `ws://`; because the socket is loopback-only, any process that could capture the traffic can also read the token from the lock file, so TLS would not add protection. Each extension activation generates a fresh random auth token, writes it to a lock file at `~/.claude/ide/<port>.lock`, and the CLI must present it as the `X-Claude-Code-Ide-Authorization` header to connect. The lock file has `0600` permissions in a `0700` directory, so only the user running VS Code can read it. If `CLAUDE_CONFIG_DIR` is set, the lock file is written to `$CLAUDE_CONFIG_DIR/ide/` instead. **Tools exposed to the model.** The server hosts a dozen tools, but only two are visible to the model. The rest are internal RPC the CLI uses for its own UI, such as opening diffs, reading selections, and saving files. They are filtered out before the tool list reaches Claude.
Tool name (as seen by hooks)| What it does| Read-only
---|---|---
-`mcp__ide__getDiagnostics`| Returns language-server diagnostics — the errors and warnings in VS Code’s Problems panel. Optionally scoped to one file.| Yes
+`mcp__ide__getDiagnostics`| Returns language-server diagnostics: the errors and warnings in VS Code’s Problems panel. Optionally scoped to one file.| Yes
`mcp__ide__executeCode`| Runs Python code in the active Jupyter notebook’s kernel. See confirmation flow below.| No
-**Jupyter execution always asks first.** `mcp__ide__executeCode` can’t run anything silently. On each call, the code is inserted as a new cell at the end of the active notebook, VS Code scrolls it into view, and a native Quick Pick asks you to **Execute** or **Cancel**. Cancelling — or dismissing the picker with `Esc` — returns an error to Claude and nothing runs. The tool also refuses outright when there’s no active notebook, when the Jupyter extension (`ms-toolsai.jupyter`) isn’t installed, or when the kernel isn’t Python.
+**Jupyter execution always asks first.** `mcp__ide__executeCode` can’t run anything silently. On each call, the code is inserted as a new cell at the end of the active notebook, VS Code scrolls it into view, and a native Quick Pick asks you to **Execute** or **Cancel**. Cancelling, or dismissing the picker with `Esc`, returns an error to Claude and nothing runs. The tool also refuses outright when there’s no active notebook, when the Jupyter extension (`ms-toolsai.jupyter`) isn’t installed, or when the kernel isn’t Python.
The Quick Pick confirmation is separate from `PreToolUse` hooks. An allowlist entry for `mcp__ide__executeCode` lets Claude _propose_ running a cell; the Quick Pick inside VS Code is what lets it _actually_ run.
Show diff (112 lines)
--- a/web-quickstart.md
+++ b/web-quickstart.md
@@ -1,6 +1,6 @@
-Claude Code on the web is in research preview for Pro, Max, and Team users, and for Enterprise users with premium seats or Chat + Claude Code seats.
-
-Claude Code on the web runs on cloud infrastructure instead of your machine, Anthropic-managed by default. Submit tasks from [claude.ai/code](<https://claude.ai/code>) in your browser or the Claude mobile app. You’ll need a GitHub repository to get started. Claude clones it into an isolated virtual machine, makes changes, and pushes a branch for you to review. Sessions persist across devices, so a task you start on your laptop is ready to review from your phone later. Claude Code on the web works well for:
+Cloud sessions are in research preview for Pro, Max, and Team users, and for Enterprise users with premium seats or Chat + Claude Code seats.
+
+A cloud session runs Claude Code on cloud infrastructure instead of your machine, Anthropic-managed by default. This quickstart starts one from [claude.ai/code](<https://claude.ai/code>) in your browser. You can also start one from the Claude mobile app, the Desktop app, or your terminal with `claude --cloud`. You’ll need a GitHub repository to get started. Claude clones it into an isolated virtual machine, makes changes, and pushes a branch for you to review. Sessions persist across devices, so a task you start on your laptop is ready to review from your phone later. Cloud sessions work well for:
* **Parallel tasks** : run several independent tasks at once, each in its own session and branch, without managing multiple worktrees
* **Repos you don’t have locally** : Claude clones the repo fresh every session, so you don’t need it checked out
@@ -30,19 +30,20 @@
Compare ways to run Claude Code
-Claude Code behaves the same everywhere. What changes is where code executes and whether your local config is available. The Desktop app offers both local and cloud sessions, so its answers below depend on which you choose:
-
-| On the web| Remote Control| Terminal CLI| Desktop app
----|---|---|---|---
-**Code runs on**| Cloud VM, Anthropic-managed by default| Your machine| Your machine| Your machine or cloud VM
-**You chat from**| claude.ai or mobile app| claude.ai or mobile app| Your terminal| The Desktop UI
-**Uses your local config**| No, repo only| Yes| Yes| Yes for local, no for cloud
-**Requires GitHub**| Yes, or [bundle a local repo](</docs/en/claude-code-on-the-web#send-local-repositories-without-github>) via `--cloud`| No| No| Only for cloud sessions
-**Keeps running if you disconnect**| Yes| While terminal stays open| No| Depends on session type
-**[Permission modes](</docs/en/permission-modes>)**| Accept edits, Plan, Auto| Manual, Accept edits, Plan| All modes| Depends on session type
-**Network access**| Configurable per environment| Your machine’s network| Your machine’s network| Depends on session type
-
-See the [terminal quickstart](</docs/en/quickstart>), [Desktop app](</docs/en/desktop>), or [Remote Control](</docs/en/remote-control>) docs to set those up.
+Claude Code behaves the same everywhere. What changes is where the session runs and whether your local configuration is available:
+
+| Cloud session| Local session| Local session with [Remote Control](</docs/en/remote-control>)
+---|---|---|---
+**Code runs on**| Cloud VM, Anthropic-managed by default| Your machine| Your machine
+**You start it from**| claude.ai/code, the Claude mobile app, the Desktop app with **Cloud** selected, or `claude --cloud`| Your terminal, your IDE, or the Desktop app with **Local** selected| Your terminal, the VS Code extension, or the Desktop app
+**You chat from**| claude.ai, the mobile app, or the Desktop app| Where you started it| claude.ai or the mobile app, as well as where you started it
+**Uses your local config**| No, repo only| Yes| Yes
+**Requires GitHub**| Yes, or [bundle a local repo](</docs/en/claude-code-on-the-web#send-local-repositories-without-github>) via `--cloud`| No| No
+**Keeps running if you disconnect**| Yes| No| While the session stays open on your machine
+**[Permission modes](</docs/en/permission-modes>)**| Accept edits, Plan, Auto| All modes in the terminal; see [Switch permission modes](</docs/en/permission-modes#switch-permission-modes>) for the IDE and Desktop app| Manual, Accept edits, or Plan from claude.ai and the mobile app
+**Network access**| Configurable per environment| Your machine’s network| Your machine’s network
+
+See the [terminal quickstart](</docs/en/quickstart>), [Desktop app](</docs/en/desktop>), or [Remote Control](</docs/en/remote-control>) docs to set up local sessions.
##
@@ -83,7 +84,7 @@
Connect from your terminal
-If you already use the GitHub CLI (`gh`), you can set up Claude Code on the web from your terminal. This requires the [Claude Code CLI](</docs/en/quickstart>). On Team and Enterprise plans, `/web-setup` is available only after an Owner turns on [Quick web setup](</docs/en/claude-code-on-the-web#github-authentication-options>). When you run `/web-setup`, Claude Code reads the token that `gh auth token` prints, asks you to confirm, and sends the token to Anthropic. Anthropic stores it encrypted with your claude.ai account, and your cloud sessions use it for GitHub access until you remove it. A cloud session can then access any repository that token can access, with no Claude GitHub App installation. If you already connected GitHub in the browser, `/web-setup` warns you that continuing replaces that connection for your cloud sessions.
+If you already use the GitHub CLI (`gh`), you can connect GitHub for cloud sessions from your terminal. This requires the [Claude Code CLI](</docs/en/quickstart>). On Team and Enterprise plans, `/web-setup` is available only after an Owner turns on [Quick web setup](</docs/en/claude-code-on-the-web#github-authentication-options>). When you run `/web-setup`, Claude Code reads the token that `gh auth token` prints, asks you to confirm, and sends the token to Anthropic. Anthropic stores it encrypted with your claude.ai account, and your cloud sessions use it for GitHub access until you remove it. A cloud session can then access any repository that token can access, with no Claude GitHub App installation. If you already connected GitHub in the browser, `/web-setup` warns you that continuing replaces that connection for your cloud sessions.
Organizations with [Zero Data Retention](</docs/en/zero-data-retention>) enabled cannot use `/web-setup` or other cloud session features. If the GitHub CLI isn’t installed or isn’t authenticated, Claude Code opens the browser onboarding flow instead.
@@ -109,7 +110,7 @@
/web-setup
-Confirm the prompt to send your `gh` token to your Claude account. On success, Claude Code prints `Connected as <your-github-username>` and opens [claude.ai/code](<https://claude.ai/code>) in your browser. If you don’t have a cloud environment yet, `/web-setup` creates one with Trusted network access and no setup script. You can [edit the environment or add variables](</docs/en/cloud-environments#configure-your-environment>) afterward. Once `/web-setup` completes, you can start cloud sessions from your terminal with [`--cloud`](</docs/en/claude-code-on-the-web#from-terminal-to-web>) or set up recurring tasks with [`/schedule`](</docs/en/routines>).
+Confirm the prompt to send your `gh` token to your Claude account. On success, Claude Code prints `Connected as <your-github-username>` and opens [claude.ai/code](<https://claude.ai/code>) in your browser. If you don’t have a cloud environment yet, `/web-setup` creates one with Trusted network access and no setup script. You can [edit the environment or add variables](</docs/en/cloud-environments#configure-your-environment>) afterward. Once `/web-setup` completes, you can start cloud sessions from your terminal with [`--cloud`](</docs/en/claude-code-on-the-web#from-terminal-to-cloud>) or set up recurring tasks with [`/schedule`](</docs/en/routines>).
####
@@ -228,7 +229,7 @@
The page only shows a GitHub login button
-Cloud sessions require a connected GitHub account. Connect via the browser flow above, or run `/web-setup` from your terminal if you use the GitHub CLI. If you’d rather not connect GitHub at all, see [Remote Control](</docs/en/remote-control>) to run Claude Code on your own machine and monitor it from the web.
+Cloud sessions require a connected GitHub account. Connect via the browser flow above, or run `/web-setup` from your terminal if you use the GitHub CLI. If you’d rather not connect GitHub at all, see [Remote Control](</docs/en/remote-control>) to run Claude Code on your own machine and monitor it from your browser or phone.
###
@@ -236,7 +237,7 @@
”Not available for the selected organization”
-Enterprise organizations may need an Owner to enable Claude Code on the web. Contact your Anthropic account team.
+Enterprise organizations may need an Owner to enable cloud sessions. Contact your Anthropic account team.
###
@@ -260,7 +261,10 @@
`/web-setup` shows “No commands match” or “Unknown command”
-`/web-setup` runs inside the Claude Code CLI, not your shell. Launch `claude` first, then type `/web-setup` at the prompt. If you typed it inside Claude Code and the command menu shows `No commands match "/web-setup"`, or submitting it returns `Unknown command: /web-setup`, the command is hidden because a requirement isn’t met. The cause is usually that you’re authenticated with an API key or third-party provider instead of a claude.ai subscription. Run `/login` to sign in with your claude.ai account. On Team and Enterprise plans, the command is hidden by default: the [Quick web setup toggle](</docs/en/claude-code-on-the-web#github-authentication-options>) is off until an Owner turns it on. While it’s off, connect GitHub from the browser instead. The command is also hidden when an administrator has disabled Claude Code on the web for your organization, or when your Enterprise organization has [Zero Data Retention](</docs/en/zero-data-retention>) enabled, which makes Claude Code on the web unavailable.
+`/web-setup` runs inside the Claude Code CLI, not your shell. Launch `claude` first, then type `/web-setup` at the prompt. If you typed it inside Claude Code and the command menu shows `No commands match "/web-setup"`, or submitting it returns `Unknown command: /web-setup`, the command is hidden because a requirement isn’t met. The cause is usually that you’re authenticated with an API key or third-party provider instead of a claude.ai subscription. Run `/login` to sign in with your claude.ai account. On Team and Enterprise plans, the command is hidden by default: the [Quick web setup toggle](</docs/en/claude-code-on-the-web#github-authentication-options>) is off until an Owner turns it on. While it’s off, connect GitHub from the browser instead. The command is also hidden in two other cases:
+
+ * An administrator has disabled cloud sessions for your organization. In this case, submitting `/web-setup` returns [`Cloud sessions are disabled by your organization's policy`](</docs/en/errors#cloud-sessions-are-disabled-by-your-organizations-policy>). Before v2.1.268, this case also returned `Unknown command: /web-setup`.
+ * Your Enterprise organization has [Zero Data Retention](</docs/en/zero-data-retention>) enabled, which makes cloud sessions unavailable.
###
@@ -268,7 +272,7 @@
”Could not create a cloud environment” or “No cloud environment available” when using `--cloud`
-Remote-session features create a default cloud environment automatically if you don’t have one. If you see “Could not create a cloud environment”, automatic creation failed. If you see “No cloud environment available”, your CLI predates automatic creation. In either case, run `/web-setup` in the Claude Code CLI, or add an environment from the [environment selector](</docs/en/cloud-environments#configure-your-environment>) at [claude.ai/code](<https://claude.ai/code>).
+Cloud session features create a default cloud environment automatically if you don’t have one. If you see “Could not create a cloud environment”, automatic creation failed. If you see “No cloud environment available”, your CLI predates automatic creation. In either case, run `/web-setup` in the Claude Code CLI, or add an environment from the [environment selector](</docs/en/cloud-environments#configure-your-environment>) at [claude.ai/code](<https://claude.ai/code>).
###
@@ -312,7 +316,7 @@
Now that you can submit and review tasks, these pages cover what comes next: starting cloud sessions from your terminal, scheduling recurring work, and giving Claude standing instructions.
- * [Use Claude Code on the web](</docs/en/claude-code-on-the-web>): the full reference, including teleporting sessions to your terminal, session sharing, and auto-fixing pull requests
+ * [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>): the full reference, including teleporting sessions to your terminal, session sharing, and auto-fixing pull requests
* [Configure cloud environments](</docs/en/cloud-environments>): network access levels, environment variables, and setup scripts for cloud sessions
* [Routines](</docs/en/routines>): automate work on a schedule, via API call, or in response to GitHub events
* [CLAUDE.md](</docs/en/memory>): give Claude persistent instructions and context that load at the start of every session
--- a/workflows.md
+++ b/workflows.md
@@ -19,7 +19,7 @@
Scale| A few delegated tasks per turn| Same as subagents| A handful of long-running peers| Dozens to hundreds of agents per run
Interruption| Restarts the turn| Restarts the turn| Teammates keep running| Resumable in the same session
-A workflow moves the plan into code. With subagents, skills, and agent teams, Claude is the orchestrator: it decides turn by turn what to spawn or assign next, and every result lands in a context window. A workflow script holds the loop, the branching, and the intermediate results itself, so Claude’s context holds only the final answer. Moving the plan into code also lets a workflow apply a repeatable quality pattern, not just run more agents: it can have independent agents adversarially review each other’s findings before they’re reported, or draft a plan from several angles and weigh them against each other, so you get a more trustworthy result than a single pass.
+A workflow moves the plan into code. With subagents, skills, and agent teams, Claude is the orchestrator: it decides turn by turn what to spawn or assign next, and every result goes into a context window. A workflow script holds the loop, the branching, and the intermediate results itself, so Claude’s context holds only the final answer. Moving the plan into code also lets a workflow apply a repeatable quality pattern, not just run more agents: it can have independent agents adversarially review each other’s findings before they’re reported, or draft a plan from several angles and weigh them against each other, so you get a more trustworthy result than a single pass.
##
@@ -57,7 +57,7 @@
Read the report
-When the run finishes, the report lands in your session. It cites the sources each claim came from, with claims that didn’t survive cross-checking already filtered out.When the verifier agents can’t check a claim, such as after a rate limit or API error, the report lists that claim as unverified instead of counting it as refuted.
+When the run finishes, the report appears in your session. It cites the sources each claim came from, with claims that didn’t survive cross-checking already filtered out.When the verifier agents can’t check a claim, such as after a rate limit or API error, the report lists that claim as unverified instead of counting it as refuted.
To run a workflow for your own task, have Claude write one, and once a run does what you wanted you can save it as a command of your own.
@@ -271,7 +271,7 @@
Review every changed file and write one summary
-Run a reviewer per file, then hand all the findings to one agent that ranks and deduplicates them.
+Run a reviewer per file, then pass all the findings to one agent that ranks and deduplicates them.
use a workflow to review every file changed in this PR for correctness issues, then merge the per-file findings into one ranked summary
--- a/zero-data-retention.md
+++ b/zero-data-retention.md
@@ -63,8 +63,7 @@
Feature| Reason
---|---
-[Claude Code on the Web](</docs/en/claude-code-on-the-web>)| Requires server-side storage of conversation history.
-[Cloud sessions](</docs/en/desktop#cloud-sessions>) from the Desktop app| Requires persistent session data that includes prompts and completions.
+[Cloud sessions](</docs/en/claude-code-on-the-web>), including those started from the [Desktop app](</docs/en/desktop#cloud-sessions>)| Requires server-side storage of session data, including conversation history with prompts and completions.
[Claude Tag](</docs/en/claude-tag>)| Retains channel memory and session transcripts.
[Artifacts](</docs/en/artifacts>)| Requires storing published page content on Anthropic-operated infrastructure.
Feedback submission (`/feedback`, `/bug`, `/share`)| Submitting feedback sends conversation data to Anthropic.