Changes on
88 changes detected
--- a/accessibility.md
+++ b/accessibility.md
@@ -103,7 +103,7 @@
Answer menus and prompts
-In screen reader mode, menus you’d normally navigate with the arrow keys, including permission prompts, become numbered lists. Claude Code announces each option as a numbered line, then an `Enter selection` prompt that names the valid range. Type the number of the option you want and press Enter.
+In screen reader mode, menus you’d normally navigate with the arrow keys, including permission prompts, become numbered lists. Claude Code announces each option as a numbered line, then a `Select with numbers` prompt that names the valid range. Type the number of the option you want and press Enter.
* Press Escape to cancel a menu whose prompt ends with `or Escape to cancel`.
* If you type a number that isn’t on the list, Claude Code announces the valid range and lets you try again.
--- a/admin-setup.md
+++ b/admin-setup.md
@@ -78,7 +78,7 @@
---|---|---
[Permission rules](</docs/en/permissions>)| Allow, ask, or deny specific tools and commands| `permissions.allow`, `permissions.deny`
[Permission lockdown](</docs/en/permissions#managed-only-settings>)| Make managed settings the [only settings source of permission rules](</docs/en/settings-reference#allowmanagedpermissionrulesonly>). Disable `--dangerously-skip-permissions`| `allowManagedPermissionRulesOnly`, `permissions.disableBypassPermissionsMode`
-[Starting permission mode](</docs/en/permission-modes#which-mode-a-session-starts-in>)| Choose the permission mode your developers’ terminal sessions start in instead of the built-in starting permission mode, or remove auto mode. The VS Code extension reads a `defaultMode` you set only on Pro, Max, and Team plans; [Switch permission modes](</docs/en/permission-modes#switch-permission-modes>) lists what the extension reads| `permissions.defaultMode`, `permissions.disableAutoMode`
+[Starting permission mode](</docs/en/permission-modes#which-mode-a-session-starts-in>)| Choose the permission mode your developers’ terminal sessions start in instead of the built-in starting permission mode, or remove auto mode. [Switch permission modes](</docs/en/permission-modes#switch-permission-modes>) lists when the VS Code extension reads a `defaultMode` you set| `permissions.defaultMode`, `permissions.disableAutoMode`
[Sandboxing](</docs/en/sandboxing>)| OS-level filesystem and network isolation with domain allowlists| `sandbox.enabled`, `sandbox.network.allowedDomains`
[Managed policy CLAUDE.md](</docs/en/memory#deploy-organization-wide-claude-md>)| Org-wide instructions loaded in every session, can’t be excluded| File at the managed policy path
[MCP server control](</docs/en/managed-mcp>)| Restrict which MCP servers users can add or connect to, deploy a fixed set, or provide remote servers to every user alongside their own| `allowedMcpServers`, `deniedMcpServers`, `allowManagedMcpServersOnly`, `managedMcpServers`, or a deployed `managed-mcp.json` file
--- a/advisor.md
+++ b/advisor.md
@@ -141,6 +141,7 @@
* **Reviewed** : the line confirms that the advisor has reviewed the conversation. When the advisor returned readable guidance, press `Ctrl+O` to read it.
* **Declined** : the line reads `Advisor declined to advise on this request`. If the advisor gave a reason, press `Ctrl+O` to read it.
+ * **Unavailable** : the advisor call failed, and the line reads `Advisor unavailable (<error_code>)`, where `<error_code>` is the code the call returned.
Claude generally follows the advisor’s guidance, but adapts when its own evidence contradicts a specific claim: if a recommended step fails when tried, or the file contents contradict the advice, Claude surfaces the conflict rather than following the guidance unconditionally. The advisor always receives the full conversation, and Claude controls the timing. For more control or a different configuration, see how the advisor compares with subagents and opusplan.
--- a/agent-teams.md
+++ b/agent-teams.md
@@ -285,7 +285,7 @@
Context and communication
-Each teammate has its own context window. When spawned, a teammate loads the same project context as a regular session: CLAUDE.md, MCP servers, and skills. It also receives the spawn prompt from the lead. The lead’s conversation history does not carry over. **How teammates share information:**
+Each teammate has its own context window. When spawned, a teammate loads the same project context as a regular session: CLAUDE.md, MCP servers, and skills. If you start the lead with [`--setting-sources`](</docs/en/cli-reference#cli-flags>), teammates load from the same restricted list of sources. Before v2.1.281, split-pane teammates loaded every settings source. A teammate also receives the spawn prompt from the lead. The lead’s conversation history does not carry over. **How teammates share information:**
* **Automatic message delivery** : when teammates send messages, they’re delivered automatically to recipients. The lead doesn’t need to poll for updates.
* **Idle notifications** : when a teammate finishes and stops, it automatically notifies the lead and includes its final answer in the notification. A teammate whose turn ends on an API error notifies the lead that it failed and includes the error text.
--- a/agent-view.md
+++ b/agent-view.md
@@ -338,6 +338,7 @@
* `--mcp-config` and `--strict-mcp-config`
* `--settings`
+ * `--setting-sources`
* `--add-dir`
* `--plugin-dir`
* `--fallback-model`
@@ -355,7 +356,7 @@
claude --bg "investigate the flaky SettingsChangeDetector test"
-The prompt is the positional argument, not a `-p` value. Claude Code rejects `--bg` combined with `-p` or `--print` before any session is created, because `--print` never starts the interactive session that `claude agents` attaches to. To run a specific [subagent](</docs/en/sub-agents>) you have defined, such as a `code-reviewer`, as the session’s main agent, combine `--bg` with `--agent`:
+The prompt is the positional argument, not a `-p` value. Claude Code rejects `--bg` combined with `-p` or `--print` before any session is created, because `--print` never starts the interactive session that `claude agents` attaches to. If you run `claude --bg` from a terminal in a directory you haven’t [trusted](</docs/en/permissions#project-allow-rules-and-workspace-trust>), the workspace trust dialog appears first and the session starts once you accept. If you decline, Claude Code exits without starting a session. Where no dialog can appear, such as in a script, the command exits with a [`Workspace not trusted`](</docs/en/errors#workspace-not-trusted-when-dispatching-a-background-session>) error instead. To run a specific [subagent](</docs/en/sub-agents>) you have defined, such as a `code-reviewer`, as the session’s main agent, combine `--bg` with `--agent`:
claude --agent code-reviewer --bg "address review comments on PR 1234"
@@ -434,8 +435,12 @@
When you delete again, Claude Code discards only what the refusal showed: if the worktree has gained a commit since, Claude Code keeps it again and shows the updated state. When another finished session’s records also name the worktree, it stays when you delete again; push the commits, then delete again.
* A worktree git no longer recognizes, for example after `git worktree prune`, doesn’t block the delete. Claude Code deletes the session and leaves the directory on disk.
* When git or your [`WorktreeRemove` hook](</docs/en/hooks#worktreeremove>) fails to remove the worktree, Claude Code keeps the worktree and the session, and the message names the cause. For a hook, the message says how it ended, such as `exited 1`, and quotes the start of its stderr. The message also tells you which of these to do next:
- * Delete the session again to remove the directory anyway, by pressing `Ctrl+X` twice on its row in agent view or running the `claude rm <id> --force-remove-worktree <worktree-id>` command that the `claude rm` refusal printed. Claude Code offers this only when it can confirm the directory is one of the repository’s linked worktrees under `.claude/worktrees/` with no uncommitted changes to tracked files, no nested repository inside it, and no other session’s record naming it. The worktree’s branch stays in the repository.
- * Fix what stands in the way, such as committing or stashing the uncommitted changes, closing whatever is using the directory, or fixing the hook, then delete the session again.
+ * Delete the session again to remove the directory anyway, by pressing `Ctrl+X` twice on its row in agent view or running the `claude rm <id> --force-remove-worktree <worktree-id>` command that the `claude rm` refusal printed. The worktree’s branch stays in the repository. Claude Code offers this only when it can confirm all of the following:
+ * The directory is one of the repository’s linked worktrees under `.claude/worktrees/`
+ * Neither the worktree nor a checked-out submodule has uncommitted changes to tracked files
+ * No other session’s record names it
+When Claude Code can’t verify a submodule checkout’s state, such as one replaced by a separate git repository, it doesn’t offer this either.
+ * Fix what stands in the way, such as committing or stashing the uncommitted changes, moving a separate git repository out of the worktree, closing whatever is using the directory, or fixing the hook, then delete the session again.
* Remove the directory yourself, then delete the session again.
A worktree you created yourself and started the session inside is left in place either way. A session whose worktree directory belongs to no git repository, because the repository was deleted or a [`WorktreeCreate` hook](</docs/en/hooks#worktreecreate>) created the directory elsewhere, can still be deleted. While files remain in the directory:
@@ -478,7 +483,7 @@
Settings and provider
-A background session reads its [settings](</docs/en/settings>) from the directory it runs in, the same as if you had started `claude` there. This includes [`env` values](</docs/en/settings-reference#env>) in project settings, so an `ANTHROPIC_MODEL` or provider variable set there applies to every background session in that directory. A background session also runs with the `PATH` of the shell you dispatched it from, so the commands it runs find the same tools your terminal does. It keeps that shell’s cloud provider selection too, such as `CLAUDE_CODE_USE_BEDROCK` or `CLAUDE_CODE_USE_VERTEX`, along with its `ANTHROPIC_DEFAULT_*_MODEL` aliases and any [`CLAUDE_CODE_EXTRA_BODY`](</docs/en/env-vars>) override you exported there.
+A background session reads its [settings](</docs/en/settings>) from the directory it runs in, the same as if you had started `claude` there with the configuration flags it carried over. This includes [`env` values](</docs/en/settings-reference#env>) in project settings, so an `ANTHROPIC_MODEL` or provider variable set there applies to every background session in that directory. A background session also runs with the `PATH` of the shell you dispatched it from, so the commands it runs find the same tools your terminal does. It keeps that shell’s cloud provider selection too, such as `CLAUDE_CODE_USE_BEDROCK` or `CLAUDE_CODE_USE_VERTEX`, along with its `ANTHROPIC_DEFAULT_*_MODEL` aliases and any [`CLAUDE_CODE_EXTRA_BODY`](</docs/en/env-vars>) override you exported there.
####
@@ -541,17 +546,18 @@
Settings, plugins, and MCP servers
-Agent view accepts the same configuration flags as `claude` for loading settings, plugins, MCP servers, and additional directories. Agent view applies `--settings` and `--plugin-dir` to itself and passes every configuration flag through to the sessions you dispatch from it, so a plugin or MCP server you load this way is available in those sessions.
+Agent view accepts the same configuration flags as `claude` for loading settings, plugins, MCP servers, and additional directories. Agent view applies `--settings`, `--setting-sources`, and `--plugin-dir` to itself and passes every configuration flag through to the sessions you dispatch from it, so a plugin or MCP server you load this way is available in those sessions.
Flag| Effect
---|---
[`--settings <file-or-json>`](</docs/en/settings>)| Override settings for agent view and dispatched sessions
+[`--setting-sources <sources>`](</docs/en/cli-reference#cli-flags>)| Load only the named settings sources, in agent view and dispatched sessions
[`--add-dir <path>`](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>)| Grant file access to an additional directory
[`--plugin-dir <path>`](</docs/en/plugins/create#load-a-directory-or-archive-for-one-session>)| Load a plugin from a local directory
[`--mcp-config <file-or-json>`](</docs/en/mcp>)| Load MCP servers from a config file or JSON string
`--strict-mcp-config`| Use only the MCP servers from `--mcp-config`, ignoring other MCP configuration. See [Exclusive control with managed-mcp.json](</docs/en/managed-mcp#exclusive-control-with-managed-mcp-json>) for what the flag does under a managed MCP file
-Repeat `--add-dir`, `--plugin-dir`, or `--mcp-config` once per value. `claude agents` doesn’t support the space-separated form, such as `--add-dir a b c`. You can place `--settings` and `--plugin-dir` before or after `agents`. Keep `--add-dir` and `--mcp-config` after `agents`: if you place either before `agents`, `claude agents --json` fails with an `unknown option` error. The following example opens agent view with a settings override and one extra directory:
+Repeat `--add-dir`, `--plugin-dir`, or `--mcp-config` once per value. `claude agents` doesn’t support the space-separated form, such as `--add-dir a b c`. You can place `--settings`, `--setting-sources`, and `--plugin-dir` before or after `agents`. Keep `--add-dir` and `--mcp-config` after `agents`: if you place either before `agents`, `claude agents --json` fails with an `unknown option` error. The following example opens agent view with a settings override and one extra directory:
claude agents --settings ./ci-settings.json --add-dir ../shared-lib
@@ -871,6 +877,10 @@
Version| Change
---|---
+v2.1.281| A [`--setting-sources`](</docs/en/cli-reference#cli-flags>) restriction carries over to a session you background with `←` or `/bg` and to the sessions you dispatch from agent view. Before this release, the spawned session loaded every settings source.
+v2.1.281| `claude --bg`, and the commands that restart a session, check workspace trust for the session’s directory first. From a terminal in that directory, the trust dialog appears if you haven’t accepted it; where no dialog can appear, such as in a script, the command exits with a [`Workspace not trusted`](</docs/en/errors#workspace-not-trusted-when-dispatching-a-background-session>) error.
+v2.1.274| After an auto-update, an agent view you’ve been away from for about an hour can relaunch itself onto the new build. When it does, it keeps the dispatch defaults you opened it with: `--model`, `--effort`, `--permission-mode`, `--allow-dangerously-skip-permissions`, and `--agent`. Before this release, the relaunched view kept only `--cwd` and configuration flags such as `--settings` and `--mcp-config`, so sessions you dispatched afterward started without those defaults.
+v2.1.274| When a delete is refused because git or your `WorktreeRemove` hook couldn’t remove the worktree, a checked-out submodule that Claude Code verifies has no uncommitted changes to tracked files doesn’t block the offer to delete again and remove the directory anyway. Uncommitted work inside a checked-out submodule counts as uncommitted changes, and the message names the submodule. Before this release, any submodule checkout in the worktree blocked the offer, with a message saying the worktree contains a nested repository.
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.
--- a/agents.md
+++ b/agents.md
@@ -5,7 +5,7 @@
[Subagents](</docs/en/sub-agents>)| Delegated workers inside one session that do a side task in their own context and return a summary| A side task would flood your main conversation with search results, logs, or file contents you won’t reference again
[Agent view](</docs/en/agent-view>)| One screen to dispatch and monitor sessions running in the background, opened with `claude agents`. Research preview| You have several independent tasks and want to hand them off, check status at a glance, and step in only when one needs you
[Agent teams](</docs/en/agent-teams>)| Multiple coordinated sessions with a shared task list and inter-agent messaging, managed by a lead. Experimental and disabled by default| You want Claude to split a project into pieces, assign them, and keep the workers in sync
-[Projects](</docs/en/claude-projects>)| One ongoing conversation at claude.ai/code or in the desktop app. Claude starts parallel cloud sessions called threads, gives each one the project’s repositories, instructions, and memory, and shows you which ones need you. Public beta on Pro and Max| The work spans many tasks over days or weeks, should keep running when your machine is off, and you’d rather describe it once than dispatch and track each session
+[Projects](</docs/en/claude-projects>)| One ongoing conversation at claude.ai/code or in the desktop app. Claude starts parallel sessions called threads, in the cloud or, when you ask, on your computer through Remote Control, gives each one the project’s instructions, and shows you which ones need you. Public beta on Pro and Max| The work spans many tasks over days or weeks, should keep running when your machine is off, and you’d rather describe it once than dispatch and track each session
[Dynamic workflows](</docs/en/workflows>)| A script that runs many subagents and cross-checks their results, for work too big to coordinate one turn at a time or that needs more than a single pass| A job outgrows a handful of subagents, or you want findings verified against each other: a codebase-wide audit, a 500-file migration, cross-checked research, or a plan drafted from several angles
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:
--- a/anthropic-marketplaces.md
+++ b/anthropic-marketplaces.md
@@ -25,7 +25,7 @@
What’s in it| Plugins Anthropic maintains, plus plugins from partners and other authors| Third-party plugins that their authors submitted to Anthropic| A small set of example plugins that show what a plugin can contain
How you get it| Claude Code adds it the first time you start an interactive terminal session, unless a [managed policy](</docs/en/plugins/org#allow-the-official-marketplace-and-your-own>) or `CLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALL` blocks it. See [Marketplace `claude-plugins-official` not found](</docs/en/plugins/troubleshooting#marketplace-claude-plugins-official-not-found>) if it’s missing| You add it in a Claude Code session with `/plugin marketplace add anthropics/claude-plugins-community`| You add it in a Claude Code session with `/plugin marketplace add anthropics/claude-code`
-If you wrote a plugin and want other people to install it, see [Publish a plugin](</docs/en/plugins/publish>), which covers your own marketplace and submitting to the community marketplace.
+If you wrote a plugin and want other people to install it, see [Publish a plugin](</docs/en/plugins/publish>), which covers your own marketplace and submitting to Anthropic’s directory.
###
@@ -56,7 +56,7 @@
* **On the web** : search the full catalog on [Claude Marketplace](<https://claude.com/marketplace/plugins>), which shows install counts and marks some plugins **Anthropic verified**.
* **On GitHub** : open `.claude-plugin/marketplace.json` in the marketplace’s repository, such as [`anthropics/claude-plugins-official`](<https://github.com/anthropics/claude-plugins-official>). That file is the catalog itself.
-To install from the desktop app or from a script, or to see what a cloud session loads, see [Install plugins](</docs/en/plugins/install>).
+Anthropic’s directory is separate from these marketplaces. The directory is the catalog on claude.ai, and `/plugin` doesn’t list it. A plugin you add from the directory on claude.ai reaches Claude Code through [account sync](</docs/en/plugins/loading#synced-plugins>). To list your own plugin there, see [Submit to Anthropic’s directory](</docs/en/plugins/publish#submit-to-anthropics-directory>). To install from the desktop app or from a script, or to see what a cloud session loads, see [Install plugins](</docs/en/plugins/install>).
###
--- a/authentication.md
+++ b/authentication.md
@@ -251,6 +251,16 @@
The command opens the same browser authorization flow as `/login`, and the token prints to the terminal after you approve access in the browser. It does not save the token anywhere; copy it and set it as the `CLAUDE_CODE_OAUTH_TOKEN` environment variable wherever you want to authenticate:
+ * macOS, Linux, WSL
+
+ * Windows PowerShell
+
+ * Windows CMD
+
export CLAUDE_CODE_OAUTH_TOKEN=your-token
+ $env:CLAUDE_CODE_OAUTH_TOKEN = "your-token"
+
+ set CLAUDE_CODE_OAUTH_TOKEN=your-token
+
This token authenticates with your Claude subscription and requires a Pro, Max, Team, or Enterprise plan. It can only make model requests, so it can’t establish [Remote Control](</docs/en/remote-control>) sessions or fetch [claude.ai connectors](</docs/en/mcp#use-mcp-servers-from-claude-ai>). MCP servers you configure locally still work. [Bare mode](</docs/en/headless#start-faster-with-bare-mode>) does not read `CLAUDE_CODE_OAUTH_TOKEN`. If your script passes `--bare`, authenticate with `ANTHROPIC_API_KEY` or an `apiKeyHelper` instead.
Show diff (145 lines)
--- a/auto-mode-config.md
+++ b/auto-mode-config.md
@@ -1,17 +1,15 @@
[Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) lets Claude Code run without routine permission prompts by routing tool calls through a classifier that blocks anything irreversible, destructive, or aimed outside your environment. Deny and explicit ask rules are evaluated before the classifier and still block or prompt. Use the `autoMode` settings block to tell that classifier which repos, buckets, and domains your organization trusts, so it stops blocking routine internal operations.
-Auto mode is available to all users on every provider, including the Anthropic API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions. If Claude Code reports auto mode as unavailable for your account, check the [full requirements](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), which also cover the supported models and the organization-level control on Team and Enterprise plans. In v2.1.158 through v2.1.206, auto mode on Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and Claude apps gateway sessions required setting `CLAUDE_CODE_ENABLE_AUTO_MODE=1`; v2.1.207 removed the requirement.
-
-By default, the classifier trusts only the working directory and the current repo’s configured remotes. Actions like pushing to your company’s source-control org or writing to a team cloud bucket are blocked until you add them to `autoMode.environment`. For how sessions end up in auto mode and what the classifier blocks by default, see [auto mode on the Permission modes page](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>). This page is the configuration reference. This page covers how to:
+This page is the configuration reference. Turning auto mode on and off is covered on the Permission modes page:
+
+ * **Switch to auto mode mid-session, or back out of it** : see [Switch permission modes](</docs/en/permission-modes#switch-permission-modes>)
+ * **Start a session in auto mode** : see [Start in a different permission mode](</docs/en/permission-modes#start-in-a-different-mode>)
+
+Auto mode is available to all users on every provider, including the Anthropic API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions. If Claude Code reports auto mode as unavailable for your account, check the [full requirements](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), which also cover the supported models and the organization-level control on Team and Enterprise plans. By default, the classifier trusts only the working directory and the current repo’s configured remotes. Actions like pushing to your company’s source-control org or writing to a team cloud bucket are blocked until you add them to `autoMode.environment`. This page covers how to:
* Add a human checkpoint for pushes and pull requests with `permissions.ask`
- * Choose where to set rules across CLAUDE.md, user settings, and managed settings
* Define trusted infrastructure with `autoMode.environment`
* Generate environment entries with `/auto-mode-setup`
- * Override the block and allow rules when the defaults don’t fit your pipeline
- * Edit rules from `/permissions` without opening a settings file
- * Route all shell commands through the classifier with `autoMode.classifyAllShell`
- * Inspect your effective config with the `claude auto-mode` subcommands
* Review denials so you know what to add next
##
@@ -20,11 +18,7 @@
Common boundaries
-Auto mode allows pushes to any branch of the repository you’re working in, including the default branch, and pull request creation by default. A non-default branch whose name marks it as a deploy or publication target, such as `production`, `release`, or `gh-pages`, isn’t covered by that default: the classifier judges a push there on its own terms, including as a production deploy. The push’s content is also still checked, so a force push, a secret entering the commit, or a change that would send secrets outside the repository when CI or a deploy pipeline runs it stays blocked.
-
-Before v2.1.211, the classifier allowed pushes only to your working branch, branches Claude created, and routine pushes to the default branch.
-
-If you want a human checkpoint before Claude’s push and pull request commands, add permission rules: the recipes below keep auto mode on for everything else.
+Auto mode allows pushes to any branch of the repository you’re working in, including the default branch, and pull request creation by default. A non-default branch whose name marks it as a deploy or publication target, such as `production`, `release`, or `gh-pages`, isn’t covered by that default: the classifier judges a push there on its own terms, including as a production deploy. The push’s content is also still checked, so a force push, a secret entering the commit, or a change that would send secrets outside the repository when CI or a deploy pipeline runs it stays blocked. If you want a human checkpoint before Claude’s push and pull request commands, add permission rules: the recipes below keep auto mode on for everything else.
###
@@ -65,7 +59,7 @@
Organization-wide| [Managed settings](</docs/en/server-managed-settings>)| Trusted infrastructure distributed to all developers
`--settings` flag or Agent SDK| Inline JSON| Per-invocation overrides for automation
-The classifier doesn’t read `autoMode` from project settings in `.claude/settings.json` or `.claude/settings.local.json`. Both files live in the repo directory, so a checked-in repo or a build step could otherwise inject its own allow rules. Before v2.1.207, the classifier also read `.claude/settings.local.json`; move any `autoMode` block in that file to `~/.claude/settings.json`. Excluding `.claude/settings.local.json` also closes the case where a repository commits the file or a local tool or build step writes it. Entries from each scope are combined. A developer can extend `environment`, `allow`, `soft_deny`, and `hard_deny` with personal entries but can’t remove entries that managed settings provide. Because allow rules act as exceptions to soft block rules inside the classifier, a developer-added `allow` entry can override an organization `soft_deny` entry: the combination is additive, not a hard policy boundary.
+The classifier doesn’t read `autoMode` from project settings in `.claude/settings.json` or `.claude/settings.local.json`. Both files live in the repo directory, so a checked-in repo or a build step could otherwise inject its own allow rules. Move any `autoMode` block in `.claude/settings.local.json` to `~/.claude/settings.json`. Entries from each scope are combined. A developer can extend `environment`, `allow`, `soft_deny`, and `hard_deny` with personal entries but can’t remove entries that managed settings provide. Because allow rules act as exceptions to soft block rules inside the classifier, a developer-added `allow` entry can override an organization `soft_deny` entry: the combination is additive, not a hard policy boundary.
The classifier is a second gate that runs after the [permissions system](</docs/en/permissions>). For actions that must never run regardless of user intent or classifier configuration, use `permissions.deny` in managed settings, which blocks the action before the classifier is consulted and can’t be overridden.
@@ -75,13 +69,13 @@
Define trusted infrastructure
-For most organizations, `autoMode.environment` is the only field you need to set. It tells the classifier which repos, buckets, and domains are trusted: the classifier uses it to decide what “external” means, so any destination not listed is a potential exfiltration target. As of Claude Code v2.1.198, `claude auto-mode defaults` prints three kinds of environment entry. Versions before v2.1.195 print only the first five trust slots.
+For most organizations, `autoMode.environment` is the only field you need to set. It tells the classifier which repos, buckets, and domains are trusted: the classifier uses it to decide what “external” means, so any destination not listed is a potential exfiltration target. `claude auto-mode defaults` prints three kinds of environment entry.
* **Context slots** : describe your organization, stack, and security posture so the classifier reads the other rules in your context. Each defaults to `None configured` or to the conservative assumption named next to it:
* **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 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
+ * **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.
* **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**
@@ -90,10 +84,8 @@
* **Host containment** : defaults to an ordinary developer machine or CI runner with open internet. If Claude Code runs in a container, VM, or pod with an egress allow-list or neighbors it must not touch, name the allowed hosts, whether the cloud metadata endpoint should be reachable, and which cloud project, cluster, or registry the task uses and under what identity. Until this entry names that identity, the classifier [blocks](</docs/en/permission-modes#what-the-classifier-blocks-by-default>) requests for the host’s own credentials. Requires Claude Code v2.1.257 or later
* **Protected deployment namespaces / environments** : falls back to the Sensitive remote targets heuristic until you name them
* **Data retention / declassification**
- * **Trust slots** : name what the classifier treats as inside your boundary. The slots are Trusted repo, Source control, Trusted internal domains, Trusted cloud buckets, Key internal services, and Internal package registry. The repo and source-control entries default to the working repository and its configured remotes. Every other trust slot defaults to `None configured`, so nothing else is trusted until you add it. A repository’s visibility scopes only confidential material: a private repository is an acceptable destination for confidential material, but making a repository private never clears secrets or personal or entrusted data into it, and the classifier treats content ported, repointed, or first read from outside the working repository as not that repository’s own work. This scoping requires Claude Code v2.1.203 or later.
+ * **Trust slots** : name what the classifier treats as inside your boundary. The slots are Trusted repo, Source control, Trusted internal domains, Trusted cloud buckets, Key internal services, and Internal package registry. The repo and source-control entries default to the working repository and its configured remotes. Every other trust slot defaults to `None configured`, so nothing else is trusted until you add it. A repository’s visibility scopes only confidential material: a private repository is an acceptable destination for confidential material, but making a repository private never clears secrets or personal or entrusted data into it, and the classifier treats content ported, repointed, or first read from outside the working repository as not that repository’s own work.
* **Sensitivity slots** : name what the protective rules treat as high-risk. The slots are Sensitive data locations & audiences, Sensitive remote targets, and Protected IaC scopes. Each defaults to a broad heuristic, such as treating any host or namespace whose name carries `prod` or `production` as a sensitive remote target, so the protective rules are active before you configure anything. Naming concrete targets in a sensitivity slot makes those rules apply to the named targets instead of the heuristic.
-
-Before v2.1.211, the context slots also included a Default / protected branches entry that treated `main` and `master` as protected until you named others. v2.1.211 removed it: pushes to any branch of the repository you’re working in are allowed by default, so there is no protected-branch default to configure.
To add your own entries alongside the defaults, include the literal string `"$defaults"` in the array. The default entries are spliced in at that position, so your custom entries can go before or after them. The following example keeps the default entries and adds an organization’s repos, buckets, domains, and services.
@@ -117,12 +109,12 @@
* **Trusted internal domains** : hostnames for APIs, dashboards, and services inside your network, like `*.internal.example.com`
* **Key internal services** : CI, artifact registries, internal package indexes, incident tooling
* **Internal package registry** : the private npm, PyPI, or other registry that installs should route through, so installs that bypass it for a public registry get blocked
- * **Sensitive data locations & audiences**: the buckets, databases, or paths that hold personal data, confidential business data, credentials, regulated data, or similarly sensitive material, and the audiences that data in each location may be shared with, so the classifier protects those locations instead of guessing from content. Claude Code v2.1.195 through v2.1.197 name this entry PII / regulated-data locations and cover only locations that hold personal or regulated data, without the audience dimension
+ * **Sensitive data locations & audiences**: the buckets, databases, or paths that hold personal data, confidential business data, credentials, regulated data, or similarly sensitive material, and the audiences that data in each location may be shared with, so the classifier protects those locations instead of guessing from content.
* **Sensitive remote targets** : the namespaces, hosts, or containers that count as production, so remote shells and port-forwards into them need your explicit approval
* **Protected IaC scopes** : the infrastructure resources whose apply or destroy should always require you to name the change
* **Additional context** : regulated-industry constraints, multi-tenant infrastructure, or compliance requirements that affect what the classifier should treat as risky
-The Internal package registry, Sensitive data locations & audiences, Sensitive remote targets, and Protected IaC scopes entries require Claude Code v2.1.195 or later. Earlier versions still read them as plain context but don’t have the built-in rules that target them. A useful starting template: fill in the bracketed fields and remove any lines that don’t apply.
+A useful starting template: fill in the bracketed fields and remove any lines that don’t apply.
{
"autoMode": {
@@ -139,7 +131,7 @@
}
}
-The more specific context you give, the better the classifier can distinguish routine internal operations from exfiltration attempts. You don’t need to fill everything in at once. A reasonable rollout: start with the defaults and add your source control org and key internal services, which resolves the most common false positives like pushing to your own repos. Add trusted domains and cloud buckets next. Fill the rest as blocks come up.
+You don’t need to fill everything in at once. A reasonable rollout: start with the defaults and add your source control org and key internal services, which resolves the most common false positives like pushing to your own repos. Add trusted domains and cloud buckets next. Fill the rest as blocks come up.
##
@@ -267,7 +259,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. 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.
+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, except [critical-path removals](</docs/en/permission-modes#critical-paths>).
{
"autoMode": {
@@ -276,8 +268,6 @@
}
This trades latency for coverage: a command that an allow rule would have approved instantly now waits for a classifier decision, and each shell command counts as a classifier call. The setting applies only while auto mode is active, and your allow rules behave normally in other permission modes.
-
-`autoMode.classifyAllShell` requires Claude Code v2.1.193 or later. Earlier versions ignore the key and continue to carry narrow shell allow rules into auto mode.
##
@@ -317,7 +307,7 @@
claude auto-mode critique
-Run `claude auto-mode config` after saving your settings to confirm the effective rules are what you expect, with `"$defaults"` expanded in place. If you’ve written custom rules, `claude auto-mode critique` reviews them and flags entries that are ambiguous, redundant, or likely to cause false positives. To discard your customizations and return to the built-in defaults, run the reset subcommand. It requires Claude Code v2.1.212 or later and removes the `autoMode` section from your user settings file:
+If you’ve written custom rules, `claude auto-mode critique` reviews them and flags entries that are ambiguous, redundant, or likely to cause false positives. To discard your customizations and return to the built-in defaults, run the reset subcommand. It requires Claude Code v2.1.212 or later and removes the `autoMode` section from your user settings file:
claude auto-mode reset
@@ -343,7 +333,7 @@
* A command you want to run without review from now on: add an `allow` rule.
* A one-off action you did intend: state that intent in your next message and let Claude retry.
-You can add the environment entry or `allow` rule from the `/permissions` dialog’s **Auto mode** tab. In most sessions the reason names the rule the classifier matched, in square brackets, such as `[Data Exfiltration]` or `[Production Deploy]`, and some sessions run a classifier model that adds a short explanation. Claude Code selects the classifier model, so which form you see isn’t something you configure.
+You can add the environment entry or `allow` rule from the `/permissions` dialog’s **Auto mode** tab.
###
@@ -351,7 +341,7 @@
Fix repeated denials
-Repeated denials for the same destination usually mean the classifier is missing context. Add that destination to `autoMode.environment`, or run `/auto-mode-setup` to have Claude Code draft the entries, then run `claude auto-mode config` to confirm the change took effect. To react to denials programmatically, use the [`PermissionDenied` hook](</docs/en/hooks#permissiondenied>).
+Repeated denials for the same destination usually mean the classifier is missing context. Add that destination to `autoMode.environment`, or run `/auto-mode-setup` to have Claude Code draft the entries, then run `claude auto-mode config` to confirm the change took effect.
##
--- a/best-practices.md
+++ b/best-practices.md
@@ -26,7 +26,7 @@
* **In one prompt** : ask Claude to run the check and iterate in the same message, as in the table above.
* **Across a session** : set the check as a [`/goal` condition](</docs/en/goal>). A separate evaluator re-checks it after every turn and Claude keeps working until the goal resolves. If Claude stalls, Claude Code eventually stops the run with the goal still set — see [how /goal evaluation works](</docs/en/goal#how-evaluation-works>).
- * **As a deterministic gate** : a [Stop hook](</docs/en/hooks#stop>) runs your check as a script and blocks the turn from ending until it passes. Claude Code overrides the hook and ends the turn after 8 consecutive blocks.
+ * **As a deterministic gate** : a [Stop hook](</docs/en/hooks#stop>) runs your check as a script and blocks the turn from ending until it passes. [Stop input](</docs/en/hooks#stop-input>) covers the cap on consecutive blocks.
* **By a second opinion** : a [verification subagent](</docs/en/sub-agents>) or a [dynamic workflow](</docs/en/workflows>) that checks its own findings has a fresh model try to refute the result, so the agent doing the work isn’t the one grading it.
Each step trades setup for attention. The prompt version works on any task today. The `/goal` and Stop hook versions are what let an unattended run finish correctly without you. Have Claude show evidence rather than asserting success: the test output, the command it ran and what it returned, or a screenshot of the result. Reviewing evidence is faster than re-running the verification yourself, and it works for sessions you weren’t watching.
@@ -179,7 +179,7 @@
To get fewer prompts without giving up control, pre-approve the tools you trust with `/permissions` and let sandboxed commands run without asking with `/sandbox`. Switch to Manual mode when you want to approve edits and commands yourself.
-On Pro, Max, and Team plans, auto mode is the [built-in starting permission mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) for interactive terminal and VS Code sessions: a separate classifier model reviews most actions instead of you and blocks only what looks risky, such as scope escalation, unknown infrastructure, or hostile-content-driven actions. In Manual mode, the built-in starting permission mode on other plans, Claude Code asks before actions that might modify your system: file writes, Bash commands, MCP tools. That’s safe but tedious. After the tenth approval you’re clicking through rather than reviewing. Two tools cut those interruptions in Manual mode and apply in auto mode as well:
+With Claude Code v2.1.283 or later, auto mode is the [built-in starting permission mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) for interactive terminal and VS Code sessions: a separate classifier model reviews most actions instead of you and blocks only what looks risky, such as scope escalation, unknown infrastructure, or hostile-content-driven actions. On earlier versions, auto mode is the built-in starting permission mode only on Pro, Max, and Team plans. In Manual mode, Claude Code asks before actions that might modify your system: file writes, Bash commands, MCP tools. That’s safe but tedious. After the tenth approval you’re clicking through rather than reviewing. Two tools cut those interruptions in Manual mode and apply in auto mode as well:
* **Permission allowlists** : permit specific tools you know are safe, like `npm run lint` or `git commit`
* **Sandboxing** : enable OS-level isolation that restricts filesystem and network access, allowing Claude to work more freely within defined boundaries
Show diff (108 lines)
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,105 @@
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.283
+
+September 25, 2026
+
+ * Added `x-claude-code-prompt-id` to the gateway hint headers so LLM gateways can group the requests that serve one user prompt; opt in with `CLAUDE_CODE_GATEWAY_HINT_HEADERS=1`
+ * Added `availableModelsMatch` managed setting: with `"exact"`, an `availableModels` entry allows only the model version it names, so new releases stay blocked until listed
+ * Added `deniedModels` managed setting to block specific models, even when `availableModels` allows them
+ * Added MCP tool, WebFetch and WebSearch outputs to the `tool.output` OpenTelemetry span event when `OTEL_LOG_TOOL_CONTENT=1`
+ * Added `/doctor prompt-audit` (also `/checkup prompt-audit`) to audit your CLAUDE.md files, skills, agents and commands for prompting patterns written for older models
+ * Added click-to-expand for truncated messages from your other sessions in fullscreen mode
+ * Added `path` to `--plugin-dir` load-failure entries in the stream-json `system/init` `plugin_errors`, naming the directory that did not load
+ * Added an opt-in `load_test_mode` block to the Claude apps gateway config: requests are built and signed but not sent upstream, and clients get a canned reply, so a deployment can be load tested
+ * Added a `mantle` upstream provider to the Claude apps gateway for Amazon Bedrock’s Mantle endpoint
+ * Fixed SDK sessions losing a deferred tool call or finished tool result when a turn ended early, a held approval prompt after a worker restart, and a non-streaming fallback’s `result.usage`
+ * Fixed MCP progress notifications being discarded once a long-running tool call moved to the background; the background task now shows the latest progress
+ * Fixed stdio MCP servers being left running when the session ended while they were still starting
+ * Fixed a brief HTTP 404 from a stateless remote MCP server (for example a proxy mid-redeploy) leaving that server unusable for the rest of the session while still shown as connected
+ * Fixed MCP sign-in for a server with no valid URL failing with an opaque SDK error; `/mcp` no longer offers Authenticate for such servers
+ * Fixed the weekly Fable limit not appearing in `/usage` and the VS Code usage meters when telemetry is disabled
+ * Fixed `/model` accepting Sonnet 4.6 or Sonnet 5 with `[1m]` when the id carried a date or `-v1:0` suffix, in the cases where the plain id was refused
+ * Fixed `/model` picker showing a hardcoded Haiku version and price when `ANTHROPIC_DEFAULT_HAIKU_MODEL` pins a different model
+ * Fixed dynamic workflows started during a model fallback running every agent on the fallback model instead of retrying the configured model
+ * Fixed `DISABLE_PROMPT_CACHING_HAIKU` having no effect when Haiku is the session’s main model
+ * Fixed `claude plugin validate` saying Claude Code accepts a plugin or marketplace name it cannot install; such names in `marketplace.json` now fail validation
+ * Fixed `claude plugin validate` passing plugins whose `outputStyles`, `themes`, `monitors`, or `lspServers` paths are missing or point outside the plugin directory
+ * Fixed `claude plugin details` showing 0 MCP servers for plugins that declare their servers in `plugin.json`
+ * Fixed `claude plugin marketplace remove` not saying which installed plugins it uninstalled with the marketplace; it now lists them
+ * Fixed `claude plugin uninstall` removing the other of two installed plugins whose ids differ only in case, with its options and secrets, when the one named had no `enabledPlugins` entry at that scope
+ * Fixed plugins that declare no version being silently restored at their source’s newest commit, not the installed one, when their cached files were missing
+ * Fixed user-installed plugins and marketplaces failing to load with “cache-miss” after the home or config directory was moved, for example in bind-mounted devcontainers
+ * Fixed `installed_plugins.json` showing no plugins when it holds a record under an invalid plugin id; such a file loads again
+ * Fixed `installed_plugins.json` being rewritten, losing records, when it holds a record this version cannot read; `claude plugin` commands now name the record and say how to recover
+ * Fixed permission dialogs in screen-reader mode reading quoted commands and paths as if they were the dialog’s own text
+ * Fixed `/context` not counting MCP server instructions: they now appear as their own row and count toward the total
+ * Fixed markdown links in the Warp terminal rendering as plain text instead of clickable hyperlinks
+ * Fixed `claude mcp add`, `add-json`, and `remove` reporting success when the user or local config file could not be written, for example inside a sandbox
+ * Fixed the first words of a reply in a cloud session sometimes appearing late instead of streaming as Claude writes them
+ * Fixed Claude’s built-in keybindings guide saying chords time out after 1 second instead of 3, and calling `cmd` an alias of `meta`, which could produce `cmd+` shortcuts most terminals never send
+ * Fixed `keybindings.json` silently accepting a misspelled modifier such as `ctl+k`; it now warns in the debug log and suggests the fix
+ * Fixed footer hints still saying “Enter to view” after `footer:openSelected` was rebound or unbound in `keybindings.json`
+ * Fixed keys typed quickly together (type-ahead, key repeat, bursts over ssh or tmux) sometimes being handled against stale state
+ * Fixed worktree checkouts failing certificate verification (for example on Git LFS downloads) when the CA certificate is passed to git as `GIT_CONFIG_COUNT` environment pairs
+ * Fixed sandboxed `git` asking credential helpers to store the sandbox proxy’s login, which printed “failed to store”
+ * Fixed managed `sandbox` settings being ignored entirely when one nested value was invalid; the invalid value now fails closed and the rest of the block still applies
+ * Fixed Claude’s edits to its own auto-memory notes being blocked as sensitive-file writes when Claude Code was started in a subdirectory of a git repository
+ * Fixed Remote Control being unavailable on paid plans when telemetry is turned off with `DISABLE_TELEMETRY` or `DO_NOT_TRACK`
+ * Fixed the `/remote-control` menu cutting its QR-code hint mid-word in narrow terminals
+ * Fixed vim mode `.` dropping a Shift+Enter newline, leaving the cursor inside an accented letter, and repeating an older change after `3J` or Visual-mode `J` on the last line
+ * Fixed vim mode cursor placement: recalling a prompt over 10,000 characters in normal mode no longer leaves the cursor past the end, and `V` then `p` now lands on the first non-blank
+ * Fixed vim mode `J` joining lines with different spacing than Vim (such as a space before `)` or after a tab), and `3J` or Visual-mode `J` on the last line not moving the cursor as Vim does
+ * Windows: Fixed the PowerShell tool letting `cmd /c rd`, `rmdir`, `del` or `erase` delete drive roots, the home folder and other folders that `Remove-Item` refuses
+ * Improved the `/mcp` tool list: it shows more tools at once, scrolls with the page keys and mouse, and marks tools your organization blocked with a warning icon
+ * Improved MCP tool results: images returned by MCP tools are now also saved to a file, so Bash, Read and other tools can open them
+ * Improved `/tasks`: rows show a status icon, the name and whole facts, the title and key hints stay on screen with many tasks, and the list gains paging keys, the mouse wheel and clicks
+ * Improved lists in `/help`, `/hooks`, `/copy`, `/chrome`, `/memory`, `/ide`, `/release-notes`, `/rewind`, `/diff`, `/remote-env`, `/plugin` and other pickers with page keys, mouse wheel and clicks
+ * Improved lists beside a search box, such as `/skills` and `/artifacts`, to draw their pointer dim while the search box has the keys, so only one pointer is highlighted
+ * Improved the compaction spinner: its timer now starts when compaction begins and it counts the summary’s tokens as they stream, replacing the percentage bar
+ * Improved the browser page shown after signing in to an MCP server: centered layout, dark mode, and new artwork
+ * Improved the Skill tool’s reply when a skill belongs to a plugin that failed to load, so Claude tells you the plugin could not be loaded instead of calling the skill uninstalled
+ * Improved `prompt-audit` on Claude Code configuration: stale paths, stale commands and contradicting instruction files now lead the report, and thinking keywords that Claude Code documents are kept
+ * Improved recovery from an `installed_plugins.json` that cannot be read at all: its contents are kept in a file beside it before it is rebuilt, and `claude plugin list` names that file
+ * Improved artifact database reads: an ordered query that returns a full page now says it is one page and how to read the rest
+ * Improved first-reply latency: a pattern-compile step that ran at the end of a session’s first reply now runs while the reply streams in
+ * Improved first-request latency by reusing the preconnected API connection
+ * Improved startup: `claude -p` and Claude Code Remote no longer load the interactive UI, and the auto-mode classifier’s rules and the Artifact tool load on first use instead of at launch
+ * Improved startup for claude.ai accounts whose Artifact tool features aren’t known yet, as on a first run: the prompt no longer waits up to 1.5 s to check them; the first message waits if needed
+ * Changed interactive sessions on third-party providers or with telemetry off to start in auto mode when no permission mode is configured; `permissions.defaultMode` still overrides it
+ * Changed the `/ultrareview` launch dialog to say that reviewing a local branch may upload uncommitted changes to tracked files
+ * Changed the `/model` picker’s Opus row and the Default model’s name to drop “(1M context)” where Opus already has a 1M context window; the window is unchanged
+ * Changed prompt suggestions in the terminal to appear less often after 20 in a row go unused; using one brings them back
+ * Changed `--system-prompt` and `--append-system-prompt` to accept their text and `-file` forms together; the file’s text comes first
+ * Changed `Skill(anthropic-skills:<name>)` deny rules to also block that skill when Claude Desktop delivers it as a plugin, and `Skill(skill:<name>)` denies to match the skill’s alias and display name
+ * Changed `/rewind` and `/diff` lists to move on the same keybinding actions as every other list (`select:*`); `messageSelector:*`/`diff:*` rebinds still work
+ * Changed the `/workflows` run list to size itself like other lists: half the terminal inline, and it keeps its title on screen when the prompt shows below
+ * Changed `claude plugin eval` to require git 2.31 or later when git is installed; a run on an older git is refused with a message naming the version
+ * Changed artifact watching: a watch that was armed automatically (not one you asked for) now ends after 3.5 hours with no activity; publishing or watching the artifact again re-arms it
+ * Self-hosted runner: Changed lifecycle hooks’ git to skip a repository’s Git LFS `pre-push` hook, ignore a writable system `core.hooksPath`, and not sign commits without `--configure-git`
+ * Self-hosted runner: Changed `GIT_SSL_CAINFO` and `GIT_SSL_NO_VERIFY` under Anthropic-managed git: the runner’s own git always verifies Anthropic’s git route, and warning lines say what applies where
+ * Reverted the 2.1.282 reservation of the `claude-ai` name: skills, commands, workflows and MCP servers’ skills and prompts so named load again, and `Skill(claude-ai:*)` rules are ordinary prefix rules
+ * [VSCode] Fixed the permission mode indicator showing Default while the session kept running in auto or bypass mode after an automatic switch out of it failed; the switch is now retried until it lands
+ * [VSCode] Fixed a session teleported from the web dropping the messages sent while Claude was working
+ * [VSCode] Fixed a Web session staying hidden from the session list, and an empty chat opening in its place, when an older version had saved an empty local copy of it
+ * [VSCode] Fixed a reopened session splitting a turn at a message Claude received mid-turn, such as an automatic continuation
+ * [VSCode] Fixed a reloaded session showing a rewound-away turn, or only the rows before a compaction
+ * [VSCode] Fixed the footer’s agents pill drawing its icon off-center, with the status dot against the edge, in narrow panels
+ * [VSCode] Fixed the chat input showing its text slightly below the cursor and selection after pasting lines that end with a line break into a long prompt
+ * [Cloud sessions] Improved adding a repository to a running cloud session: a private repository your GitHub account can read but not push to now attaches for reading
+ * [Cloud sessions] Fixed cloud sessions occasionally redoing an already-finished step, such as posting a duplicate comment or push, after recovering from a server-side restart
+ * [Cloud sessions] Changed new routine schedules to default to a few minutes past the hour, with a note that routines set exactly on the hour can start several minutes late
+ * [Claude Tag] Added a “Channels Claude can search” admin setting that limits Claude’s Slack search to public channels it has been added to, set per organization, workspace or channel
+ * [Claude Tag] Added a Back to Slack button on the page shown after connecting your Claude account, returning you to the thread you started from
+ * [Claude Tag] Fixed a channel’s configure page listing no connectors or plugins when the channel gets its access bundle through an attach rule; rule-attached bundles are now shown
+ * [Claude Tag] Fixed access-bundle repository search missing repositories on GitHub App installs that are limited to a large list of selected repositories
+ * [Claude Tag] Fixed Claude occasionally posting the same reply twice when a new message interrupted it mid-reply
+ * [Claude Tag] Fixed channel routines that stopped running in older private channels whose Slack channel ID changed, for example after a Slack Connect share
+ * [Claude Tag] Fixed conversations in a channel set to “Channel only” all ending when a non-guest member joined and Slack was slow to confirm their membership
+ * [Code Review] Fixed “@claude review” requests going silent when GitHub failed to return the pull request: the request is retried once, and a comment explains if it still fails
+ * [Code Review] Fixed billing for a review that stopped at its time limit with nothing verified: it now shows as incomplete, isn’t charged, and is retried once
--- a/channels.md
+++ b/channels.md
@@ -319,7 +319,7 @@
Research preview
-Channels are a research preview feature. Availability is rolling out gradually, and the `--channels` flag syntax and protocol contract may change based on feedback. Neither `--channels` nor `--dangerously-load-development-channels` appears in `claude --help` while the feature is in preview. The flags work even though they aren’t listed. During the preview, `--channels` only accepts plugins from an Anthropic-maintained allowlist, or from your organization’s allowlist if an admin has set `allowedChannelPlugins`. The channel plugins in [claude-plugins-official](<https://github.com/anthropics/claude-plugins-official/tree/main/external_plugins>) are the default approved set. If you pass something that isn’t on the effective allowlist, Claude Code starts normally but the channel doesn’t register, and the startup notice tells you why. To test a channel you’re building, use `--dangerously-load-development-channels`. See [Test during the research preview](</docs/en/channels-reference#test-during-the-research-preview>) for information about testing custom channels that you build. Report issues or feedback on the [Claude Code GitHub repository](<https://github.com/anthropics/claude-code/issues>).
+Channels are a research preview feature. Availability is rolling out gradually, and the `--channels` flag syntax and protocol contract may change based on feedback. Neither `--channels` nor `--dangerously-load-development-channels` appears in `claude --help` while the feature is in preview. The flags work even though they aren’t listed. During the preview, `--channels` only accepts plugins from an Anthropic-maintained allowlist, or from your organization’s allowlist if an admin has set `allowedChannelPlugins`. The channel plugins in [claude-plugins-official](<https://github.com/anthropics/claude-plugins-official/tree/main/external_plugins>) are the default approved set. If you pass something that isn’t on the effective allowlist, Claude Code starts normally but the channel doesn’t register, and the startup notice tells you why. To test a channel you’re building, pass it to `--dangerously-load-development-channels` in the `plugin:<name>@<marketplace>` or `server:<name>` form. See [Test during the research preview](</docs/en/channels-reference#test-during-the-research-preview>) for information about testing custom channels that you build. Report issues or feedback on the [Claude Code GitHub repository](<https://github.com/anthropics/claude-code/issues>).
##
--- a/channels-reference.md
+++ b/channels-reference.md
@@ -740,7 +740,7 @@
Package as a plugin
-To make your channel installable and shareable, wrap it in a [plugin](</docs/en/plugins/overview>) and publish it to a [marketplace](</docs/en/plugins/overview>). Users install it with `/plugin install`, then enable it per session with `--channels plugin:<name>@<marketplace>`. A channel published to your own marketplace still needs `--dangerously-load-development-channels` to run, since it isn’t on the [approved allowlist](</docs/en/channels#supported-channels>). The default allowlist is the channel plugins in `claude-plugins-official`. The [in-app submission forms](</docs/en/plugins/publish#submit-to-the-community-marketplace>) add plugins to the community marketplace, which is not on the channel allowlist. If you are working with an Anthropic partner contact, reach out to them to coordinate an official-marketplace listing. On Team and Enterprise plans, an admin can instead include your plugin in the organization’s own [`allowedChannelPlugins`](</docs/en/channels#restrict-which-channel-plugins-can-run>) list, which replaces the default Anthropic allowlist.
+To make your channel installable and shareable, wrap it in a [plugin](</docs/en/plugins/overview>) and publish it to a [marketplace](</docs/en/plugins/overview>). Users install it with `/plugin install`, then enable it per session with `--channels plugin:<name>@<marketplace>`. A channel published to your own marketplace still needs `--dangerously-load-development-channels` to run, since it isn’t on the [approved allowlist](</docs/en/channels#supported-channels>). The default allowlist is the channel plugins in `claude-plugins-official`. The community marketplace is not on the channel allowlist. If you are working with an Anthropic partner contact, reach out to them to coordinate an official-marketplace listing. On Team and Enterprise plans, an admin can instead include your plugin in the organization’s own [`allowedChannelPlugins`](</docs/en/channels#restrict-which-channel-plugins-can-run>) list, which replaces the default Anthropic allowlist.
##
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -118,7 +118,7 @@
Messages sent mid-turn not checkpointed
-When a message you [queue while Claude works](</docs/en/interactive-mode#queue-messages-while-claude-works>) reaches Claude within the running turn, it joins that turn instead of starting a new one. The message appears in the conversation, but Claude Code doesn’t create a checkpoint for it, and the rewind menu doesn’t list it. A queued message that Claude Code sends as its own turn gets a checkpoint as usual. To remove such a message, or undo the edits Claude made after it, rewind to the prompt that started the turn. That rewinds the whole turn, including the work Claude did before your message arrived.
+When a message you [queue while Claude works](</docs/en/interactive-mode#queue-messages-while-claude-works>) reaches Claude within the running turn, it joins that turn instead of starting a new one. The message appears in the conversation, but Claude Code doesn’t create a checkpoint for it, and the rewind menu doesn’t list it. A queued message that Claude Code sends as part of a new turn gets a checkpoint as usual, including when several queued messages [share that turn](</docs/en/interactive-mode#when-claude-code-sends-what-you-queued>). To remove such a message, or undo the edits Claude made after it, rewind to the prompt that started the turn. That rewinds the whole turn, including the work Claude did before your message arrived.
###
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
@@ -59,7 +59,7 @@
OpenID Connect (OIDC) identity provider| Okta, Microsoft Entra ID, Google Workspace, Keycloak, or Dex, or any other OIDC-compliant IdP such as PingFederate. The gateway runs standard OIDC discovery and the authorization-code flow against it. SAML and LDAP aren’t supported.
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`.
+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. At `/login`, Claude Code accepts a plain `http://` origin 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 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.
--- a/claude-apps-gateway-config.md
+++ b/claude-apps-gateway-config.md
@@ -23,7 +23,7 @@
* `managed`: managed settings policies by IdP group
* `telemetry`: OTLP forwarding to your observability stack
* `access_control`, `limits`, `timeouts`, `rate_limits`: IP allow/deny, request size caps, upstream time-to-first-byte, and per-IP sign-in limits
- * `load_test_mode`: load test the gateway without calling a model provider
+ * `load_test_mode`: load testing the gateway without calling a model provider
##
@@ -803,12 +803,37 @@
* `OTEL_EXPORTER_OTLP_ENDPOINT=<public_url>`
* `OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf`
-Before Claude Code v2.1.265 on the gateway server, the gateway pushed all three exporter selectors as `otlp`, including for signals no destination opted into. The pushed endpoint is built from the public URL, so metrics and logs need no OTEL configuration from developers or policies. Developers signed in through `/login` can’t redirect exports with their own OTEL configuration:
+When you add your own labels, the gateway also pushes `OTEL_RESOURCE_ATTRIBUTES`. Before Claude Code v2.1.265 on the gateway server, the gateway pushed all three exporter selectors as `otlp`, including for signals no destination opted into. The pushed endpoint is built from the public URL, so metrics and logs need no OTEL configuration from developers or policies. Developers signed in through `/login` can’t redirect exports with their own OTEL configuration:
* **Locally set variables** : Claude Code applies the pushed variables at the managed tier, so each one overrides the value a developer sets for it locally.
* **Locally configured endpoints** : with OTLP/HTTP export enabled, the CLI ignores any locally configured endpoint, whether or not the gateway pushed the telemetry variables. Its exports go to the gateway unless a policy names your collector as the endpoint.
Without a `forward_to` destination for a signal, the gateway accepts and discards it. If developers already export Claude Code telemetry to one of your collectors, add it as a `forward_to` destination, with logs or traces enabled if they export those, so it keeps receiving their data after they sign in. To skip the relay instead, name the collector in a policy. [Traces](</docs/en/monitoring-usage#traces-beta>) also require `CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1` on each client. Set it in a managed policy’s `env` block, since the gateway doesn’t push it. Developers approve it in the same security approval dialog that the pushed endpoint already triggers. Set it to `1` only in the policies whose groups you want traced. A policy that doesn’t set it inherits the value from your `match: {}` catch-all policy if that policy sets one, per the merge rules. To keep a group’s clients from sending traces even when a developer sets the variable locally, set it to `0` in that group’s policy. Both protobuf and JSON OTLP encodings are relayed, and any OpenTelemetry-compatible backend works as a destination.
+
+####
+
+
+
+Add your own labels
+
+To put fixed labels such as `service.namespace` or `deployment.environment.name` on the telemetry of sessions signed in through the gateway, set `telemetry.resource_attributes`. Each label is an OpenTelemetry resource attribute, and every destination receives the same labels. Sessions get the labels only when you also set `telemetry.forward_to` and `listen.public_url`. This example adds two labels:
+
+ telemetry:
+ forward_to:
+ - url: https://otel-collector.internal.example.com
+ resource_attributes:
+ service.namespace: claude
+ deployment.environment.name: prod
+
+The gateway refuses to start when a label breaks one of these rules, and the startup error names the label:
+
+ * Names use only letters, digits, `.`, `_`, and `-`
+ * Names aren’t reserved. Compared in any letter case, the reserved names are everything that starts with `user.`, `enduser.`, or `identity.`, plus `service.name`, `service.version`, `claude.deployment_mode`, `host.arch`, `os.type`, `os.version`, and `wsl.version`
+ * Values are non-empty printable ASCII with no space and none of `, ; = \ " %`
+ * Values are at most 255 characters as the gateway counts them after percent-encoding, so `/`, `:`, and `@` each count as three
+ * Values are text, so quote a number, `true`, or `false`
+
+You need Claude Code v2.1.281 or later on the gateway server to set `telemetry.resource_attributes`. An earlier gateway refuses to start when it finds the key. Upgrade every replica before you add the key, and remove the key before you roll back to an earlier version. Terminal sessions signed in through `/login` receive the labels as `OTEL_RESOURCE_ATTRIBUTES`, pushed with the other telemetry variables. If you set `OTEL_RESOURCE_ATTRIBUTES` in a policy’s `env` block, terminal sessions that policy matches get that value instead of the labels. Claude Desktop receives the labels from the gateway alongside `user.email` and the other identity attributes. Claude Code also copies each label onto every metric data point, so you can filter metrics by it in a backend that doesn’t index resource attributes. To turn that copy off, see [Metrics cardinality control](</docs/en/monitoring-usage#metrics-cardinality-control>).
####
@@ -870,7 +895,7 @@
`load_test_mode`
-The `load_test_mode` block lets you load test a gateway without calling a model provider. While it’s on, the gateway builds and signs each provider request as usual, discards it instead of sending it, and streams a canned reply back through its normal response path. The reply is filler text that begins with a sentence saying it is canned. Requires v2.1.283 or later. Earlier versions refuse to start when the key is set, so upgrade every replica before you add the block and remove it before you roll back. The example below turns the mode on with the defaults, a reply of 750 output tokens streamed over about 10 seconds:
+The `load_test_mode` block lets you load test a gateway without calling a model provider. While it’s on, the gateway builds and signs each provider request as usual, discards it instead of sending it, and streams a canned reply back through its normal response path. The reply is filler text that begins with a sentence saying it is canned. Requires Claude Code v2.1.282 or later on the gateway server. An earlier gateway refuses to start when it finds the key. Upgrade every replica before you add the block, and remove the block before you roll back. The example below turns the mode on with the defaults, a reply of roughly 750 tokens of text streamed over about 10 seconds:
load_test_mode:
enabled: true
@@ -883,7 +908,7 @@
`reply_tokens`| No| Default `750`. Roughly how many tokens of text each canned reply carries, a whole number from 1 to 100000.
`reply_seconds`| No| Default `9.5`. How long a streamed reply takes, from 0 to 600. `0` sends the whole reply at once. A reply to a non-streaming request always comes back at once.
-A load test in this mode covers the gateway, your Postgres, and everything in front of the gateway. It doesn’t cover the provider’s limits, speed, or network path. While the mode is on, a request can carry an `x-load-test-user` header holding a whole number of up to seven digits, and the gateway counts each number as a separate developer with the email and groups of the developer whose token came with the request. Give the load-test deployment its own empty database, because the gateway refuses to start with the mode on against a database in which any developer has already spent anything.
+A load test in this mode covers the gateway, your Postgres, and everything in front of the gateway. It doesn’t cover the provider’s limits, speed, or network path. No model request is sent to the provider, so a replica’s CPU per request is an estimate and reads lower than production, which also encrypts its traffic to the provider. Confirm a replica count with a small pilot against the real provider. Before v2.1.283, the estimate reads much lower. While the mode is on, a request can carry an `x-load-test-user` header holding a whole number of up to seven digits. The gateway counts each number as a separate developer, with the email and groups of the developer whose token came with the request. Give the load-test deployment its own empty database, because the gateway refuses to start with the mode on against a database in which any developer has already spent anything.
Never turn this on for a gateway that developers use. Every request gets the canned reply and no model is called. The gateway logs a `load_test_mode is on` warning at boot and marks each `inference` [audit event](</docs/en/claude-apps-gateway-deploy#logs>) with `load_test: true` while the mode is on.
--- a/claude-apps-gateway-deploy.md
+++ b/claude-apps-gateway-deploy.md
@@ -186,7 +186,7 @@
* **[Spend-limit enforcement](</docs/en/claude-apps-gateway-spend-limits#postgres-availability>)** : fails open by default during the outage, so inference still flows; flip it to fail closed if you’d rather block than run unmetered
* **Readiness** : `/readyz` reports not-ready during the outage, so orchestrators that gate traffic on readiness remove every replica from rotation at once. In that topology all traffic, including inference the gateway could still serve, fails at the load balancer until Postgres recovers. The liveness probe on `/healthz` keeps passing, so replicas aren’t restarted. Point the readiness probe at `/healthz` instead if you’d rather signed-in developers keep working through a store outage; the cost is that new sign-ins fail against a replica that still reports ready.
-If your IdP goes down, existing sessions work until `ttl_hours`, new logins fail, and a session refresh gets a try-again answer and goes through once the IdP is back. Set a longer `ttl_hours` if your IdP has frequent maintenance windows.
+If your IdP goes down, existing sessions work until `ttl_hours` and new logins fail. A session refresh gets a try-again answer and succeeds once the IdP is back. Set a longer `ttl_hours` if your IdP has frequent maintenance windows.
###
--- a/claude-code-on-the-web.md
+++ b/claude-code-on-the-web.md
@@ -43,7 +43,7 @@
**GitHub App**| Authorize the Claude GitHub App during [web onboarding](</docs/en/web-quickstart>)| Any public repository, and private repositories that the Claude GitHub App is installed on| Browser onboarding; teams that want Auto-fix
**`/web-setup`**| Run `/web-setup` in your terminal to send your local `gh` CLI token to your Claude account| Any repository your `gh` token can access, whether or not the Claude GitHub App is installed| Individual developers who already use `gh`
-Installing the Claude GitHub App on a repository also enables Auto-fix for pull requests in it. Threads in a [project](</docs/en/claude-projects>) need the Claude GitHub App installed on each repository they clone, whichever method you connected with. See [Set up GitHub access](</docs/en/claude-projects#set-up-github-access>). For how `/schedule` checks repository access before creating a routine, see [Repositories and branch permissions](</docs/en/routines#repositories-and-branch-permissions>). See [Connect from your terminal](</docs/en/web-quickstart#connect-from-your-terminal>) for the `/web-setup` walkthrough, including what `/web-setup` stores and how to remove it. Quick web setup is an organization setting that lets members connect GitHub with `/web-setup`, skips the Claude GitHub App install prompt during browser onboarding, and has browser onboarding create the [**Default** environment](</docs/en/cloud-environments#the-default-environment>) for them instead of showing the environment form. On Team and Enterprise plans it’s off by default, which hides `/web-setup`. An [Owner](</docs/en/server-managed-settings#access-control>) turns it on with the **Quick web setup** toggle at [**Admin settings > Claude Code**](<https://claude.ai/admin-settings/claude-code>).
+Installing the Claude GitHub App on a repository also enables Auto-fix for pull requests in it. Threads in a [project](</docs/en/claude-projects>) need the Claude GitHub App installed on each repository they clone, whichever method you connected with. See [Set up GitHub access](</docs/en/claude-projects#set-up-github-access>). In Anthropic-hosted environments, your GitHub credentials stay encrypted on Anthropic’s servers and never enter a session’s VM. GitHub operations from the VM go through the [GitHub proxy](</docs/en/cloud-environments#github-proxy>), which attaches the credential on the server side. For how `/schedule` checks repository access before creating a routine, see [Repositories and branch permissions](</docs/en/routines#repositories-and-branch-permissions>). See [Connect from your terminal](</docs/en/web-quickstart#connect-from-your-terminal>) for the `/web-setup` walkthrough, including what `/web-setup` stores and how to remove it. Quick web setup is an organization setting that lets members connect GitHub with `/web-setup`, skips the Claude GitHub App install prompt during browser onboarding, and has browser onboarding create the [**Default** environment](</docs/en/cloud-environments#the-default-environment>) for them instead of showing the environment form. On Team and Enterprise plans it’s off by default, which hides `/web-setup`. An [Owner](</docs/en/server-managed-settings#access-control>) turns it on with the **Quick web setup** toggle at [**Admin settings > Claude Code**](<https://claude.ai/admin-settings/claude-code>).
Organizations with [Zero Data Retention](</docs/en/zero-data-retention>) enabled can’t use `/web-setup` or other cloud session features.
@@ -393,6 +393,7 @@
Before relying on cloud sessions for a workflow, account for these constraints:
* **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.
+ * **Time limits** : commands Claude runs and SessionStart hooks have default timeouts you can change, and a setup script is cached only when it finishes in roughly five minutes. See [Time limits](</docs/en/cloud-environments#time-limits>)
* **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
@@ -130,7 +130,7 @@
`projects/<project>/<session>.jsonl`| Full conversation transcript: every message, tool call, and tool result
`projects/<project>/<session>.orphaned-<timestamp>-<suffix>.jsonl`, `projects/<project>/<session>.jsonl.superseded-<timestamp>`| A previous transcript for the session that Claude Code set aside instead of overwriting or deleting it. It doesn’t appear in the session picker
`projects/<project>/<session>/subagents/`| [Subagent](</docs/en/sub-agents>) conversation transcripts, removed with the parent session transcript when it ages out
-`projects/<project>/<session>/tool-results/`| Large tool outputs spilled to separate files
+`projects/<project>/<session>/tool-results/`| Large tool outputs spilled to separate files, and full-size copies of [images that MCP tools return](</docs/en/mcp#images-in-tool-results>)
`file-history/<session>/`| Pre-edit snapshots of files Claude changed, used for [checkpoint restore](</docs/en/checkpointing>). Holds snapshots for the 100 most recent checkpoints; snapshot files that no retained checkpoint references are deleted, except each file’s first snapshot
`plans/`| Plan files written during [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>)
`debug/`| Per-session debug logs, written while debug logging is on, such as when you start with [`--debug`](</docs/en/cli-reference#cli-flags>) or run `/debug`
@@ -162,6 +162,24 @@
+Session scratchpad directory
+
+The scratchpad is a per-session directory that Claude Code gives Claude for temporary files: intermediate results, helper scripts, and drafts that don’t belong in your project. When Claude says it saved something “to the scratchpad”, the file is there. Claude uses it instead of `/tmp`, and can create, edit, and read files in it without a permission prompt. The scratchpad lives under Claude Code’s temp directory rather than `~/.claude`. Find the current session’s path for your platform:
+
+ * **macOS** : `/private/tmp/claude-<uid>/<project>/<session-id>/scratchpad/`
+ * **Linux** : `/tmp/claude-<uid>/<project>/<session-id>/scratchpad/`, or the same shape under `$TMPDIR` when your system sets one
+ * **Windows** : `%TEMP%\claude\<project>\<session-id>\scratchpad\`
+
+`<project>` is your working directory path with every character other than letters and digits replaced by `-`, such as `-Users-you-my-project`. If you set [`CLAUDE_CODE_TMPDIR`](</docs/en/env-vars>), the tree moves under that directory instead. Hooks receive the current session’s path as [`scratchpad_dir`](</docs/en/hooks#common-input-fields>). Scratchpad files last as long as the session’s transcript: the retention sweep deletes the directory when it deletes the transcript, and `claude project purge` doesn’t touch the temp directory. Because the directory sits under the system temp location, your operating system can also clear it, such as on restart. To keep something Claude wrote there, ask Claude to move it into your project. A session has a scratchpad only when all of these hold:
+
+ * You’re signed in with a claude.ai account rather than an API key
+ * The session uses the Anthropic API, not Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry
+ * [`enableArtifact`](</docs/en/settings-reference#enableartifact>) isn’t set to `false`
+
+###
+
+
+
Kept until you delete them
The retention cleanup sweep doesn’t remove the paths below. Claude Code keeps them until you delete them, apart from the two caches it deletes when you log out.
@@ -206,7 +224,7 @@
* Matching prompt lines in `history.jsonl`
* The project’s entry in `~/.claude.json`
-Images you pasted or attached in the project’s sessions are stored under Claude Code’s temp directory rather than `~/.claude`, so the purge doesn’t remove them. The retention sweep deletes them once they’re older than `cleanupPeriodDays`. The command prints the full deletion plan and asks for confirmation before removing anything. The examples below use `~/work/my-repo` as a placeholder. Replace it with the path to your project. If no state matches the path, the command prints an error and exits with status 1. Preview the plan without deleting anything:
+Images you pasted or attached in the project’s sessions and each session’s scratchpad are stored under Claude Code’s temp directory rather than `~/.claude`, so the purge doesn’t remove them. The retention sweep still deletes the images once they’re older than `cleanupPeriodDays`; a purged session’s scratchpad stays until you delete it or your operating system clears the temp directory. The command prints the full deletion plan and asks for confirmation before removing anything. The examples below use `~/work/my-repo` as a placeholder. Replace it with the path to your project. If no state matches the path, the command prints an error and exits with status 1. Preview the plan without deleting anything:
claude project purge ~/work/my-repo --dry-run
Show diff (122 lines)
--- a/claude-projects.md
+++ b/claude-projects.md
@@ -1,6 +1,6 @@
Projects are in public beta on Pro and Max plans and rolling out gradually, starting with accounts that have used [cloud sessions](</docs/en/claude-code-on-the-web>) and don’t have existing projects in claude.ai chat or Cowork. They aren’t available on Team or Enterprise plans yet. If **Projects** doesn’t appear in the sidebar at [claude.ai/code](<https://claude.ai/code>) or in the Code tab of the [desktop app](</docs/en/desktop>), the rollout hasn’t reached your account, and you can [join the waitlist](<https://claude.com/form/projects>). [Run agents in parallel](</docs/en/agents>) lists what you can use in the meantime.
-A project is one ongoing conversation where Claude coordinates a stream of related work for you. You tell it what needs doing and it starts a thread for each task. Each thread is usually a [cloud session](</docs/en/claude-code-on-the-web>): Claude Code running in the cloud rather than on your machine. When a task needs something only your computer has, you can ask Claude to run that thread on your computer instead through [Remote Control](</docs/en/remote-control>). Threads run in parallel and you can check on them and steer them from your phone. Cloud threads keep going after you close the laptop. Without a project, running several sessions means doing the coordinating yourself: you decide what each one works on, repeat the same background at the start of each, and check back to see which finished or needs an answer. With a project, you instead:
+A project is one ongoing conversation where Claude coordinates a stream of related work for you. You tell it what needs doing and it starts a thread for each task. Each thread is usually a [cloud session](</docs/en/claude-code-on-the-web>): Claude Code running in the cloud rather than on your machine. When a task needs something only your computer has, you can ask Claude to run that thread on your computer instead of in the cloud, through [Remote Control](</docs/en/remote-control>). Threads run in parallel, and you can check on them and steer them from your phone. Cloud threads keep going after you close your laptop, while a thread on your computer runs only while that computer is awake. Without a project, running several sessions means doing the coordinating yourself: you decide what each one works on, repeat the same background at the start of each, and check back to see which finished or needs an answer. With a project, you instead:
* **Send work to one place** : paste a bug report, a stack trace, or a list of tasks into the conversation whenever one comes up. Claude starts a thread for each piece of work or passes it to the thread already working in that area, and answers quick questions in place.
* **Set context once** : every new thread starts with the project’s instructions, so a rule you state once, such as which branch to target, reaches all of them.
@@ -18,7 +18,7 @@
* **One goal across many repositories** : “Bring every service up to the new lint config.” Claude can run a thread per repository, each with its own pull request, and the **Overview** pane shows which ones are ready for review.
* **An area you keep feeding** : the bugs, stack traces, and review requests for one service, pasted into the conversation as they reach you. A pitfall you tell Claude to remember after one fix is in project memory for the next.
- * **A build or migration bigger than a session** : “Build what `docs/spec.md` describes” or “Move the app off the deprecated ORM.” The work splits into threads that each take a part, decisions you ask Claude to remember early on reach the later threads, and the spec changes and bugs you find during the build go into the same conversation.
+ * **A build or migration bigger than a session** : “Build what `docs/spec.md` describes” or “Move the app off the deprecated ORM.” The work splits into threads that each take a part, decisions you ask Claude to remember early on reach the later cloud threads, and the spec changes and bugs you find during the build go into the same conversation.
* **Work that isn’t code** : a folder of contracts or a support-ticket export you keep coming back to with new questions, such as “find the ten most common integration mistakes in these tickets.” Upload the documents instead of adding a repository, and threads deliver each write-up as a file on the project’s **Library** tab.
In any of them you can send a batch of tasks, tell Claude to start without asking you to confirm, walk away, and find the threads that need you under **Waiting on you** when you’re back, or ask Claude to put part of the work on a schedule as a [routine](</docs/en/routines>). If one of these is your situation, create a project.
@@ -29,7 +29,7 @@
When something else fits better
-Cloud threads work on GitHub repositories and on the files, folders, and Google Drive folders you upload to the project, not on files or tools that exist only on your machine. If a task needs your machine, ask Claude to run its thread there through [Remote Control](</docs/en/remote-control>). Limitations lists what that needs. Something else fits better in these cases:
+A project still fits when only some tasks need your machine. Cloud threads work on GitHub repositories and on the files, folders, and Google Drive folders you upload to the project, and for the occasional task that needs a local database or a tool on your computer, you can ask Claude to run that task’s thread on your computer. Something other than a project fits better in these cases:
* **One task that fits in a session** : “Fix the flaky login test.” Start a [cloud session](</docs/en/claude-code-on-the-web>) yourself.
* **Work where every task needs your machine** : a local database, a device emulator, or an API behind your VPN. Use a local session, or [agent view](</docs/en/agent-view>) to run several at once. If the work only needs local files, upload them to the project instead.
@@ -275,7 +275,7 @@
* “Tell me what’s wrong in these repositories and don’t fix anything yet”, when you want to go through the findings before any of them becomes a thread
* “Answer that here instead of starting a thread”, when Claude starts a thread for something you meant as a quick question
-Claude saves preferences like these to project memory on its own and follows them in later threads. They’re instructions Claude keeps to, not enforced settings, so a thread limit you give this way isn’t a hard cap. Add one to project instructions when you want it worded exactly and applied to every thread from the start.
+Claude saves preferences like these to project memory on its own and follows them in later cloud threads. They’re instructions Claude keeps to, not enforced settings, so a thread limit you give this way isn’t a hard cap. Add one to project instructions when you want it worded exactly and applied to every thread from the start.
###
@@ -284,6 +284,41 @@
Unblock a thread waiting on approval
Threads run in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) when the thread’s model supports it, so most tool calls run without asking you. When a thread needs your approval, the prompt is inside that thread and the thread waits until you answer it there. Telling Claude in the project conversation to go ahead doesn’t reach it. Each approval covers that prompt, or the rest of that thread if you choose the broader option. To let every thread run certain commands without asking, or to block some, add [permission rules](</docs/en/permissions>) to the repository’s `.claude/settings.json`. Cloud threads apply them only in a project with one repository; see What threads pick up from your repositories.
+
+###
+
+
+
+Run a thread on your own computer
+
+When a task needs something only your computer has, such as a local database, a device emulator, or an API behind your VPN, ask Claude to run the thread for that task on your computer instead of in the cloud. When you ask in the project conversation, the thread is a Claude Code session in a folder on your machine, connected through [Remote Control](</docs/en/remote-control>). The project’s other threads keep running in the cloud. Compared with a cloud thread, a thread on your computer:
+
+ * Works with the files, tools, MCP servers, and Claude Code settings on that machine instead of the project’s cloud environment
+ * Starts with the project’s instructions, but not with its memory files loaded
+ * Runs only while that computer is awake with Remote Control turned on
+
+1
+
+Connect the folder
+
+On the computer that has the folder the task needs, make it available through Remote Control in one of two ways. Both need Claude Code v2.1.280 or later on that computer.
+
+ * **In the Claude desktop app** : open **Settings > Claude Code**, turn on **Use this computer from your phone and claude.ai** , and add the folder to the list under that switch. Threads can run on this computer while the app is open.
+ * **In a terminal** : run `claude remote-control` in the folder and leave it running.
+
+2
+
+Ask for the task with Work locally
+
+In the project conversation, choose **Work locally** from the **+** menu beside the message box, which tags your message **Local** , and write what you want done. Saying in the message that the task should run on your computer works too.
+
+3
+
+Allow it on the card
+
+Claude answers with an **Allow Claude to work in a folder on your device** card. Pick the folder if you connected several. Then click **Allow once**.
+
+The thread runs in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), so Claude runs commands and edits files in that folder without asking you each time. If auto mode is unavailable or turned off in that computer’s Claude Code, the thread runs without it, and any permission prompt it raises waits for your answer in the thread, as Unblock a thread waiting on approval describes. While the thread runs, a laptop icon in its header shows whether your computer is connected. Click it to see which folder the thread is using or to turn the connection off. The thread pauses while that computer is asleep, and stops if the desktop app or `claude remote-control` quits. Lost contact with your folder covers getting it going again. In the desktop app, turn on **Keep this computer awake for Remote Control** under **Settings > Claude Code** to stop the computer from sleeping on its own. A project can’t run a thread on your computer while [**Require trusted devices**](</docs/en/remote-control#trusted-devices>) is on for your account.
##
@@ -459,7 +494,8 @@
* **Claude Tag** : [Claude Tag](<https://claude.com/docs/claude-tag/overview>) is Claude in your team’s Slack channels, on Team and Enterprise plans. Anyone in a channel can give it work, everyone in the channel sees and steers it, and it uses connections an admin set up for that channel. A project is yours alone: you’re the only one who sends it work or sees its threads, it uses your own GitHub access and connectors, and it’s on Pro and Max. [How Claude Tag differs from Cowork and Claude Code](<https://claude.com/docs/claude-tag/concepts/how-it-works#how-claude-tag-differs-from-cowork-and-claude-code>) has the side-by-side.
* **Cloud sessions** : every thread is a [cloud session](</docs/en/claude-code-on-the-web>) unless you ask Claude to run it on your machine. Either way, Claude starts and tracks it instead of you. A cloud session you started yourself can become a project or feed one through **Continue as a project** or **Move to project**.
* **Routines** : when you ask for scheduled work in a project, Claude creates a [routine](</docs/en/routines>) that runs as threads in that project and appears on its **Routines** tab. Routines you create outside a project keep working on their own.
- * **Local sessions and agent view** : a session you start yourself in your terminal, IDE, or the desktop app’s local environment can’t be added to a project. A project reaches your machine only by running a thread there through [Remote Control](</docs/en/remote-control>). [Agent view](</docs/en/agent-view>) is a screen for tracking several local sessions you started yourself; it has no coordinator.
+ * **Remote Control** : [Remote Control](</docs/en/remote-control>) connects claude.ai to a Claude Code session running on your machine. When you ask Claude in a project to run a thread on your computer, the project uses Remote Control to do it.
+ * **Local sessions and agent view** : a session you start yourself in your terminal, IDE, or the desktop app’s local environment can’t be added to a project. [Agent view](</docs/en/agent-view>) is a screen for tracking several local sessions side by side, and you still start each one and give it its task yourself.
* **Worktrees** : a [worktree](</docs/en/worktrees>) gives each local session its own working copy of a repository so parallel sessions on your machine don’t overwrite each other. Cloud threads don’t need them: each clones its repositories into its own cloud sandbox and works on its own branch.
* **Agent teams** : an [agent team](</docs/en/agent-teams>) is one session that starts teammate sessions for a single task, on your machine or inside a cloud session, and ends with that task.
* **Projects in claude.ai chat and Cowork** : the [earlier Projects experience](<https://support.claude.com/en/articles/9517075-what-are-projects>), which groups conversations and reference files without threads or a coordinator. Those projects keep working as they do today until the redesigned experience reaches them.
@@ -474,7 +510,7 @@
* Projects are available at claude.ai/code, in the desktop app, and in the Claude mobile app, not in the terminal CLI or through Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. The CLI’s [`claude project`](</docs/en/cli-reference>) command, which manages local Claude Code state for a directory, is unrelated.
* Project threads are [cloud sessions](</docs/en/claude-code-on-the-web>), or sessions on your own machine through [Remote Control](</docs/en/remote-control>), with Anthropic as the model provider in both cases. [Security](</docs/en/security>) and [Data usage](</docs/en/data-usage>) cover how cloud sessions are isolated and what’s retained, and [Connection and security](</docs/en/remote-control#connection-and-security>) covers how a thread on your machine connects and what’s stored.
- * You can’t add a session you started yourself on your machine to a project. To let a project run a thread on your machine, connect the folder it should work in through [Remote Control](</docs/en/remote-control#requirements>): turn on Remote Control under **Settings > Claude Code** in the Claude desktop app, or run `claude remote-control` in the folder and leave it running. That machine needs Claude Code v2.1.280 or later. A project also can’t run a thread on your machine while **Require trusted devices** is on in your claude.ai settings.
+ * You can’t add a session you started yourself on your machine to a project. A project reaches your machine only by running a thread there through Remote Control, and that section lists what it needs.
* A cloud thread’s sandbox pauses between turns and resumes when the thread continues. If the sandbox can’t be resumed, the thread continues from a fresh clone, so uncommitted changes can be lost. On long tasks, ask Claude to commit and push work in progress.
* A project belongs to one user. You can’t share a project or its threads with another user, and thread transcripts don’t have the share option other cloud sessions have. There are no organization-level controls for projects during the beta.
* A thread belongs to the one project that started it. You can’t move or copy a thread to another project, or move it out to stand alone. **Move to project** goes the other way only: it brings a cloud session’s work into a project.
@@ -544,6 +580,14 @@
Additional usage credits are required
A thread or the project conversation made a request your plan covers only with usage credits, such as one to a model or context size your plan doesn’t include, and usage credits aren’t turned on for your account. [Add usage credits to your subscription](</docs/en/costs#add-usage-credits-to-your-subscription>) covers who can turn them on or buy them on each plan. Once credits are available, send another message to retry.
+
+###
+
+
+
+Lost contact with your folder
+
+A thread running on your computer shows this when the Claude Code session there stopped responding, usually because the computer went to sleep or the desktop app or `claude remote-control` quit. Wake the computer, and if the desktop app or `claude remote-control` is no longer running there, start it again: reopen the app and confirm **Use this computer from your phone and claude.ai** is still on under **Settings > Claude Code**, or run `claude remote-control` again in the same folder.
###
@@ -561,6 +605,8 @@
”The project’s environment was removed”| Choose a different environment in **Project settings > Environment**; the change applies to new threads
”Setup script failed”| Click **Edit setup script** on the error, fix the script in the environment, then send another message. [Setup script failed](</docs/en/web-quickstart#setup-script-failed>) lists common causes
”Claude ran out of context on this turn”| The thread filled its context window. If the message says the thread continues in a fresh session, it carries on by itself; otherwise ask Claude in the project conversation to start a new thread for the remaining work
+”Couldn’t start in” followed by your folder’s name| You allowed a thread to run on your computer, but the session couldn’t start there. When a line under the message gives the reason, fix that, then ask Claude to run the task again
+”Claude is out of date on your device”| The computer you picked to run a thread has a Claude Code version older than v2.1.280. Update Claude Code there, or update the desktop app if that’s what connects the folder, then ask Claude to run the task again
”Reached the turn limit”| The thread reached the cap on agentic turns that [`CLAUDE_CODE_MAX_TURNS`](</docs/en/env-vars>) sets. Send another message to continue, or raise or remove that variable where it’s set
##
--- a/cli-hints.md
+++ b/cli-hints.md
@@ -114,5 +114,5 @@
Next steps
- * [Publish and distribute a plugin](</docs/en/plugins/publish>): the routes into each marketplace, including the official marketplace, which the hint requires
+ * [Publish and distribute a plugin](</docs/en/plugins/publish>): the routes for distributing a plugin, including the official marketplace, which the hint requires
* [Plugin commands reference](</docs/en/plugins/cli-reference#plugin-install>): the shell command that installs the same plugin outside a session
--- a/cli-reference.md
+++ b/cli-reference.md
@@ -58,7 +58,7 @@
`--add-dir`| Add additional working directories for Claude to read and edit files. Grants file access; Claude Code [doesn’t discover](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) most `.claude/` configuration from these directories. Validates that each path exists as a directory. You can’t add most [network paths](</docs/en/errors#working-directory-is-a-network-path>), such as `\\server\share`. To persist these directories across sessions, set [`permissions.additionalDirectories`](</docs/en/settings-reference#permissions-additionaldirectories>) in settings| `claude --add-dir ../apps ../lib`
`--advisor <model>`| Enable the server-side [advisor tool](</docs/en/advisor>) for this session with a model alias, `fable`, `opus`, or `sonnet`, or a full model ID. Takes precedence over the `advisorModel` setting for the session. `fable` requires [Fable access](</docs/en/advisor#choose-an-advisor-model>)| `claude --advisor opus`
`--agent`| Specify an agent for the current session (overrides the `agent` setting)| `claude --agent my-custom-agent`
-`--agents`| Define custom subagents dynamically via JSON. Accepts the [fields listed for CLI-defined subagents](</docs/en/sub-agents#choose-the-subagent-scope>). Claude Code validates the JSON at startup and exits on an invalid value; see [`Invalid --agents configuration`](</docs/en/errors#invalid-agents-configuration>) for the message and for the flags and environment variable that skip the validation. Validation requires Claude Code v2.1.242 or later| `claude --agents '{"reviewer":{"description":"Reviews code","prompt":"You are a code reviewer"}}'`
+`--agents`| Define custom subagents dynamically via JSON. Accepts the [fields listed for CLI-defined subagents](</docs/en/sub-agents#choose-the-subagent-scope>). With `--print`, the value can instead be the path to a JSON file holding the object; the file form requires Claude Code v2.1.281 or later. Claude Code validates the value at startup and exits on an invalid one; see [`Invalid --agents configuration`](</docs/en/errors#invalid-agents-configuration>) for the message and for the flags and environment variable that skip the validation. Validation requires Claude Code v2.1.242 or later| `claude --agents '{"reviewer":{"description":"Reviews code","prompt":"You are a code reviewer"}}'`
`--allow-dangerously-skip-permissions`| Add `bypassPermissions` to the `Shift+Tab` mode cycle without starting in it. Lets you begin in a different mode like `plan` and switch to `bypassPermissions` later. See [permission modes](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>)| `claude --permission-mode plan --allow-dangerously-skip-permissions`
`--allowedTools`, `--allowed-tools`| Tools that execute without prompting for permission. See [permission rule syntax](</docs/en/settings-reference#permission-rule-syntax>) for pattern matching. To restrict which tools are available, use `--tools` instead. If you name one of the [task-tracking tools](</docs/en/tools-reference#task-tool-availability>) here, Claude Code also opts the session in| `"Bash(git log *)" "Bash(git diff *)" "Read"`
`--append-subagent-system-prompt`| Append custom text to the end of every [subagent](</docs/en/sub-agents>)’s system prompt, nested subagents included, apart from a [forked subagent](</docs/en/sub-agents#fork-the-current-conversation>), which reuses the conversation’s own prompt. Only applies in non-interactive mode with `-p`. Requires Claude Code v2.1.205 or later| `claude -p --append-subagent-system-prompt "Cite file paths in every answer" "query"`
@@ -69,7 +69,7 @@
`--ax-screen-reader`| Render screen-reader friendly output: flat text without decorative borders or animations. Forces the classic renderer, so the [`tui`](</docs/en/settings-reference#tui>) setting has no effect; attached [background sessions](</docs/en/agent-view>) still render fullscreen. Takes precedence over [`CLAUDE_AX_SCREEN_READER`](</docs/en/env-vars>) and the [`axScreenReader`](</docs/en/settings-reference#axscreenreader>) setting. Requires Claude Code v2.1.181 or later| `claude --ax-screen-reader`
`--bare`| Minimal mode: skip auto-discovery of hooks, skills, custom commands, subagents, installed plugins, MCP servers, auto memory, and CLAUDE.md so scripted calls start faster. Skills in a directory you pass with `--add-dir` still load. Claude has access to Bash, file read, and file edit tools. Sets [`CLAUDE_CODE_SIMPLE`](</docs/en/env-vars>). See [bare mode](</docs/en/headless#start-faster-with-bare-mode>)| `claude --bare -p "query"`
`--betas`| Beta headers to include in API requests (API key users only)| `claude --betas interleaved-thinking`
-`--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"`
+`--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. Checks [workspace trust](</docs/en/permissions#project-allow-rules-and-workspace-trust>) for the directory before it starts. 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 [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"`
@@ -125,7 +125,7 @@
`--resume`, `-r`| Resume a specific session by ID or name, or show an interactive picker to choose a session. In place of an ID, you can pass the absolute path to a session’s `.jsonl` [transcript file](</docs/en/sessions#where-transcripts-are-stored>). The picker and name search include sessions that added this directory with `/add-dir`. When you pass a session ID, Claude Code searches the current project directory and its git worktrees, then every other project on this machine. Before v2.1.223, the ID search covered only the current project directory and its git worktrees. [Background sessions](</docs/en/agent-view>) appear in the picker marked with `bg`| `claude --resume auth-refactor`
`--safe-mode`| Start with all customizations disabled to troubleshoot a broken configuration: CLAUDE.md, skills, plugins, hooks, MCP servers, custom commands and agents, output styles, workflows, custom themes, custom keybindings, status line and file-suggestion commands, LSP servers, and auto memory do not load. Authentication, model selection, built-in tools, and permissions work normally, which differs from [`--bare`](</docs/en/headless#start-faster-with-bare-mode>). Managed settings policy still applies, including policy-configured hooks, status line, and file-suggestion commands; managed plugins, managed skills, managed CLAUDE.md, and policy-configured MCP servers do not. Useful for checking whether a customization is what triggers [automatic model fallback](</docs/en/model-config#automatic-model-fallback>). Sets [`CLAUDE_CODE_SAFE_MODE`](</docs/en/env-vars>)| `claude --safe-mode`
`--session-id`| Use a specific session ID for the conversation (must be a valid UUID)| `claude --session-id "550e8400-e29b-41d4-a716-446655440000"`
-`--setting-sources`| Comma-separated list of setting sources to load (`user`, `project`, `local`)| `claude --setting-sources user,project`
+`--setting-sources`| Comma-separated list of setting sources to load (`user`, `project`, `local`). See [agent view](</docs/en/agent-view#what-carries-over-when-you-background>) and [agent teams](</docs/en/agent-teams#context-and-communication>) for the sessions you start from this one that inherit the list| `claude --setting-sources user,project`
`--settings`| Path to a settings JSON file or an inline JSON string. Values you set here override the same keys in your `settings.json` files for this session. Keys you omit keep their file-based values. The file must be a regular file no larger than 2 MiB. See [settings precedence](</docs/en/settings#settings-precedence>)| `claude --settings ./settings.json`
`--strict-mcp-config`| Only use MCP servers from `--mcp-config`, ignoring all other MCP configurations. See [Exclusive control with managed-mcp.json](</docs/en/managed-mcp#exclusive-control-with-managed-mcp-json>) for what the flag does under a managed MCP file| `claude --strict-mcp-config --mcp-config ./mcp.json`
`--system-prompt`| Replace the entire system prompt with custom text| `claude --system-prompt "You are a Python expert"`
--- a/cloud-environments.md
+++ b/cloud-environments.md
@@ -271,7 +271,7 @@
What’s available in cloud sessions
-In Anthropic-hosted environments, each session gets a fresh virtual machine (VM) running Ubuntu 24.04 on x86_64, regardless of your own operating system and CPU architecture, with your repository cloned and common toolchains pre-installed. When a dependency provides precompiled binaries, such as Ruby gems with native extensions or prebuilt Python wheels, use its x86_64 Linux build to match the VM. This section covers the Anthropic-hosted defaults, the built-in GitHub tools, how to run tests and services, and the resource limits each VM gets.
+In Anthropic-hosted environments, each session gets a fresh virtual machine (VM) running Ubuntu 24.04 on x86_64, regardless of your own operating system and CPU architecture, with your repository cloned and common toolchains pre-installed. When a dependency provides precompiled binaries, such as Ruby gems with native extensions or prebuilt Python wheels, use its x86_64 Linux build to match the VM. This section covers the Anthropic-hosted defaults, the built-in GitHub tools, how to run tests and services, the resource limits each VM gets, and the time limits on long-running work.
Sessions your organization routes to a [self-hosted environment](</docs/en/self-hosted-environments>) run on your own runners instead, with the tools your runner image provides.
@@ -401,6 +401,21 @@
The VM may stop tasks that need significantly more memory, such as large build jobs or memory-intensive tests. For workloads beyond these limits, use [Remote Control](</docs/en/remote-control>) to run Claude Code on your own hardware, or run cloud sessions in a [self-hosted environment](</docs/en/self-hosted-environments>) on compute your organization operates.
+###
+
+
+
+Time limits
+
+In Anthropic-hosted environments, these time limits apply to long-running work in a cloud session, such as a build, an install, or a test run. Each entry links to the section that defines the limit.
+
+ * **Commands Claude runs** : a cloud environment doesn’t set its own command timeout, so the Bash tool’s defaults apply. Claude waits 2 minutes for a command by default and can ask for up to 10 minutes. When a command reaches its [timeout](</docs/en/tools-reference#timeout-and-output-limits>), Claude Code [moves it to the background](</docs/en/tools-reference#background-commands>) instead of stopping it, unless the command starts with `sleep`.
+ * **SessionStart hooks** : Claude Code cancels a `command` hook after 600 seconds unless you set [`timeout`](</docs/en/hooks#common-fields>), in seconds, on the hook entry. Claude Code doesn’t enforce the timeout on a hook you run with [`async: true`](</docs/en/hooks#run-hooks-in-the-background>).
+ * **Setup script** : a script that takes longer than roughly five minutes isn’t cached. Script requirements covers how to stay under that.
+ * **Idle sessions** : a session stops after a period of inactivity and its VM is reclaimed. [Environment expired](</docs/en/claude-code-on-the-web#environment-expired>) covers what counts as inactive and how to reopen the session.
+
+To raise the command timeouts for an environment’s sessions, add [`BASH_DEFAULT_TIMEOUT_MS` and `BASH_MAX_TIMEOUT_MS`](</docs/en/env-vars#variables>) to its environment variables. Both take milliseconds. For example, `BASH_DEFAULT_TIMEOUT_MS=600000` makes 10 minutes the default.
+
##
@@ -421,7 +436,7 @@
A setup script has three constraints to write around:
* **Exit zero** : if the script exits non-zero, the session fails to start. Append `|| true` to non-critical commands so an intermittent install failure doesn’t block the session.
- * **Finish within five minutes** : keep the script’s total runtime under roughly five minutes so the environment cache can build. Run independent installs in parallel with `&` and `wait`, and move any single download that won’t fit into a SessionStart hook that launches it in the background.
+ * **Finish within five minutes** : keep the script’s total runtime under roughly five minutes so the environment cache can build. When setup takes longer than that, the environment isn’t cached. Run independent installs in parallel with `&` and `wait`, and move any single download that won’t fit into a SessionStart hook that launches it in the background. If new sessions stall or fail during setup, see [New sessions hang or time out during setup](</docs/en/web-quickstart#new-sessions-hang-or-time-out-during-setup>).
* **Network access for installs** : package installs need to reach registries. The default **Trusted** level covers common package registries including npm, PyPI, RubyGems, and crates.io; with **None** network access, installs fail.
###
@@ -430,7 +445,7 @@
Environment caching
-The setup script runs the first time you start a session in an environment. After it completes, Anthropic snapshots the filesystem and reuses that snapshot as the starting point for later sessions. New sessions start with your dependencies, tools, and Docker images already on disk, and skip the setup script step. This keeps startup fast even when the script installs large toolchains or pulls container images. The cache is a filesystem snapshot, so it keeps what the setup script writes to disk and loses anything that was only running. Packages you install, Docker images you pull, and files you write all carry over. A database the script started, a `docker compose up` stack, or any other background process doesn’t; start those per session by asking Claude or with a SessionStart hook. The setup script runs again to rebuild the cache when you change the environment’s setup script or allowed network hosts, and when the cache reaches its expiry after roughly seven days. Resuming an existing session never re-runs the setup script. You don’t need to enable caching or manage snapshots yourself.
+The setup script runs the first time you start a session in an environment. When setup completes within roughly five minutes, Anthropic snapshots the filesystem and reuses that snapshot as the starting point for later sessions. New sessions start with your dependencies, tools, and Docker images already on disk, and skip the setup script step. This keeps startup fast even when the script installs large toolchains or pulls container images. If setup takes longer than roughly five minutes, the environment isn’t cached. The cache is a filesystem snapshot, so it keeps what the setup script writes to disk and loses anything that was only running. Packages you install, Docker images you pull, and files you write all carry over. A database the script started, a `docker compose up` stack, or any other background process doesn’t; start those per session by asking Claude or with a SessionStart hook. The setup script runs again to rebuild the cache when you change the environment’s setup script or allowed network hosts, and when the cache reaches its expiry after roughly seven days. Resuming an existing session never re-runs the setup script. You don’t need to enable caching or manage snapshots yourself.
###
--- a/code-review.md
+++ b/code-review.md
@@ -271,7 +271,7 @@
Troubleshooting
-Review runs are best-effort. A failed run never blocks your PR, but it also doesn’t retry on its own. This section covers how to recover from a failed run and where to look when the check run reports issues you can’t find.
+Review runs are best-effort, and a failed run never blocks your PR. Code Review retries some interrupted reviews on its own. This section covers how to run a review again yourself and where to look when the check run reports issues you can’t find.
###
@@ -279,7 +279,7 @@
Retrigger a failed or timed-out review
-When the review infrastructure hits an internal error or exceeds its time limit, the check run completes with a title of **Code review encountered an error** or **Code review timed out**. The conclusion is still neutral, so nothing blocks your merge, but no findings are posted. To run the review again, comment `@claude review` on the PR. This starts a fresh review without subscribing the PR to future pushes. If the PR isn’t from a fork, you can instead click **Re-run** on the **Claude Code Review** check in GitHub’s Checks tab. A re-run also starts a fresh review without subscribing the PR.
+When a review fails or exceeds its time limit, the check run completes with a title such as **Code review failed** or **Code review timed out**. The conclusion is still neutral, so nothing blocks your merge. Unless the check run’s summary says a new review of the commit has been queued automatically, run the review again yourself. To run the review again, comment `@claude review` on the PR. This starts a fresh review without subscribing the PR to future pushes. If the PR isn’t from a fork, you can instead click **Re-run** on the **Claude Code Review** check in GitHub’s Checks tab. A re-run also starts a fresh review without subscribing the PR.
###
--- a/components.md
+++ b/components.md
@@ -4,7 +4,7 @@
* **Building your first plugin** : start with [Create a plugin](</docs/en/plugins/create>)
* **Installing someone else’s plugin** : see [Install plugins](</docs/en/plugins/install>)
- * **Your plugin’s users are on claude.ai or in Cowork** : a different set of components loads there. See [Plugins on claude.ai and in Cowork](<https://claude.com/docs/plugins/overview>)
+ * **Your plugin’s users are on claude.ai or in Cowork** : a different set of components loads there. See [Plugin structure and testing](<https://claude.com/docs/plugins/build>) and the [component support table](<https://claude.com/docs/plugins/platform-support#compare-component-support-by-app>)
##
@@ -225,7 +225,7 @@
Reach users on claude.ai and Cowork
-A local stdio server, such as the `db` server under MCP servers, runs in Claude Code and in a Cowork session that runs on your machine in the Claude Desktop app, but not on claude.ai. To reach users there too, reference a remote server by its `https://` URL, which claude.ai and Cowork offer to the user as a connector.
+A local stdio server, such as the `db` server under MCP servers, runs in Claude Code and in a Cowork session that runs on your machine in the Claude Desktop app, but not on claude.ai. To reach users there too, reference a remote server by its `https://` URL, which claude.ai and Cowork offer to the user as a connector, as [Bundle an MCP connector with its skill](<https://claude.com/docs/plugins/build#bundle-an-mcp-connector-with-its-skill>) shows.
####
@@ -297,7 +297,7 @@
#!/bin/bash
echo "hello from my-plugin"
-Make it executable with `chmod +x bin/hello-plugin` and load the plugin. When you ask Claude to run `hello-plugin`, the Bash tool result shows the script’s output. Plugin `bin/` directories come after the user’s own `PATH` entries, so a plugin can’t shadow `git`, `ls`, or another system command. claude.ai and Cowork don’t install a plugin that has a top-level `bin/` directory, including one you [distribute through claude.ai organization settings](</docs/en/plugins/host-marketplace#distribute-through-organization-settings>).
+Make it executable with `chmod +x bin/hello-plugin` and load the plugin. When you ask Claude to run `hello-plugin`, the Bash tool result shows the script’s output. Plugin `bin/` directories come after the user’s own `PATH` entries, so a plugin can’t shadow `git`, `ls`, or another system command. claude.ai and Cowork don’t install a plugin that has a top-level `bin/` directory, including one you [distribute through claude.ai organization settings](<https://claude.com/docs/plugins/org-sync#keep-executables-out-of-the-top-level-bin-directory>).
###
--- a/costs.md
+++ b/costs.md
@@ -357,7 +357,7 @@
Delegate verbose operations to subagents
-Running tests, fetching documentation, or processing log files can consume significant context. Delegate these to [subagents](</docs/en/sub-agents#isolate-high-volume-operations>) so the verbose output stays in the subagent’s context while only a summary returns to your main conversation.
+Running tests, fetching documentation, or processing log files can consume significant context. Delegate these to [subagents](</docs/en/sub-agents#isolate-high-volume-operations>) so the verbose output stays in the subagent’s context while only a summary returns to your main conversation. The subagent’s own requests still draw on your usage. To spend less on them, [choose a smaller model for a subagent](</docs/en/sub-agents#choose-a-model>) or [run every subagent on one model](</docs/en/sub-agents#run-every-subagent-on-one-model>).
###
@@ -414,6 +414,7 @@
* **Scheduled tasks** : a [scheduled task](</docs/en/scheduled-tasks>) fires on its interval even while the session is idle, sending your full context each time
* **Cross-session messages** : Claude Code delivers a [message from another of your sessions](</docs/en/cross-session-messaging>) as a new turn when this session sits idle, sending your full context each time. To hold inbound messages instead of delivering them, set [`crossSessionInbound`](</docs/en/settings-reference#crosssessioninbound>) to `hold`
* **Goal check-ins** : while background work keeps an active [goal](</docs/en/goal>) waiting, Claude Code [asks Claude to check on that work](</docs/en/goal#background-work-defers-evaluation>) even when the session sits idle, starting a new turn that sends your full context. Claude Code starts at most three idle check-ins per goal between your prompts. Before v2.1.246, idle check-ins were uncapped. To turn check-ins off, set [`CLAUDE_CODE_GOAL_CHECKIN_MINUTES`](</docs/en/env-vars>) to `0`. Idle check-ins require Claude Code v2.1.236 or later
+ * **Subagents and workflows** : every subagent, and every agent a [dynamic workflow](</docs/en/workflows#cost>) spawns, sends its own requests on top of the main conversation’s. The attribution breakdown shows the subagent share
* **Agent teammates** : each active teammate keeps consuming tokens until it exits
* **Compaction** : `/compact` reads the conversation it summarizes, so [compacting a large context](</docs/en/prompt-caching#compacting-the-conversation>) is itself a large request. When you want a fresh start instead of continuity, `/clear` costs nothing
--- a/create.md
+++ b/create.md
@@ -4,7 +4,7 @@
* **Installing someone else’s plugin** : see [Install plugins](</docs/en/plugins/install>)
* **Not sure you need a plugin** : see [Decide whether you need a plugin](</docs/en/plugins/overview#decide-whether-you-need-a-plugin>) on the overview
- * **Your plugin’s users are on claude.ai or in Cowork** : the same folder installs there with a different subset of components. See [Plugins on claude.ai and in Cowork](<https://claude.com/docs/plugins/overview>)
+ * **Your plugin’s users are on claude.ai or in Cowork** : the same folder installs there with a different subset of components. See [Plugin structure and testing](<https://claude.com/docs/plugins/build>) and the [component support table](<https://claude.com/docs/plugins/platform-support#compare-component-support-by-app>)
Start from the section that matches what you already have:
@@ -112,7 +112,7 @@
Claude replies with a greeting.
-The plugin loads only in sessions you start with `--plugin-dir`. To keep working on it without the flag, or to test a `.zip` build, see Develop without a marketplace.
+The plugin loads only in sessions you start with `--plugin-dir`. To keep working on it without the flag, or to test a `.zip` build, see Develop without a marketplace. To have Claude scaffold and check a larger plugin with you, [install](</docs/en/plugins/install#install-a-plugin>) Anthropic’s `plugin-dev` plugin from the `claude-plugins-official` marketplace, which adds skills and agents for writing components such as skills, hooks, and MCP servers and for validating the finished plugin. Once it’s installed, run `/plugin-dev:create-plugin` followed by a description of the plugin you want, and Claude walks you through designing, creating, and validating it.
###
@@ -124,7 +124,7 @@
* **Send it to a few people directly** : give them the plugin’s directory or a `.zip` of it, and nothing needs to be published. See [Share a plugin without a marketplace](</docs/en/plugins/publish#share-a-plugin-without-a-marketplace>).
* **List it in your own marketplace** : teammates add your marketplace once and install the plugin by name, and they receive your updates. See [Publish through your own marketplace](</docs/en/plugins/publish#publish-through-your-own-marketplace>).
- * **Submit it to Anthropic’s community marketplace** : once it’s listed, anyone who adds that marketplace can install it. See [Submit to the community marketplace](</docs/en/plugins/publish#submit-to-the-community-marketplace>).
+ * **Submit it to Anthropic’s directory** : after it passes review, people can add it on claude.ai and in Cowork, and it reaches Claude Code through their account. See [Submit to Anthropic’s directory](</docs/en/plugins/publish#submit-to-anthropics-directory>).
###
@@ -403,8 +403,8 @@
* [Plugin components](</docs/en/plugins/components>): add agents, hooks, MCP servers, LSP servers, and user configuration to your plugin
* [Test plugins with evals](</docs/en/plugin-evals>): write eval cases and run them with `claude plugin eval` to check how reliably the plugin guides Claude’s behavior
- * [Publish a plugin](</docs/en/plugins/publish>): version it, put it in a marketplace, and submit it to the community marketplace
- * [Plugins on claude.ai and in Cowork](<https://claude.com/docs/plugins/overview>): the same plugin folder installs on claude.ai and in Cowork. Some components are Claude Code-only
+ * [Publish a plugin](</docs/en/plugins/publish>): version it, put it in a marketplace, and submit it for review
+ * [Plugin structure and testing](<https://claude.com/docs/plugins/build>): the same plugin folder installs on claude.ai and in Cowork. Some components are Claude Code-only, and the [component support table](<https://claude.com/docs/plugins/platform-support#compare-component-support-by-app>) lists which load on each surface
* [Plugin manifest reference](</docs/en/plugins/manifest-reference>): every `plugin.json` field, path rule, and directory
* [Skills](</docs/en/skills>): write the skills your plugin provides
* [Anthropic’s plugins in the claude-code repository](<https://github.com/anthropics/claude-code/tree/main/plugins>): complete worked examples of the layout on this page, such as `feature-dev` and `code-review`
--- a/create-marketplace.md
+++ b/create-marketplace.md
@@ -3,7 +3,7 @@
These cases are covered on other pages:
* **Sharing one plugin with a few people** : send them the plugin’s directory or a `.zip` of it. See [Share a plugin without a marketplace](</docs/en/plugins/publish#share-a-plugin-without-a-marketplace>).
- * **Offering a plugin to everyone** : submit it to Anthropic’s community marketplace. See [Submit to the community marketplace](</docs/en/plugins/publish#submit-to-the-community-marketplace>).
+ * **Offering a plugin to everyone** : submit it to Anthropic’s directory. See [Submit to Anthropic’s directory](</docs/en/plugins/publish#submit-to-anthropics-directory>).
* **Using a plugin yourself** : load it with `--plugin-dir` or save it in your skills directory. See [Develop without a marketplace](</docs/en/plugins/create#develop-without-a-marketplace>).
Start with Create a marketplace to build one on your own machine and install a plugin from it, then add more plugin entries.
--- a/data-usage.md
+++ b/data-usage.md
@@ -95,8 +95,8 @@
[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
+ * **Code and data storage:** Your repository is cloned into the session’s isolated VM. Anthropic stores the session transcript so you can return to the session later. Code and session data are subject to the retention and usage policies for your account type
+ * **Credentials:** GitHub credentials are stored encrypted on Anthropic’s servers and never enter the VM. GitHub traffic from the VM goes through an Anthropic proxy that attaches them on the server side
* **Network traffic:** All outbound traffic goes through a security proxy for audit logging and abuse prevention
* **Session data:** Prompts, code changes, and outputs follow the same data policies as local Claude Code usage
--- a/debug-your-config.md
+++ b/debug-your-config.md
@@ -90,7 +90,7 @@
Hook never fires| `matcher` uses `,` as a separator on a version before v2.1.191| Claude Code v2.1.191 or later treats `,` as a list separator like `|`. Earlier versions evaluate a comma as a literal character, so `"Edit,Write"` matches nothing. Use `|` instead, or upgrade Claude Code.
Hook never fires| `matcher` value is lowercase, for example `"bash"`| Matching is case-sensitive. Tool names are capitalized: `Bash`, `Edit`, `Write`, `Read`.
Hook never fires| Hooks are defined in a standalone file instead of `settings.json`| There is no standalone hooks file for project or user config. Define hooks under the `"hooks"` key in `settings.json`. Only [plugins](</docs/en/plugins/components#hooks>) load a separate `hooks/hooks.json`. See [hook configuration](</docs/en/hooks>).
-Permissions, hooks, or env set globally are ignored| Configuration was added to `~/.claude.json`| `~/.claude.json` holds app state and UI toggles. `permissions`, `hooks`, and `env` belong in `~/.claude/settings.json`. These are two different files.
+Permissions or hooks set globally are ignored| Configuration was added to `~/.claude.json`| `~/.claude.json` holds app state and UI toggles. `permissions`, `hooks`, and `env` belong in `~/.claude/settings.json`. These are two different files.
A `settings.json` value seems ignored| The same key is set in `settings.local.json`| `settings.local.json` overrides `settings.json`, and both override `~/.claude/settings.json`. See [settings precedence](</docs/en/settings#settings-precedence>).
Skill doesn’t appear in `/skills`| Skill file is at `.claude/skills/name.md` instead of in a folder| Use a folder with `SKILL.md` inside: `.claude/skills/name/SKILL.md`.
Skill appears in `/skills` but Claude never invokes it| Skill has `disable-model-invocation: true` in its frontmatter, or its description doesn’t match how you phrase the request| Check the badge in `/skills`: a “user-only” label means Claude won’t trigger it on its own. See [skill invocation](</docs/en/skills>).
--- a/desktop-quickstart.md
+++ b/desktop-quickstart.md
@@ -1,4 +1,4 @@
-The desktop app gives you Claude Code with a graphical interface built for running multiple sessions side by side: a sidebar for managing parallel work, a drag-and-drop layout with an integrated terminal and file editor, visual diff review, live app preview, GitHub PR monitoring with auto-merge, and scheduled tasks. No terminal required.
+The desktop app gives you Claude Code with a graphical interface, so you can ask Claude to work on the code in a folder on your computer and review its changes without using a terminal. This page walks through installing the app and starting your first session in the **Code** tab. Claude Code requires a [Pro, Max, Team, or Enterprise subscription](<https://claude.com/pricing?utm_source=claude_code&utm_medium=docs&utm_content=desktop_quickstart_pricing>).
## Download for macOS
@@ -14,12 +14,15 @@
For Windows ARM64, download the [ARM64 installer](<https://claude.ai/api/desktop/win32/arm64/setup/latest/redirect?utm_source=claude_code&utm_medium=docs>). On Linux, install with apt; see [Claude Desktop on Linux](</docs/en/desktop-linux>).
-Claude Code requires a [Pro, Max, Team, or Enterprise subscription](<https://claude.com/pricing?utm_source=claude_code&utm_medium=docs&utm_content=desktop_quickstart_pricing>).
+These cases are covered on other pages:
-This page walks through installing the app and starting your first session. If you’re already set up, see [Use Claude Code Desktop](</docs/en/desktop>) for the full reference. The desktop app has three tabs:
+ * **Already set up** : see [Use Claude Code Desktop](</docs/en/desktop>) for everything the Code tab can do
+ * **Want`claude` in your terminal**: [install the CLI](</docs/en/quickstart>) separately
+
+The desktop app has three tabs:
* **Chat** : General conversation with no file access, similar to claude.ai.
- * **Cowork** : An autonomous background agent that works on tasks in a sandboxed virtual machine with its own environment, running independently while you do other work. On-device Cowork sessions run the VM on your computer; remote Cowork sessions run on an Anthropic-managed VM instead.
+ * **Cowork** : An autonomous background agent that works on tasks independently while you do other work.
* **Code** : An interactive coding assistant with direct access to your local files. Depending on the permission mode, you approve each change as Claude proposes it or review the changes after Claude makes them.
Chat and Cowork are covered in the [Claude Help Center](<https://support.claude.com/>); installing and deploying the desktop app is covered in the [Claude Desktop support articles](<https://support.claude.com/en/collections/16163169-claude-desktop>). This page focuses on the **Code** tab.
@@ -42,7 +45,7 @@
Click the **Code** tab at the top center. If clicking Code prompts you to upgrade, you need to [subscribe to a paid plan](<https://claude.com/pricing?utm_source=claude_code&utm_medium=docs&utm_content=desktop_quickstart_upgrade>) first. If it prompts you to sign in online, complete the sign-in and restart the app. If you see a 403 error, see [authentication troubleshooting](</docs/en/desktop#403-or-authentication-errors-in-the-code-tab>).
-The desktop app includes Claude Code. You don’t need to install Node.js or the CLI separately. To use `claude` from the terminal, install the CLI separately. See [Get started with the CLI](</docs/en/quickstart>).
+The desktop app includes Claude Code, so you don’t need to install Node.js or the CLI to use the Code tab.
##
--- a/desktop-scheduled-tasks.md
+++ b/desktop-scheduled-tasks.md
@@ -51,7 +51,7 @@
* **Manual** : no schedule, only runs when you click **Run now**. Useful for saving a prompt you trigger on demand
* **Hourly** : runs every hour
- * **Daily** : shows a time picker, defaults to 9:00 AM local time
+ * **Daily** : runs every day at the local time you pick
* **Weekdays** : same as Daily but skips Saturday and Sunday
* **Weekly** : shows a time picker and a day picker
--- a/env-vars.md
+++ b/env-vars.md
@@ -225,6 +225,7 @@
`CLAUDE_CODE_DISABLE_CFC_PROMPT`| Set to `1` to keep the [Claude in Chrome](</docs/en/chrome>) browser tools available while omitting the Chrome section of the system prompt and the `/claude-in-chrome` [bundled skill](</docs/en/skills#bundled-skills>). For hosts that embed Claude Code and supply their own browser guidance. Requires Claude Code v2.1.257 or later
`CLAUDE_CODE_DISABLE_CLAUDE_MDS`| Set to `1` to prevent loading any CLAUDE.md memory files into context, including user, project, and auto memory files
`CLAUDE_CODE_DISABLE_CRON`| Set to `1` to disable [scheduled tasks](</docs/en/scheduled-tasks>). The `/loop` skill and cron tools become unavailable and any already-scheduled tasks stop firing, including tasks that are already running mid-session
+`CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT`| Set to `1` to turn off the time limit on [critical-path removal](</docs/en/permission-modes#critical-paths>) prompts. In `auto` mode Claude Code then sends these removals to the classifier instead, and in `bypassPermissions` mode the prompt waits for your answer. Set it in the environment that launches Claude Code, since Claude Code ignores a copy delivered through a settings `env` block. Requires Claude Code v2.1.281 or later
`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS`| Set to `1` to strip Anthropic-specific `anthropic-beta` request headers and beta tool-schema fields (such as `defer_loading` and `eager_input_streaming`) from API requests. Use this when a proxy gateway rejects requests with errors like “Unexpected value(s) for the `anthropic-beta` header” or “Extra inputs are not permitted”. Standard fields (`name`, `description`, `input_schema`, `cache_control`) are preserved. [MCP tool search](</docs/en/mcp#scale-with-mcp-tool-search>) is disabled and all MCP tools load upfront, even when you set `ENABLE_TOOL_SEARCH`. On Claude Code v2.1.227 or later, [managed settings](</docs/en/managed-settings>) can keep tool search on. [Disable pre-release capabilities](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) covers where the override applies
`CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS`| Set to `1` to disable the built-in [Explore and Plan subagents](</docs/en/sub-agents#built-in-subagents>). Claude explores with its search tools or the general-purpose subagent instead, and [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>) reads files directly rather than launching Explore and Plan agents. Custom subagents named `Explore` or `Plan` are unaffected. To remove every built-in subagent type in the Agent SDK or non-interactive mode, use `CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS` instead. Requires Claude Code v2.1.198 or later
`CLAUDE_CODE_DISABLE_FAST_MODE`| Set to `1` to disable [fast mode](</docs/en/fast-mode>)
@@ -241,6 +242,8 @@
`CLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALL`| Set to `1` to disable automatic registration of the official plugin marketplace. Claude Code reads the variable when it is about to register the marketplace, usually during a machine’s first interactive launch. If the variable is set at that point, Claude Code skips the registration permanently. Unsetting the variable later doesn’t undo the skip. Run `claude plugin marketplace add anthropics/claude-plugins-official` to register the marketplace at any time
`CLAUDE_CODE_DISABLE_PERMISSION_PROMPT_NOTIFY_HOOKS`| Set to `1` to stop Claude Code from running your [`Notification` hooks for unanswered permission requests](</docs/en/hooks#notification>) in sessions where Claude Code sends them to the Agent SDK’s `canUseTool` callback, which is how Claude Desktop and the VS Code extension host Claude Code. Has no effect in terminal sessions. Requires Claude Code v2.1.233 or later
`CLAUDE_CODE_DISABLE_POLICY_SKILLS`| Set to `1` to skip loading skills from the system-wide managed skills directory. Useful for container or CI sessions that should not load operator-provisioned skills
+`CLAUDE_CODE_DISABLE_POWERSHELL_CMD_RM_DENY`| Set to `1` to turn off the [PowerShell tool](</docs/en/tools-reference#powershell-tool>) check that denies the `cmd` built-ins `rd`, `rmdir`, `del`, and `erase` on a [system path](</docs/en/permission-modes#remove-item-in-powershell>), such as a drive root or your home directory. Claude Code ignores this variable in a settings file’s `env` block. Requires Claude Code v2.1.283 or later
+`CLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPT`| Set to `1` to turn off the [critical-path](</docs/en/permission-modes#critical-paths>) check for a recursive `rm` whose target is entirely the output of a command substitution, such as `rm -rf "$(pwd)"`. The other critical-path checks keep running. Set it in the environment that launches Claude Code, since Claude Code ignores a copy delivered through a settings `env` block. Requires Claude Code v2.1.281 or later
`CLAUDE_CODE_DISABLE_TERMINAL_TITLE`| Set to `1` to disable automatic terminal title updates based on conversation context. This also skips the background small/fast-model request that [generates a session title](</docs/en/sessions#name-your-sessions>)
`CLAUDE_CODE_DISABLE_THINKING`| Set to `1` to omit the `thinking` parameter from API requests entirely. This is a compatibility option for proxies and gateways that reject the parameter. On models that think by default, omitting the parameter means the model may still think. To explicitly disable [extended thinking](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking>) on the Anthropic API, use `MAX_THINKING_TOKENS=0` instead. Neither variable turns thinking off on Opus 5.5 or the Fable models, which can’t have thinking turned off. On [third-party providers](</docs/en/third-party-integrations>), `MAX_THINKING_TOKENS=0` likewise omits the parameter, so the two variables behave the same there
`CLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENT`| Set to `1` to skip proactive [auto-compaction](</docs/en/costs#reduce-token-usage>) when Claude Code doesn’t recognize the model ID, such as an [LLM gateway](</docs/en/llm-gateway>) alias. Without this variable, Claude Code compacts at the context window it assumes for the ID. `CLAUDE_CODE_MAX_CONTEXT_TOKENS` can correct the assumed window instead; see [Correct the window for a gateway or custom model ID](</docs/en/model-config#correct-the-window-for-a-gateway-or-custom-model-id>) for when each variable applies. Requires Claude Code v2.1.223 or later
@@ -410,13 +413,13 @@
`DISABLE_LOGOUT_COMMAND`| Set to `1` to hide the `/logout` command
`DISABLE_PROMPT_CACHING`| Set to `1` to disable [prompt caching](</docs/en/prompt-caching#disable-prompt-caching>) for all models (takes precedence over per-model settings)
`DISABLE_PROMPT_CACHING_FABLE`| Set to `1` to disable prompt caching for Fable models
-`DISABLE_PROMPT_CACHING_HAIKU`| Set to `1` to disable prompt caching for Haiku models
+`DISABLE_PROMPT_CACHING_HAIKU`| Set to `1` to disable prompt caching for the [default Haiku model](</docs/en/prompt-caching#disable-prompt-caching>), wherever it runs
`DISABLE_PROMPT_CACHING_OPUS`| Set to `1` to disable prompt caching for Opus models
`DISABLE_PROMPT_CACHING_SONNET`| Set to `1` to disable prompt caching for Sonnet models
-`DISABLE_TELEMETRY`| Set to any non-empty value, such as `1`, to opt out of telemetry. **Setting it to`0` or `false` still opts out**, unlike most on/off variables; unset the variable to turn telemetry back on. Telemetry events don’t include user data like code, file paths, or bash commands. Also disables feature-flag fetching with the same effect as `DISABLE_GROWTHBOOK`, which makes [Remote Control](</docs/en/remote-control#requirements>) and the other features that need feature-flag fetching unavailable. See [Turn telemetry off for your organization](</docs/en/managed-settings#turn-telemetry-off-for-your-organization>)
+`DISABLE_TELEMETRY`| Set to any non-empty value, such as `1`, to opt out of telemetry. **Setting it to`0` or `false` still opts out**, unlike most on/off variables; unset the variable to turn telemetry back on. Telemetry events don’t include user data like code, file paths, or Bash commands. Also disables feature-flag fetching. See [Turn telemetry off for your organization](</docs/en/managed-settings#turn-telemetry-off-for-your-organization>)
`DISABLE_UPDATES`| Set to `1` to block all updates including manual `claude update` and `claude install`. Stricter than `DISABLE_AUTOUPDATER`. Use when distributing Claude Code through your own channels and users should not self-update
`DISABLE_UPGRADE_COMMAND`| Set to `1` to hide the `/upgrade` command
-`DO_NOT_TRACK`| Set to `1` to opt out of telemetry, with the same effect as `DISABLE_TELEMETRY`, including making [Remote Control](</docs/en/remote-control#requirements>) and the other features that need feature-flag fetching unavailable. Claude Code reads this variable as a standard boolean, so `0` leaves telemetry on, and honors it as the cross-tool convention recognized by many developer CLIs
+`DO_NOT_TRACK`| Set to `1` to opt out of telemetry, with the same effect as `DISABLE_TELEMETRY`, including on feature-flag fetching. Claude Code reads this variable as a standard boolean, so `0` leaves telemetry on, and honors it as the cross-tool convention recognized by many developer CLIs
`ENABLE_BETA_TRACING_DETAILED`| Set to `1`, together with `BETA_TRACING_ENDPOINT`, to turn on [detailed beta tracing](</docs/en/monitoring-usage#traces-beta>), which adds content-bearing span attributes and the `claude_code.hook` span. Interactive CLI sessions also require your organization to be allowlisted for the beta. Both variables are ignored in [project and local settings](</docs/en/settings-reference#variables-claude-code-ignores-in-env>)
`ENABLE_CLAUDEAI_MCP_SERVERS`| Set to `false` to stop Claude Code from fetching [claude.ai MCP servers](</docs/en/mcp#use-mcp-servers-from-claude-ai>). Enabled by default for logged-in users. To disable per-project or per-org, set [`disableClaudeAiConnectors`](</docs/en/settings-reference#disableclaudeaiconnectors>) in settings instead
`ENABLE_PROMPT_CACHING_1H`| Set to `1` to request a 1-hour [prompt cache TTL](</docs/en/prompt-caching#cache-lifetime>) instead of the default 5 minutes. Intended for API key, [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>) users. Subscription users within included usage receive the 1-hour TTL automatically on the [main conversation](</docs/en/prompt-caching#which-ttl-each-request-gets>). Subscription users drawing on [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>) can set it to keep the 1-hour TTL. 1-hour cache writes are billed at a higher rate. To choose the TTL per request bucket instead, use `CLAUDE_CODE_PROMPT_CACHE_TTL` and `CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL`, which take precedence over this variable
@@ -498,11 +501,9 @@
With fetching off, you can’t:
- * [Start sessions in auto mode by default](</docs/en/permission-modes#which-mode-a-session-starts-in>) on Pro, Max, and Team plans
- * Have the VS Code extension [read settings files for the starting permission mode](</docs/en/permission-modes#switch-permission-modes>)
* Run [`/auto-mode-setup`](</docs/en/auto-mode-config#generate-environment-entries>) to draft `autoMode.environment` entries
- * Use [Remote Control](</docs/en/remote-control#requirements>)
- * [Message sessions beyond this machine](</docs/en/cross-session-messaging#message-sessions-on-other-machines>); messaging between sessions on this machine works with fetching off
+ * Use [Remote Control](</docs/en/remote-control>) with `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` or `DISABLE_GROWTHBOOK` set. For `DISABLE_TELEMETRY` and `DO_NOT_TRACK`, see the [Remote Control requirements](</docs/en/remote-control#requirements>)
+ * [Message sessions beyond this machine](</docs/en/cross-session-messaging#message-sessions-on-other-machines>) when [Remote Control](</docs/en/remote-control#requirements>) is unavailable. Messaging between sessions on this machine works with fetching off
* Run [`claude import` or the `/import` command](</docs/en/cli-reference#cli-commands>)
* Run [`/skill-doctor`](</docs/en/skills#find-unused-skills>) or open its report in the `/plugin` **Stats** tab
* Sync the [skills](</docs/en/skills#where-synced-skills-load>) and [plugins](</docs/en/plugins/loading#synced-plugins>) enabled for your claude.ai account into your terminal sessions
@@ -520,7 +521,7 @@
First session after an install or upgrade
-In your first session after you install Claude Code, or upgrade to a version that adds a feature, a flag-gated feature can be missing, and the session can start in Manual mode on a plan that otherwise starts in auto mode. Claude Code fetches the flags during that session, so both are there in your next session. After a fresh install, in a non-interactive session such as `claude -p`, the Agent SDK, or the VS Code extension, Claude Code can still pick the flags up before it [chooses the starting permission mode](</docs/en/permission-modes#which-mode-a-session-starts-in>).
+In your first session after you install Claude Code, or upgrade to a version that adds a feature, a flag-gated feature can be missing. That session can also start in a different [permission mode](</docs/en/permission-modes#which-mode-a-session-starts-in>) than your later sessions do. Claude Code fetches the flags during that session, so your next session has the feature and the usual starting permission mode. After a fresh install, in a non-interactive session such as `claude -p`, the Agent SDK, or the VS Code extension, Claude Code can still pick the flags up before it [chooses the starting permission mode](</docs/en/permission-modes#which-mode-a-session-starts-in>).
##
Show diff (655 lines)
--- a/errors.md
+++ b/errors.md
@@ -14,11 +14,14 @@
---|---
`API Error: 500 Internal server error`| Server errors
`API Error: Repeated 529 Overloaded errors`| Server errors
+`Opus is experiencing high load` / `Fable is experiencing high load`| Server errors
`Request timed out`| Server errors, or Network if the message mentions your internet connection
`API Error: No response from API`| Server errors
`Server error mid-response. The response above may be incomplete.`| Server errors
`Connection lost mid-response` / `Your computer went to sleep mid-response` / `The response stopped arriving`| Server errors
`Connection closed mid-response` / `Response stalled mid-stream`| Server errors
+`Part of the response never arrived` / `The response stream was malformed`| Server errors
+`API Error: Content block not found` / `API Error: Content block already closed`| Server errors
`Connection lost before a response was produced` / `Your computer went to sleep before a response was produced` / `The response stalled before a response was produced`| Automatic retries
`Connection closed while thinking` / `Response stalled while thinking`| Automatic retries
`Connection lost while your computer was asleep`| Automatic retries
@@ -39,6 +42,8 @@
`Could not update your spend limit`| Usage limits
`spend limit reached` / `spend limit unavailable`| Usage limits
`Not logged in · Please run /login`| Authentication
+`Couldn't save your login`| Authentication
+`Authentication required · Sign in again to continue`| Authentication
`Could not resolve authentication method`| Authentication
`Invalid API key`| Authentication
`Your apiKeyHelper script is failing`| Authentication
@@ -59,6 +64,7 @@
`signed-in claude.ai account or organization changed on this machine`| Authentication
`Remote Control stopped — the app running this session is now signed in to a different Claude account`| Authentication
`Remote Control stopped — the app running this session is signed out of Claude`| Authentication
+`Couldn't verify your organization's policy for remote control`| [Troubleshoot Remote Control](</docs/en/remote-control#couldnt-verify-your-organizations-policy-for-remote-control>)
`OAuth token revoked` / `OAuth token has expired`| Authentication
`API Error: 401 Invalid authentication credentials`| Authentication
`Login expired · Please run /login`| Authentication
@@ -67,6 +73,8 @@
`Not signed in to the Cloud gateway — run /login.`| Authentication
`Administrator policy requires a Cloud gateway sign-in on this machine`| Authentication
`Failed to authenticate: OAuth session expired and could not be refreshed`| Authentication
+`Could not refresh your login because another Claude Code process is refreshing it`| Authentication
+`Failed to refresh OAuth token: another Claude Code process is refreshing it or exited mid-refresh`| Authentication
`Your account is on hold and can't use Claude Code. View details or appeal: https://claude.ai/restricted`| Authentication
`Your account is on hold and can't sign in to Claude Code. View details or appeal: https://claude.ai/restricted`| Authentication
`Anthropic profile login expired · Re-authenticate your Anthropic profile`| Authentication
@@ -110,6 +118,7 @@
`Couldn't reconnect to your Remote Control session`| Network
`N sessions ended while this machine was offline — the environment was cleaned up on the server and can't be resumed.`| Network
`Couldn't share the transcript.`| Network
+`Couldn't send feedback`| Network
`Prompt is too long` / `Input is too long for requested model`| Request errors
`Prompt is too long · automatic compaction failed:`| Request errors
`Prompt is too long · this conversation is a single exchange` / `A single-exchange conversation cannot be compacted`| Request errors
@@ -129,13 +138,16 @@
`PDF too large` / `PDF is password protected`| Request errors
`Extra inputs are not permitted`| Request errors
`API Error: 400 ... tools.N.custom.input_schema: JSON schema is invalid` / `Property keys should match pattern`| Request errors
+`tool_use.name: String should have at most 200 characters`| Request errors
`There's an issue with the selected model`| Request errors
`Model ... is not a recognized model id`| Request errors
`Model ... not found`| Request errors
+`API error: ... · model not changed`| Request errors
`Claude Opus is not available with the Claude Pro plan`| Request errors
`Claude Code ... does not support this model; version ... or newer is required`| Request errors
`Claude Code ... is older than the minimum version required by your organization's policy`| Request errors
`Model ... is restricted by your organization's settings`| Request errors
+`Model ... is not available. Your organization restricts model selection.`| Request errors
`Model switch ... blocked by a PreModelSwitch hook`| Request errors
`couldn't save it as your default` / `couldn't confirm it was saved as your default`| Request errors
`thinking.type.enabled is not supported for this model`| Request errors
@@ -145,9 +157,11 @@
`API Error: 400 due to tool use concurrency issues`| Request errors
`API Error: 400 orphaned tool_result in conversation history`| Request errors
`API Error: 400 duplicate tool_use ID in conversation history`| Request errors
+`Invalid data in redacted_thinking block`| Request errors
`[Unsupported tool content removed]`| Request errors
`role 'system' must precede an 'assistant' message`| Request errors
`Invalid encrypted_content in search_result block` / `Invalid encrypted_index in text block` / `Failed to decrypt web search result content`| Request errors
+`Invalid encrypted_stdout in encrypted_code_execution_result block`| Request errors
`server_tool_use.name: Input should be` on every turn of a resumed session| Request errors
`<model> can't help with this. Start a new session to continue`| Request errors
`Claude Code is unable to respond to this request, which appears to violate our Usage Policy`| Request errors
@@ -163,6 +177,8 @@
`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: --agents takes a JSON object, or a file path only with --print (-p)`| Command-line errors
+`Error: --agents file not found`| Command-line errors
`Error: Settings file exceeds the 2MiB limit`| Command-line errors
`The current directory no longer exists (it was deleted or moved)` / `Can't read the current directory`| Command-line errors
`Temp directory <dir> ... Refusing to use it` / `ENOSPC: no space left on device, mkdir '<dir>'`| Command-line errors
@@ -197,6 +213,7 @@
`Single sign-on authorization needed`| Command-line errors
`Failed to resume the conversation`| Command-line errors
`No conversation found with session ID: <session-id>`| Command-line errors
+`Windows reported an error (EBADF) when Claude Code read this session's transcript file`| Command-line errors
`Cannot switch renderers in this session`| Command-line errors
`Cannot switch renderers while work is running in the background`| Command-line errors
`Couldn't open Claude Desktop`| Command-line errors
@@ -223,6 +240,8 @@
`Plugin "<name>@synced" is required by your organization and can't be disabled here`| Plugin errors
`would be spawned with zero tools — refusing`| Tool errors
`File is covered by a Read deny rule in your permission settings`| Tool errors
+`cannot contain null bytes (\0)`| Tool errors
+`Path contains null bytes`| Tool errors
`subagent_type is required: the general-purpose agent is not available in this session`| Tool errors
`Error: this write left the memory index at MEMORY.md at ..., over its ... read limit`| Tool errors
`pkill: refusing to run`| Tool errors
@@ -242,6 +261,9 @@
`its permission check expired before it ran (too many concurrent file operations)` / `ripgrep was found only by name on PATH`| Tool errors
`task output swap refused (tasks dir moved or linked)`| Tool errors
`Command killed: its output file was replaced or could no longer be verified`| Tool errors
+`Your disk quota is full on the filesystem with Claude Code's temp directory <dir> (EDQUOT)`| Tool errors
+`The filesystem with Claude Code's temp directory <dir>, or your disk quota on it, is full (ENOSPC)`| Tool errors
+`Command output was lost: the temp filesystem at <dir> is full` / `is out of inodes`| 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
@@ -269,6 +291,7 @@
`EACCES: permission denied, posix_spawn`| Background session errors
`exited before it became reachable`| Background session errors
`Couldn't start a background session (working directory no longer exists or is not accessible: ...)`| Background session errors
+`Workspace not trusted.` when starting or restarting a background session| Background session errors
`Claude Code is being updated by npm on this machine (still not runnable after 2 min, ...)`| Background session errors
`Claude Code process exited with code N`| Wrapper and IDE errors
`The connection to Claude Code ended before this message completed`| Wrapper and IDE errors
@@ -281,10 +304,12 @@
`Claude Code's fullscreen renderer didn't finish starting last time on this machine` / `Claude Code's fullscreen renderer has repeatedly failed to start on this machine`| Configuration warnings
`Claude Code exited after an unrecoverable interface error (...)`| Configuration warnings
`Agent descriptions are over the 15.0k-token limit`| Configuration warnings
+`Not loaded: rename <path>, then restart — its name uses "<name>", a name reserved for the skills synced from your claude.ai account`| Configuration warnings
`Ignoring N permissions.allow entries from ... this workspace has not been trusted`| Configuration warnings
`is a network path, which cannot be added as a working directory`| Configuration warnings
`Remote managed settings failed to load (<cause>)`| Configuration warnings
`Managed settings were not approved; exiting without applying them.`| Configuration warnings
+`Claude Code can't start: your organization's managed settings block the default model` / `Claude Code can't start: your organization allows only the models listed in "availableModels"`| Configuration warnings
`MCP server <name> is blocked by enterprise managed policy`| Configuration warnings
`Managed settings document could not be parsed as a JSON object; none of its settings are in effect. Fix or remove it.`| Configuration warnings
`Managed settings drop-in directory could not be read`| Configuration warnings
@@ -376,7 +401,7 @@
API Error: 500 Internal server error. This is a server-side issue, usually temporary — try again in a moment. If it persists, check https://status.claude.com.
-The trailing sentence names where to check service health and varies by provider. Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry configurations name that provider’s service status. A custom `ANTHROPIC_BASE_URL` names the gateway host. This indicates an unexpected failure inside the API. It is not caused by your prompt, settings, or account. **What to do:**
+The trailing sentence names where to check service health and varies by provider. Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry configurations name that provider’s service status. A custom `ANTHROPIC_BASE_URL` names the gateway host. A 5xx from the API itself indicates an unexpected failure inside the API. It is not caused by your prompt, settings, or account. When a proxy, load balancer, or gateway answers with an HTML error page, the message shows the status code and the page’s title, such as `API Error: 502 Bad Gateway`. For a page with no title, the message shows the status code and its standard name instead. Before v2.1.281, the status code was dropped when the page had a title, and the page’s raw markup was printed when it had none. **What to do:**
* Check [status.claude.com](<https://status.claude.com>), or the provider status page named in the message, for active incidents
* Wait a minute, then send your message again. Your original message is still in the conversation, so for a long prompt you can type `try again` instead of pasting the whole thing.
@@ -396,7 +421,7 @@
* Check [status.claude.com](<https://status.claude.com>), or the provider status page named in the message, for capacity notices
* Try again in a few minutes
- * Run `/model` and switch to a different model to keep working, since capacity is tracked per model. Claude Code prompts you to do this when one model is under particularly high load, for example `Opus is experiencing high load, please use /model to switch to Sonnet`.
+ * Run `/model` and switch to a different model to keep working, since capacity is tracked per model. Claude Code prompts you to do this when one model is under particularly high load, for example `Opus is experiencing high load, please use /model to switch to Sonnet`. On Fable models the message names Fable. In a session the Claude Desktop app runs, such as the Code tab or Cowork, the message reads `Opus is experiencing high load. Switch to Sonnet.` and you switch models with the app’s model picker.
###
@@ -451,13 +476,22 @@
API Error: Connection lost mid-response. The response above may be incomplete.
API Error: Your computer went to sleep mid-response. The response above may be incomplete.
API Error: The response stopped arriving. The response above may be incomplete.
+ API Error: Part of the response never arrived. The response above may be incomplete.
+ API Error: The response stream was malformed. The response above may be incomplete.
* `Server error mid-response`: a mid-stream overloaded or 5xx server error. This variant requires Claude Code v2.1.199 or later; before then that case discarded the partial output and reported the whole turn as an error.
- * `Connection lost mid-response`: the connection dropped.
+ * `Connection lost mid-response`: the connection dropped. You also see this variant when a proxy or gateway ends the response body cleanly before the response has finished.
* `Your computer went to sleep mid-response`: Claude Code detected that your computer went to sleep while the response was streaming. Once your computer wakes, Claude Code treats the connection as broken and stops reading from it.
+ * `Part of the response never arrived`: a stream event was dropped between the API and Claude Code, so a later event referenced content that never arrived. Before v2.1.281, this case ended the turn with `API Error: Content block not found`.
+ * `The response stream was malformed`: an event arrived for a content block that had already finished.
* `The response stopped arriving`: the connection stayed open but stopped delivering data, so the streaming idle watchdog aborted it. Before v2.1.222, Claude Code could also report this failure on [gateway](</docs/en/gateways>) connections reached through `ANTHROPIC_BASE_URL` or `ANTHROPIC_AWS_BASE_URL` while the server’s keep-alive pings were still arriving, because it counted only parsed response events there; upgrading stops those spurious timeouts on those routes. Gateways reached through a provider base URL such as `ANTHROPIC_BEDROCK_BASE_URL` aren’t wrapped by the byte watchdog; see [Streaming idle watchdogs](</docs/en/network-config#streaming-idle-watchdogs>).
-Before v2.1.227, `Connection lost mid-response` read `Connection closed mid-response` and `The response stopped arriving` read `Response stalled mid-stream`. In four cases, Claude Code handles the failure without showing this notice right away:
+Before v2.1.227, `Connection lost mid-response` read `Connection closed mid-response` and `The response stopped arriving` read `Response stalled mid-stream`. When a dropped or duplicated stream event arrives before Claude has started any text or tool call, you don’t see this notice:
+
+ * If Claude had completed only its thinking, Claude Code re-issues the request. When the re-issued streams break the same way, the turn ends with `Part of the response never arrived and no response was produced. Try again.` or `The response stream was malformed and no response was produced. Try again.`
+ * If nothing had completed, Claude Code re-sends the request without streaming instead. If you turned that fallback off with [`CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK`](</docs/en/env-vars>), the turn ends with `API Error: Content block not found` for a dropped event or `API Error: Content block already closed` for a duplicated one.
+
+In four cases, Claude Code handles the failure without showing this notice right away:
* Earlier in the response, Claude Code either retries the failure or ends the turn with a different error. See Automatic retries.
* When one of these failures arrives after Claude has finished the response, Claude Code keeps the complete response and ends the turn normally, without this notice. Before v2.1.222, Claude Code showed this notice when the connection dropped or stalled after the response finished, and reported the turn as an error even though the response was complete.
@@ -616,7 +650,7 @@
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:**
+In a session the Claude Desktop app runs, the hint names no commands: it points at the claude.ai usage settings page, or on Team and Enterprise plans says to turn on usage credits at claude.ai/admin-settings/usage or to ask your admin. 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. Once usage credits are on, restart Claude Code or start a new session, whichever the message says. Until then, the session stays at the standard context limit.
@@ -669,7 +703,7 @@
API Error: Request rejected (429) · this may be a temporary capacity issue. If it persists, check https://status.claude.com.
-The trailing sentence names where to check service health and varies by provider. Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry configurations name that provider’s service status instead of the Anthropic status page. A custom `ANTHROPIC_BASE_URL` names the gateway host. **What to do:**
+The trailing sentence names where to check service health and varies by provider. Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry configurations name that provider’s service status instead of the Anthropic status page. A custom `ANTHROPIC_BASE_URL` names the gateway host. When a proxy, load balancer, or gateway between Claude Code and the API answers with its own HTML 429 page, the text after the `·` is that page’s title when it has one, such as `Too Many Requests`. Before v2.1.281, the whole page’s markup was printed after the `·`. **What to do:**
* Run `/status` and confirm the active credential is the one you expect. A stray `ANTHROPIC_API_KEY` in your environment can route requests through a low-tier key instead of your subscription.
* Check your provider console for the active limits and request a higher tier if needed
@@ -765,7 +799,7 @@
Not logged in · Please run /login
-**What to do:**
+In a session the Claude Desktop app runs, such as the Code tab or Cowork, the message reads `Authentication required · Sign in again to continue`, and you sign in again from the app. **What to do:**
* Run `/login` to authenticate with your Claude subscription or Console account
* If you expected an environment variable to authenticate you, confirm `ANTHROPIC_API_KEY` is set and exported in the shell where you launched `claude`
@@ -890,8 +924,9 @@
Your organization has disabled API key authentication · Unset ANTHROPIC_API_KEY to use your claude.ai account instead
Your organization has disabled API key authentication · Unset ANTHROPIC_API_KEY and run /login to sign in with your claude.ai account
Your organization has disabled API key authentication · Unset the apiKeyHelper setting and run /login to sign in with your claude.ai account
-
-Environment variables and `apiKeyHelper` take precedence over `/login`, so running `/login` alone doesn’t help while either is still supplying a key. See [Authentication precedence](</docs/en/authentication#authentication-precedence>). **What to do:**
+ Your organization has disabled API key authentication · Sign in again with your claude.ai account
+
+The last form appears in a session the Claude Desktop app runs, such as the Code tab or Cowork, where you sign in again from the app. Environment variables and `apiKeyHelper` take precedence over `/login`, so running `/login` alone doesn’t help while either is still supplying a key. See [Authentication precedence](</docs/en/authentication#authentication-precedence>). **What to do:**
* If the message names `ANTHROPIC_API_KEY`, unset it in the current shell and remove it from your shell profile or `.env` file, then relaunch `claude`
* If the message names `apiKeyHelper`, remove the [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>) setting from your `settings.json`
@@ -1074,6 +1109,43 @@
* Run `/login` to sign in again. Retrying without signing in shows the same message on every request.
* In non-interactive mode, run `claude` in the same environment, complete `/login`, then rerun your command. For automation that can’t sign in interactively, authenticate with `ANTHROPIC_API_KEY` or [generate a long-lived token with `claude setup-token`](</docs/en/authentication#generate-a-long-lived-token>).
* If signing in keeps failing, see [Login and authentication](</docs/en/troubleshoot-install#login-and-authentication>)
+
+###
+
+
+
+Could not refresh your login because another Claude Code process is refreshing it
+
+This message doesn’t mean your login was rejected. Your saved claude.ai login had expired and needed renewing. Another Claude Code process on the same machine held the shared refresh lock, or exited and left it behind, and the refresh made no progress while this session waited. Claude Code stops the request before sending it:
+
+ Could not refresh your login because another Claude Code process is refreshing it (or exited mid-refresh) · Try again in a minute; if it keeps happening, close other Claude Code windows or sign in again with /login
+
+In [non-interactive mode](</docs/en/headless>) (`-p`) and the [Agent SDK](</docs/en/agent-sdk/overview>), the message reads as follows, and the structured error code is `server_error`:
+
+ Failed to refresh OAuth token: another Claude Code process is refreshing it or exited mid-refresh. This is usually transient; retry in a minute, and if it persists close other Claude Code processes or sign in again
+
+Sessions authenticated with an API key, [`CLAUDE_CODE_OAUTH_TOKEN`](</docs/en/env-vars>), or a third-party provider don’t use the saved login and never see this message. **What to do:**
+
+ * Try again in a minute. If another process completes the refresh first, this session uses the renewed login.
+ * If the message keeps returning, close other Claude Code windows and processes, then retry.
+ * If it returns with no other Claude Code process running, run `/login`. Signing in again doesn’t wait on the refresh lock.
+
+###
+
+
+
+Couldn’t save your login
+
+You signed in with claude.ai, but Claude Code couldn’t save the login to its credential store, so the login didn’t complete. On macOS this can happen when the login keychain locks, for example on sleep or idle, after Claude Code has already read or saved credentials in it during the same session.
+
+ Couldn't save your login. If your Mac's keychain is locked, unlock it and log in again.
+ Couldn't save your login. Try logging in again.
+
+The first form appears on macOS and the second everywhere else. A transient credential-store failure, such as a timeout or an unreadable store, produces the same message. **What to do:**
+
+ * On macOS, unlock the login keychain, then run `/login` again
+ * On other platforms, run `/login` again
+ * If the login still doesn’t save, see [Not logged in or token expired](</docs/en/troubleshoot-install#not-logged-in-or-token-expired>) for the keychain unlock command and other credential-storage recovery steps
###
@@ -1470,6 +1542,7 @@
If `curl` succeeds but Claude Code still fails, the cause is usually something between the runtime and the network rather than the network itself:
+ * Check whether `ANTHROPIC_BASE_URL` is set by running `echo $ANTHROPIC_BASE_URL`, or `echo $env:ANTHROPIC_BASE_URL` in PowerShell, and look for it in the `env` block of your [settings files](</docs/en/settings>). When it’s set, Claude Code sends model requests to that address instead of `api.anthropic.com`, so a leftover value pointing at a local proxy or gateway that’s no longer running produces `Connection refused` even though `curl` reaches the API. Remove it from your shell profile or settings and start Claude Code from a new terminal.
* On Linux and WSL, check `/etc/resolv.conf` for an unreachable nameserver. WSL in particular can inherit a broken resolver from the host.
* On macOS, a VPN client that was disconnected or uninstalled can leave a tunnel interface or routing rule behind. Check `ifconfig` for stale `utun` interfaces and remove the VPN’s network extension in System Settings.
* Docker Desktop and similar container runtimes can intercept outbound traffic. Quit them and retry to rule this out.
@@ -1656,7 +1729,7 @@
* Start a new session with `claude --remote-control` to create a new Remote Control session
* For other Remote Control startup messages, see [Troubleshoot Remote Control](</docs/en/remote-control#troubleshooting>)
-If the server reports instead that the previous session is gone, you don’t see this message. Claude Code starts a new session in its place or shows [`Previous session is unavailable — run /remote-control to start a new one`](</docs/en/remote-control#previous-session-is-unavailable>), depending on [the conversation’s reconnection record](</docs/en/remote-control#resume-outcomes>). From v2.1.227 through v2.1.231, Claude Code showed a message that starts with `Remote Control could not resume the previous session under the current login` instead, and [earlier versions behaved differently again](</docs/en/remote-control#reconnect-history>).
+If the server reports instead that the previous session is gone, you don’t see this message. Claude Code starts a new session in its place or shows [`Previous session is unavailable — run /remote-control to start a new one`](</docs/en/remote-control#previous-session-is-unavailable>).
###
@@ -1687,6 +1760,29 @@
* Run `/feedback` to send the transcript with a description of what happened. See Report an error if `/feedback` is unavailable in your environment
* If other requests are failing too, check your network connection and see Unable to connect to API
+
+###
+
+
+
+Couldn’t send feedback
+
+You sent a report from the [`/feedback`, `/bug`, or `/share` dialog](</docs/en/commands#all-commands>) and the upload to Anthropic failed. The dialog keeps your text so you can retry.
+
+ Couldn't send feedback (couldn't reach the service). If it keeps failing, you can file at https://github.com/anthropics/claude-code/issues instead.
+
+The text after the prefix names what failed:
+
+ * **`: not signed in. Run /login, then retry.`** : the dialog uploads only when Claude Code found Anthropic credentials as it opened, and none were usable by the time you sent. For example, you signed out on this machine in the meantime, or your login could no longer be refreshed.
+ * **A parenthetical** : `(server returned <status>)` is the service’s response code; `(request timed out)` and `(couldn't reach the service)` are network failures. When Claude Code can’t name a reason, the parenthetical is absent.
+
+In the [feedback drafts queue](</docs/en/tools-reference#sendfeedback-tool-behavior>), the same failure ends with `The draft is still queued. Try again later.` instead, and the draft stays in the queue for another attempt. **What to do:**
+
+ * For the not-signed-in wording, run `/login` and send again
+ * Otherwise, send again; if other requests are failing too, check your network connection and see Unable to connect to API
+ * If it keeps failing, file the report at [github.com/anthropics/claude-code/issues](<https://github.com/anthropics/claude-code/issues>), as the message says
+
+Before v2.1.281, every send failed with this message once a Remote Control **Stop** or an urgent cross-session message had arrived while the dialog was open. On those versions, close the dialog, reopen it, and send again.
##
@@ -1893,6 +1989,22 @@
* If your Claude Code version is earlier than v2.1.216, run `claude update`.
* Remove or [disable](</docs/en/mcp#disable-a-server-without-removing-it>) the MCP server that declares the invalid schema. The error names the tool only by position. On v2.1.216 or later, check each server’s log for a line naming a tool whose input schema would be rejected. If no log names one, disable servers one at a time.
* If you maintain the server, fix the tool’s `input_schema`. The schema must be valid JSON Schema, and top-level property names must be 1 to 64 characters long and use only ASCII letters and digits, `_`, `.`, and `-`. See [Tools with invalid input schemas](</docs/en/mcp#tools-with-invalid-input-schemas>).
+
+###
+
+
+
+tool_use.name over 200 characters
+
+A tool call in the conversation history carries a name longer than the 200 characters the API accepts in a request:
+
+ API Error: 400 ... tool_use.name: String should have at most 200 characters
+
+Claude Code cuts such a name to 200 characters when the response arrives and when it loads a saved conversation, so the call fails with an ordinary `No such tool available` tool error and the conversation continues without this API error. **What to do:**
+
+ * Run `claude update`, then resume the conversation. The updated version repairs the overlong name when it loads the transcript, so a conversation that was stuck works again.
+
+Before v2.1.281, the overlong name stayed in the history and the API rejected every request that re-sent the conversation, including `/compact` and `--resume`, so this error repeated and the conversation was stuck.
###
@@ -1925,7 +2037,7 @@
Model "claud-sonnet-5" is not a recognized model id. Did you mean 'claude-sonnet-5'?
-The trailing hint names the closest matching alias or model ID. When nothing is close enough, it reads `Run /model to see available models.` instead. Claude Code produces this error locally at the moment the switch is requested, before any API request is made. It applies when a model is set through the [Agent SDK](</docs/en/agent-sdk/typescript>) `setModel()` method, by an app such as the [Desktop app](</docs/en/desktop>) that runs the Claude Code CLI for you, or when you pick a model from a device connected through [Remote Control](</docs/en/remote-control>). Before v2.1.260, the check didn’t cover Remote Control picks, so Claude Code applied the pick and the next request failed with There’s an issue with the selected model. **What to do:**
+The trailing hint names the closest matching alias or model ID. When nothing is close enough, it reads `Run /model to see available models.` instead. In a session that the [Desktop app](</docs/en/desktop>) starts for you, the no-match hint reads `Switch to a different model.` Claude Code produces this error locally at the moment the switch is requested, before any API request is made. It applies when a model is set through the [Agent SDK](</docs/en/agent-sdk/typescript>) `setModel()` method, by an app such as the [Desktop app](</docs/en/desktop>) that runs the Claude Code CLI for you, or when you pick a model from a device connected through [Remote Control](</docs/en/remote-control>). Before v2.1.260, the check didn’t cover Remote Control picks, so Claude Code applied the pick and the next request failed with There’s an issue with the selected model. **What to do:**
* Run `/model` with no argument to open the picker and choose from the models available to your account, then pass the alias or ID shown there
* If you used an alias that a newer Claude Code version supports, run `claude update`. A full ID that starts with `claude-` passes this local check even when the model is newer than your Claude Code version. The server can still require a minimum version for that model; see Claude Code does not support this model.
@@ -1952,13 +2064,28 @@
+API error when checking the picked model
+
+You picked a model with `/model <name>`, or an app connected to the session requested the switch. The API refused the minimal request Claude Code sends to verify the model, for a reason that has no entry of its own, such as a rate limit or a server error. The session keeps its current model, and the message ends by saying so:
+
+ API error: 429 <the server's explanation> · model not changed
+
+The middle of the message is the HTTP status and the server’s own explanation. **What to do:**
+
+ * Act on the server’s explanation; for a rate limit or a 5xx status, wait and pick the model again
+ * The refusals with their own wording are covered by the surrounding entries, such as Model not found and Model is restricted by your organization’s settings
+
+###
+
+
+
Claude Opus is not available with the Claude Pro plan
Your active subscription plan does not include the model you selected.
Claude Opus is not available with the Claude Pro plan. If you have updated your subscription plan recently, run /logout and /login for the plan to take effect.
-**What to do:**
+In a session the Claude Desktop app runs, the message says to `sign out and sign in again` instead of naming the commands. **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 claude.ai does not take effect in an existing session until you re-authenticate.
@@ -1990,11 +2117,11 @@
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. 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.
+Your organization admin has disabled this model in the claude.ai admin console, or managed settings exclude it through an [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist or a [`deniedModels`](</docs/en/model-config#block-specific-models-or-versions>) list. The notice appears at startup when `--model`, `ANTHROPIC_MODEL`, or the `model` setting named the restricted model, and it names the model the session uses instead. If managed settings leave no permitted model for the session to use, see Managed settings block the default 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.
-A notice prefixed with an agent, skill, or command name means the restriction applied to that [subagent’s requested model](</docs/en/sub-agents#choose-a-model>): the subagent runs on the substituted model and your session’s model is unchanged. Before v2.1.223, Claude Code showed the notice only for subagents launched with the Agent tool. Claude Code treats a model family alias, one of `opus`, `sonnet`, `haiku`, or `fable`, as a request for that family rather than for its newest version. On the Anthropic API and on [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), a restricted family alias resolves to the newest version of the family that your organization and the `availableModels` allowlist permit, and the substitution notice names that version. Claude Code rejects `/model <alias>` only when every version of the family is restricted. Before v2.1.205, a family alias was substituted or rejected based on its newest version alone, even when an older version of the same family was allowed. **What to do:**
+Typing `/model <name>` for a restricted model is rejected and the session keeps its current model. For a model disabled in the admin console, the rejection reads `Model '<name>' is restricted by your organization's settings. Run /model to choose a different model.` For a model that managed settings exclude, it reads `Model '<name>' is not available. Your organization restricts model selection.` A notice prefixed with an agent, skill, or command name means the restriction applied to that [subagent’s requested model](</docs/en/sub-agents#choose-a-model>): the subagent runs on the substituted model and your session’s model is unchanged. Before v2.1.223, Claude Code showed the notice only for subagents launched with the Agent tool. Claude Code treats a model family alias, one of `opus`, `sonnet`, `haiku`, or `fable`, as a request for that family rather than for its newest version. On the Anthropic API and on [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), a restricted family alias resolves to the newest version of the family that your organization’s settings permit, and the substitution notice names that version. Claude Code rejects `/model <alias>` only when every version of the family is restricted. Before v2.1.205, a family alias was substituted or rejected based on its newest version alone, even when an older version of the same family was allowed. **What to do:**
* Run `/model` to pick from the models your organization allows. Restricted models are hidden from the picker.
* If the restricted model was set in `--model`, `ANTHROPIC_MODEL`, the `model` field of a settings file, or the `model` frontmatter of a [subagent](</docs/en/sub-agents#choose-a-model>), skill, or command, remove or update that value so the notice doesn’t recur
@@ -2063,7 +2190,7 @@
API Error: Effort 'xhigh' isn't available with thinking turned off on this model · run /effort high to continue, or turn thinking back on (unset MAX_THINKING_TOKENS=0)
-**What to do:**
+The hint after the `·` varies by session: in a non-interactive session it reads `use --effort high (or the effortLevel setting)`, and in a session the Claude Desktop app runs it reads `you can lower effort to High`. **What to do:**
* [Lower the effort level](</docs/en/model-config#set-the-effort-level>) to `high` or below.
* Turn thinking back on, for example by unsetting [`MAX_THINKING_TOKENS`](</docs/en/env-vars>) or removing [`"alwaysThinkingEnabled": false`](</docs/en/settings-reference#alwaysthinkingenabled>) from your settings.
@@ -2108,6 +2235,21 @@
+Invalid data in redacted_thinking block
+
+The API refused the request with a 400 because it couldn’t accept a `redacted_thinking` block that an earlier turn in the conversation history carries.
+
+ API Error: 400 ... Invalid `data` in `redacted_thinking` block
+
+Claude Code leaves the conversation’s earlier thinking out of the request and retries once, so the session continues without showing the error. Before v2.1.282, Claude Code kept the refused block, and every later turn failed with the same error. **What to do:**
+
+ * If you’re on v2.1.281 or earlier and every turn fails with this error, run `claude update` and resume the session
+ * If the error persists, run `/clear` to start a conversation that doesn’t carry the block
+
+###
+
+
+
Unsupported tool content removed
When Claude Code connects directly to the Anthropic API and loads or previews a saved session, it removes tool content the Anthropic API doesn’t accept and leaves this line where removed content sat between two thinking blocks:
@@ -2144,13 +2286,15 @@
The API refused the request with a 400 because the conversation history holds hosted web-search content it can’t decrypt. The wording names the field it can’t read:
- API Error: 400 messages.21.content.0: Invalid `encrypted_content` in `search_result` block
- API Error: 400 messages.21.content.3.citations.0: Invalid `encrypted_index` in `text` block
- API Error: 400 Failed to decrypt web search result content
-
-Results from the API’s hosted [web search tool](<https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool>) carry encrypted fields that only the API can read. The API refuses a request that replays content it can’t decrypt, such as content produced for a different organization. Claude Code’s own [WebSearch tool](</docs/en/tools-reference#websearch-tool-behavior>) records search results as plain text, so these blocks usually reach a conversation through a proxy or [LLM gateway](</docs/en/llm-gateway>) that ran hosted web search itself. The refused blocks stay in the conversation history, so every later turn and `/compact` fail the same way. **What to do:**
-
- * Run `/clear` or start a new session; the new conversation doesn’t carry the refused blocks
+ API Error: 400 ... Invalid `encrypted_content` in `search_result` block
+ API Error: 400 ... Invalid `encrypted_index` in `text` block
+ API Error: 400 ... Failed to decrypt web search result content
+ API Error: 400 ... Invalid `encrypted_stdout` in `encrypted_code_execution_result` block
+
+Results from the API’s hosted [web search tool](<https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool>) carry encrypted fields that only the API can read. The `encrypted_stdout` wording names the output of a hosted code execution program that read such results, which the API encrypts as well. The API refuses a request that replays content it can’t decrypt, such as content produced for a different organization. Claude Code’s own [WebSearch tool](</docs/en/tools-reference#websearch-tool-behavior>) records search results as plain text, so these blocks usually reach a conversation through a proxy or [LLM gateway](</docs/en/llm-gateway>) that ran hosted web search itself. For the three web search wordings, Claude Code leaves the search calls, results, and citations out of what it sends and retries the request once, so the session continues without showing the error. The `encrypted_stdout` wording has no such recovery, so that message still reaches you. Before v2.1.282, Claude Code kept the refused web search blocks too, and every later turn and `/compact` failed the same way. **What to do:**
+
+ * If you’re on v2.1.281 or earlier and every turn fails with one of the web search wordings, run `claude update` and resume the session
+ * If the error persists, or the message names `encrypted_stdout`, run `/rewind` to step back to a checkpoint before the turn that added the content, or run `/clear` to start a conversation that doesn’t carry it
* If you run Claude Code behind a proxy or gateway, report the error to whoever operates it
###
@@ -2159,7 +2303,7 @@
Usage Policy refusal
-The API declined to respond because content in the conversation triggered a [Usage Policy](<https://www.anthropic.com/legal/aup>) check. The message includes a Request ID you can quote to support if you believe the refusal is incorrect.
+The API declined to respond because content in the conversation triggered a [Usage Policy](<https://www.anthropic.com/legal/aup>) check. The message includes a Request ID and a Message ID you can quote to support if you believe the refusal is incorrect.
API Error: Opus 4.6 can't help with this. Start a new session to continue.
@@ -2257,18 +2401,23 @@
Invalid —agents configuration
-The value you passed to `--agents` is invalid, so `claude` exits with code 1 instead of starting the session. When you pass `--safe-mode`, `--resume`, or `--continue`, or set [`CLAUDE_CODE_SAFE_MODE`](</docs/en/env-vars#variables>), Claude Code doesn’t check the value and starts the session. Before v2.1.242, Claude Code started the session anyway and left out the definitions it couldn’t load.
+The value you passed to `--agents` is invalid, so `claude` exits with code 1 instead of starting the session. When you pass `--safe-mode` or set [`CLAUDE_CODE_SAFE_MODE`](</docs/en/env-vars#variables>), Claude Code ignores `--agents` entirely. With `--resume` or `--continue`, an inline JSON value isn’t checked and the session starts; a value read from a file is checked on every launch. Before v2.1.242, Claude Code started the session anyway and left out the definitions it couldn’t load.
Error: Invalid --agents configuration:
<what failed>
What follows the first line depends on how the value failed. Claude Code runs these checks in order and stops at the first one that fails. If your value has two kinds of problem, you see the second only after you fix the first:
- 1. When the value doesn’t parse as JSON, Claude Code prints one `invalid JSON:` line carrying the JSON parser’s own message
+ 1. When the value begins with `{` but doesn’t parse as JSON, or the contents of an `--agents` file don’t parse, Claude Code prints one `invalid JSON:` line carrying the JSON parser’s own message
2. When it parses but an agent definition doesn’t match the schema for [CLI-defined subagents](</docs/en/sub-agents#choose-the-subagent-scope>), Claude Code prints one line per problem
3. When an agent name starts with `-`, Claude Code prints `<name>: agent names must not start with '-'`
-When there are more than 20 problem lines, Claude Code prints the first 20 and replaces the rest with `…and N more`. **What to do:**
+When there are more than 20 problem lines, Claude Code prints the first 20 and replaces the rest with `…and N more`. With `--print`, `--agents` also accepts [the path to a JSON file](</docs/en/sub-agents#choose-the-subagent-scope>) in place of the inline object. Before v2.1.281, `--agents` accepted only inline JSON and treated a file path as invalid JSON. The file form has refusals of its own, printed in place of this message, including these:
+
+ * **`Error: --agents takes a JSON object, or a file path only with --print (-p)`** : Claude Code read the value as a file path in an interactive session. Pass the definitions as inline JSON, or add `-p` to read them from a file.
+ * **`Error: --agents file not found:<path>`**: no file exists at that path. A value that doesn’t begin with `{` and isn’t valid JSON is read as a path, so inline JSON that your shell mangled can fail this way too. Check the path or the quoting and run the command again.
+
+**What to do:**
* Fix each problem the message lists, then run the command again. See [the fields a CLI-defined subagent takes](</docs/en/sub-agents#choose-the-subagent-scope>).
@@ -2870,6 +3019,24 @@
+Windows reported an error (EBADF) when Claude Code read this session’s transcript file
+
+You resumed a session on Windows, its saved [transcript file](</docs/en/sessions#where-transcripts-are-stored>) opened normally, and reading it then failed with the system error EBADF. The system error doesn’t say why the read failed, so the message suggests likely causes and what to try:
+
+ Windows reported an error (EBADF) when Claude Code read this session's transcript file, although the file had opened normally. This can happen when other software intercepts file reads — security, encryption or endpoint-management tools, for example. If it keeps happening for this conversation, try excluding the folder that holds Claude Code's session transcripts from such software (the .claude folder in your user profile, unless the app or CLAUDE_CONFIG_DIR points Claude Code elsewhere), or adding Claude Code to its allowed applications, then resume again.
+
+The message follows the command’s own failure line, such as `Failed to resume session <session-id>`. A `claude --resume` or [`claude -p`](</docs/en/headless>) command exits with code 1 after showing it. After `/resume` inside a session, your current session keeps running. **What to do:**
+
+ * Exclude the folder that holds your session transcripts from software that scans or intercepts file reads, such as security, encryption, or endpoint-management tools. Transcripts live under `%USERPROFILE%\.claude\projects` by default, or under the directory [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>) names
+ * If you can’t add an exclusion, add Claude Code to that software’s allowed applications instead
+ * Resume the session again
+
+Before v2.1.282, the failure came with no explanation: `claude --resume <session-id>` ended at `Failed to resume session <session-id>`, and a `-p` run printed only the system error text, such as `Failed to resume session: EBADF: bad file descriptor, read`.
+
+###
+
+
+
Cannot switch renderers in this session
When you switch renderers, Claude Code restarts its process. You ran [`/tui`](</docs/en/fullscreen#enable-fullscreen-rendering>) in a session Claude Code declines to restart, so it doesn’t switch and saves nothing. Which message you see tells you the cause:
@@ -3259,6 +3426,22 @@
* If Claude should be able to change the file, remove or narrow the `Read` deny rule in `/permissions` or in [settings](</docs/en/settings-reference#permission-settings>)
* If the file must stay untouched, keep the rule and add an `Edit` deny rule for the same path to block the NotebookEdit tool too
+
+###
+
+
+
+Path cannot contain null bytes
+
+A file tool call’s path or pattern argument contained a null byte, which file systems and search tools can’t accept. Read, Write, Edit, NotebookEdit, Glob, and Grep check for this, and the message names the tool and the argument:
+
+ Read file_path cannot contain null bytes (\0). Remove the null byte and try again.
+
+The tool call fails, Claude sees the error, and the turn continues. **What to do:**
+
+ * Nothing on your side: the error is returned to Claude as the tool’s result, and the message itself tells Claude to remove the null byte and try again
+
+Before v2.1.281, a null byte in a Read, Write, Edit, or NotebookEdit path ended the whole turn with an error naming `Path contains null bytes`, and the tool never ran.
###
@@ -3467,6 +3650,28 @@
+Disk quota or temp filesystem is full
+
+Claude Code saves each Bash and PowerShell command’s output to a file under its temp directory. When a command exits with a nonzero code and no output at all, Claude Code checks whether the filesystem holding that file is out of space or inodes, or whether your disk quota on it is used up. If so, a diagnostic appears in the command’s result in place of the empty output:
+
+ Your disk quota is full on the filesystem with Claude Code's temp directory /private/tmp/claude-501/-Users-you-my-project/1f0e62dc-4b0a-4f5e-9c2d-8a7b6c5d4e3f/tasks (EDQUOT), so any output this command printed was lost, and it may have failed because it could not write. Delete files you no longer need there, or restart Claude Code with CLAUDE_CODE_TMPDIR set to a directory on another filesystem.
+
+The message names what ran out:
+
+ * `Your disk quota is full ... (EDQUOT)`: your own quota on that filesystem is used up. A quota can be full while the filesystem still shows free space
+ * `The filesystem with Claude Code's temp directory ..., or your disk quota on it, is full (ENOSPC)`: the filesystem, or your quota on it, has no space left
+ * `Command output was lost: the temp filesystem at ... is full` or `... is out of inodes`: the filesystem has almost no free space left, or is running out of inodes
+
+**What to do:**
+
+ * Delete files you no longer need on the filesystem that holds Claude Code’s temp directory. For `EDQUOT`, delete files that count against your own quota. For `out of inodes`, delete many files rather than a few large ones, since each file takes one inode whatever its size
+ * Or restart Claude Code with [`CLAUDE_CODE_TMPDIR`](</docs/en/env-vars>) set to a directory on a filesystem with room
+ * Then have Claude run the command again. The output it printed was lost, not truncated
+
+###
+
+
+
The source file is not valid UTF-8 text
Claude tried to publish an [artifact](</docs/en/artifacts>) from a file whose bytes don’t decode as text, or whose text already contains the replacement character `U+FFFD`, so Claude Code refused the publish before uploading anything. The message appears in the Artifact tool result and names the first position to fix:
@@ -3814,13 +4019,34 @@
Working directory no longer exists when starting a background session
-You tried to start a [background session](</docs/en/agent-view>) in a directory that doesn’t exist anymore. This happens when you dispatch from agent view or run `/background` after the directory you’re working in was deleted or moved. It also happens when you attach to or restart a session whose process has exited and whose directory is gone, because the new process would start in that same directory. Claude Code doesn’t start the session, and the message names the missing directory:
+You tried to start a [background session](</docs/en/agent-view>) in a directory that doesn’t exist anymore. Claude Code doesn’t start the session, and the message names the missing directory:
Couldn't start a background session (working directory no longer exists or is not accessible: /tmp/demo)
Before v2.1.257, the session appeared to start and then showed in agent view as a failed row with the same reason. **What to do:**
* Recreate the directory the message names, or dispatch from a directory that exists, then try again
+
+###
+
+
+
+Workspace not trusted when dispatching a background session
+
+You started or restarted a [background session](</docs/en/agent-view>) in a directory you haven’t [trusted](</docs/en/permissions#project-allow-rules-and-workspace-trust>), and the workspace trust dialog couldn’t appear to ask you. Claude Code doesn’t start the session:
+
+ Workspace not trusted. Run `claude` in /path/to/project once and accept the trust prompt, then retry.
+
+From a terminal in the session’s own directory, the same command shows the trust dialog instead and starts the session once you accept. This message appears where no dialog can, such as in a script, or when you restart a session from a directory other than its own. Two variants name a different cause:
+
+ * **`The home directory is trusted one session at a time`** : the session’s directory is your home directory. Claude Code never saves trust for the home directory, so accepting the dialog there in an earlier session doesn’t count.
+ * **`<path> could not be resolved on disk`**: Claude Code couldn’t find the session’s directory on disk.
+
+**What to do:**
+
+ * Run `claude` in the directory the message names and accept the trust dialog, then run the command again
+ * For the home-directory message, run the command from a terminal in your home directory so the dialog can appear, or start the session from a project directory instead
+ * For the `could not be resolved on disk` message, recreate the directory, or start a new session from a directory that exists
##
@@ -4050,6 +4276,22 @@
+A skill, command, or workflow wasn’t loaded because its name is reserved
+
+A skill folder, a frontmatter `name`, a file or subfolder in `.claude/commands/`, or a [saved workflow](</docs/en/workflows#save-the-workflow-for-reuse>) uses the name `anthropic-skills` or a name that starts with `anthropic-skills:`. Claude Code [reserves that name for skills synced from claude.ai](</docs/en/skills#names-reserved-for-synced-skills>) and doesn’t load that item. Claude Code shows this warning as a startup notice in the conversation view rather than on stderr:
+
+ Not loaded: rename .claude/skills/anthropic-skills, then restart — its name uses "anthropic-skills", a name reserved for the skills synced from your claude.ai account
+
+The notice names what to change for the first item it refused: a folder or file to rename, a `name:` line to edit, or a workflow to rename. When more than one item was refused, the notice ends with a count such as `· 2 more`, and the [debug log](</docs/en/debug-your-config>) names each one. **What to do:**
+
+ * Rename the item the notice names, or edit the `name:` line it points to, then restart the session.
+
+Before v2.1.282, Claude Code loaded skills and commands with these names.
+
+###
+
+
+
Workspace has not been trusted
Claude Code found `permissions.allow` rules or `permissions.additionalDirectories` entries in the project’s `.claude/settings.json` or `.claude/settings.local.json` and didn’t apply them, because [allow rules from project settings require workspace trust](</docs/en/permissions#project-allow-rules-and-workspace-trust>). The count, the setting name, and the file named in the message vary with your configuration. `deny` and `ask` rules aren’t affected.
@@ -4092,7 +4334,7 @@
Remote managed settings failed to load
-Your session is eligible for [server-managed settings](</docs/en/server-managed-settings>), but Claude Code couldn’t fetch them, so it shows this warning in interactive sessions. The parenthesized cause names what failed, such as `network error`, `request timed out`, or `authentication rejected (401)`, and the rest of the line says which policy the session runs on:
+Your session is eligible for [server-managed settings](</docs/en/server-managed-settings>), but Claude Code couldn’t fetch them or couldn’t apply what the server returned, so it shows this warning in interactive sessions. The parenthesized cause names what failed, such as `network error`, `request timed out`, or `authentication rejected (401)`. The cause `no setting in the server response could be applied as written` means the server answered but none of the settings it returned passed [validation](</docs/en/server-managed-settings#invalid-entries-in-delivered-settings>). Before v2.1.282, this cause read `server returned invalid settings`. The rest of the line says which policy the session runs on:
* **Settings cached from an earlier successful fetch** : Claude Code runs the session on that cached policy, except the [withheld environment variables](</docs/en/server-managed-settings#fetch-and-caching-behavior>), and the line reads `using cached policy`.
* **No cache** : Claude Code runs the session without server-managed settings, and the line reads `no remote policy applied`.
@@ -4100,6 +4342,7 @@
**What to do:**
* Act on the cause the message names: for a network cause, check that this machine can reach `api.anthropic.com`; for an authentication cause, check your sign-in with `/status`
+ * For `no setting in the server response could be applied as written`, ask your administrator to correct the settings on the server
* Run `/status` or `claude doctor` for the full diagnostic
Before v2.1.248, Claude Code reported a failed settings fetch only in the debug log.
@@ -4118,6 +4361,25 @@
* Start Claude Code again and approve the dialog to continue under your organization’s settings. A declined dialog isn’t remembered, so it appears again at the next start.
* If you’re unsure about a setting the dialog lists, ask whoever maintains your organization’s managed settings before approving
+
+###
+
+
+
+Managed settings block the default model
+
+Your organization’s [managed settings](</docs/en/managed-settings>) block the model the Default option resolves to and every model it could step down to. A session that would start on the Default option exits at startup instead of running a blocked model. Which message you see depends on the setting that blocks it. When a [`deniedModels`](</docs/en/model-config#block-specific-models-or-versions>) list blocks it, the message reads:
+
+ Claude Code can't start: your organization's managed settings block the default model (claude-opus-5-5) in "deniedModels", and none of the models they allow can be used as the default instead. Ask your administrator to update "deniedModels" or "availableModels".
+
+When an `availableModels` list with [`availableModelsMatch`](</docs/en/settings-reference#availablemodelsmatch>) set to `"exact"` omits it, the message reads:
+
+ Claude Code can't start: your organization allows only the models listed in "availableModels", and none of them can be used as the default model (claude-opus-5-5 isn't listed). Ask your administrator to update "availableModels".
+
+**What to do:**
+
+ * If you administer the settings, add a model your users can run to `availableModels`, or narrow the `deniedModels` entries that block every fallback. [Block specific models or versions](</docs/en/model-config#block-specific-models-or-versions>) describes how the Default option steps down
+ * If you don’t administer them, send the message to your administrator. Your own settings files can’t widen a managed `availableModels` or `deniedModels` list
###
--- a/feature-availability.md
+++ b/feature-availability.md
@@ -89,7 +89,7 @@
[Server-managed settings](</docs/en/server-managed-settings>)| ✓ (Team and Enterprise)| ✓ (Team and Enterprise)| ✗| ✗| ✗| ✗
[Zero Data Retention](</docs/en/zero-data-retention>)| ✓ (qualified Enterprise accounts)| ✓ (qualified accounts)| See note 3| ✓ (qualified accounts)| See note 3| See note 3
1 On Google Cloud’s Agent Platform, web search is available for Claude 4 models and later.
-2 On these providers, auto mode supports only Claude Sonnet 5, Opus 4.7 or later, and 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.
+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>). For the permission mode a session on these providers starts in, 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 [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>).
--- a/fullscreen.md
+++ b/fullscreen.md
@@ -86,8 +86,10 @@
* **Click an option in a multi-select menu** to toggle it, and click the submit button to confirm your choices. Clicking a free-text row, such as the `Other` row in a multiple-choice question, focuses its input field so you can type an answer. Requires Claude Code v2.1.208 or later.
* **Click a setting’s value in the`/config` panel** to change it, and scroll the settings list with the mouse wheel. Requires Claude Code v2.1.271 or later.
* **Scroll a select or multi-select menu with the mouse wheel** when it has more options than it shows at once, such as the `/model` list in a short terminal window. The wheel scrolls the list while the pointer is over its options. Requires Claude Code v2.1.280 or later.
+ * **Scroll an overflowing list with its scrollbar.** In list panels such as `/skills`, `/mcp`, and `/plugin`’s Installed list, a scrollbar appears beside a list with more rows than fit while the pointer is over it. Click the track to jump to that point, or drag the thumb. Requires Claude Code v2.1.281 or later.
* **Click a collapsed tool result** to expand it and see the full output. Click again to collapse. The tool call and its result expand together. Only messages that have more to show are clickable.
* Clicking also expands the output of a `!` shell command, whether an older truncated result or the live progress row while the command runs. Requires Claude Code v2.1.257 or later.
+ * Clicking also expands a dim `Message from @<sender>` line when the sender is a [teammate](</docs/en/agent-teams>) or another agent running in your session. The line for a message from [one of your other sessions](</docs/en/cross-session-messaging#what-a-message-looks-like>) also shows the message’s first line and isn’t clickable, so press `Ctrl+o` to read that one.
* **Hold`Cmd` on macOS, or `Ctrl` on Linux and Windows, and click a URL or file path** to open it. Plain `http://` and `https://` URLs open in your browser, and file paths in tool output, like the ones printed after an Edit or Write, open in your default application. A plain click without the modifier doesn’t open links, matching native terminal behavior.
* Claude Code renders a network (UNC) path, such as `\\server\share\file.ts`, as plain text with no link, because opening a network path can send your Windows credentials to the host it names.
* Some macOS terminals forward `Cmd`+click to the running app instead of opening the link themselves, and the terminal mouse protocol has no way to encode the `Cmd` key, so Claude Code receives a plain click. In Ghostty, and in Warp on macOS, Claude Code detects this and lets a plain click on a link open it, and holding `Cmd` still works.
@@ -230,7 +232,7 @@
CLAUDE_CODE_NO_FLICKER=1 CLAUDE_CODE_DISABLE_MOUSE=1 claude
-With mouse capture disabled, keyboard scrolling with `PgUp`, `PgDn`, `Ctrl+Home`, and `Ctrl+End` still works, and your terminal handles selection natively. You lose click-to-position-cursor, click-to-expand tool output, URL clicking, and wheel scrolling inside Claude Code. To keep wheel scrolling but turn off click, drag, and hover handling, set `CLAUDE_CODE_DISABLE_MOUSE_CLICKS=1` instead. Requires Claude Code v2.1.195 or later. `CLAUDE_CODE_DISABLE_MOUSE` takes precedence when both variables are set. With clicks disabled, Claude Code still captures the mouse, so the wheel and touchpad scroll the conversation but left clicks do nothing inside Claude Code. You still need to hold your terminal’s key for native click-and-drag selection. Right-click and middle-click paste continue to work on terminals that support them.
+With mouse capture disabled, keyboard scrolling with `PgUp`, `PgDn`, `Ctrl+Home`, and `Ctrl+End` still works, and your terminal handles selection natively. You lose click-to-position-cursor, click-to-expand, URL clicking, and wheel scrolling inside Claude Code. To keep wheel scrolling but turn off click, drag, and hover handling, set `CLAUDE_CODE_DISABLE_MOUSE_CLICKS=1` instead. Requires Claude Code v2.1.195 or later. `CLAUDE_CODE_DISABLE_MOUSE` takes precedence when both variables are set. With clicks disabled, Claude Code still captures the mouse, so the wheel and touchpad scroll the conversation but left clicks do nothing inside Claude Code. You still need to hold your terminal’s key for native click-and-drag selection. Right-click and middle-click paste continue to work on terminals that support them.
##
--- a/github-enterprise-server.md
+++ b/github-enterprise-server.md
@@ -256,7 +256,7 @@
Session start fails with `Unable to get organization UUID`
-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`.
+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`.
##
--- a/glossary.md
+++ b/glossary.md
@@ -68,7 +68,7 @@
Auto mode
-A permission mode where a separate classifier model reviews actions instead of you, so Claude Code runs most of them without asking you. Claude Code still asks you before actions your explicit ask rules match. On Pro, Max, and Team plans, auto mode is the [built-in starting permission mode](</docs/en/permission-modes#which-mode-a-session-starts-in>) for interactive terminal and VS Code sessions. The classifier blocks scope escalation, untrusted infrastructure, and prompt injection. Tool results are stripped from what it sees, so hostile content in a file or web page can’t manipulate it directly. Learn more: [Eliminate prompts with auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>)
+A permission mode where a separate classifier model reviews actions instead of you, so Claude Code runs most of them without asking you. Claude Code still asks you before actions your explicit ask rules match. With Claude Code v2.1.283 or later, auto mode is the [built-in starting permission mode](</docs/en/permission-modes#which-mode-a-session-starts-in>) for interactive terminal and VS Code sessions, and on earlier versions only on Pro, Max, and Team plans. The classifier blocks scope escalation, untrusted infrastructure, and prompt injection. Tool results are stripped from what it sees, so hostile content in a file or web page can’t manipulate it directly. Learn more: [Eliminate prompts with auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>)
##
--- a/goal.md
+++ b/goal.md
@@ -139,7 +139,7 @@
If a turn fails on an error that won’t clear until you fix it, Claude Code clears the goal and prints a warning naming the cause. The warning starts with `Goal cleared after an unrecoverable error` and ends with `Run /goal again to continue`. Fix the cause, then set the goal again with `/goal <condition>`. Four kinds of failure clear the goal:
- * An authentication failure, when Claude Code manages its own credentials. When a host manages them for you, such as the desktop app, the VS Code extension, or a [cloud session](</docs/en/claude-code-on-the-web>), Claude Code leaves the goal active because the host restores access on its own.
+ * An authentication failure, when Claude Code manages its own credentials. When a host manages them for you, such as the desktop app or a [cloud session](</docs/en/claude-code-on-the-web>), Claude Code leaves the goal active because the host restores access on its own.
* An exhausted credit balance
* A context overflow that [auto-compaction](</docs/en/model-config#set-the-auto-compact-window>) couldn’t clear
* A model that isn’t available
--- a/headless.md
+++ b/headless.md
@@ -63,7 +63,15 @@
* **Running a command** : Claude Code records the command as killed in the session.
* **Waiting for an answer to a permission prompt** : if you send SIGTERM to the process, Claude Code leaves the prompt unanswered. If your program closes the session through the Agent SDK, the SDK ends Claude Code’s input before sending any signal, and Claude Code cancels the prompt as soon as the input ends.
-When you resume the session, Claude Code continues the turn that SIGTERM left unfinished.
+When you resume the session, Claude Code leaves the interrupted turn as it is, and your next prompt drives the conversation. To have Claude Code continue the interrupted turn on resume instead, set [`CLAUDE_CODE_RESUME_INTERRUPTED_TURN=1`](</docs/en/env-vars>).
+
+###
+
+
+
+If the working directory is deleted
+
+If the working directory of a `claude -p` or Agent SDK session is deleted mid-session, the session keeps running. When a turn starts while the directory is missing, Claude Code emits a [warning message](</docs/en/agent-sdk/typescript#sdkinformationalmessage>) in `stream-json` output, and shell commands fail until the directory exists again.
##
@@ -215,9 +223,9 @@
Field| Type| Description
---|---|---
`plugins`| array| plugins that loaded successfully, each with `name` and `path`
-`plugin_errors`| array| plugin load-time errors, each with `plugin`, `type`, and `message`. Includes unsatisfied dependency versions and `--plugin-dir` load failures such as a missing path or invalid archive. Affected plugins are demoted and absent from `plugins`. The key is omitted when there are no errors
-
-Use the MCP server fields the same way. When you pass [`--mcp-config`](</docs/en/cli-reference#cli-flags>) with `-p`, Claude Code waits for still-pending servers before running the first turn, up to the [`MCP_TIMEOUT`](</docs/en/env-vars>) startup timeout, 30 seconds by default. A remote server with a [cached tool list](</docs/en/agent-sdk/mcp#connection-timing>) skips the wait, shows `pending` in `system/init`, and connects on its first tool call. The wait requires Claude Code v2.1.221 or later. Claude Code validates each `--mcp-config` entry at startup and skips entries that fail validation, for example a `url` entry with no `type`. The run continues and exits cleanly, so check these fields to catch a server that never loaded:
+`plugin_errors`| array| plugin load-time errors, each with `plugin`, `type`, and `message`. Includes unsatisfied dependency versions and `--plugin-dir` load failures such as a missing path or invalid archive. A plugin that didn’t load is absent from `plugins`. The key is omitted when there are no errors
+
+When a `--plugin-dir` directory or archive itself fails to load, its `plugin_errors` entry includes the resolved absolute path as `path`. Use it to tell which of several `--plugin-dir` values failed. The `path` field requires Claude Code v2.1.283 or later. Use the MCP server fields the same way. When you pass [`--mcp-config`](</docs/en/cli-reference#cli-flags>) with `-p`, Claude Code waits for still-pending servers before running the first turn, up to the [`MCP_TIMEOUT`](</docs/en/env-vars>) startup timeout, 30 seconds by default. A remote server with a [cached tool list](</docs/en/agent-sdk/mcp#connection-timing>) skips the wait, shows `pending` in `system/init`, and connects on its first tool call. The wait requires Claude Code v2.1.221 or later. Claude Code validates each `--mcp-config` entry at startup and skips entries that fail validation, for example a `url` entry with no `type`. The run continues and exits cleanly, so check these fields to catch a server that never loaded:
Field| Type| Description
---|---|---
--- a/host-marketplace.md
+++ b/host-marketplace.md
@@ -81,10 +81,10 @@
On a Team or Enterprise plan, you can also distribute the marketplace through [**Organization settings > Plugins & skills**](<https://claude.ai/admin-settings/skills?tab=inventory>) on claude.ai instead of hosting it somewhere users add it themselves. Organization sync reads the repository through your organization’s GitHub or GitLab connection on claude.ai, so your users’ git credentials aren’t involved. Organization sync is stricter about the repository than `/plugin marketplace add` is:
* **Marketplace repository** : on github.com and gitlab.com, it must be private or internal
- * **Plugin sources** : each plugin source must be of type `github`, `url`, or `git-subdir`, or a [relative path](</docs/en/plugins/marketplace-reference#relative-path-plugin-source>) that starts with `./`
+ * **Plugin sources** : organization sync accepts only some [source types](</docs/en/plugins/marketplace-reference#plugin-sources>)
* **Top-level`bin/` directory**: claude.ai rejects a plugin that has one and syncs the rest of the marketplace. The error message starts with `Plugin contains a top-level bin/ directory`. Keep executables in another directory, such as `scripts/`, and reference them as `${CLAUDE_PLUGIN_ROOT}/scripts/<name>` from your hooks or MCP server configs
-See [Manage plugins for your organization](<https://support.claude.com/en/articles/13837433>) for the admin workflow.
+[Sync your organization’s plugins from a repository](<https://claude.com/docs/plugins/org-sync>) on claude.com lists the accepted sources, the GitLab setup, and the `bin/` error, and [Manage plugins for your organization](<https://claude.com/docs/plugins/admin>) covers the admin workflow.
##
@@ -103,7 +103,7 @@
* **SSH** : the key must work without a passphrase prompt, for example because it’s loaded in `ssh-agent`. The host must already be in `known_hosts`.
* **HTTPS** : Claude Code leaves the user’s git credential helper enabled but forbids it from prompting. A credential the helper already stores works; one it would have to ask for fails. On GitHub, `gh auth login` followed by `gh auth setup-git` stores one.
-For a GitHub Enterprise Server host, users need git access to that host from their machine. See [Plugin marketplaces on GHES](</docs/en/github-enterprise-server#plugin-marketplaces-on-ghes>) for what each Claude Code surface needs to reach a GHES-hosted marketplace. If you distribute through **Organization settings > Plugins & skills** on claude.ai instead, your users’ git credentials aren’t involved. See Distribute through organization settings for which plugin sources can be private there.
+For a GitHub Enterprise Server host, users need git access to that host from their machine. See [Plugin marketplaces on GHES](</docs/en/github-enterprise-server#plugin-marketplaces-on-ghes>) for what each Claude Code surface needs to reach a GHES-hosted marketplace. If you distribute through **Organization settings > Plugins & skills** on claude.ai instead, your users’ git credentials aren’t involved. See Distribute through organization settings.
###
--- a/hosting.md
+++ b/hosting.md
@@ -101,7 +101,12 @@
Long-running sessions
-Run persistent container instances, often hosting multiple SDK processes per container, to serve ongoing work. Best for agents that take autonomous action, serve content, or handle high-volume message streams. Example workloads include an email agent that triages and responds to incoming mail, a site builder that hosts a per-user editable site through container ports, and a chat bot that handles continuous traffic from a platform like Slack. The container exposes an HTTP or WebSocket endpoint and maps each active session to a long-lived query and the subprocess behind it. In TypeScript, use [`streamInput()`](</docs/en/agent-sdk/typescript#query-object>) to add turns to an active session and [`startup()`](</docs/en/agent-sdk/typescript#startup>) to pre-warm subprocesses ahead of incoming traffic. In Python, use [`ClaudeSDKClient`](</docs/en/agent-sdk/python#claudesdkclient>) to hold a session open across turns. Size the container so it can hold the maximum number of concurrent sessions in memory.
+Run persistent container instances, often hosting multiple SDK processes per container, to serve ongoing work. Best for agents that take autonomous action, serve content, or handle high-volume message streams. Example workloads include an email agent that triages and responds to incoming mail, a site builder that hosts a per-user editable site through container ports, and a chat bot that handles continuous traffic from a platform like Slack. The container exposes an HTTP or WebSocket endpoint and maps each active session to a long-lived query and the subprocess behind it. The calls that keep sessions open and warm differ between the SDKs:
+
+ * **TypeScript** : use [`streamInput()`](</docs/en/agent-sdk/typescript#query-object>) to add turns to an active session. Call [`startup()`](</docs/en/agent-sdk/typescript#startup>) to pre-warm subprocesses ahead of incoming traffic. If you don’t know a session’s working directory until its first request arrives, pre-warm with [`prewarm()`](</docs/en/agent-sdk/typescript#prewarm>) instead.
+ * **Python** : use [`ClaudeSDKClient`](</docs/en/agent-sdk/python#claudesdkclient>) to hold a session open across turns.
+
+Size the container so it can hold the maximum number of concurrent sessions in memory.
###
--- a/how-claude-code-works.md
+++ b/how-claude-code-works.md
@@ -162,7 +162,7 @@
Choose a permission mode to set what Claude can do without asking you. Press `Shift+Tab` to cycle through the permission modes:
- * **Auto** : a classifier reviews most actions in the background and blocks the risky ones instead of asking you. On Pro, Max, and Team plans, it’s the [built-in starting permission mode](</docs/en/permission-modes#which-mode-a-session-starts-in>) for interactive terminal and VS Code sessions
+ * **Auto** : a classifier reviews most actions in the background and blocks the risky ones instead of asking you. With Claude Code v2.1.283 or later, it’s the [built-in starting permission mode](</docs/en/permission-modes#which-mode-a-session-starts-in>) for interactive terminal and VS Code sessions, and on earlier versions only on Pro, Max, and Team plans
* **Manual** : Claude asks before file edits and shell commands
* **Accept edits** : Claude edits files and runs common filesystem commands like `mkdir` and `mv` without asking, still asks for other commands
* **Plan** : Claude explores and proposes a plan without editing your source files
@@ -215,7 +215,7 @@
You can redirect Claude at any point without starting over. Do either of these:
* **Press`Esc`** to stop Claude immediately. The running tool call is canceled and Claude waits for your next instruction. If you have messages queued, Claude Code [sends them next](</docs/en/interactive-mode#queue-messages-while-claude-works>).
- * **Type a correction and press`Enter`** without stopping Claude. The message shows as queued above the input box. If Claude is running tool calls, it reads the message as soon as those calls finish, within the same turn, and adjusts before its next step. [Queue messages while Claude works](</docs/en/interactive-mode#queue-messages-while-claude-works>) covers when other queued entries are sent.
+ * **Type a correction and press`Enter`** without stopping Claude. The message shows as queued in the conversation. If Claude is running tool calls, it reads the message as soon as those calls finish, within the same turn, and adjusts before its next step. [Queue messages while Claude works](</docs/en/interactive-mode#queue-messages-while-claude-works>) covers when other queued entries are sent.
###
--- a/install.md
+++ b/install.md
@@ -137,7 +137,7 @@
A plugin’s install scope decides who gets the plugin and which settings file records it as enabled:
* **User scope** : the plugin is enabled for you in every project on this machine. The entry goes in `enabledPlugins` in `~/.claude/settings.json`.
- * **Project scope** : the plugin is enabled for everyone who works in this repository. The entry goes in `.claude/settings.json`, which you commit.
+ * **Project scope** : the plugin is enabled for everyone who works in this repository. The entry goes in `.claude/settings.json`, which you commit. Committing that entry turns the plugin on for your collaborators but doesn’t download it to their machines, so each collaborator also runs `claude plugin install <name>@<marketplace> --scope project` once; see [Enabled in project settings but not installed](</docs/en/plugins/loading#enabled-in-project-settings-but-not-installed>).
* **Local scope** : the plugin is enabled for you in this repository only. The entry goes in `.claude/settings.local.json`.
Some plugins are set by their author to start turned off, through the [`defaultEnabled`](</docs/en/plugins/manifest-reference#defaultenabled>) field. Such a plugin is installed but stays off until you turn it on with `claude plugin enable <name>` in your shell, or from the **Installed** tab of `/plugin` in a session. When the same plugin is set at several scopes, the local setting overrides the project setting, and the project setting overrides the user setting. See [Find where a plugin is enabled](</docs/en/plugins/loading#find-where-a-plugin-is-enabled>) for the full rule. The terminal, the desktop app’s local sessions, and the VS Code extension on one computer read the same settings files, so a plugin you install at user scope in any of them is available in the other two.
--- a/interactive-mode.md
+++ b/interactive-mode.md
@@ -26,10 +26,10 @@
`Ctrl+T`| Toggle Claude’s task checklist| Show or hide Claude’s to-do checklist in the status area. This is not the background-task view; use [`/tasks`](</docs/en/commands>) to see running shells and subagents
`Ctrl+S`| Stash or restore prompt| With text in the input, stashes it and clears the prompt. Pressed again on an empty prompt, restores the stashed text, cursor position, pasted content, and input mode, so a stashed `!` shell command comes back in shell mode
`Ctrl+Z`| Suspend Claude Code| Unix only. Suspends the process to your shell; run `fg` to resume
-`Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus
+`Left/Right arrows`| Cycle through dialog tabs| Navigate between tabs in permission dialogs and menus. In a tabbed dialog, the keys switch tabs while the tab row has focus. See [Tabs actions](</docs/en/keybindings#tabs-actions>) for how focus moves
`Tab`| Accept an autocomplete suggestion, or add a comment to a permission answer| While autocomplete suggestions are showing in the prompt input, accepts the selected suggestion. On most permission prompts, with **Yes** or **No** focused, opens a comment field on that option, and pressing it again closes the field. See [add a comment when you answer a permission prompt](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>)
`Up/Down arrows` or `Ctrl+P`/`Ctrl+N`| Move cursor or navigate command history| When the input spans more than one visual row, whether wrapped or multiline, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history. While you have messages queued, `Up` from the first row instead takes them back
-`Esc`| Interrupt Claude, or close a dialog| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. If you have messages queued, Claude Code sends them next. When a dialog is open, `Esc` closes the dialog. On a permission prompt, `Esc` declines the action, the same as [**No** without a comment](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>)
+`Esc`| Interrupt Claude, or close a dialog| Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. If you have messages queued, Claude Code sends them next. When a dialog is open, `Esc` closes the dialog. While a footer item is selected, such as a row in the [subagent panel](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) below the prompt, `Esc` [deselects it](</docs/en/keybindings#footer-actions>) instead of interrupting. On a permission prompt, `Esc` declines the action, the same as [**No** without a comment](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>)
`Esc` \+ `Esc`| Clear input draft, or rewind| When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](</docs/en/checkpointing>) to restore or summarize code and conversation from a previous point
`Ctrl+Enter` or `Ctrl+X Ctrl+S`| Send queued messages now| Sends your queued messages, and your draft with them, right away. When Claude Code sends what you queued covers what happens to the turn Claude is working on. In shell mode, the key only queues your command. In terminals that don’t report extended keys, `Ctrl+Enter` arrives as plain `Enter`; `Ctrl+X Ctrl+S` works in any terminal. Requires Claude Code v2.1.275 or later
`Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn’t enable VT input mode| Cycle permission modes| Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and, when available, `bypassPermissions` and then `auto`. From `auto`, the first press switches to `default`. See [permission modes](</docs/en/permission-modes>). On a file permission prompt, the same key closes an open [comment field](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>). With no field open, it selects the option that allows the action for the rest of the session, when the prompt offers that option
@@ -229,10 +229,14 @@
Command| Action
---|---
`x`| Delete character
+`r{char}`| Replace character under cursor with `{char}`
`dd`| Delete line
`D`| Delete to end of line
`dw`/`de`/`db`| Delete word/to end/back
`df{char}`/`dt{char}`| Delete to and including, or up to, the next occurrence of a character
+`dj`/`dk`| Delete the current line and the line below or above
+`dgg`/`dG`| Delete from the current line to the first or last line
+`d0`/`c0`/`y0`| Delete, change, or yank from the cursor back to the beginning of the line. Requires Claude Code v2.1.281 or later
`cc`| Change line
`C`| Change to end of line
`cw`/`ce`/`cb`| Change word/to end/back
@@ -344,7 +348,7 @@
* Prompt Claude Code to run a command in the background
* Press `Ctrl+B` to move a regular Bash tool invocation to the background. Tmux users must press `Ctrl+B` twice due to tmux’s prefix key.
-**Key features:**
+When a command reaches its timeout before it finishes, Claude Code automatically [moves it to the background](</docs/en/tools-reference#background-commands>) instead of stopping it, unless the command starts with `sleep`. To change how long commands run before that happens, set the [Bash timeout environment variables](</docs/en/tools-reference#timeout-and-output-limits>). **Key features:**
* Output is written to a file and Claude can retrieve it using the Read tool
* Background tasks have unique IDs for tracking and output retrieval
@@ -395,7 +399,7 @@
Queue messages while Claude works
-Type a message and press `Enter` while Claude is working. Claude Code queues the message instead of interrupting the turn, and lists the queued entries above the input box until it sends them. You can queue `!` shell commands and most [commands](</docs/en/commands>) the same way, apart from the commands, such as `/status`, that Claude Code runs as soon as you send them. Sent and queued messages show in gray until Claude starts responding to them, so you can tell which messages Claude hasn’t started on yet.
+Type a message and press `Enter` while Claude is working. Claude Code queues the message instead of interrupting the turn, and lists the queued entries in the conversation until it sends them. You can queue `!` shell commands and most [commands](</docs/en/commands>) the same way, apart from the commands, such as `/status`, that Claude Code runs as soon as you send them. Sent and queued messages show in gray until Claude starts responding to them, so you can tell which messages Claude hasn’t started on yet. If you queue a message with a selection attached from a [connected IDE](</docs/en/vs-code#the-built-in-ide-mcp-server>) or the diff panel, it keeps the selection you had when you pressed `Enter`, whatever you select afterward.
###
--- a/jetbrains.md
+++ b/jetbrains.md
@@ -265,7 +265,7 @@
The built-in IDE MCP server
-When the plugin is active, it runs a local MCP server that the CLI connects to automatically. This is how the CLI opens diffs in the IDE’s native diff viewer, reads your current selection for `@`-mentions, and lets Claude read inspection diagnostics. The server is named `ide` and is hidden from `/mcp` because there’s nothing to configure. If your organization uses a [`PreToolUse` hook](</docs/en/hooks#pretooluse>) 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. **Transport and authentication.** The server listens on an OS-assigned ephemeral port, and the port is not configurable. The transport is unencrypted `ws://`; on loopback, any process that could capture the traffic can also read the token from the lock file, so TLS would not add protection against a local attacker. Each IDE start 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. 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 several tools, but only one is visible to the model. The rest are internal RPC the CLI uses for its own UI, such as opening diffs and reading selections, and are filtered out before the tool list reaches Claude.
+When the plugin is active, it runs a local MCP server that the CLI connects to automatically. This is how the CLI opens diffs in the IDE’s native diff viewer, reads your current selection for `@`-mentions, and lets Claude read inspection diagnostics. The server is named `ide` and is hidden from `/mcp` because there’s nothing to configure. If your organization uses a [`PreToolUse` hook](</docs/en/hooks#pretooluse>) 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. If you [queue a message while Claude works](</docs/en/interactive-mode#queue-messages-while-claude-works>), it keeps the selection you had when you pressed `Enter`, whatever you select afterward. 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. **Transport and authentication.** The server listens on an OS-assigned ephemeral port, and the port is not configurable. The transport is unencrypted `ws://`; on loopback, any process that could capture the traffic can also read the token from the lock file, so TLS would not add protection against a local attacker. Each IDE start 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. 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 several tools, but only one is visible to the model. The rest are internal RPC the CLI uses for its own UI, such as opening diffs and reading selections, and are filtered out before the tool list reaches Claude.
Tool name (as seen by hooks)| What it does| Read-only
---|---|---
--- a/keybindings.md
+++ b/keybindings.md
@@ -168,7 +168,7 @@
`confirm:toggle`| Space| Toggle selection
`confirm:cycleMode`| Shift+Tab*| Cycle permission modes. On a file permission prompt, closes an open [comment field](</docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt>); with no field open, selects the option that allows the action for the rest of the session, when the prompt offers that option
-*On Windows without VT mode (Node <24.2.0/<22.17.0, Bun <1.2.23), defaults to Meta+M. Before v2.1.257, a `confirm:toggleExplanation` action, bound to `Ctrl+E` by default, showed a model-generated explanation of the command on Bash and PowerShell permission prompts. Dialogs use `confirm:yes` and `confirm:no` to accept and cancel even when they don’t ask a yes-or-no question. If you bind a bare letter such as `y` or `n` in this context, the letter also acts on dialogs that never show it as a key. A dialog that shows `y` and `n` as its keys reads those letters itself and needs no binding. This example binds `y` to `confirm:yes` and `n` to `confirm:no`:
+*On Windows without VT mode (Node <24.2.0/<22.17.0, Bun <1.2.23), defaults to Meta+M. Before v2.1.257, a `confirm:toggleExplanation` action, bound to `Ctrl+E` by default, showed a model-generated explanation of the command on Bash and PowerShell permission prompts. Dialogs use `confirm:yes` and `confirm:no` to accept and cancel even when they don’t ask a yes-or-no question. If you bind a bare letter such as `y` or `n` in this context, the letter also acts on dialogs that never show it as a key. A dialog that shows `y` and `n` as its keys reads those letters itself and needs no binding. In most dialogs, pressing `Ctrl+C` or `Ctrl+D` twice closes the dialog instead of exiting Claude Code. The hint after the first press says whether the second press closes the dialog or exits. Both keys are reserved and can’t be rebound. This example binds `y` to `confirm:yes` and `n` to `confirm:no`:
{
"bindings": [
@@ -278,6 +278,8 @@
`tabs:next`| Tab, Right| Next tab
`tabs:previous`| Shift+Tab, Left| Previous tab
+In a tabbed dialog, `tabs:next` and `tabs:previous` switch tabs while the tab row has focus. In some dialogs, such as `/help` and `/sandbox`, the tab-switching keys also work from inside the tab’s content. `Up` and `Down` move focus between the tab row and the tab’s content, and a list in the content responds to keys only while it has focus.
+
###
@@ -309,7 +311,7 @@
`footer:down`| Down| Navigate down in footer
`footer:openSelected`| Enter| Open selected footer item
`footer:clearSelection`| Escape| Clear footer selection
-`footer:dismiss`| Backspace, Delete| Dismiss the selected [artifact](</docs/en/artifacts>) link from the footer; the published artifact itself is unaffected. On other footer rows, these keys have no effect. Requires v2.1.217 or later
+`footer:dismiss`| (unbound)| Removed in v2.1.281. A `keybindings.json` that still names the action remains valid, and the binding does nothing. Before v2.1.281, Backspace and Delete dismissed the selected artifact link from the footer
While a footer item is selected, such as a row in the agent panel below the prompt, `Enter` opens it even when you rebind `Enter` in the `Chat` context to `chat:queueSubmit` or `chat:newline`. `Chat` bindings on keys the `Footer` context doesn’t bind, such as `Shift+Tab` for `chat:cycleMode`, keep working while an item is selected.
@@ -319,15 +321,20 @@
Message selector actions
-Actions available in the `MessageSelector` context:
-
-Action| Default| Description
----|---|---
-`messageSelector:up`| Up, K, Ctrl+P| Move up in list
-`messageSelector:down`| Down, J, Ctrl+N| Move down in list
-`messageSelector:top`| Ctrl+Up, Shift+Up, Meta+Up, Shift+K| Jump to top
-`messageSelector:bottom`| Ctrl+Down, Shift+Down, Meta+Down, Shift+J| Jump to bottom
-`messageSelector:select`| Enter| Select message
+In the message list of the [rewind menu](</docs/en/checkpointing>), you move through messages and pick one with the Select actions and their default keys. Your `Select` bindings for those actions apply there too. The `MessageSelector` context has no actions or default bindings of its own. Use it to change a key for this list alone, by binding a Select action such as `select:accept` in a `MessageSelector` block. This example binds `o` to pick the highlighted message in the rewind menu, without changing any other list:
+
+ {
+ "bindings": [
+ {
+ "context": "MessageSelector",
+ "bindings": {
+ "o": "select:accept"
+ }
+ }
+ ]
+ }
+
+Before v2.1.283, this list ignored `Select` bindings and had its own actions: `messageSelector:up`, `messageSelector:down`, `messageSelector:top`, `messageSelector:bottom`, and `messageSelector:select`. If your `keybindings.json` binds one of those names, the binding keeps working in this list as the Select action that does the same thing. `Home` and `End` jump to either end of the list; before v2.1.283, keys such as `Shift+K` and `Shift+J` did that by default.
###
@@ -344,10 +351,9 @@
`diff:nextSource`| Right| Next diff source
`diff:previousFile`| Up, K| Previous file in the file list; scroll up one line in the detail view
`diff:nextFile`| Down, J| Next file in the file list; scroll down one line in the detail view
-`diff:viewDetails`| Enter| View diff details
`diff:back`| (unbound)| Go back in diff viewer. Escape performs the back action via `diff:dismiss`. The previous default of Left in the detail view was removed in v2.1.203
-The diff detail view also binds pager-style keys to the standard scroll actions. These bindings are part of the `DiffDialog` context and apply only in the detail view; the `Scroll` context defaults listed under Scroll actions are unchanged.
+The file list also responds to the Select actions, through their default keys and your `Select` bindings. `select:previous` and `select:next` move to the previous and next file, and `Enter` opens the selected file’s diff through `select:accept`. To change one of those keys for the file list alone, bind the Select action in a `DiffDialog` block. Before v2.1.283, the file list ignored `Select` bindings, and `Enter` opened the selected file’s diff through a separate `diff:viewDetails` action. If your `keybindings.json` binds `diff:viewDetails`, the binding keeps working in the file list as `select:accept`. The diff detail view also binds pager-style keys to the standard scroll actions. These bindings are part of the `DiffDialog` context and apply only in the detail view; the `Scroll` context defaults listed under Scroll actions are unchanged.
Action| Default| Description
---|---|---
@@ -420,7 +426,7 @@
`select:accept`| Enter| Accept selection
`select:cancel`| Escape| Cancel selection
-Claude Code applies your `select:pageUp`, `select:pageDown`, `select:first`, and `select:last` bindings in the `/skills` menu. In most other lists, such as the `/model` picker, your `select:first` and `select:last` bindings apply. PageUp and PageDown page through the options in those lists regardless of your bindings. Before v2.1.280, those other lists ignored Home, End, and your `select:first` and `select:last` bindings.
+In list panels such as `/skills` and `/mcp`, Claude Code applies your `select:pageUp`, `select:pageDown`, `select:first`, and `select:last` bindings. In most other lists, such as the `/model` picker, your `select:first` and `select:last` bindings apply. PageUp and PageDown page through the options in those lists regardless of your bindings. Before v2.1.280, those other lists ignored Home, End, and your `select:first` and `select:last` bindings.
###
--- a/llm-gateway-connect.md
+++ b/llm-gateway-connect.md
@@ -133,7 +133,7 @@
* PowerShell
- curl -X POST "$ANTHROPIC_BASE_URL/v1/messages" \
+ curl -sS -w '\n%{http_code}\n' -X POST "$ANTHROPIC_BASE_URL/v1/messages" \
-H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
--- a/llm-gateway-protocol.md
+++ b/llm-gateway-protocol.md
@@ -61,7 +61,7 @@
Streaming
-Stream inference responses. Claude Code reads the stream as it arrives, so if your gateway buffers complete responses before relaying them, Claude Code stalls. When the client speaks the Amazon Bedrock format, relay the `InvokeModelWithResponseStream` response body and its `Content-Type: application/vnd.amazon.eventstream` header unmodified, and don’t convert the stream to server-sent events. See [Streaming errors behind a gateway or proxy](</docs/en/amazon-bedrock#streaming-errors-behind-a-gateway-or-proxy>). Forward keep-alive pings as well. On connections through `ANTHROPIC_BASE_URL` or `ANTHROPIC_AWS_BASE_URL`, Claude Code counts every byte your gateway relays, including SSE `ping` events and comment lines, and aborts a stream that goes silent for 300 seconds by default. The upstream’s pings are the only traffic during long thinking pauses, so if your gateway strips or buffers them, Claude Code aborts the stream during those pauses; [Automatic retries](</docs/en/errors#automatic-retries>) covers what an aborted stream reports based on how far the response had progressed. An upstream that sends no pings at all, such as Amazon Bedrock’s binary event-stream, leaves those pauses with nothing to forward. When translating from such an upstream, emit your own `ping` events during silent gaps. Gateways reached through `ANTHROPIC_BEDROCK_BASE_URL`, `ANTHROPIC_VERTEX_BASE_URL`, or `ANTHROPIC_FOUNDRY_BASE_URL` aren’t wrapped by this byte-level watchdog, even when they relay the Anthropic Messages format; there, a [5-minute idle timeout](</docs/en/env-vars>) aborts a silent stream instead, and on `ANTHROPIC_BEDROCK_BASE_URL` connections you can add the byte watchdog with [`CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCK`](</docs/en/env-vars>).
+Stream inference responses. Claude Code reads the stream as it arrives, so if your gateway buffers complete responses before relaying them, Claude Code stalls. Deliver each response’s full event sequence without dropping, duplicating, or reordering events. When an event references a content block whose `content_block_start` never arrived, or a block whose `content_block_stop` already arrived, Claude Code stops reading the stream at that event instead of applying it, so a duplicated `content_block_stop` can’t run the same tool call twice. [The response above may be incomplete](</docs/en/errors#the-response-above-may-be-incomplete>) describes what the user sees, under the `Part of the response never arrived` and `The response stream was malformed` variants. Relay each response through its final `message_delta` and `message_stop` events before ending the body. A body that ends after a `message_delta` carrying a `stop_reason`, with no content block still open and no content block event after that frame, counts as complete even when `message_stop` is missing. A body that your gateway ends cleanly any earlier, once a content block has started, is treated the same as a dropped connection: [Automatic retries](</docs/en/errors#automatic-retries>) says when Claude Code re-issues the request, and [The response above may be incomplete](</docs/en/errors#the-response-above-may-be-incomplete>) covers what it keeps once visible content has arrived. Claude Code keeps the `stop_reason` a `message_delta` delivers, so a later usage-only `message_delta` whose `delta` has `stop_reason: null` or no `stop_reason` key doesn’t clear it. When the client speaks the Amazon Bedrock format, relay the `InvokeModelWithResponseStream` response body and its `Content-Type: application/vnd.amazon.eventstream` header unmodified, and don’t convert the stream to server-sent events. See [Streaming errors behind a gateway or proxy](</docs/en/amazon-bedrock#streaming-errors-behind-a-gateway-or-proxy>). Forward keep-alive pings as well. On connections through `ANTHROPIC_BASE_URL` or `ANTHROPIC_AWS_BASE_URL`, Claude Code counts every byte your gateway relays, including SSE `ping` events and comment lines, and aborts a stream that goes silent for 300 seconds by default. The upstream’s pings are the only traffic during long thinking pauses, so if your gateway strips or buffers them, Claude Code aborts the stream during those pauses; [Automatic retries](</docs/en/errors#automatic-retries>) covers what an aborted stream reports based on how far the response had progressed. An upstream that sends no pings at all, such as Amazon Bedrock’s binary event-stream, leaves those pauses with nothing to forward. When translating from such an upstream, emit your own `ping` events during silent gaps. Gateways reached through `ANTHROPIC_BEDROCK_BASE_URL`, `ANTHROPIC_VERTEX_BASE_URL`, or `ANTHROPIC_FOUNDRY_BASE_URL` aren’t wrapped by this byte-level watchdog, even when they relay the Anthropic Messages format; there, a [5-minute idle timeout](</docs/en/env-vars>) aborts a silent stream instead, and on `ANTHROPIC_BEDROCK_BASE_URL` connections you can add the byte watchdog with [`CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCK`](</docs/en/env-vars>).
###
@@ -148,7 +148,7 @@
* Custom base URL: off by default, because a proxy that rejects unknown headers would fail the request. To receive them, set [`CLAUDE_CODE_GATEWAY_HINT_HEADERS=1`](</docs/en/env-vars>) for your developers, for example in the `env` block of [managed settings](</docs/en/managed-settings>)
* Any other backend, including Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and Claude Platform on AWS: sent only when `CLAUDE_CODE_GATEWAY_HINT_HEADERS=1` is set
-Setting `CLAUDE_CODE_GATEWAY_HINT_HEADERS` to `0` stops the headers on every connection. The headers carry only what the rows below list: fixed vocabularies, tool names, and durations, never prompt text or file contents. Every value is printable ASCII.
+Setting `CLAUDE_CODE_GATEWAY_HINT_HEADERS` to `0` stops the headers on every connection. The headers carry only what the rows below list: fixed vocabularies, tool names, durations, and a random prompt identifier, never prompt text or file contents. Every value is printable ASCII.
Header| Description
---|---
@@ -157,6 +157,7 @@
`x-claude-code-compaction`| Present on the request that summarizes the conversation during a [compaction](</docs/en/prompt-caching#compacting-the-conversation>). The value says what triggered it: `auto` when the context window approached capacity, `manual` for `/compact`, or `reactive` when the API rejected a request as too long. Absent on every other request
`x-claude-code-context-compacted`| Present once, on the first main-conversation request after a compaction, with the same values as `x-claude-code-compaction`. The conversation prefix before this request is no longer used, so a cache keyed on it can be dropped
`x-claude-code-prev-tool-durations`| Measured run time of the tool calls whose results this request carries, as `<name>=<ms>;<name>=<ms>`, for example `Bash=742;Read=9`. Sent on the next request of the same conversation after a batch of tool calls, from the main session or a subagent
+`x-claude-code-prompt-id`| Random UUID that identifies the user prompt a request serves. Requests serving one prompt share the value, including the turns of subagents that prompt started. Requests not attributed to a prompt omit it. Use it to group a session’s requests by prompt. Requires Claude Code v2.1.283 or later
Before parsing `x-claude-code-prev-tool-durations`, check how Claude Code builds the value and what it leaves out:
@@ -253,7 +254,7 @@
Disable pre-release capabilities
-`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` stops Claude Code from sending pre-release capabilities and their body fields on every provider, including context management and the beta tool fields. The variable doesn’t affect adaptive reasoning, which is selected by model rather than by beta. It never suppresses the OAuth capability that subscription authentication requires. On Claude Code v2.1.227 or later, your organization can keep [MCP tool search](</docs/en/mcp#scale-with-mcp-tool-search>) on under this variable through [managed settings](</docs/en/managed-settings>). What Claude Code sends with that override in place depends on how you connect:
+`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` stops Claude Code from sending pre-release capabilities and their body fields, including context management and the beta tool fields. The variable doesn’t affect adaptive reasoning, which is selected by model rather than by beta. It never suppresses the OAuth capability that subscription authentication requires. When a host platform that embeds Claude Code sets [`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`](</docs/en/env-vars>), `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` doesn’t stop auto mode sessions on Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, or a [Claude apps gateway](</docs/en/claude-apps-gateway>) from asking the server for [classifier review](</docs/en/permission-modes#server-side-classifier-review>). That review adds an `anthropic-beta` value and a `safeguards` request field. Set `CLAUDE_CODE_AUTO_MODE_SERVER=0` to stop it there. On Claude Code v2.1.227 or later, your organization can keep [MCP tool search](</docs/en/mcp#scale-with-mcp-tool-search>) on under this variable through [managed settings](</docs/en/managed-settings>). What Claude Code sends with that override in place depends on how you connect:
* On a direct connection, or through a gateway set with `ANTHROPIC_BASE_URL`, Claude Code keeps sending the tool-search beta header, `defer_loading` tool fields, and `tool_reference` blocks, and strips the rest
* On a cloud provider, or signed in through a [Claude apps gateway](</docs/en/claude-apps-gateway>), the override has no effect
--- a/loading.md
+++ b/loading.md
@@ -88,7 +88,7 @@
Plugins synced from claude.ai
-A plugin you turn on for your claude.ai account also loads in Claude Code, alongside the plugins you install from marketplaces. That includes plugins your organization turns on for its members. Each of these plugins loads as `<name>@synced`, with no marketplace and no install record. In terminal sessions, a synced plugin’s skills, agents, hooks, MCP servers, and LSP servers all load, with the same trust as a marketplace plugin you installed. For the components Cowork loads, see [Plugins on claude.ai and in Cowork](<https://claude.com/docs/plugins/overview>) on claude.com. Synced plugins load in Cowork sessions and in terminal sessions where you sign in with your claude.ai account:
+A plugin you turn on for your claude.ai account also loads in Claude Code, alongside the plugins you install from marketplaces. That includes plugins your organization turns on for its members. Each of these plugins loads as `<name>@synced`, with no marketplace and no install record. In terminal sessions, a synced plugin’s skills, agents, hooks, MCP servers, and LSP servers all load, with the same trust as a marketplace plugin you installed. For the components Cowork loads, see the [component support table](<https://claude.com/docs/plugins/platform-support#compare-component-support-by-app>) on claude.com. Synced plugins load in Cowork sessions and in terminal sessions where you sign in with your claude.ai account:
* **[Cowork](<https://claude.com/product/cowork>)** : Claude Code downloads them into the session’s own environment when the session starts
* **Terminal sessions** : each time you start Claude Code, it syncs once in the background, downloading new and updated plugins and removing the ones that you or your organization turned off. Syncing in terminal sessions requires Claude Code v2.1.273 or later
--- a/managed-settings.md
+++ b/managed-settings.md
@@ -176,8 +176,8 @@
Kind of key| How Claude Code combines it| Examples
---|---|---
-Lists| Combines the entries from every source| `permissions.allow`, `hooks`, `sandbox.network.allowedDomains`, `deniedMcpServers`
-Locks| Applies the strictest value any source sets; a looser value applies only from the highest-ranked source| `allowManagedHooksOnly`, `permissions.disableBypassPermissionsMode`, `crossSessionInbound`
+Lists| Combines the entries from every source| `permissions.allow`, `hooks`, `sandbox.network.allowedDomains`, `deniedMcpServers`, `deniedModels`
+Locks| Applies the strictest value any source sets; a looser value applies only from the highest-ranked source| `allowManagedHooksOnly`, `permissions.disableBypassPermissionsMode`, `crossSessionInbound`, `availableModelsMatch`
Restriction allowlists| Takes the list whole from the highest-ranked source that sets it, without adding entries from lower sources| `availableModels`, `allowedMcpServers`, `strictKnownMarketplaces`, `allowedChannelPlugins`, and the `fallbackModel` chain
Values taken whole| Takes the value whole from the highest-ranked source that sets it, without combining entries or fields from lower sources| `sandbox.credentials.awsPairs`, `sandbox.ripgrep`
Provided MCP servers| Combines the server names from every source; when two sources set the same name, applies the higher-ranked source’s whole entry| `managedMcpServers`
@@ -321,11 +321,13 @@
`disableSideloadFlags`| Treated as `true` until the value is fixed, with the effects listed for [`disableSideloadFlags`](</docs/en/settings-reference#disablesideloadflags>).
`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`.
+[`availableModelsMatch`](</docs/en/settings-reference#availablemodelsmatch>)| Treated as `exact` until the value is fixed.
`syncClaudeAiPlugins`| Treated as `false`, so syncing of [claude.ai plugins](</docs/en/settings-reference#syncclaudeaiplugins>) is off until the value is fixed.
`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.
+[`deniedModels`](</docs/en/settings-reference#deniedmodels>)| A non-string entry is stripped and the rest of the list is enforced. A wholly invalid value is dropped with a warning and blocks no models until it is fixed.
`blockedMarketplaces`| An individual invalid entry is stripped and the valid subset is enforced. An entry that parses but can never match, such as a `hostPattern` regex that doesn’t compile, is kept with a warning. It blocks nothing until fixed, but [marketplace restrictions](</docs/en/plugins/org#restrict-what-users-can-install>) stay active. A wholly invalid value is dropped with a warning, since blocking every marketplace would block sources 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>)
@@ -337,7 +339,7 @@
Keys only a managed source can set
-Claude Code reads the following keys only from a managed source; placing them in user or project settings files has no effect. Most of them are locks: the value a lock governs, such as permission rules or `sandbox.network.allowedDomains`, is an ordinary key that any level can set, and the lock tells Claude Code to honor only the managed value. The table covers the permission, plugin, and delivery controls. For any key not listed here, the Scope column of the [settings reference](</docs/en/settings-reference#all-settings>) index says whether it’s managed-only; the remaining managed-only keys there include the gateway login URL, version, browser, mobile-simulator, SSH host, Desktop local-session, sandbox binary path, model pricing, and CLAUDE.md controls.
+Claude Code reads the following keys only from a managed source; placing them in user or project settings files has no effect. Most of them are locks: the value a lock governs, such as permission rules or `sandbox.network.allowedDomains`, is an ordinary key that any level can set, and the lock tells Claude Code to honor only the managed value. The table covers the permission, plugin, and delivery controls. For any key not listed here, the Scope column of the [settings reference](</docs/en/settings-reference#all-settings>) index says whether it’s managed-only; the remaining managed-only keys there include the gateway login URL, version, browser, mobile-simulator, SSH host, Desktop local-session, sandbox binary path, model pricing, model restriction, and CLAUDE.md controls.
Setting| Description
---|---
@@ -379,7 +381,7 @@
}
}
-Claude Code applies a value of `1` without showing the user the [approval dialog](</docs/en/server-managed-settings#environment-variables-and-the-approval-dialog>). If you turn telemetry off, Claude Code stops sending the usage data that feeds your organization’s [analytics dashboard](</docs/en/analytics>) for the developers the policy reaches. The variable also turns off feature-flag fetching, which makes Remote Control, default auto mode, and the other [features that need feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) unavailable for those developers. Where and when a policy applies says which delivery mechanism reaches each surface, and [Platform availability](</docs/en/server-managed-settings#platform-availability>) says which sessions skip the server-managed settings fetch. If your organization uses customer-managed encryption keys and routes Claude Code through a gateway, [Configure proxies and gateways](</docs/en/third-party-integrations#configure-proxies-and-gateways>) says why those sessions need this variable.
+Claude Code applies a value of `1` without showing the user the [approval dialog](</docs/en/server-managed-settings#environment-variables-and-the-approval-dialog>). If you turn telemetry off, Claude Code stops sending the usage data that feeds your organization’s [analytics dashboard](</docs/en/analytics>) for the developers the policy reaches. The variable also turns off [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) for those developers. For Remote Control, see the [Remote Control requirements](</docs/en/remote-control#requirements>). Where and when a policy applies says which delivery mechanism reaches each surface, and [Platform availability](</docs/en/server-managed-settings#platform-availability>) says which sessions skip the server-managed settings fetch. If your organization uses customer-managed encryption keys and routes Claude Code through a gateway, [Configure proxies and gateways](</docs/en/third-party-integrations#configure-proxies-and-gateways>) says why those sessions need this variable.
##
--- a/manifest-reference.md
+++ b/manifest-reference.md
@@ -373,10 +373,12 @@
Containment and existence
-Every component path must resolve inside the plugin root and must exist. `claude plugin validate` doesn’t check the `outputStyles`, `lspServers`, `monitors`, or `themes` paths, so a bad path in those fields fails only when the plugin loads:
-
- * **Containment** : a path that resolves outside the plugin root doesn’t load, and the `/plugin` **Errors** tab shows `<component> path escapes plugin directory: <path>`. A path containing `..` is the usual case, and `claude plugin validate` reports it as `Path contains ".." which could be a path traversal attempt`
- * **Existence** : a path that doesn’t exist doesn’t load, and the `/plugin` **Errors** tab shows `<component> path not found: <path>`. `claude plugin validate` reports it as `Path not found`
+Every component path must resolve inside the plugin root and must exist. `claude plugin validate` checks the paths under every component key:
+
+ * **Containment** : a path that resolves outside the plugin root doesn’t load, and the `/plugin` **Errors** tab shows `<component> path escapes plugin directory: <path>`. A path containing `..` is the usual case, and `claude plugin validate` reports the error `Path contains ".." which could be a path traversal attempt`
+ * **Existence** : a path that doesn’t exist doesn’t load, and the `/plugin` **Errors** tab shows `<component> path not found: <path>`. `claude plugin validate` reports the error `Path not found`
+
+For `outputStyles`, `lspServers`, `monitors`, and `themes` paths, the `claude plugin validate` check requires Claude Code v2.1.283 or later.
###
@@ -611,7 +613,7 @@
Workflows| `workflows/`| Workflow `.js` files
Themes| `themes/`| Theme JSON files
Monitors| `monitors/monitors.json`| The monitors array
-Executables| `bin/`| Files here are on the Bash tool’s `PATH` while the plugin is enabled, so Claude runs them as bare commands. claude.ai and Cowork don’t install a plugin that has this directory, including one you [distribute through claude.ai organization settings](</docs/en/plugins/host-marketplace#distribute-through-organization-settings>)
+Executables| `bin/`| Files here are on the Bash tool’s `PATH` while the plugin is enabled, so Claude runs them as bare commands. claude.ai and Cowork don’t install a plugin that has this directory, including one you [distribute through claude.ai organization settings](<https://claude.com/docs/plugins/org-sync#keep-executables-out-of-the-top-level-bin-directory>)
Settings| `settings.json`| `agent` and `subagentStatusLine` defaults applied while the plugin is enabled
A plugin that uses every default location, plus a `scripts/` folder that its hooks call, is laid out like this:
--- a/mcp.md
+++ b/mcp.md
@@ -150,7 +150,7 @@
---|---|---
stdio server, or HTTP/SSE server without a cached tool list| Yes, until it connects| [`MCP_TIMEOUT`](</docs/en/env-vars>), 30 seconds by default; the connection fails at that deadline
Remote server with a cached tool list, saved by Claude Code from a previous connection| No; the cached tools are available from the first turn| None; connects on its first tool call, and that deferred connect has its own timeout
-In-process SDK server| Yes, until it connects and lists its tools| None; the connect and tool listing requests each have their own timeout
+In-process SDK server| Yes, until it connects and lists its tools| [`MCP_TIMEOUT`](</docs/en/env-vars>), 30 seconds by default, per connect attempt; the connection fails at that deadline
Servers loaded from settings files such as `.mcp.json` or from plugins commonly show `pending` in the init message. When `options.mcpServers` holds a stdio, HTTP, or SSE server, the first turn waits for these pending servers too, up to `MCP_TIMEOUT`. When `options.mcpServers` is empty or holds only SDK servers, the first turn waits up to 2 seconds instead:
--- a/measure.md
+++ b/measure.md
@@ -79,6 +79,8 @@
* **You administer Claude Code for their organization** : the OpenTelemetry events and the Analytics API count installs and skill activations across every machine. See Measure across a fleet.
* **They’re teammates you can ask** : each user’s own Claude Code shows them whether they still use the plugin, in four places: the `/plugin` panel, `/skill-doctor`, `/doctor`, and `/usage`. All four are commands the user runs at the Claude Code prompt in a session on their own machine.
* **Neither** : you have no usage signal from Claude Code for that plugin.
+
+For usage of a plugin listed in Anthropic’s directory, see [Track published plugin usage](<https://claude.com/docs/connectors/building/after-publishing#track-published-plugin-usage>) on claude.com.
###
--- a/memory.md
+++ b/memory.md
@@ -226,6 +226,8 @@
ln -s ~/shared-claude-rules .claude/rules/shared
ln -s ~/company-standards/security.md .claude/rules/security.md
+
+If you point a `.claude/rules/` or `CLAUDE.md` symlink at a network path such as the UNC share `\\server\share` or a path under `/net` or `/Network`, the linked instructions don’t load. Claude Code doesn’t follow the link, because looking up such a path can contact the host it names. `\\wsl$` paths don’t count as network paths.
####
@@ -585,7 +587,7 @@
My CLAUDE.md is too large
-Files over 200 lines consume more context and may reduce adherence. Claude Code skips a file over 4 MiB. Use path-scoped rules to load instructions only when Claude works with matching files, or trim content that isn’t needed in every session. Splitting into `@path` imports helps organization but doesn’t reduce context, since imported files load at launch. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes trims for a checked-in CLAUDE.md: it cuts content Claude can derive from the codebase, such as directory layouts, dependency lists, and architecture overviews, and keeps pitfalls, rationale, and conventions that differ from tool defaults. The trim check requires Claude Code v2.1.206 or later.
+Files over 200 lines consume more context and may reduce adherence. Claude Code skips a file over 4 MiB. Use path-scoped rules to load instructions only when Claude works with matching files, or trim content that isn’t needed in every session. Splitting into `@path` imports helps organization but doesn’t reduce context, since imported files load at launch. If one of your instruction files is over the recommended length, you see a warning at startup and when you run `/status`. You also see a warning when files that are each within that length add up past a combined limit at session start. Each CLAUDE.md, rules file, and `@path` import counts as a separate file. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes trims for a checked-in CLAUDE.md: it cuts content Claude can derive from the codebase, such as directory layouts, dependency lists, and architecture overviews, and keeps pitfalls, rationale, and conventions that differ from tool defaults. The trim check requires Claude Code v2.1.206 or later.
###
--- a/mobile.md
+++ b/mobile.md
@@ -39,7 +39,7 @@
Feature| What you connect to| When to use
---|---|---
[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.
-[Projects](</docs/en/claude-projects>)| A conversation where Claude coordinates parallel cloud sessions as threads| You have a stream of related work rather than one task and want to see which threads finished or need you.
+[Projects](</docs/en/claude-projects>)| A conversation where Claude coordinates parallel threads of work and reports back| You have a stream of related work rather than one task and want to see which threads finished or need you.
[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.
Show diff (122 lines)
--- a/model-config.md
+++ b/model-config.md
@@ -151,7 +151,7 @@
* You set it to `default`, `inherit`, `opusplan`, or `haiku`
* `enforceAvailableModels` is on
- * `availableModels` or organization model restrictions exclude the model
+ * Your organization’s model restrictions exclude the model
* The model isn’t available to your account
When a new session would start on the variable’s model, a session you resume with `claude --resume`, `--continue`, or the `/resume` picker starts on it too. Claude Code doesn’t restore the model saved in that session’s transcript. Otherwise Claude Code doesn’t use the variable when you resume a session.
@@ -175,7 +175,7 @@
Restrict model selection
-Enterprise administrators can use `availableModels` in [managed or policy settings](</docs/en/managed-settings>) to restrict which models users can select. Entries match a model family such as `sonnet`, a version prefix such as `claude-sonnet-4-5`, or a full model ID such as `claude-sonnet-4-5-20250929`. A version prefix also matches later model IDs that extend it with another segment, so `claude-fable-5` permits both Fable 5 and Fable 5.1, while `claude-fable-5-1` permits Fable 5.1 only. On platforms that embed Claude Code and set [`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`](</docs/en/env-vars>), the host’s model configuration takes precedence over managed model settings, while a managed `availableModels` allowlist stays in force unless the host supplies its own; [Exceptions to managed settings precedence](</docs/en/settings#exceptions-to-managed-settings-precedence>) says which keys and variables the host overrides. When `availableModels` is set, the allowlist applies everywhere a user can specify a model:
+Enterprise administrators can use `availableModels` in [managed or policy settings](</docs/en/managed-settings>) to restrict which models users can select. Entries match a model family such as `sonnet`, a version prefix such as `claude-sonnet-4-5`, or a full model ID such as `claude-sonnet-4-5-20250929`. A version prefix also matches later model IDs that extend it with another segment, so `claude-fable-5` permits both Fable 5 and Fable 5.1, while `claude-fable-5-1` permits Fable 5.1 only. To block a model the list permits, or to make each model ID entry permit only the version it names, see Block specific models or versions. On platforms that embed Claude Code and set [`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`](</docs/en/env-vars>), the host’s model configuration takes precedence over managed model settings, while a managed `availableModels` allowlist stays in force unless the host supplies its own; [Exceptions to managed settings precedence](</docs/en/settings#exceptions-to-managed-settings-precedence>) says which keys and variables the host overrides. When `availableModels` is set, the allowlist applies everywhere a user can specify a model:
* **Main session model** : `/model`, the `--model` flag, the `ANTHROPIC_MODEL` environment variable, the `model` setting, `ANTHROPIC_DEFAULT_MODEL`, and the model restored when resuming a session
* **Alias resolution** : the `ANTHROPIC_DEFAULT_OPUS_MODEL`, `ANTHROPIC_DEFAULT_SONNET_MODEL`, `ANTHROPIC_DEFAULT_HAIKU_MODEL`, and `ANTHROPIC_DEFAULT_FABLE_MODEL` environment variables cannot redirect an allowed alias to a model outside the list
@@ -233,7 +233,7 @@
Default model behavior
-On its own, `availableModels` leaves the Default option on the system’s runtime default for the account until you also set `enforceAvailableModels`. If that default is a model you intend to restrict, set `enforceAvailableModels` as well. An empty `availableModels` array never engages the Default-model enforcement: with `availableModels: []`, named model selections are blocked but the Default model for the account type remains usable regardless of `enforceAvailableModels`.
+With the default prefix matching, `availableModels` on its own leaves the Default option on the system’s runtime default for the account until you also set `enforceAvailableModels`. If that default is a model you intend to restrict, set `enforceAvailableModels` as well, or block that model. With `availableModels: []`, named model selections are blocked and `enforceAvailableModels` has no effect.
###
@@ -248,7 +248,7 @@
"enforceAvailableModels": true
}
-The Default option resolves to the account-type default, or to the organization default model when an admin has set one. When that model is not in the allowlist, the Default option instead resolves to the first `availableModels` entry that names an allowed, available model, and the `/model` picker’s Default row shows that model. This applies everywhere the default is reached: session startup, selecting Default in `/model`, the `"default"` keyword in fallback model chains, and the fallback used when an excluded selection is dropped. `enforceAvailableModels` remaps the Default option only when `availableModels` is non-empty. With `availableModels: []`, the Default model for the account type remains usable, so the setting cannot lock users out of every model. When `availableModels` is non-empty but no entry resolves to an allowed and available model, enforcement is skipped and Default resolves to the account-type default, with a warning visible only under `--debug`. Keep at least one guaranteed-available entry in the list to avoid this. Deploy both keys together in the highest-ranked managed source you deliver. By default Claude Code reads only that source, so a pair placed in a managed settings file is ignored when the admin console delivers any settings; under the opt-in merge in [how Claude Code combines managed sources](</docs/en/managed-settings#how-claude-code-combines-managed-sources>), Claude Code still ignores a `modelOverrides` map from a source ranked below the one that sets `availableModels`.
+The Default option resolves to the account-type default, or to the organization default model when an admin has set one. When that model is not in the allowlist, the Default option instead resolves to the first `availableModels` entry that names an allowed, available model, and the `/model` picker’s Default row shows that model. This applies everywhere the default is reached: session startup, selecting Default in `/model`, the `"default"` keyword in fallback model chains, and the fallback used when an excluded selection is dropped. `enforceAvailableModels` remaps the Default option only when `availableModels` is non-empty. When `availableModels` is non-empty but no entry resolves to an allowed and available model, enforcement is skipped with a warning visible only under `--debug`. Keep at least one guaranteed-available entry in the list to avoid this. Deploy both keys together in the highest-ranked managed source you deliver. By default Claude Code reads only that source, so a pair placed in a managed settings file is ignored when the admin console delivers any settings; under the opt-in merge in [how Claude Code combines managed sources](</docs/en/managed-settings#how-claude-code-combines-managed-sources>), Claude Code still ignores a `modelOverrides` map from a source ranked below the one that sets `availableModels`.
###
@@ -256,10 +256,11 @@
Control the model users run on
-The `model` setting is an initial selection, not enforcement. It sets which model is active when a session starts, but users can still open `/model` and pick Default, which resolves to the system’s runtime default regardless of what `model` is set to, unless `enforceAvailableModels` redirects it. To fully control the model experience, combine these settings:
+The `model` setting is an initial selection, not enforcement. It sets which model is active when a session starts, but users can still open `/model` and pick Default, which resolves to the system’s runtime default regardless of what `model` is set to, unless `enforceAvailableModels` or the keys that block specific versions apply to it. To fully control the model experience, combine these settings:
* **`availableModels`** : restricts which named models users can switch to
* **`enforceAvailableModels`** : extends the `availableModels` allowlist to the Default option, so Default cannot resolve to a model outside the list
+ * **`deniedModels`** and **`availableModelsMatch`** : block specific versions that an `availableModels` entry would otherwise permit
* **`model`** : sets the initial model selection when a session starts
* **`ANTHROPIC_DEFAULT_SONNET_MODEL`** / **`ANTHROPIC_DEFAULT_OPUS_MODEL`** / **`ANTHROPIC_DEFAULT_HAIKU_MODEL`** / **`ANTHROPIC_DEFAULT_FABLE_MODEL`** : control what the `sonnet`, `opus`, `haiku`, and `fable` aliases resolve to, and which version the account-type default uses
@@ -296,6 +297,32 @@
+Block specific models or versions
+
+An `availableModels` entry such as `claude-opus-5` also permits later releases that extend it, such as Opus 5.5, as soon as Claude Code supports them. Two managed settings let you hold a release back, and both require Claude Code v2.1.283 or later:
+
+ * [`deniedModels`](</docs/en/settings-reference#deniedmodels>): list the models to block. A listed model is blocked even when `availableModels` permits it, and the key also works with no allowlist at all. A release that no entry blocks stays permitted
+ * [`availableModelsMatch`](</docs/en/settings-reference#availablemodelsmatch>): set it to `"exact"` so that each model ID in `availableModels` permits only the version it names. A newer version of a listed model ID then stays blocked until you add it to the list
+
+Earlier versions ignore both keys, so also set [`requiredMinimumVersion`](</docs/en/settings-reference#requiredminimumversion>) to keep those versions from starting. This example permits Opus and Sonnet models and blocks Opus 5.5 in every spelling, including dated and provider-specific IDs:
+
+ {
+ "availableModels": ["opus", "sonnet"],
+ "deniedModels": ["claude-opus-5-5"]
+ }
+
+A blocked model, whether `deniedModels` names it or an `"exact"` list omits it, is treated as a blocked selection everywhere the allowlist applies. It is hidden from the `/model` picker, and `/model <name>` rejects it. If you name a blocked model ID with `--model`, `ANTHROPIC_MODEL`, or the `model` setting, Claude Code drops it at startup and resolves the Default option instead. If a [hook](</docs/en/hooks>) or background request names a model that `deniedModels` blocks, such as an agent hook’s `model` field, that request runs on the session’s model instead. The Default option follows both keys too, whether or not you set `enforceAvailableModels`. If you set it with a non-empty `availableModels`, a blocked default counts as a model outside the allowlist. Otherwise, a Default option that would resolve to a blocked model steps down in this order:
+
+ 1. The newest permitted version of the same family
+ 2. The newest permitted model of each lower-cost family in turn: Sonnet, then Haiku
+ 3. The first `availableModels` entry that names a permitted model
+
+If none of those is permitted, a session starting on the Default option [refuses to start](</docs/en/errors#managed-settings-block-the-default-model>) with an error that names the key to fix. An `"exact"` list affects the Default option only when the managed `availableModels` list names at least one model or family. Claude Code reads both keys from managed settings only. If you set either one in user, project, or local settings or with `--settings`, Claude Code ignores it with a warning.
+
+###
+
+
+
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. 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:
@@ -321,8 +348,9 @@
Admins can also configure the organization default to override user selection. With override on, it takes precedence over the `model` value in user, project, and local settings, so a model you save with `/model` applies for the current session and the organization default returns on the next launch. When your selection differs, `/model` shows `Your organization's default (<model>) applies on restart`. The `--model` flag, `ANTHROPIC_MODEL`, managed settings, and `--settings` still take precedence even with override on. Override is available to a limited set of organizations; ask your Anthropic account team about availability. To limit which models members can select, use organization model restrictions or `availableModels` instead. Claude Code reads the organization default once at startup, so a default the admin changes mid-session takes effect on the next launch. When the organization default doesn’t override user selection, the first interactive launch after the admin changes it clears the `model` key from your user settings once, so the new default applies. It changes nothing else in the file, and a model you save with `/model` after that launch is kept. The organization default passes through these restriction checks before it is adopted:
- * `availableModels` on its own doesn’t apply to the organization default, so an organization default outside the allowlist still applies. When `enforceAvailableModels` is also set, an organization default outside the allowlist is remapped to the first allowlist entry, like any other Default
+ * With the default prefix matching, `availableModels` on its own doesn’t apply to the organization default, so an organization default outside the allowlist still applies. When `enforceAvailableModels` is also set, an organization default outside the allowlist is remapped to the first allowlist entry as well
* an organization default that organization model restrictions deny for your account is replaced by the newest allowed model in its family, or a lower-cost family when every version of it is restricted
+ * for an organization default that `deniedModels` or an `"exact"` list blocks, see Block specific models or versions
* an organization default that isn’t available to your account at all is skipped, and the Default option resolves as it would without an organization default
As of v2.1.199, when the organization default is a different model family from your account type’s usual default, the `/model` picker keeps a separate row for that usual family, so you can still switch to it for a session. In v2.1.196 through v2.1.198 that row is missing from the picker. The organization default reaches only sessions authenticated with the Anthropic API. To set a default anywhere else, including [LLM gateway](</docs/en/llm-gateway>) deployments, use the `model` key in [managed settings](</docs/en/managed-settings>) instead.
@@ -508,7 +536,7 @@
`max`| Can improve performance on demanding tasks but may show diminishing returns and is prone to overthinking. Test before adopting broadly
`ultracode`| A Claude Code setting that plans a [dynamic workflow](</docs/en/workflows>) for each substantive task with `xhigh` per-message reasoning
-The effort scale is calibrated per model, so the same level name does not represent the same underlying value across models.
+The effort scale is calibrated per model, so the same level name does not represent the same underlying value across models. Opus 5.5 defaults to `medium`, one level below Opus 5’s default of `high`. In Anthropic’s testing, Opus 5.5 at `medium` matches or exceeds Opus 5 at `high` on coding and knowledge-work evaluations. At a given level, Opus 5.5 tends to think more per turn than Opus 5. When you move from Opus 5 to Opus 5.5, start at `medium` rather than carrying over the level you used on Opus 5. To test levels against your own work, see [Calibrate effort](<https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5-5#calibrate-effort>) in the Opus 5.5 prompting guide.
####
@@ -701,7 +729,7 @@
`ANTHROPIC_DEFAULT_HAIKU_MODEL`| The model to use for `haiku`, or [background functionality](</docs/en/costs#background-token-usage>)
`CLAUDE_CODE_SUBAGENT_MODEL`| The default model for [subagents](</docs/en/sub-agents#choose-a-model>), [agent team](</docs/en/agent-teams#specify-teammates-and-models>) teammates, and [workflow](</docs/en/workflows>) agents that aren’t assigned a model another way. Accepts an alias such as `haiku` or a full model name. A per-invocation model or a definition’s `model` field, including `inherit`, takes precedence. To change that, set [`CLAUDE_CODE_SUBAGENT_MODEL_FORCE`](</docs/en/sub-agents#run-every-subagent-on-one-model>)
-Note: `ANTHROPIC_SMALL_FAST_MODEL` is deprecated in favor of `ANTHROPIC_DEFAULT_HAIKU_MODEL`.
+On third-party providers, Customize pinned model display and capabilities describes what a pinned model’s row in the `/model` picker shows. Note: `ANTHROPIC_SMALL_FAST_MODEL` is deprecated in favor of `ANTHROPIC_DEFAULT_HAIKU_MODEL`.
###
@@ -799,7 +827,7 @@
Environment variable| Description
---|---
`DISABLE_PROMPT_CACHING`| Set to `1` to disable prompt caching for all models. Takes precedence over the per-model settings
-`DISABLE_PROMPT_CACHING_HAIKU`| Set to `1` to disable prompt caching for Haiku models only
+`DISABLE_PROMPT_CACHING_HAIKU`| Set to `1` to disable prompt caching for the [default Haiku model](</docs/en/prompt-caching#disable-prompt-caching>)
`DISABLE_PROMPT_CACHING_SONNET`| Set to `1` to disable prompt caching for Sonnet models only
`DISABLE_PROMPT_CACHING_OPUS`| Set to `1` to disable prompt caching for Opus models only
`DISABLE_PROMPT_CACHING_FABLE`| Set to `1` to disable prompt caching for Fable models only
Show diff (124 lines)
--- a/monitoring-usage.md
+++ b/monitoring-usage.md
@@ -29,7 +29,7 @@
# 6. Run Claude Code
claude
-To verify a setup that exports metrics, check your backend for the `claude_code.session.count` metric, which Claude Code emits when a session starts. To verify a logs-only setup, submit a prompt and check for the `claude_code.user_prompt` event. If nothing arrives, run `claude --debug` and check the debug log. Claude Code reports failures from the exporters you configure as `[3P telemetry]` errors, where 3P means third-party. Lines prefixed `[Anthropic telemetry]` describe [Anthropic’s separate operational telemetry](</docs/en/data-usage#telemetry-services>) and don’t indicate a problem with your setup. For full configuration options, see the [OpenTelemetry specification](<https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options>).
+To verify a setup that exports metrics, check your backend for the `claude_code.session.count` metric, which Claude Code emits when a session starts. To verify a logs-only setup, submit a prompt and check for the `claude_code.user_prompt` event. If nothing arrives, start Claude Code with `claude --debug-file <path>` and check the log it writes to that path. Claude Code reports failures from the exporters you configure as `[3P telemetry]` errors, where 3P means third-party. Lines prefixed `[Anthropic telemetry]` describe [Anthropic’s separate operational telemetry](</docs/en/data-usage#telemetry-services>) and don’t indicate a problem with your setup. For full configuration options, see the [OpenTelemetry specification](<https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options>).
##
@@ -58,7 +58,7 @@
How managed settings lock the OTLP destination
-When you set an `OTEL_EXPORTER_OTLP_*` variable in managed settings, Claude Code removes conflicting developer-set variables at startup and logs a warning you can see with `claude --debug`. What it removes depends on which variable you set:
+When you set an `OTEL_EXPORTER_OTLP_*` variable in managed settings, Claude Code removes conflicting developer-set variables at startup and logs a warning in the debug log. What it removes depends on which variable you set:
* **Endpoints** : when you set `OTEL_EXPORTER_OTLP_ENDPOINT`, Claude Code removes every developer-set per-signal endpoint. Developers can’t point one signal at a different collector, so you don’t need to also set the per-signal endpoint variables in managed settings.
* **Protocols** : when you set `OTEL_EXPORTER_OTLP_PROTOCOL`, Claude Code removes every developer-set per-signal protocol.
@@ -225,7 +225,7 @@
`output_tokens`| Output token count|
`cache_read_tokens`| Tokens read from prompt cache|
`cache_creation_tokens`| Tokens written to prompt cache|
-`request_id`| Anthropic API request ID from the `request-id` response header|
+`request_id`| API request ID. Same value as the `request_id` event correlation attribute|
`gen_ai.response.id`| Same value as `request_id`. OpenTelemetry GenAI semantic convention|
`client_request_id`| Client-generated `x-client-request-id` of the final attempt|
`attempt`| Total attempts made for this request|
@@ -258,18 +258,19 @@
`skill_name`| Skill name for the Skill tool| `OTEL_LOG_TOOL_DETAILS`
`subagent_type`| Subagent type for the Agent tool or legacy Task tool| `OTEL_LOG_TOOL_DETAILS`
-**`tool.output` span event on `claude_code.tool`** If you set `OTEL_LOG_TOOL_CONTENT=1`, Read and Bash calls can record a `tool.output` span event on the `claude_code.tool` span. Edit and Write calls record one only when you also set `OTEL_LOG_TOOL_DETAILS=1`. That variable isn’t scoped to those two tools, so check its row in the configuration table for the arguments it adds elsewhere. Claude Code writes this event from a tool call’s successful return, so a call that raises an error records nothing, whatever the tool. Among the calls that do return, it records no `tool.output` event for:
-
- * A call to any tool other than Read, Edit, Write, and Bash, including MCP tools and WebFetch
+**`tool.output` span event on `claude_code.tool`** If you set `OTEL_LOG_TOOL_CONTENT=1`, Read and Bash calls can record a `tool.output` span event on the `claude_code.tool` span. Edit and Write calls record one only when you also set `OTEL_LOG_TOOL_DETAILS=1`. That variable isn’t scoped to those two tools, so check its row in the configuration table for the arguments it adds elsewhere. MCP tools, WebFetch, and WebSearch record this event too, on Claude Code v2.1.283 or later. Claude Code writes this event from a tool call’s successful return, so a call that raises an error records nothing, whatever the tool. Among the calls that do return, it records no `tool.output` event for:
+
+ * A call to any tool other than Read, Edit, Write, Bash, WebFetch, WebSearch, and MCP tools
* A Read that returns anything other than file text, such as an image, a PDF, or a re-read of a file whose contents haven’t changed
* An Edit or Write call, unless you also set `OTEL_LOG_TOOL_DETAILS=1`
+ * A WebFetch or WebSearch call that Claude Code moved to the background because you interrupted the turn to [send your queued messages right away](</docs/en/interactive-mode#when-claude-code-sends-what-you-queued>) while the call ran. Claude receives that result later, after the tool span has ended
The event carries these attributes, each truncated at the content limit (60 KB by default). `Gated by` names the variable an attribute needs on top of `OTEL_LOG_TOOL_CONTENT=1`, and for Edit and Write that variable gates the event itself rather than the attribute.
Attribute| Description| Gated by
---|---|---
`content`| Text the Read tool returned, or the text a Write call was asked to write| `OTEL_LOG_TOOL_DETAILS` for the Write tool
-`output`| Combined output of a Bash command, with stderr interleaved into stdout|
+`output`| For the Bash tool, the command’s combined output, with stderr interleaved into stdout. For an MCP tool, WebFetch, or WebSearch, the result the tool returned: text blocks joined by newlines, with an image or document replaced by a placeholder such as `[image]`|
`diff`| Structured patch the Edit tool applied| `OTEL_LOG_TOOL_DETAILS`
`file_path`| Target file path for the Read, Edit, and Write tools, repeating the span attribute of the same name| `OTEL_LOG_TOOL_DETAILS`
`bash_command`| Command string for the Bash tool| `OTEL_LOG_TOOL_DETAILS`
@@ -656,6 +657,7 @@
`prompt.id`| UUID v4 identifier linking all events produced while processing a single user prompt
`event.sequence`| 0-based counter for ordering events, counted per Claude Code process rather than per session
`message.uuid`| UUID of the message as persisted in the session transcript, the `~/.claude/projects/*/*.jsonl` files. Present on `assistant_response`, on `api_response_body`, and on `user_prompt` except for command dispatches, which can produce zero or many messages. On `assistant_response` and `api_response_body`, this is the response’s final transcript entry, which the next turn’s `parentUuid` chains from. Requires Claude Code v2.1.214 or later, or v2.1.274 or later on `api_response_body`
+`request_id`| Server-assigned ID of the API request, read from the `request-id` response header, such as `req_011...`. On a response with no `request-id` header, as on [Amazon Bedrock](</docs/en/amazon-bedrock>), the value comes from the `x-amzn-requestid` header instead. Present on `api_request`, `api_error`, `api_refusal`, `assistant_response`, and `api_response_body` when the response carries either header. Matches the same attribute on the `llm_request` trace span. The `x-amzn-requestid` source requires Claude Code v2.1.282 or later
`client_request_id`| Client-generated UUID sent as the `x-client-request-id` request header. Present on `api_request` and `api_error` on first-party API connections; absent on third-party provider backends and when the request was retried through the non-streaming fallback. Pairs a request with its response and remains available for failures such as timeouts that never produced a server `request_id`. Matches the same attribute on the `llm_request` trace span. Requires Claude Code v2.1.214 or later
To trace all activity triggered by a single prompt, filter your events by a specific `prompt.id` value. This returns the user_prompt event, any api_request events, and any tool_result events that occurred while processing that prompt. `event.sequence` starts at 0 each time a Claude Code process starts and counts up for the life of that process. It keeps counting across `/clear`, which assigns a new `session.id`. If you [resume a session without forking](</docs/en/how-claude-code-works#resume-or-fork-sessions>), the session keeps its `session.id` but takes its `event.sequence` values from the process that resumed it, so within one session a later event can carry a lower value than an earlier one, or repeat one. To order a session’s events, sort by `event.timestamp` and use `event.sequence` to order events that share a timestamp. For message-level reconstruction, each event class carries a key that matches a field in the session transcript. The transcript entry format is [internal to Claude Code](</docs/en/sessions#where-transcripts-are-stored>) and changes between versions, so a pipeline that joins on these fields can break on any release; treat the joins as version-specific rather than a stable contract:
@@ -697,7 +699,7 @@
* `response_length`: Length of the response text in characters
* `response`: Response text, truncated at the content limit (60 KB by default). Redacted to `<REDACTED>` by default. Set `OTEL_LOG_ASSISTANT_RESPONSES=1` to include it. When `OTEL_LOG_ASSISTANT_RESPONSES` is unset, `OTEL_LOG_USER_PROMPTS` controls it instead, so set `OTEL_LOG_ASSISTANT_RESPONSES=0` to keep responses redacted while prompt logging is on
* `model`: Model identifier (for example, “claude-sonnet-5”)
- * `request_id`: Anthropic API request ID from the response’s `request-id` header. Present only when the API returns one
+ * `request_id`: API request ID, described under Event correlation attributes
* `message.uuid`: UUID of the response’s final transcript entry. An API response is persisted as one transcript entry per content block; this is the last one, which the next turn’s `parentUuid` chains from. Requires Claude Code v2.1.214 or later
* `query_source`: Subsystem that issued the request, such as `"repl_main_thread"`, `"compact"`, or a subagent name
@@ -753,7 +755,7 @@
* `output_tokens`: Number of output tokens
* `cache_read_tokens`: Number of tokens read from cache
* `cache_creation_tokens`: Number of tokens used for cache creation
- * `request_id`: Anthropic API request ID from the response’s `request-id` header, such as `"req_011..."`. Present only when the API returns one.
+ * `request_id`: API request ID, such as `"req_011..."`, described under Event correlation attributes.
* `client_request_id`: Client-generated UUID sent as the `x-client-request-id` request header; see the event correlation attributes table for when it’s present. Requires Claude Code v2.1.214 or later
* `speed`: `"fast"` or `"normal"`, indicating whether fast mode was active
* `query_source`: Subsystem that issued the request, such as `"repl_main_thread"`, `"compact"`, or a subagent name
@@ -777,7 +779,7 @@
* `status_code`: HTTP status code as a number. Absent for non-HTTP errors such as connection failures.
* `duration_ms`: Request duration in milliseconds
* `attempt`: Total number of attempts made, including the initial request (`1` means no retries occurred)
- * `request_id`: Anthropic API request ID from the response’s `request-id` header, such as `"req_011..."`. Present only when the API returns one.
+ * `request_id`: API request ID, such as `"req_011..."`, described under Event correlation attributes.
* `client_request_id`: Client-generated UUID sent as the `x-client-request-id` request header. Available even when a failure such as a timeout or connection error never produced a server `request_id`; see the event correlation attributes table for when it’s present. Requires Claude Code v2.1.214 or later
* `speed`: `"fast"` or `"normal"`, indicating whether fast mode was active
* `query_source`: Subsystem that issued the request, such as `"repl_main_thread"`, `"compact"`, or a subagent name
@@ -797,7 +799,7 @@
* `event.timestamp`: ISO 8601 timestamp
* `event.sequence`: per-process counter for ordering events, described under Event correlation attributes
* `model`: Model identifier from the request
- * `request_id`: Anthropic API request ID from the response’s `request-id` header, such as `"req_011..."`. Present only when the API returns one.
+ * `request_id`: API request ID, such as `"req_011..."`, described under Event correlation attributes.
* `query_source`: Subsystem that issued the request, such as `"repl_main_thread"`, `"compact"`, or a subagent name. See `api_request` for definitions.
* `speed`: Either `"fast"` when [Fast mode](</docs/en/fast-mode>) is active, or `"normal"`
* `attempt`: Retry attempt number. The first attempt is `1`.
@@ -846,7 +848,7 @@
* `body_truncated`: `"true"` when inline truncation occurred. Absent in file mode and when no truncation occurred.
* `model`: Model identifier
* `query_source`: Subsystem that issued the request
- * `request_id`: Anthropic API request ID from the response’s `request-id` header, such as `"req_011..."`. Present only when the API returns one.
+ * `request_id`: API request ID, such as `"req_011..."`, described under Event correlation attributes.
* `request_body_id`: The `request_body_id` of the `api_request_body` event that this response answers. Requires Claude Code v2.1.274 or later
* `message.id`: Message ID the API assigned to the response, the `id` field of the response body. Requires Claude Code v2.1.274 or later
* `message.uuid`: UUID of the response’s final transcript entry. Together with `request_body_id`, it links a transcript message to the request and response bodies behind it. Requires Claude Code v2.1.274 or later
@@ -1427,7 +1429,7 @@
}
}
-To confirm events arrive, submit a prompt in a session running under this configuration and check your SIEM for the `claude_code.user_prompt` event. If nothing arrives, run `claude --debug` and check the debug log for `[3P telemetry]` export errors.
+To confirm events arrive, submit a prompt in a session running under this configuration and check your SIEM for the `claude_code.user_prompt` event. If nothing arrives, start Claude Code with `claude --debug-file <path>` and check that log for `[3P telemetry]` export errors.
##
@@ -1512,7 +1514,7 @@
* `tool_result` events additionally include a `tool_input` attribute with file paths, URLs, search patterns, and other arguments. Individual values over 512 characters are truncated and the total is bounded to ~4 K characters
* `user_prompt` events include the verbatim `command_name` for custom, plugin, and MCP commands
* Trace spans include the same `tool_input` attribute and input-derived attributes such as `file_path`, with the same truncation as `tool_input`
- * Tool content is not logged in trace spans by default. To include it, set `OTEL_LOG_TOOL_CONTENT=1`. The `claude_code.tool` span then carries a `tool.output` span event with raw file contents and Bash command output, truncated at the content limit (60 KB by default) per attribute. Tool content also reaches spans through `new_context`, whose gate differs per span. Configure your telemetry backend to filter or redact these attributes as needed
+ * Tool content is not logged in trace spans by default. To include it, set `OTEL_LOG_TOOL_CONTENT=1`. The `claude_code.tool` span then carries a `tool.output` span event with raw file contents, Bash command output, and what MCP tools, WebFetch, and WebSearch return, truncated at the content limit (60 KB by default) per attribute. Results from MCP tools, WebFetch, and WebSearch require Claude Code v2.1.283 or later. Tool content also reaches spans through `new_context`, whose gate differs per span. Configure your telemetry backend to filter or redact these attributes as needed
* Raw Anthropic Messages API request and response bodies are not logged by default. To include them, set `OTEL_LOG_RAW_API_BODIES` in your shell, user settings, or managed settings. It’s ignored in [project and local settings](</docs/en/settings-reference#variables-claude-code-ignores-in-env>). The bodies contain the full conversation history, including the system prompt, every prior user and assistant turn, and tool results, so enabling this implies consent to everything the other `OTEL_LOG_*` content flags would reveal. Claude Code always redacts Claude’s extended-thinking content from these bodies, regardless of other settings. The value you set determines how Claude Code delivers the bodies:
* With `=1`, Claude Code emits `api_request_body` and `api_response_body` log events for each API call. The events’ `body` attribute carries the JSON-serialized payload, truncated at the content limit (60 KB by default)
* With `=file:<dir>`, Claude Code writes untruncated bodies to `.request.json` and `.response.json` files under that directory, and the events carry a `body_ref` path instead of the inline body. Ship the directory with a log collector or sidecar rather than through the telemetry stream. For each successful response, Claude Code also appends one line to `index.jsonl` in that directory, linking the response file to the request file that produced it and to the transcript message it became. Each line holds no message content, and the API response body event section lists its fields. The index file requires Claude Code v2.1.274 or later
--- a/observability.md
+++ b/observability.md
@@ -221,7 +221,7 @@
---|---
`OTEL_LOG_USER_PROMPTS=1`| Prompt text on `claude_code.user_prompt` events and on the `claude_code.interaction` span
`OTEL_LOG_TOOL_DETAILS=1`| Tool input arguments (file paths, shell commands, search patterns) on `claude_code.tool_result` events
-`OTEL_LOG_TOOL_CONTENT=1`| A [`tool.output` span event](</docs/en/monitoring-usage#tool-output-span-event>) on `claude_code.tool` with file contents and Bash output, truncated at 60 KB by default, configurable via `CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH`, which requires Claude Code v2.1.214 or later. Requires tracing to be enabled. Span attributes carry tool content under [their own gates](</docs/en/monitoring-usage#new-context-gates>)
+`OTEL_LOG_TOOL_CONTENT=1`| A [`tool.output` span event](</docs/en/monitoring-usage#tool-output-span-event>) on `claude_code.tool` with file contents, Bash output, and what MCP tools, WebFetch, and WebSearch return, truncated at 60 KB by default, configurable via `CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH`, which requires Claude Code v2.1.214 or later. Results from MCP tools, WebFetch, and WebSearch require Claude Code v2.1.283 or later. Requires tracing to be enabled. Span attributes carry tool content under [their own gates](</docs/en/monitoring-usage#new-context-gates>)
`OTEL_LOG_RAW_API_BODIES`| Full Anthropic Messages API request and response JSON as `claude_code.api_request_body` and `claude_code.api_response_body` log events. Set to `1` for inline bodies truncated at 60 KB by default, or `file:<dir>` for untruncated bodies on disk with a `body_ref` path in the event. `CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH` configures the inline truncation limit, and requires Claude Code v2.1.214 or later. Bodies include the entire conversation history and have extended-thinking content redacted. Enabling this implies consent to everything the three variables above would reveal
Leave these unset unless your observability pipeline is approved to store the data your agent handles. See [Security and privacy](</docs/en/monitoring-usage#security-and-privacy>) in the Monitoring reference for the full list of attributes and redaction behavior.
--- a/org.md
+++ b/org.md
@@ -3,7 +3,8 @@
These cases are covered on other pages:
* **Installing plugins for yourself** : start at [Install plugins](</docs/en/plugins/install>)
- * **Controlling which plugins members can use in claude.ai and Cowork** : see [Manage plugins for your organization](<https://support.claude.com/en/articles/13837433>) in the help center
+ * **Controlling which plugins members can use in claude.ai and Cowork** : see [Manage plugins for your organization](<https://claude.com/docs/plugins/admin>) on claude.com
+ * **Rolling one plugin out to claude.ai, Cowork, and Claude Code together** : see [Choose a rollout route](<https://claude.com/docs/plugins/org-rollout#choose-a-rollout-route>) on claude.com
* **The plugins page in claude.ai’s admin settings** : [**Organization settings > Plugins & skills**](<https://claude.ai/admin-settings/skills?tab=inventory>) turns plugins on for members’ claude.ai accounts, and those reach Claude Code as [synced plugins](</docs/en/plugins/loading#synced-plugins>). It doesn’t set any of the keys on this page
The sections follow the order most rollouts take: require plugins for everyone or per repository, seed containers and CI, restrict what users can add on their own, set update policy, then audit what’s installed. To review every policy key in one place, see the control matrix.
Show diff (209 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -1,4 +1,4 @@
-A permission mode sets which actions Claude can take in a session without asking you first. In Manual mode, Claude Code stops and asks you before most actions that edit files, run shell commands, or reach the network. In auto mode, a second model, the classifier, reviews actions instead of you; how the classifier evaluates actions lists which actions it reviews and which skip it. On Pro, Max, and Team plans, the built-in starting permission mode is auto mode. Which mode a session starts in covers the surfaces and settings that change the starting permission mode. You can also change a running session’s permission mode at any time.
+A permission mode sets which actions Claude can take in a session without asking you first. In Manual mode, Claude Code stops and asks you before most actions that edit files, run shell commands, or reach the network. In auto mode, a second model, the classifier, reviews actions instead of you; how the classifier evaluates actions lists which actions it reviews and which skip it. With Claude Code v2.1.283 or later, auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions. On earlier versions, it’s the built-in starting permission mode only on Pro, Max, and Team plans. Which mode a session starts in covers the surfaces and settings that change the starting permission mode. You can also change a running session’s permission mode at any time.
##
@@ -47,7 +47,7 @@
Review every action yourself| Manual mode: `claude --permission-mode default`| None| Sensitive work, unfamiliar code
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
+Work hands-off in auto mode| `claude --permission-mode auto`, the built-in starting permission mode with v2.1.283 or later| 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| [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
@@ -65,19 +65,15 @@
2. `permissions.defaultMode` in a [settings file](</docs/en/settings#where-settings-live>) If you set `"auto"` in `.claude/settings.json` or `.claude/settings.local.json`, the value doesn’t take effect, and Claude Code then uses the built-in default rather than a `defaultMode` from `~/.claude/settings.json`. If you set `"bypassPermissions"` in those two files, it doesn’t take effect either, and the session starts in Manual mode. The other values apply from any settings file.
3. The built-in default
-Conversations the VS Code extension starts follow the extension’s own list in Switch permission modes. For the permission mode Claude Code starts a resumed session in, see [permission mode on resume](</docs/en/sessions#permission-mode-on-resume>). The built-in `auto` default requires Claude Code v2.1.228 or later on macOS, Linux, and WSL, and v2.1.233 or later on native Windows. On earlier versions, the built-in default is Manual. The built-in default depends on how you run Claude Code, on your plan, and on whether Claude Code could fetch its feature flags. The first row that matches your session applies. The table covers sessions you start in a terminal or through the VS Code extension; for the desktop app and claude.ai, see the Desktop and Web tabs in Switch permission modes.
+Conversations the VS Code extension starts follow the extension’s own list in Switch permission modes. For the permission mode Claude Code starts a resumed session in, see [permission mode on resume](</docs/en/sessions#permission-mode-on-resume>). The built-in `auto` default requires Claude Code v2.1.228 or later on macOS, Linux, and WSL, and v2.1.233 or later on native Windows. On earlier versions, the built-in default is Manual. The built-in default depends on how you run Claude Code. The first row that matches your session applies. The table covers sessions you start in a terminal or through the VS Code extension; for the desktop app and claude.ai, see the Desktop and Web tabs in Switch permission modes.
How you run Claude Code| Built-in starting permission mode
---|---
Any settings file sets `disableAutoMode` to `"disable"`| `default`
-[Feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) is off| `default`
-Your [first session after you install Claude Code or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>) to a version that adds this default, unless, after a fresh install, Claude Code fetches the flags in time| `default`
`claude -p` or the [Agent SDK](</docs/en/agent-sdk/permissions>)| `default`
-Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), or a signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) session| `default`
-A Pro, Max, or Team plan, in a terminal or through the [VS Code extension](</docs/en/vs-code>)| `auto`
-An Enterprise plan or a Claude Console API key| `default`
-
-When feature-flag fetching is off, or in a [first session after an install or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>) where the flags haven’t arrived yet, the VS Code extension ignores every settings file when choosing the starting permission mode. When the flag, a settings file, or the built-in default selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when the session doesn’t meet the availability requirements, such as a settings file turning it off or a model that doesn’t support it, or when Anthropic has temporarily turned it off server-side. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
+In a terminal or through the [VS Code extension](</docs/en/vs-code>)| `auto` with Claude Code v2.1.283 or later; on earlier versions, `auto` on Pro, Max, or Team plans in sessions that [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), and `default` otherwise
+
+In your [first session after an install or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>), Claude Code can choose the starting permission mode before its feature flags arrive. That session can start in a different permission mode than the table gives, and your next session matches the table. When the flag, a settings file, or the built-in default selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when the session doesn’t meet the availability requirements, such as a settings file turning it off or a model that doesn’t support it, or when Anthropic has temporarily turned it off server-side. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
* In a terminal, once, at the top of the session
* In the VS Code extension, as a card on the new-conversation screen that stays until you dismiss it
@@ -153,10 +149,10 @@
1. `claudeCode.initialPermissionMode`
2. The mode you last picked from the mode indicator, if it was Manual, Edit automatically, or Auto. Picking Plan or Bypass permissions applies to that conversation only
- 3. `permissions.defaultMode` from [managed settings](</docs/en/managed-settings>) or `~/.claude/settings.json`, on Pro, Max, and Team plans with feature-flag fetching available
+ 3. `permissions.defaultMode` from [managed settings](</docs/en/managed-settings>) or `~/.claude/settings.json`
4. The built-in default for your plan, provider, and organization settings
-The extension never reads a project’s `.claude/settings.json` or `.claude/settings.local.json` for the starting permission mode, and in conversations that don’t meet item 3’s conditions it reads no settings file at all. When `claudeCode.claudeProcessWrapper` is set, items 3 and 4 don’t apply either: those conversations start in Manual unless item 1 or item 2 sets a permission mode.Auto appears in the mode indicator when auto mode is available.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings. Without it, the permission mode doesn’t appear in the indicator, and a `bypassPermissions` value from item 1 or item 3 starts the conversation in Manual instead. Auto from any item likewise starts the conversation in Manual when auto mode isn’t available.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
+The extension never reads a project’s `.claude/settings.json` or `.claude/settings.local.json` for the starting permission mode. When `claudeCode.claudeProcessWrapper` is set, items 3 and 4 don’t apply: those conversations start in Manual unless item 1 or item 2 sets a permission mode.Before v2.1.283, item 3 applied only on Pro, Max, and Team plans in sessions that [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>).Auto appears in the mode indicator when auto mode is available.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings. Without it, the permission mode doesn’t appear in the indicator, and a `bypassPermissions` value from item 1 or item 3 starts the conversation in Manual instead. Auto from any item likewise starts the conversation in Manual when auto mode isn’t available.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
The JetBrains plugin runs Claude Code in the IDE terminal, so switching permission modes works the same as in the CLI: press `Shift+Tab` to cycle, or pass `--permission-mode` when launching.
@@ -170,7 +166,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](</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.
+ * **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, and Plan for a session you started yourself, and you can’t select Auto or Bypass permissions from the app. For a project thread running on your computer, see [Run a thread on your own computer](</docs/en/claude-projects#run-a-thread-on-your-own-computer>).
* 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.
* Before v2.1.202, sessions connected with `/remote-control` or `claude --remote-control` didn’t report their permission mode at all, so claude.ai and the mobile app could show a permission mode the session wasn’t in. The mismatch affected only the label. Claude Code generated permission prompts from the session’s actual permission mode, and they still appeared in the app for approval.
@@ -195,7 +191,13 @@
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 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:
+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. What happens to a shell command during planning depends on the session, and the first of these cases that matches applies:
+
+ * **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.
+ * **[Auto mode](</docs/en/auto-mode-config>) available and the `useAutoModeDuringPlan` setting on**, which it is by default: the classifier reviews shell commands other than critical-path removals instead of prompting you. Approved commands run, and rejected ones are blocked.
+ * **Auto mode not available, or`useAutoModeDuringPlan` off**: 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.
+
+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
@@ -229,7 +231,7 @@
Eliminate permission prompts with auto mode
-Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. On Pro, Max, and Team plans, auto mode is the built-in starting permission mode. The classifier also reviews each message Claude sends to another agent with [`SendMessage`](</docs/en/tools-reference>), whether plain text or a structured [agent team](</docs/en/agent-teams>) message, before Claude Code delivers it, both in auto mode and in plan mode while the classifier reviews commands; the send review requires Claude Code v2.1.222 or later. The classifier also reviews and approves or blocks `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` and `rm -rf ~`, including when the removal sits inside command or process substitution. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior in a mode that still prompts you, set the [Proactive output style](</docs/en/output-styles>) instead.
+Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. With Claude Code v2.1.283 or later, auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions on every plan and provider. On earlier versions, it’s the built-in starting permission mode only on Pro, Max, and Team plans. The classifier also reviews each message Claude sends to another agent with [`SendMessage`](</docs/en/tools-reference>), whether plain text or a structured [agent team](</docs/en/agent-teams>) message, before Claude Code delivers it, both in auto mode and in plan mode while the classifier reviews commands; the send review requires Claude Code v2.1.222 or later. By default, the classifier doesn’t review `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` or `rm -rf ~`. Critical paths covers what happens to them in each permission mode. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior in a mode that still prompts you, set the [Proactive output style](</docs/en/output-styles>) instead.
Auto mode reduces permission prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
@@ -248,7 +250,7 @@
Auto mode on Bedrock, Agent Platform, or Foundry
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the permission mode a session starts in: on these providers, terminal sessions start in your [`defaultMode`](</docs/en/settings-reference#permissions-defaultmode>), which is Manual unless you change it, and conversations in the [VS Code extension](</docs/en/vs-code>) start in Manual unless `claudeCode.initialPermissionMode` or a mode you picked in the extension sets one. Only Claude Sonnet 5, Opus 4.7 or later, and 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.
+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 is available by default. With Claude Code v2.1.283 or later, it’s also the built-in starting permission mode for interactive terminal and [VS Code](</docs/en/vs-code>) sessions. To choose the starting permission mode yourself, set `permissions.defaultMode` as Start in a different permission mode describes, or pick a permission mode from the VS Code extension’s mode indicator. Only Claude Sonnet 5, Opus 4.7 or later, and the Fable models are supported on these providers. On any other model, the session starts in Manual instead. 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.
###
@@ -267,7 +269,7 @@
* **The server doesn’t review the session** : a response completes with no review results, or the server answers that it doesn’t review this session. The most common causes are an LLM gateway or proxy that drops the request for review or the results, and a platform, region, or credential that doesn’t have server-side checks yet. Claude Code falls back to its own classifier requests. Once that fallback holds for the rest of the session, it shows a [notice about classifier request charges](</docs/en/auto-mode-classifier-billing>) on accounts where those requests are billed.
* **The server gives no verdict for an action** : Claude Code denies the action rather than run it unreviewed. On any connection, this happens when the response ends before the review results arrive or the results arrive in a form Claude Code can’t read. An LLM gateway or proxy that cuts responses short or rewrites the results can cause either. On a direct connection to the Anthropic API, it also happens when the server’s check fails for the action, for example by timing out. [The server returned no safety verdict](</docs/en/errors#the-server-returned-no-safety-verdict>) covers the denial message, what happens when denials repeat, and what to do.
-To skip asking the server and always use Claude Code’s own classifier requests, set [`CLAUDE_CODE_AUTO_MODE_SERVER=0`](</docs/en/env-vars>). On a direct connection to the Anthropic API, the variable requires Claude Code v2.1.281 or later. Setting it to `1` there turns server review on in a session that doesn’t have it yet, such as a `-p` or Agent SDK session, unless you’ve also set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`. If you set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` and leave `CLAUDE_CODE_AUTO_MODE_SERVER` unset, Claude Code also stops asking the server.
+To skip asking the server and always use Claude Code’s own classifier requests, set [`CLAUDE_CODE_AUTO_MODE_SERVER=0`](</docs/en/env-vars>). On a direct connection to the Anthropic API, the variable requires Claude Code v2.1.281 or later. Setting it to `1` there turns server review on in a session that doesn’t have it yet, such as a `-p` or Agent SDK session, unless you’ve also set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`. If you set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` and leave `CLAUDE_CODE_AUTO_MODE_SERVER` unset, Claude Code also stops asking the server, except as [Disable pre-release capabilities](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) describes.
###
@@ -331,7 +333,7 @@
Claude Code v2.1.205 and later also block these by default:
* Writing to Claude Code session transcripts, the `.jsonl` history files under `~/.claude/projects/` or your configured config directory, whether directly or through a shell command. The rule also covers the metadata lines Claude Code appends to each transcript entry for its own checks. Reading a transcript isn’t blocked
- * A recursive forced delete such as `rm -rf "$VAR"` or `Remove-Item -Recurse -Force $dir` whose target is a shell variable, or a glob rooted at one, that isn’t assigned anywhere in the conversation the classifier sees. The value came only from earlier command output, which the classifier never receives, so the classifier can’t verify the deletion target against the other deletion rules. The block clears when you name the exact path being deleted, or when Claude re-runs the delete with the resolved literal path written into the command. Deletes whose target the classifier can resolve aren’t affected. `Remove-Item` targets that are a bare `*` or end in `/*` or `\*` never reach the classifier: Claude Code denies them outright
+ * A recursive forced delete such as `rm -rf "$VAR"` or `Remove-Item -Recurse -Force $dir` whose target is a shell variable that isn’t assigned anywhere in the conversation the classifier sees, or a glob rooted at such a variable. The value came only from earlier command output, which the classifier never receives, so the classifier can’t verify the deletion target against the other deletion rules. The block clears when you name the exact path being deleted, or when Claude re-runs the delete with the resolved literal path written into the command. Deletes whose target the classifier can resolve aren’t affected. A glob directly under the variable, as in `rm -rf "$VAR"/*`, is a critical path instead. `Remove-Item` targets that are a bare `*` or end in `/*` or `\*` never reach the classifier: Claude Code denies them outright.
Claude Code v2.1.257 and later also block these by default:
@@ -415,13 +417,14 @@
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, 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
+ * Writes to protected paths route to the classifier even when an allow rule matches
+ * No allow rule approves `rm` and `rmdir` removals targeting a critical path
* 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
* In a session with server-side classifier review, read-only and [sandboxed](</docs/en/sandboxing#sandbox-modes>) shell commands wait for that review and are blocked if it flags them
- 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
+ 3. Everything else goes to the classifier, apart from critical-path removals under their default handling. The connector tools and `requiresUserInteraction` MCP tools that prompt you directly in step 1 never reach the classifier either, 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>)
On entering auto mode, broad allow rules that grant arbitrary code execution are dropped:
@@ -462,7 +465,7 @@
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 interactive terminal 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. The Remove-Item in PowerShell denies also apply 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.
@@ -499,7 +502,12 @@
`dontAsk`| Denied
`bypassPermissions`| Allowed
-In a session started with [`--restricted`](</docs/en/cli-reference#cli-flags>), which requires Claude Code v2.1.248 or later, the classifier can’t approve protected-path writes. [`permissions.allow`](</docs/en/permissions#manage-permissions>) rules in settings files do not pre-approve protected-path writes. The safety check runs before Claude Code evaluates allow rules from settings, so an entry such as `Edit(.claude/**)` in `~/.claude/settings.json` or `.claude/settings.json` does not change the per-mode outcome in the table above. In modes that prompt, the prompt for a `.claude/` write offers **Yes, and allow Claude to edit its own settings for this session** , which approves later `.claude/` writes in that session without prompting again. Protected directories:
+In a session started with [`--restricted`](</docs/en/cli-reference#cli-flags>), which requires Claude Code v2.1.248 or later, the classifier can’t approve protected-path writes. [`permissions.allow`](</docs/en/permissions#manage-permissions>) rules in settings files do not pre-approve protected-path writes. The safety check runs before Claude Code evaluates allow rules from settings, so an entry such as `Edit(.claude/**)` in `~/.claude/settings.json` or `.claude/settings.json` does not change the per-mode outcome in the table above. In permission modes that prompt, the prompt for a write to the project’s `.claude/` folder or to `~/.claude/` can offer one of these session-scoped options:
+
+ * For the project’s `.claude/` folder: **Yes, and allow Claude to edit files in this project’s .claude folder for this session**
+ * For `~/.claude/`: **Yes, and allow Claude to edit files in its ~/.claude folder for this session**
+
+Protected directories:
* `.git`
* `.config/git`
@@ -535,12 +543,18 @@
Mode| What Claude Code does with a critical-path removal
---|---
`default`, `acceptEdits`| Asks you to approve it
-`plan`| Asks you to approve it. With auto mode available during planning and no bypass permissions available, sends it to the classifier instead
-`auto`| Sends it to the classifier
+`plan`| Asks you to approve it. When the classifier reviews commands during planning and no bypass permissions are available, handles it as in `auto` mode
+`auto`| Asks you to approve it in the terminal, with a time limit. Elsewhere, denies it
`dontAsk`| Denies it
-`bypassPermissions`| Asks you to approve it
-
-If an explicit [ask rule](</docs/en/permissions#manage-permissions>) matches the command, Claude Code asks you even in `auto` mode. In modes that ask, a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) can answer the prompt the way it answers any other. Claude Code treats an `rm` or `rmdir` target as a critical path when it is any of the following:
+`bypassPermissions`| Asks you to approve it, with a time limit in the terminal
+
+If an explicit [ask rule](</docs/en/permissions#manage-permissions>) matches the command, Claude Code asks you instead, even in `auto` mode and without a time limit. In modes that ask, a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) can answer the prompt. The `auto` and `bypassPermissions` handling requires Claude Code v2.1.281 or later. To turn it off, set [`CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT=1`](</docs/en/env-vars#variables>) in the environment that launches Claude Code. In `auto` mode, critical-path removals then go to the classifier instead, and in `bypassPermissions` mode the prompt has no time limit. In `auto` and `bypassPermissions` modes, the terminal prompt shows a two-minute countdown:
+
+ * If the countdown runs out before you answer, Claude Code denies the command and tells Claude what to do instead, so an unattended session keeps working.
+ * Press any key while the prompt is open to stop the countdown and keep the prompt waiting for your answer.
+ * After three of these prompts run out unanswered in a session, Claude Code stops showing them and denies further critical-path removals immediately. Sending a new message starts the count over.
+
+In `auto` mode, wherever Claude Code can’t show you a terminal prompt, it denies the command immediately, for example in [non-interactive runs](</docs/en/headless>) with `-p`, in [Agent SDK](</docs/en/agent-sdk/permissions>) sessions, and in the VS Code extension’s chat panel and the Desktop app. The denial tells Claude to report what it wanted to delete and leave the removal to you. Claude Code treats an `rm` or `rmdir` target as a critical path when it is any of the following:
* The filesystem root
* Top-level directories, meaning any direct child of the root, such as `/usr`, `/etc`, or `/data`
@@ -554,7 +568,14 @@
* For a variable such as `$DIR`, guard each expansion so the shell stops with an error when the variable is unset or empty, as in `rm -rf "${DIR:?}"/*`, or use a literal path
* For a variable that is normally set, such as `$HOME`, use a literal path
-A removal whose expansions are all guarded that way isn’t a critical-path removal, so in `bypassPermissions` mode it runs without a prompt. Hiding the removal inside a subshell with `(...)`, a brace group with `{ ...; }`, command substitution with `$(...)` or backticks, or process substitution with `<(...)`, doesn’t skip the check. Claude Code finds a critical-path removal whether it sits inside the nested form, as in `(rm -rf ~)` or `echo "$(rm -rf ~)"`, or elsewhere in the same command.
+A removal whose expansions are all guarded that way passes this check, so in `bypassPermissions` mode it runs without a prompt unless another check in this section flags it. Claude Code also treats these targets as critical paths:
+
+ * **A shell variable followed by one top-level directory name** , such as `rm -rf "$TMPDIR/mnt"`: when the variable expands empty, the command removes `/mnt`. This covers common top-level names such as `mnt`, `tmp`, `usr`, and `Users`.
+ * **A variable that the same command assigns from a directory-printing substitution** , such as `D=$(pwd); rm -rf "$D"` or an assignment from `$(git rev-parse --show-toplevel)`: the value can name your working directory or repository root. A `"${D:?}"` guard doesn’t clear this check, because the variable isn’t empty; use a literal path instead.
+ * **A backslash-only target** , such as `rm -rf "\\"`: Git Bash on Windows reads a lone backslash as the current drive’s root, so the check applies on every platform.
+ * **Only the output of a command substitution** , such as `rm -rf "$(pwd)"`, when the `rm` is recursive: Claude Code can’t check the target before the command runs, so the prompt tells Claude to run the substitution on its own first and then remove the literal paths it prints. To turn off this one check, set [`CLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPT=1`](</docs/en/env-vars#variables>) in the environment that launches Claude Code.
+
+When a trailing command substitution can expand empty, as in `rm -rf ~/$(cmd)`, Claude Code checks the path that would remain, your home directory in this example. Hiding the removal inside a subshell with `(...)`, a brace group with `{ ...; }`, command substitution with `$(...)` or backticks, or process substitution with `<(...)`, doesn’t skip the check. Claude Code finds a critical-path removal whether it sits inside the nested form, as in `(rm -rf ~)` or `echo "$(rm -rf ~)"`, or elsewhere in the same command.
###
@@ -562,11 +583,13 @@
Remove-Item in PowerShell
-When you enable the [PowerShell tool](</docs/en/tools-reference#powershell-tool>), Claude Code gives `Remove-Item` its own check, separate from the `rm` critical-path list. The outcome depends on the target, and the first matching case applies:
+When you enable the [PowerShell tool](</docs/en/tools-reference#powershell-tool>), Claude Code gives `Remove-Item` and the `cmd` built-ins `rd`, `rmdir`, `del`, and `erase` their own checks, separate from the `rm` critical-path list. For `Remove-Item`, the outcome depends on the target, and the first matching case applies:
* **System paths** : the filesystem root and its top-level directories, drive roots and their top-level directories, and your home directory. Claude Code denies the command in every mode, without asking you.
* **Wildcards** : a bare `*`, or any target ending in `/*` or `\*`, including a glob under a shell variable such as `$dir/*`. Claude Code denies the command in every mode, without asking you, before the classifier sees it.
* **Your working directory or one of its parents, with`-Recurse`**: Claude Code treats the command like any other that needs approval in your permission mode, so it asks you in modes that ask, sends it to the classifier in `auto` mode, and denies it in `dontAsk` mode. `bypassPermissions` mode skips this check.
+
+The system-paths case also applies to `rd`, `rmdir`, `del`, and `erase` when Claude runs them through `cmd`, as in `cmd /c rd /s /q C:\Users`. By default, Claude Code denies such a command in every mode, without asking you. This `cmd` check requires Claude Code v2.1.283 or later. When judging a `cmd` target, Claude Code treats a PowerShell variable that follows literal text as empty. That makes `cmd /c rd /s /q "C:\$name"` a removal of `C:\`, so it is denied too. A trailing wildcard counts as the folder it empties, so `cmd /c del /q C:\*` is denied and `cmd /c del /q dist\*` in your project is not. To turn the `cmd` check off, set [`CLAUDE_CODE_DISABLE_POWERSHELL_CMD_RM_DENY=1`](</docs/en/env-vars#variables>) in the environment that launches Claude Code. Claude Code ignores this variable in a settings file’s `env` block. `Remove-Item` on a system path stays denied either way.
##
--- a/permissions.md
+++ b/permissions.md
@@ -41,7 +41,7 @@
Allow rules
-Check `allow` rules (from `allowed_tools` and settings.json). If a rule matches, the tool is approved. A call the tool approves on its own is resolved at this step too, with no rule needed: for example a file read inside your working directories or a [read-only Bash command](</docs/en/permissions#read-only-commands>). `rm` and `rmdir` removals targeting a [critical path](</docs/en/permission-modes#critical-paths>) are never approved by an allow rule: they reach your callback in the modes that prompt, go to the [classifier](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) in `auto` mode on Claude Code v2.1.218 or later, and are denied in `dontAsk` mode.
+Check `allow` rules (from `allowed_tools` and settings.json). If a rule matches, the tool is approved. A call the tool approves on its own is resolved at this step too, with no rule needed: for example a file read inside your working directories or a [read-only Bash command](</docs/en/permissions#read-only-commands>).`rm` and `rmdir` removals targeting a [critical path](</docs/en/permission-modes#critical-paths>) are never approved by an allow rule. Whether they then reach your callback depends on the permission mode: in an Agent SDK session in `auto` mode, for example, Claude Code denies them by default without calling it. The [Critical paths](</docs/en/permission-modes#critical-paths>) mode table lists what each mode does with them.
6
@@ -76,7 +76,7 @@
Allow rules accept tool-name globs only after a literal `mcp__<server>__` prefix. The server segment must be glob-free so the rule names a specific server you configured: `mcp__puppeteer__*` matches every tool from the `puppeteer` server, and `mcp__github__get_*` matches its `get_` tools. An unanchored entry like `allowed_tools=["*"]` or `allowed_tools=["mcp__*"]` is ignored with a startup warning and does not auto-approve anything. Scoped rules for `Read` and `Edit` take a path pattern. `Edit(path)` rules govern all built-in tools that write files, including `Write` and `NotebookEdit`; a `Write(path)` rule is never matched by the file permission checks. Use `//path` for an absolute filesystem path: a deny rule of `Edit(//secrets/**)` blocks writes anywhere under `/secrets` on disk. With a single leading slash, `Edit(/secrets/**)` anchors at the rule’s source instead. For rules passed through `allowed_tools` or `disallowed_tools`, that means the session’s working directory, so the rule doesn’t block `/secrets` on disk. See [Read and Edit rules](</docs/en/permissions#read-and-edit>) for the four anchor forms and how rules from settings files resolve.
-**Auto-approved tools never reach`canUseTool`.** A tool call approved at any earlier step, by `acceptEdits` or `bypassPermissions`, or by an allow rule, skips your `canUseTool` callback, so permission checks you put there are silently bypassed for that tool. `AskUserQuestion`, MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>), connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), and `rm` and `rmdir` removals targeting a [critical path](</docs/en/permission-modes#critical-paths>) still reach the callback, even when an allow rule matches. In `auto` mode, critical-path removals go to the [classifier](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) instead of the callback, while the other calls listed here still reach it; the classifier routing requires Claude Code v2.1.218 or later. In `dontAsk` mode these calls are denied instead, without invoking the callback.Coverage depends on the entry’s form: a bare name like `Read` or `mcp__github__get_issue` auto-approves every call to that tool apart from the exceptions above, while a scoped rule like `Bash(npm test *)` auto-approves only matching calls, and other `Bash` calls that need approval still fall through to the callback. For checks that must run on every tool call, use a [`PreToolUse` hook](</docs/en/agent-sdk/hooks>): hooks run before every other step, and a hook deny applies even in `bypassPermissions` mode.
+**Auto-approved tools never reach`canUseTool`.** A tool call approved at any earlier step, by `acceptEdits` or `bypassPermissions`, or by an allow rule, skips your `canUseTool` callback, so permission checks you put there are silently bypassed for that tool.An allow rule never auto-approves `AskUserQuestion`, MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>), connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), or `rm` and `rmdir` removals targeting a [critical path](</docs/en/permission-modes#critical-paths>). In `dontAsk` mode Claude Code denies these calls without invoking the callback. In other modes the first three reach the callback. Depending on the [permission mode](</docs/en/permission-modes#critical-paths>), a critical-path removal reaches the callback too or Claude Code denies it without calling it, as it does by default for an Agent SDK session in `auto` mode.Coverage depends on the entry’s form: a bare name like `Read` or `mcp__github__get_issue` auto-approves every call to that tool apart from the exceptions above, while a scoped rule like `Bash(npm test *)` auto-approves only matching calls, and other `Bash` calls that need approval still fall through to the callback. For checks that must run on every tool call, use a [`PreToolUse` hook](</docs/en/agent-sdk/hooks>): hooks run before every other step, and a hook deny applies even in `bypassPermissions` mode.
For a locked-down agent, pair `allowedTools` with `permissionMode: "dontAsk"`:
--- a/platforms.md
+++ b/platforms.md
@@ -49,7 +49,7 @@
| Trigger| Claude runs on| Setup| Best for
---|---|---|---|---
[Dispatch](</docs/en/desktop#sessions-from-dispatch>)| Message a task from the Claude mobile app| Your machine (Desktop)| [Pair the mobile app with Desktop](<https://support.claude.com/en/articles/13947068>)| Delegating work while you’re away, minimal setup
-[Remote Control](</docs/en/remote-control>)| Drive a running session from [claude.ai/code](<https://claude.ai/code>) or the Claude mobile app| Your machine (CLI or VS Code)| Run `claude remote-control`| Steering in-progress work from another device
+[Remote Control](</docs/en/remote-control>)| Drive a running session from [claude.ai/code](<https://claude.ai/code>) or the Claude mobile app| Your machine (CLI, Desktop, or VS Code)| Run [`claude remote-control` or `/remote-control`](</docs/en/remote-control#start-a-remote-control-session>)| Steering in-progress work from another device
[Channels](</docs/en/channels>)| Push events from a chat app like Telegram or Discord, or your own server| Your machine (CLI)| [Install a channel plugin](</docs/en/channels#quickstart>) or [build your own](</docs/en/channels-reference>)| Reacting to external events like CI failures or chat messages
[Slack](</docs/en/slack>)| Mention `@Claude` in a team channel| Anthropic cloud| [Install the Slack app](</docs/en/slack#setting-up-claude-code-in-slack>) with [Claude Code on the web](</docs/en/claude-code-on-the-web>) enabled| PRs and reviews from team chat
[Self-hosted environments](</docs/en/self-hosted-environments>)| Start a [cloud session](</docs/en/claude-code-on-the-web>) and pick your organization’s environment| Your organization’s infrastructure| [Deploy runners](</docs/en/self-hosted-environments-quickstart>), on Team and Enterprise plans| Cloud sessions that must run inside your network
--- a/plugin-evals.md
+++ b/plugin-evals.md
@@ -4,7 +4,7 @@
* Catch regressions when you change the plugin or a new model is released
* See what the plugin contributes compared with no plugin
-This page is for plugin and skill authors who have a working plugin and want to test its behavior, and for teams that gate plugin changes in CI. Its case format is separate from the `evals/evals.json` file the [skill-creator plugin](</docs/en/skills#run-evals-with-skill-creator>) uses. To create a plugin, see [Create a plugin](</docs/en/plugins/create>); to check a plugin’s files for syntax and schema errors rather than its behavior, use [`claude plugin validate`](</docs/en/plugins/cli-reference#plugin-validate>).
+This page is for plugin and skill authors who have a working plugin and want to test its behavior, and for teams that gate plugin changes in CI. For iterating on one skill inside a Claude Code conversation, the [skill-creator plugin](</docs/en/skills#run-evals-with-skill-creator>) runs a similar comparison with its own `evals/evals.json` format, and neither tool reads the other’s case files. To create a plugin, see [Create a plugin](</docs/en/plugins/create>); to check a plugin’s files for syntax and schema errors rather than its behavior, use [`claude plugin validate`](</docs/en/plugins/cli-reference#plugin-validate>).
Every eval run and every judge grader is a real model call on your account, counted against your plan’s usage or your API bill, so check the requirements first. Then create your first eval suite, or go to Run evals in CI if you already have one.
@@ -17,6 +17,7 @@
To run plugin evals you need:
* Claude Code v2.1.269 or later. Run `claude --version` to check and `claude update` to upgrade.
+ * Git 2.31 or later, if git is installed. Run `git --version` to check. With an older git, `claude plugin eval` stops before running any case. Without git, it runs normally.
* A plugin directory with a `plugin.json` or `.claude-plugin/plugin.json` manifest, or a [skills-directory plugin](</docs/en/plugins/loading#plugins-shared-through-a-repository>).
* The same authentication and model provider your normal Claude Code sessions use. Eval runs, judge-scored graders, and `claude plugin eval init` call the model with your credentials, so they count against your plan’s usage limits or your API bill. When the command reports a cost, the figure is a [list-price estimate](</docs/en/costs>) of those calls.
@@ -392,7 +393,7 @@
130| Interrupted. Partial results are written
143| Terminated, such as by a CI timeout
-Problems writing or publishing the HTML report never change the exit code. To see why a case scored low, run it locally without `--json` so the per-run progress and grader lines print. A CI runner also needs these in place:
+The with-minus-without delta is reported but never changes the exit code, and neither do problems writing or publishing the HTML report. To see why a case scored low, run it locally without `--json` so the per-run progress and grader lines print. A CI runner also needs these in place:
* **Install and credentials** : a CI runner needs a Claude Code install and [credentials in the environment](</docs/en/authentication>) such as `ANTHROPIC_API_KEY`.
* **Trust** : without `--trust-plugin`, a job whose checkout directory Claude Code doesn’t already trust needs the first-run trust prompt, and a run that can’t ask is refused with exit 1.
@@ -654,6 +655,18 @@
+“is too old for claude plugin eval”
+
+The `git` on your `PATH` is older than 2.31, so `claude plugin eval` stopped before running any case and exited 1 with a message naming your version:
+
+ git 2.30 is too old for claude plugin eval: it ignores the environment configuration (GIT_CONFIG_COUNT, added in git 2.31) that switches off the repository's git hooks and helper programs for the run. Install git 2.31 or newer.
+
+For each run, Claude Code switches off git hooks, credential helpers, and other programs a repository’s git configuration can start. It does so through environment configuration that git reads only from version 2.31. An older git ignores that configuration, so the suite stops rather than scoring runs where those programs could execute. Install git 2.31 or later and run the suite again. Before v2.1.283, `claude plugin eval` didn’t check the git version, and on an older git the suite ran with those programs left on.
+
+###
+
+
+
”No eval cases found”
No `<case>/prompt.md` or `<case>/case.yaml` exists beneath the eval directory in effect, or your `--case` and `--tag` filters matched no case. Run from the plugin root, or run `claude plugin eval init` to create a suite.
--- a/plugins.md
+++ b/plugins.md
@@ -311,7 +311,7 @@
Plugin not loading
-If your plugin doesn’t appear in the init message:
+If your plugin doesn’t appear in the init message’s `plugins` list, check its [`plugin_errors`](</docs/en/agent-sdk/typescript#sdksystemmessage>) field for the reason, then work through these checks:
1. **Check the path** : ensure the path points to the plugin root directory, the parent of `skills/`, `agents/`, `hooks/`, `commands/`, or `.claude-plugin/`
2. **Validate plugin.json** : if your plugin includes a manifest, ensure it has valid JSON syntax
--- a/prompt-caching.md
+++ b/prompt-caching.md
@@ -48,12 +48,12 @@
Actions that invalidate the cache
-These actions cause the next request to miss part or all of the cache. You see a one-time slower, more expensive turn, after which the new prefix is cached. Most of them are avoidable mid-task once you know they have a cost. A model switch can feel free until you notice the slower turn that follows.
+These actions can cause the next request to miss part or all of the cache. You see a one-time slower, more expensive turn, after which the new prefix is cached. Most of them are avoidable mid-task once you know they have a cost. A model switch can feel free until you notice the slower turn that follows.
* Switching models
* Changing effort level
* Turning on fast mode
- * Connecting or disconnecting an MCP server
+ * Connecting or removing an MCP server
* Enabling or disabling a plugin
* Denying an entire tool
* Compacting the conversation
@@ -88,14 +88,23 @@
-Connecting or disconnecting an MCP server
+Connecting or removing an MCP server
Tool definitions sit in the system prompt layer, so the cache invalidates when the set of tool definitions in the request changes between turns. Toggling the [advisor tool](</docs/en/advisor>) is an exception: its definition sits after the cache breakpoint, so enabling or disabling `/advisor` keeps the cached prefix intact. Whether an [MCP server](</docs/en/mcp>) change does this depends on whether its tools are deferred by [tool search](</docs/en/mcp#scale-with-mcp-tool-search>) or loaded into the prefix:
* **Deferred tools** , the default on supported models: a server connecting, disconnecting, or changing its tool list only appends new content and doesn’t disturb anything already cached.
- * **Tools loaded into the prefix** : any change to them invalidates the cache. This happens when [tool search is unavailable or disabled](</docs/en/mcp#configure-tool-search>), such as on Google Cloud’s Agent Platform models earlier than the Claude 4.5 generation, with a custom `ANTHROPIC_BASE_URL` gateway, or on a Microsoft Foundry [deployment hosted on Azure](<https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry#hosting-options>) once Claude Code detects that the deployment rejects tool search. It also happens for a server or tool marked [`alwaysLoad`](</docs/en/mcp#exempt-a-server-from-deferral>), and for definitions kept upfront by [threshold-based loading](</docs/en/mcp#configure-tool-search>).
-
-When tools load into the prefix, the most common cause of an invalidation is a server connecting or disconnecting mid-session, which can happen without any action on your part: a stdio server’s process exits, an HTTP session expires, or a server [reconnects automatically after a transient failure](</docs/en/mcp#automatic-reconnection>). A connected server can also push a [dynamic tool update](</docs/en/mcp#dynamic-tool-updates>) that changes its tool list. Editing your MCP config does not by itself change the cache. The new config takes effect only after a restart, which is when the server connects or disconnects.
+ * **Tools loaded into the prefix** : adding a definition invalidates the cache, and so does removing one on purpose. This is the case when [tool search is unavailable or disabled](</docs/en/mcp#configure-tool-search>), such as on Google Cloud’s Agent Platform models earlier than the Claude 4.5 generation, with a custom `ANTHROPIC_BASE_URL` gateway, or on a Microsoft Foundry [deployment hosted on Azure](<https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry#hosting-options>) once Claude Code detects that the deployment rejects tool search.
+
+Without tool search, whether a mid-session server change invalidates the cache depends on what changed. For each change, this table gives whether the cache is kept and what happens to the tool definitions in the next request.
+
+Mid-session change| Cache| Tool definitions in the next request
+---|---|---
+A server connects, or a [dynamic tool update](</docs/en/mcp#dynamic-tool-updates>) adds tools| Invalidated| The new definitions are added
+A server drops out with no action on your part, such as a stdio server’s process exiting| Kept| The server’s definitions stay unchanged. A call to one of its tools returns an error instead of running
+A remote server [reconnects automatically](</docs/en/mcp#automatic-reconnection>) after its connection drops| Kept, unless a request sent while the server reconnects adds the `WaitForMcpServers` tool, which invalidates the cache once| The server’s definitions stay unchanged. A request sent while the server reconnects can add `WaitForMcpServers` when the conversation hasn’t listed it yet, and the tool then stays listed for the rest of the conversation
+You remove a tool on purpose, such as with a deny rule or by disabling its server in `/mcp`| Invalidated| The definition is removed
+
+When you resume a conversation whose tools load into the prefix, one of its MCP servers can still be connecting as the first request goes out. If the transcript recorded that server’s tool definitions, that request includes them as recorded, so it doesn’t change when the server finishes connecting with the same tools. Editing your MCP config does not by itself change the cache. The new config takes effect only after a restart, which is when the server connects or disconnects.
###
@@ -119,7 +128,7 @@
Plugins that provide MCP servers
-When you enable or disable a plugin that provides [MCP servers](</docs/en/plugins/components#mcp-servers>), Claude Code follows the same rules as when you connect or disconnect an MCP server:
+When you enable or disable a plugin that provides [MCP servers](</docs/en/plugins/components#mcp-servers>), Claude Code follows the same rules as when you connect or remove an MCP server:
* If Claude Code defers the server’s tools, it keeps the cache.
* If Claude Code loads them into the prefix, the next request re-reads the entire conversation.
@@ -369,12 +378,12 @@
Variable| Effect
---|---
`DISABLE_PROMPT_CACHING`| Disable for all models
-`DISABLE_PROMPT_CACHING_HAIKU`| Disable for Haiku only
+`DISABLE_PROMPT_CACHING_HAIKU`| Disable for the default Haiku model
`DISABLE_PROMPT_CACHING_SONNET`| Disable for Sonnet only
`DISABLE_PROMPT_CACHING_OPUS`| Disable for Opus only
`DISABLE_PROMPT_CACHING_FABLE`| Disable for Fable only
-To set caching policy across an organization, put any of these or the TTL variables in the `env` block of [managed settings](</docs/en/managed-settings>). For normal use, leave caching enabled.
+`DISABLE_PROMPT_CACHING_HAIKU` applies to the default Haiku model, the model the `haiku` alias resolves to. It disables caching wherever that model runs, including the main conversation when it is your main model. Covering the main conversation requires Claude Code v2.1.283 or later. The variable also covers a background model you set with the deprecated `ANTHROPIC_SMALL_FAST_MODEL` variable, when that model differs from your main model. A different Haiku version that you pin as your main model keeps caching; set `DISABLE_PROMPT_CACHING` to disable caching for it. To set caching policy across an organization, put any of these or the TTL variables in the `env` block of [managed settings](</docs/en/managed-settings>). For normal use, leave caching enabled.
##
--- a/publish.md
+++ b/publish.md
@@ -1,4 +1,4 @@
-Publishing a Claude Code plugin means listing it in a marketplace, a JSON catalog that lists plugins and where to fetch each one, so that other people can install it by name and receive your updates. You can run your own marketplace or submit your plugin to Anthropic’s community marketplace. To share a plugin without publishing it, send people the plugin’s directory or a `.zip` of it to load themselves. This page is for the author of a working plugin who is ready to share it.
+Publishing a Claude Code plugin means listing it in a marketplace, a JSON catalog that lists plugins and where to fetch each one, so that other people can install it by name and receive your updates. You can run your own marketplace or submit your plugin to Anthropic’s directory. To share a plugin without publishing it, send people the plugin’s directory or a `.zip` of it to load themselves. This page is for the author of a working plugin who is ready to share it.
These cases are covered on other pages:
@@ -19,7 +19,7 @@
---|---|---|---
No marketplace| The people you send the plugin folder or a `.zip` of it| The plugin’s folder| None. They load the copy you sent
Your own marketplace| Anyone who can reach the repository, which can be a private one your team can clone| A git repository or other host with a `.claude-plugin/marketplace.json` that lists your plugin| Off
-Anthropic’s community marketplace| Anyone who adds `anthropics/claude-plugins-community`| A submission through the plugin directory submission form| Off
+Anthropic’s directory| People who add it on claude.ai or in Cowork. It also loads in their Claude Code sessions through [account sync](</docs/en/plugins/loading#synced-plugins>)| A GitHub repository holding the plugin and a paid claude.ai plan to submit from| Yes, after the version you push is published
Auto-update is a per-marketplace setting on the user’s side that fetches new versions in the background.
@@ -159,14 +159,29 @@
-Submit to the community marketplace
-
-Anthropic’s community marketplace, `claude-community`, is the public marketplace that lists plugins submitted through the plugin directory submission form. Users add the community marketplace in a Claude Code session with `/plugin marketplace add anthropics/claude-plugins-community` and install from it as `@claude-community`. For how the community marketplace differs from the official marketplace, see [Anthropic’s marketplaces](</docs/en/plugins/anthropic-marketplaces>). To submit your plugin to the community marketplace, use one of the in-app forms:
-
- * **claude.ai** : [claude.ai/admin-settings/directory/submissions/plugins/new](<https://claude.ai/admin-settings/directory/submissions/plugins/new>)
- * **Console** : [platform.claude.com/plugins/submit](<https://platform.claude.com/plugins/submit>)
-
-The claude.ai form requires a Team or Enterprise organization and the Directory permission, which Owners hold by default. Individual authors who aren’t part of a Team or Enterprise organization can use the Console form instead. In your shell, run `claude plugin validate ./your-plugin` locally before you submit, replacing `./your-plugin` with the path to your plugin directory. When validation passes, Claude Code prints `✔ Validation passed`, or `✔ Validation passed with warnings` if there are warnings. Warnings don’t fail validation; add `--strict` to treat them as errors. Listed plugins appear in the [`anthropics/claude-plugins-community`](<https://github.com/anthropics/claude-plugins-community>) catalog, in nearly every case pinned to a specific commit SHA. There can be a delay between submitting and your plugin appearing in `marketplace.json`. To check whether your plugin is installable yet, search for its name in the [community catalog](<https://github.com/anthropics/claude-plugins-community/blob/main/.claude-plugin/marketplace.json>). The official marketplace, `claude-plugins-official`, doesn’t take submissions through these forms. If you work with an Anthropic partner contact, ask them about an official-marketplace listing.
+Submit to Anthropic’s directory
+
+Anthropic’s directory is the catalog people browse on claude.ai and in Cowork to add plugins and connectors. One listing there reaches people on claude.ai, in Cowork, and in Claude Code. You submit from the developer portal at [claude.ai/directory/manage](<https://claude.ai/directory/manage>); [Prepare for review](<https://claude.com/docs/directory/publish#prepare-for-review>) on claude.com describes what happens to each version before it’s published. Submitting requires a paid claude.ai plan. On Pro and Max you submit from your own account. On Team and Enterprise, an Owner can submit, and on Enterprise an Owner can also grant the **Directory** permission to other members through a custom role under **Organization settings > Roles**. See [Confirm you can submit to the directory](<https://claude.com/docs/directory/publish#confirm-you-can-submit-to-the-directory>). The submission steps, the checks each version must pass, and what happens after you publish are documented on claude.com, because they’re the same whichever surface your users are on:
+
+ * [Publish to the directory](<https://claude.com/docs/directory/publish#before-you-submit-to-the-directory>): what you can submit and who can submit it
+ * [Submit a plugin](<https://claude.com/docs/plugins/submit#submit-a-plugin>): the portal steps and [updating a published plugin](<https://claude.com/docs/plugins/submit#update-a-published-plugin>)
+ * [Plugin pre-submission checklist](<https://claude.com/docs/plugins/pre-submission-checklist#run-the-checks-before-you-submit>): the checks to run and fix before you submit
+ * [Move an earlier submission to the developer portal](<https://claude.com/docs/directory/publish#move-an-earlier-submission-to-the-developer-portal>): what to do if you submitted a plugin through one of the earlier submission forms, before the portal existed
+
+Before you open the portal, validate locally and check which of your components load outside Claude Code:
+
+ * **Run`claude plugin validate ./your-plugin --strict` in your shell**: replace `./your-plugin` with the path to your plugin directory. The command catches manifest errors locally; [plugin validate](</docs/en/plugins/cli-reference#plugin-validate>) lists which files each run reads. The portal applies additional directory rules that the CLI doesn’t check, so a clean local run doesn’t guarantee a clean portal validation.
+ * **Check what loads where** : some plugin components are Claude Code-only and don’t load on claude.ai or in Cowork. The [component support table](<https://claude.com/docs/plugins/platform-support#compare-component-support-by-app>) lists each component by app, so you know what users outside Claude Code will get.
+
+Anthropic’s official marketplace, `claude-plugins-official`, doesn’t take submissions through the directory portal. If you work with an Anthropic partner contact, ask them about an official-marketplace listing.
+
+###
+
+
+
+How a listed plugin reaches Claude Code users
+
+A person who installs your plugin from the directory on claude.ai has it on their account, and Claude Code loads it as `<name>@synced`. [Plugins synced from claude.ai](</docs/en/plugins/loading#synced-plugins>) covers what they see and how they turn it off.
##
@@ -180,7 +195,7 @@
Release a new version
-If you publish through your own marketplace and your `plugin.json` sets `version`, increment it and push. Users who run `claude plugin update` or have auto-update on then receive the new version, as described under Ship updates to users.
+If you publish through your own marketplace and your `plugin.json` sets `version`, increment it and push. Users who run `claude plugin update` or have auto-update on then receive the new version, as described under Ship updates to users. For a directory listing, see [Update a published plugin](<https://claude.com/docs/plugins/submit#update-a-published-plugin>).
###
--- a/python.md
+++ b/python.md
@@ -873,6 +873,7 @@
include_partial_messages: bool = False
include_hook_events: bool = False
forward_subagent_text: bool = False
+ verbatim_prompts: bool = False
fork_session: bool = False
resume_session_at: str | None = None
resume_drops_turn: str | None = None
@@ -925,6 +926,7 @@
`include_partial_messages`| `bool`| `False`| Include partial message streaming events. When enabled, `StreamEvent` messages are yielded
`include_hook_events`| `bool`| `False`| Include hook lifecycle events in the message stream as `HookEventMessage` objects
`forward_subagent_text`| `bool`| `False`| Forward subagent text and thinking blocks in the message stream. Without this option, Claude Code emits subagent `tool_use` and `tool_result` blocks but not text or thinking. Requires Python Agent SDK 0.2.140 or later
+`verbatim_prompts`| `bool`| `False`| Deliver every prompt as written. The SDK sends each user message with `client_composed` set to `True`. See [`client_composed`](</docs/en/agent-sdk/typescript#sdkusermessage>) for what Claude Code skips on those messages. Use this option when your prompt text includes content the end user didn’t type. For per-turn control, leave it off and set `"client_composed": True` on individual streamed messages instead. While the option is on, the SDK overwrites any `client_composed` value you set. Requires Python Agent SDK 0.2.158 or later and Claude Code v2.1.248 or later; the CLI bundled with those SDK versions satisfies the Claude Code requirement
`fork_session`| `bool`| `False`| When resuming with `resume`, fork to a new session ID instead of continuing the original session
`resume_session_at`| `str | None`| `None`| When resuming, load the conversation only up to and including the message with this UUID. Use with `resume`, and usually `fork_session`, to branch from an earlier point. Requires Python Agent SDK 0.2.137 or later
`resume_drops_turn`| `str | None`| `None`| UUID of the user prompt whose turn a `resume_session_at` truncation discards. When set, the CLI refuses the resume if the discarded range holds entries not attributable to that turn. Requires Python Agent SDK 0.2.137 or later and Claude Code v2.1.223 or later; the CLI bundled with those SDK versions satisfies the Claude Code requirement
@@ -1205,7 +1207,7 @@
"plan", # Planning mode - explore without editing
"dontAsk", # Deny anything not pre-approved instead of prompting
"bypassPermissions", # Bypass permission checks; explicit ask rules still prompt (use with caution)
- "auto", # Model classifier approves or denies permission prompts
+ "auto", # A model classifier reviews actions such as shell commands and network requests
]
###
Show diff (371 lines)
--- a/remote-control.md
+++ b/remote-control.md
@@ -1,13 +1,11 @@
-Remote Control is available on all plans. On Team and Enterprise, it is off by default until an Owner enables the Remote Control toggle in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>).
-
Remote Control connects [claude.ai/code](<https://claude.ai/code>) or 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>) to a Claude Code session running on your machine. Start a task at your desk, then pick it up from your phone on the couch or a browser on another computer. When you start a Remote Control session on your machine, Claude keeps running locally the entire time, so your code execution and filesystem access stay on your machine. With Remote Control you can:
* **Use your full local environment remotely** : your filesystem, [MCP servers](</docs/en/mcp>), tools, and project configuration all stay available, and typing `@` autocompletes file paths from your local project.
* **Work from both surfaces at once** : the conversation and the progress of [subagents](</docs/en/sub-agents>) and [dynamic workflows](</docs/en/workflows>) stay in sync across all connected devices, so you can send messages from your terminal, browser, and phone interchangeably.
* **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 [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.
+ * **Survive interruptions** : if your laptop sleeps or your network drops, Claude Code reconnects automatically when your machine comes back online.
+
+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, so your computer has to stay on and the `claude` process has to keep running.
##
@@ -21,9 +19,11 @@
* **Authentication** : run `claude` and use `/login` to sign in through claude.ai if you haven’t already. Without an eligible login, `claude remote-control` exits with an error, while `claude --remote-control` still starts an interactive session and shows a Remote Control failure notification shortly after launch.
* **API endpoint** : not available in any of these configurations:
* You use Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry.
- * You point [`ANTHROPIC_BASE_URL`](</docs/en/env-vars>) at a host other than `api.anthropic.com`, such as an [LLM gateway](</docs/en/llm-gateway>) or proxy. Unset the variable to use Remote Control. Before v2.1.196, Claude Code allowed Remote Control with a custom `ANTHROPIC_BASE_URL`.
+ * You point [`ANTHROPIC_BASE_URL`](</docs/en/env-vars>) at a host other than `api.anthropic.com`, such as an [LLM gateway](</docs/en/llm-gateway>) or proxy. Unset the variable to use Remote Control.
* You sign in through an enterprise [Claude apps gateway](</docs/en/claude-apps-gateway>).
- * **Feature-flag evaluation** : [`DISABLE_TELEMETRY`, `DO_NOT_TRACK`, `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, and `DISABLE_GROWTHBOOK`](</docs/en/env-vars>) each disable the feature-flag evaluation that Remote Control availability depends on. Unset the variable wherever it’s set, in your shell environment or in the `env` block of a [`settings.json` file](</docs/en/settings-reference#all-settings>), to use Remote Control.
+ * **Feature-flag evaluation** : if you set an [environment variable that turns off feature-flag evaluation](</docs/en/env-vars#features-that-need-feature-flag-fetching>), whether Remote Control is available depends on which one:
+ * If you set `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` or `DISABLE_GROWTHBOOK`, Remote Control is unavailable. Unset the variable wherever it’s set, in your shell environment or in the `env` block of a [`settings.json` file](</docs/en/settings-reference#all-settings>), to use Remote Control.
+ * If you set only `DISABLE_TELEMETRY` or `DO_NOT_TRACK`, Remote Control stays available unless your organization requires Trusted Devices. If it does, unset the variable to use Remote Control. Using Remote Control with either variable set requires Claude Code v2.1.283 or later.
* **Workspace trust** : run `claude` in your project directory at least once to accept the workspace trust dialog. The startup trust dialog never saves trust for your home directory, so start Remote Control from a project directory.
##
@@ -32,7 +32,7 @@
Start a Remote Control session
-You can start a Remote Control session from the CLI or the VS Code extension. The CLI offers three invocation modes; VS Code uses the `/remote-control` command.
+You can start a Remote Control session from the CLI, the [Claude Desktop app](</docs/en/desktop>), or the VS Code extension. The CLI offers three invocation modes; the Desktop app and VS Code use the `/remote-control` command.
* Server mode
@@ -41,6 +41,8 @@
* From an existing session
* VS Code
+
+ * Desktop app
In your project directory, run:
@@ -52,8 +54,8 @@
---|---
`--name "My Project"`| Set a custom session title visible in the session list at claude.ai/code.
`--remote-control-session-name-prefix <prefix>`| Prefix for auto-generated session names when no explicit name is set. Defaults to your machine’s hostname, producing names like `myhost-graceful-unicorn`. Set `CLAUDE_REMOTE_CONTROL_SESSION_NAME_PREFIX` for the same effect.
-`-c`, `--continue`| Bring back the session that the last server in this directory started with, instead of creating a new one. See Resume sessions after stopping the server. Can’t be combined with `--session-id`, `--spawn`, `--capacity`, or `--create-session-in-dir`. Requires Claude Code v2.1.200 or later; earlier versions reject the flag as an unknown argument.
-`--session-id <id>`| Bring back one session by its ID. See Resume sessions after stopping the server. Can’t be combined with `--continue`, `--spawn`, `--capacity`, or `--create-session-in-dir`. Requires Claude Code v2.1.200 or later; earlier versions reject the flag as an unknown argument.
+`-c`, `--continue`| Bring back the session that the last server in this directory started with, instead of creating a new one. See Resume sessions after stopping the server. Can’t be combined with `--session-id`, `--spawn`, `--capacity`, or `--create-session-in-dir`. Requires Claude Code v2.1.200 or later.
+`--session-id <id>`| Bring back one session by its ID. See Resume sessions after stopping the server. Can’t be combined with `--continue`, `--spawn`, `--capacity`, or `--create-session-in-dir`. Requires Claude Code v2.1.200 or later.
`--spawn <mode>`| How the server creates sessions.
• `same-dir` (default): all sessions share the current working directory, so they can conflict if editing the same files.
• `worktree`: each on-demand session gets its own [git worktree](</docs/en/worktrees>). Requires a git repository.
@@ -62,11 +64,12 @@
`--capacity <N>`| Maximum number of concurrent sessions. Default is 32. Cannot be used with `--spawn=session`.
`--[no-]create-session-in-dir`| Pre-create one session in the current directory when the server starts, so you have somewhere to type immediately. In `worktree` mode this session stays in the current directory while on-demand sessions get isolated worktrees. On by default. If you pass `--no-create-session-in-dir` to start with none, Claude Code archives the server’s sessions when you stop it, so there’s nothing to resume.
`--permission-mode <mode>`| Set the starting [permission mode](</docs/en/permission-modes>) for the server’s sessions, such as `acceptEdits`. Accepts `manual` as an alias for `default`; an unrecognized mode stops the server at startup and lists the valid modes.
+`-d`, `--debug[=<filter>]`| Turn on debug logging for the server, optionally filtered by category. Pass a filter only in the `=` form, such as `--debug=api,hooks`. Requires Claude Code v2.1.282 or later; earlier versions reject the flag as an unknown argument.
`--debug-file <path>`| Write debug logs to the given file.
`--verbose`| Show detailed connection and session logs.
`--sandbox` / `--no-sandbox`| Enable or disable [sandboxing](</docs/en/sandboxing>) for filesystem and network isolation. Off by default.
-Give these flags after `remote-control`.If you pass a global `claude` flag before `remote-control`, or a wrapper script adds one, Claude Code doesn’t carry the flag over to the sessions the server creates. Claude Code lets the flag through only when dropping it is known not to change what those sessions can do, such as `--verbose` or `--model`. For any other flag, such as `--settings`, Claude Code [refuses to start](</docs/en/errors#not-carried-over-to-the-sessions-remote-control-starts>) and names the flag to remove. Before v2.1.248, any option before `remote-control` made Claude Code reject the flags after it with an `unknown option` error.Claude Code checks Remote Control eligibility before printing help, so `claude remote-control --help` returns an error instead of this flag list when you aren’t signed in with an eligible account.
+Give these flags after `remote-control`.If you pass a global `claude` flag before `remote-control`, or a wrapper script adds one, Claude Code doesn’t carry the flag over to the sessions the server creates. Claude Code lets the flag through only when dropping it is known not to change what those sessions can do, such as `--verbose` or `--model`. For any other flag, such as `--settings`, Claude Code [refuses to start](</docs/en/errors#not-carried-over-to-the-sessions-remote-control-starts>) and names the flag to remove.Claude Code checks Remote Control eligibility before printing help, so `claude remote-control --help` returns an error instead of this flag list when you aren’t signed in with an eligible account.
To start a normal interactive Claude Code session with Remote Control enabled, use the `--remote-control` flag (or `--rc`):
@@ -93,6 +96,12 @@
/remote-control
While Remote Control is on, Claude Code shows a **Remote Control** indicator in the prompt box footer. Once the session connects, click the indicator to go directly to the session, or find it in the session list at [claude.ai/code](<https://claude.ai/code>). Claude Code also posts the session URL in the conversation. To disconnect, run `/remote-control` again.Unlike the CLI, the VS Code command does not accept a name argument or display a QR code. The session title is derived from your conversation history or first prompt.
+
+In a local session in the [Claude Desktop app’s](</docs/en/desktop>) Code tab, type `/remote-control` or `/rc` in the prompt box.
+
+ /remote-control
+
+Once the session connects, find it in the session list at [claude.ai/code](<https://claude.ai/code>). To disconnect, run `/remote-control` again.To turn Remote Control on for every session by default instead, see Enable Remote Control for all sessions.
###
@@ -105,19 +114,6 @@
* **Another connection took over this session** : another device or Claude Code session has it now. Run `/remote-control` only if you want to take it back.
* **This session was ended or archived from another device or app** : run `/remote-control` only if you want the session back. Claude Code reopens an archived session.
* **The server no longer reports this session** : it may have been deleted from another device or app.
-
-###
-
-
-
-Session URL reminders
-
-While Remote Control is connected, Claude Code reminds you of the session URL when switching to your phone or browser helps most, so you don’t have to find the link in `/remote-control`. A reminder appears above the prompt box at either of these moments:
-
- * **Long turn** : when a turn runs longer than a server-tuned threshold, Claude Code shows a **Still working** notification with a **Check in from your phone** link, so you can follow the turn from your phone or browser instead of waiting at the terminal. Claude Code removes it when the turn ends.
- * **Repeated permission prompts** : after you answer several [permission prompts](</docs/en/permissions>) in a session, an **Approve tool calls from your phone** notification shows the session URL. Claude Code removes it when your next turn starts.
-
-The reminders can appear in any connected session, including ones where Remote Control connects automatically. They don’t appear every time these conditions occur, and each one appears only a few times in total across sessions. You can’t configure or turn them off; each clears on its own.
###
@@ -138,7 +134,7 @@
3. The last meaningful message in existing conversation history
4. An auto-generated name like `myhost-graceful-unicorn`, where `myhost` is your machine’s hostname or the prefix you set with `--remote-control-session-name-prefix`
-If you didn’t set an explicit name, Claude Code updates the title to reflect your prompt once you send one. Claude Code matches auto-generated titles to the language of your conversation, or to the [`language`](</docs/en/settings-reference#language>) setting if one is configured. When you rename a session from claude.ai or the Claude app, Claude Code also updates the local title shown in `claude --resume`. Claude Code applies the same rename to the session name shown on the prompt bar, and in the `claude agents` listing when the session [runs in the background](</docs/en/agent-view>). Before v2.1.221, renaming from the session list at claude.ai or in the Claude app updated only the title, and the CLI kept its previous session name; `/rename`, which runs in the CLI itself, set the name on any version. If you don’t have the Claude app yet, run `/mobile` inside Claude Code to show a QR code for [claude.ai/mobile](<https://claude.ai/mobile>), which opens the right app store for your phone.
+If you didn’t set an explicit name, Claude Code updates the title to reflect your prompt once you send one. When you rename a session from claude.ai or the Claude app, Claude Code also updates the local title shown in `claude --resume`. If you don’t have the Claude app yet, run `/mobile` inside Claude Code to show a QR code for [claude.ai/mobile](<https://claude.ai/mobile>), which opens the right app store for your phone.
###
@@ -151,13 +147,10 @@
* **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 [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 your changes. The device requests the diff over the connection, and Claude Code computes it on your machine. On a branch that has commits ahead of the repository’s default branch, the pane shows the changes since the branch split from it, including your uncommitted edits. On the default branch itself, or on a branch that isn’t ahead of it, the pane shows only your uncommitted changes. Before v2.1.247, Claude Code reported the diff to connected devices only in sessions served by `claude remote-control`.
- * **Model** : when you pick a [model](</docs/en/model-config>) from a connected device, Claude Code runs the session on that model. The terminal’s `/model` picker, `/status`, and `/config` show that model. Requires Claude Code v2.1.238 or later.
- * A model you pick from the device’s model control applies to the current session only. When you send `/model <name>` from the device to an interactive session, Claude Code also sets your default for new sessions.
- * If you send a name Claude Code doesn’t recognize, such as a display name where a model ID is expected, Claude Code [refuses the pick](</docs/en/errors#model-is-not-a-recognized-model-id>) and the session keeps its current model. Before v2.1.260, Claude Code saved an unrecognized pick from the device’s model control, and your next message failed.
- * **Effort level** : when you set the [effort level](</docs/en/model-config#adjust-effort-level>) from a connected device, with `/effort` or the device’s effort control, Claude Code applies it to the session on your machine, and claude.ai/code shows the level the session is using. If you pinned a level with `CLAUDE_CODE_EFFORT_LEVEL`, the session keeps that level, and Claude Code refuses a different pick from the effort control. Picking a level from the effort control requires Claude Code v2.1.234 or later on your machine.
+ * **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>).
+ * **Diff of your changes** : when the session’s directory is in a git repository, a connected device’s diff pane shows your changes. On a branch that has commits ahead of the repository’s default branch, the pane shows the changes since the branch split from it, including your uncommitted edits. On the default branch itself, or on a branch that isn’t ahead of it, the pane shows only your uncommitted changes.
+ * **Model** : when you pick a [model](</docs/en/model-config>) from a connected device, Claude Code runs the session on that model. Requires Claude Code v2.1.238 or later. A model you pick from the device’s model control applies to the current session only. When you send `/model <name>` from the device to an interactive session, Claude Code also sets your default for new sessions.
+ * **Effort level** : when you set the [effort level](</docs/en/model-config#adjust-effort-level>) from a connected device, with `/effort` or the device’s effort control, Claude Code applies it to the session on your machine. If you pinned a level with `CLAUDE_CODE_EFFORT_LEVEL`, the session keeps that level, and Claude Code refuses a different pick from the effort control. Picking a level from the effort control requires Claude Code v2.1.234 or later on your machine.
* **Reconnecting after a connection failure** : run `/remote-control` to reconnect. If compaction rewrote the conversation or you switched conversations with `/resume` in the meantime, Claude Code archives the server session it was using instead of leaving it in the session list. You can still find it by [filtering for archived sessions](</docs/en/claude-code-on-the-web#archive-sessions>). Switching conversations while a device is still connected doesn’t archive the session.
###
@@ -175,7 +168,7 @@
The same toggle appears outside the CLI:
* **Desktop app** : **Settings > Claude Code > Enable remote control by default**.
- * **VS Code extension** : **Enable Remote Control for all sessions** in the [command menu’s](</docs/en/vs-code#use-the-prompt-box>) Settings section. Requires Claude Code v2.1.203 or later.
+ * **VS Code extension** : **Enable Remote Control for all sessions** in the [command menu’s](</docs/en/vs-code#use-the-prompt-box>) Settings section.
To turn auto-connect on from a settings file instead, set [`remoteControlAtStartup`](</docs/en/settings-reference#remotecontrolatstartup>) to `true` in your user `~/.claude/settings.json` or in [managed settings](</docs/en/managed-settings>). In project or local settings (`.claude/settings.json`, `.claude/settings.local.json`), Claude Code honors a `false` and turns auto-connect off for that repository, but ignores a `true`, so a checked-in file can’t turn on Remote Control for everyone who opens the repository. Auto-connect signs in with your own claude.ai account, so a session it starts appears only in your own account’s Claude apps and grants no one else access. With this setting on, each interactive Claude Code process registers one remote session. If you run multiple instances, each one gets its own remote session. To run multiple concurrent sessions from a single process, use server mode instead.
@@ -191,7 +184,7 @@
* **`claude remote-control --continue`** : brings back only the session the server started with, and exits when that session ends. If this directory has no record, Claude Code uses the newest one from this repository’s other git worktrees.
* **`claude remote-control --session-id<id>`**: brings back only the session whose ID you pass, and exits when that session ends. The ID is the part of the session’s URL at claude.ai/code between `/code/` and any `?`.
-These commands work for about four hours after the server stopped. After that, run `claude remote-control` to start a new session. If you archived a session in the meantime, `--continue` and `--session-id` unarchive it on Claude Code v2.1.228 or later. To bring back a session you started with `claude --remote-control` or `/remote-control`, resume the conversation with `claude --continue` or `claude --resume`. Whether Claude Code reconnects, and to which session, depends on the conversation’s reconnection record. If you resume the conversation in a second terminal while the first one still has Remote Control on, Claude Code prints a notice in the second terminal and leaves Remote Control off there instead of taking the session away from the first. While Remote Control stays off there, Claude in that terminal doesn’t see [your sessions on other machines](</docs/en/cross-session-messaging#see-which-sessions-claude-can-reach>), and they can’t reach it. Run `/remote-control` in the second terminal to move Remote Control to it. When you resume a conversation in Claude Desktop or an IDE extension that had Remote Control on, Claude Code reattaches it to the existing claude.ai session instead of adding a new one to the session list.
+These commands work for about four hours after the server stopped. After that, run `claude remote-control` to start a new session. If you archived a session in the meantime, `--continue` and `--session-id` unarchive it on Claude Code v2.1.228 or later. To bring back a session you started with `claude --remote-control` or `/remote-control`, resume the conversation with `claude --continue` or `claude --resume`. If Remote Control doesn’t reconnect, see Couldn’t reconnect to your Remote Control session. If you resume the conversation in a second terminal while the first one still has Remote Control on, Claude Code prints a `Remote Control not started here` notice in the second terminal and leaves Remote Control off there instead of taking the session away from the first. Run `/remote-control` in the second terminal to move Remote Control to it. When you resume a conversation in Claude Desktop or an IDE extension that had Remote Control on, Claude Code reattaches it to the existing claude.ai session instead of adding a new one to the session list.
##
@@ -199,7 +192,7 @@
Connection and security
-Your local Claude Code session makes outbound HTTPS requests only and never opens inbound ports on your machine. When you start Remote Control, it registers with the Anthropic API and polls for work. When you connect from another device, the server routes messages between the web or mobile client and your local session over a streaming connection. All traffic travels through the Anthropic API over TLS, the same transport security as any Claude Code session. The connection uses multiple short-lived credentials, each scoped to a single purpose and expiring independently. When a `claude remote-control` server’s registration credential expires, the server registers with the Anthropic API again and keeps serving its sessions. While Remote Control is connected, the session transcript, including your messages, Claude’s responses, and tool activity, is stored on Anthropic servers. The stored transcript keeps the conversation in sync across your devices and lets the session reconnect after a network drop. Execution and filesystem access stay on your machine, and stored transcripts are retained under the [Data usage](</docs/en/data-usage>) policy. To turn Remote Control off entirely, use the [`disableRemoteControl`](</docs/en/settings-reference#disableremotecontrol>) setting. Organizations with compliance requirements such as Zero Data Retention can’t enable Remote Control.
+Your local Claude Code session makes outbound HTTPS requests only and never opens inbound ports on your machine. When you start Remote Control, it registers with the Anthropic API and polls for work. When you connect from another device, the server routes messages between the web or mobile client and your local session over a streaming connection. All traffic travels through the Anthropic API over TLS, the same transport security as any Claude Code session. The connection uses multiple short-lived credentials, each scoped to a single purpose and expiring independently. While Remote Control is connected, the session transcript, including your messages, Claude’s responses, and tool activity, is stored on Anthropic servers. The stored transcript keeps the conversation in sync across your devices and lets the session reconnect after a network drop. Execution and filesystem access stay on your machine, and stored transcripts are retained under the [Data usage](</docs/en/data-usage>) policy. To turn Remote Control off entirely, use the [`disableRemoteControl`](</docs/en/settings-reference#disableremotecontrol>) setting. Organizations with compliance requirements such as Zero Data Retention can’t enable Remote Control.
##
@@ -270,7 +263,16 @@
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.
+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. A [project](</docs/en/claude-projects>) combines the two: its threads run in the cloud, and it uses Remote Control to [run a thread on your computer](</docs/en/claude-projects#run-a-thread-on-your-own-computer>) when you ask for one there. Claude Code offers several ways to work when you’re not at your terminal. They differ in what triggers the work, where Claude runs, and how much you need to set up.
+
+| Trigger| Claude runs on| Setup| Best for
+---|---|---|---|---
+[Dispatch](</docs/en/desktop#sessions-from-dispatch>)| Message a task from the Claude mobile app| Your machine (Desktop)| [Pair the mobile app with Desktop](<https://support.claude.com/en/articles/13947068>)| Delegating work while you’re away, minimal setup
+[Remote Control](</docs/en/remote-control>)| Drive a running session from [claude.ai/code](<https://claude.ai/code>) or the Claude mobile app| Your machine (CLI, Desktop, or VS Code)| Run [`claude remote-control` or `/remote-control`](</docs/en/remote-control#start-a-remote-control-session>)| Steering in-progress work from another device
+[Channels](</docs/en/channels>)| Push events from a chat app like Telegram or Discord, or your own server| Your machine (CLI)| [Install a channel plugin](</docs/en/channels#quickstart>) or [build your own](</docs/en/channels-reference>)| Reacting to external events like CI failures or chat messages
+[Slack](</docs/en/slack>)| Mention `@Claude` in a team channel| Anthropic cloud| [Install the Slack app](</docs/en/slack#setting-up-claude-code-in-slack>) with [Claude Code on the web](</docs/en/claude-code-on-the-web>) enabled| PRs and reviews from team chat
+[Self-hosted environments](</docs/en/self-hosted-environments>)| Start a [cloud session](</docs/en/claude-code-on-the-web>) and pick your organization’s environment| Your organization’s infrastructure| [Deploy runners](</docs/en/self-hosted-environments-quickstart>), on Team and Enterprise plans| Cloud sessions that must run inside your network
+[Scheduled tasks](</docs/en/scheduled-tasks>)| Set a schedule| [CLI](</docs/en/scheduled-tasks>), [Desktop](</docs/en/desktop-scheduled-tasks>), or [cloud](</docs/en/routines>)| Pick a frequency| Recurring automation like daily reviews
##
@@ -310,7 +312,7 @@
* On iOS, Focus modes and notification summaries can suppress or delay pushes. Check Settings → Notifications → Claude.
* On Android, aggressive battery optimization can delay delivery. Exempt the Claude app from battery optimization in system settings.
-Claude Code skips mobile push notifications while you are typing in or focused on the connected terminal. As of v2.1.181, you can set [`CLAUDE_CLIENT_PRESENCE_FILE`](</docs/en/env-vars>) to a marker file path to extend this to any time you are at the machine, even in another window: notifications are skipped while the file exists. Configure a screen-lock listener or similar tool to create the file when your screen unlocks and delete it when your screen locks.
+Claude Code skips mobile push notifications while you are typing in or focused on the connected terminal. To extend this to any time you are at the machine, even in another window, set [`CLAUDE_CLIENT_PRESENCE_FILE`](</docs/en/env-vars>) to a marker file path: notifications are skipped while the file exists. Configure a screen-lock listener or similar tool to create the file when your screen unlocks and delete it when your screen locks.
##
@@ -319,13 +321,13 @@
Limitations
* **One remote session per interactive process** : outside of server mode, each Claude Code instance supports one remote session at a time. Use server mode to run multiple concurrent sessions from a single process.
- * **Local process must keep running** : Remote Control runs as a local process. If you close the terminal, quit VS Code, or otherwise stop the `claude` process, the session goes offline until you bring it back. Unless Claude is in the middle of a task, claude.ai and the Claude app show the session as offline within seconds after the process exits. To keep a session running on a remote machine after you disconnect from SSH, start it inside `tmux` or `screen`.
+ * **Local process must keep running** : Remote Control runs as a local process. If you close the terminal, quit the Desktop app or VS Code, or otherwise stop the `claude` process, the session goes offline until you bring it back. To keep a session running on a remote machine after you disconnect from SSH, start it inside `tmux` or `screen`.
* **Crashed sessions in server mode** : if a session served by `claude remote-control` crashes, send it a message from a connected device. Claude Code serves it again. You don’t have to restart the server. Requires Claude Code v2.1.238 or later.
* **HTTP 403 refusals on a connected session** : once an interactive session is connected, Claude Code keeps retrying for up to three minutes when something between your machine and Anthropic’s servers answers with HTTP 403, as can happen after a VPN or network change. If the refusals last longer, Claude Code disconnects, and the reason names what refused: a network edge, or a proxy, VPN, or firewall on your own network.
* **Extended network outage** : if your machine is awake but can’t reach the network, what you do next depends on the mode:
* **Server mode** : Claude Code gives up after roughly 10 minutes and the `claude remote-control` process exits. Run `claude remote-control` again to start a new session.
* **Interactive session** : keep working locally. Claude Code retries for as long as the outage lasts and reconnects on its own when the network returns.
- * **Presence heartbeats failing** : if an interactive session disconnects with `could not reach the Remote Control server for about 30 minutes`, run `/remote-control` to reconnect. Claude Code shows this message only when the session’s presence heartbeats have been failing while the rest of the connection stayed up; it re-registers the session for about 30 minutes before disconnecting.
+ * **Presence heartbeats failing** : if an interactive session disconnects with `could not reach the Remote Control server for about 30 minutes`, run `/remote-control` to reconnect.
* **Forwarded dialogs expire** : Claude Code keeps permission prompts and `AskUserQuestion` questions open until you answer them. When Claude Code forwards another kind of dialog to the remote session, such as the model-choice prompt shown after a safety refusal, it waits five minutes by default, then closes the dialog and continues with the dialog’s no-action default. Set [`dialogExpiry`](</docs/en/settings-reference#dialogexpiry>) to adjust or disable the deadline. Requires Claude Code v2.1.224 or later.
* **The Fable usage-credits consent prompt isn’t forwarded** : Claude Code shows the mid-session [Fable usage-credits consent prompt](</docs/en/model-config#fable-and-usage-credits>) only where the session runs, not on your device. When the session runs in a terminal and nobody there answers before Claude Code closes the prompt, the turn ends without sending the request; see [The prompt to confirm went unanswered](</docs/en/errors#the-prompt-to-confirm-went-unanswered>).
* **Some commands are local-only** : commands that only run in the terminal interface, such as `/plugin` or `/resume`, work only from the local CLI, whether or not you pass an argument. The following work from mobile and web:
@@ -333,10 +335,11 @@
* `/model`, `/effort`, `/fast`, `/color`, and `/rename`: pass the value as an argument, for example `/model sonnet` or `/effort high`. From mobile and web, `/model` and `/effort` take the argument in place of the terminal picker or slider.
* `/mcp`: from the mobile app, returns a text summary of server status instead of opening the picker. On the web, `/mcp` on its own opens a directory of [claude.ai connectors](</docs/en/mcp#use-mcp-servers-from-claude-ai>) instead of returning the summary. The `reconnect`, `enable`, and `disable` [subcommands](</docs/en/commands#all-commands>) work from both. Unlike the local CLI, `/mcp reconnect` without a server name reconnects every server that has failed or needs authentication.
* `/config`: from the mobile app, pass `key=value` to set a setting, or run it with no argument to list the keys you can set. On the web, `/config` opens the Claude Code section of your settings instead, and ignores text after the command.
- * On Team and Enterprise, `/usage-credits` from mobile or web doesn’t send a [usage-credits request to your admin](</docs/en/costs#add-usage-credits-to-your-subscription>). Sending requires a confirmation that appears only in the interactive CLI, so the command tells you to run it there instead. Before v2.1.211, the text form sent the request without confirmation.
+ * On Team and Enterprise, `/usage-credits` from mobile or web doesn’t send a [usage-credits request to your admin](</docs/en/costs#add-usage-credits-to-your-subscription>). Sending requires a confirmation that appears only in the interactive CLI, so the command tells you to run it there instead.
* `/autocompact`, from v2.1.221: pass the window size as an argument, for example `/autocompact 500k`. With no argument, it prints the current window size as text instead of opening the dialog the command shows in a terminal session.
* `/advisor`, from v2.1.260: pass the model as an argument, for example `/advisor opus`, or pass `off` to turn the advisor off. Both forms apply to the current session only and leave your saved default unchanged. With no argument, it prints the current advisor as text instead of opening the picker.
* `/output-style`, from v2.1.269: pass the style name as an argument, for example `/output-style concise`, or run it with no argument to list the styles. From mobile and web, you can list and select only [built-in styles](</docs/en/output-styles#built-in-output-styles>). To use a [custom style](</docs/en/output-styles#create-a-custom-output-style>), select it in the session itself.
+ * `/focus`, from v2.1.281: pass `on` or `off` as an argument, for example `/focus on`, or run it with no argument to toggle the [focus view](</docs/en/commands#all-commands>). Both forms apply to the current session only and leave your saved selection unchanged.
##
@@ -356,7 +359,7 @@
* 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.
-Run `claude auth login` and choose the claude.ai option. If the message names `ANTHROPIC_API_KEY` or `ANTHROPIC_AUTH_TOKEN`, remove it wherever it’s set: your shell environment or the `env` block of a [settings file](</docs/en/settings-reference#env>). If it names `apiKeyHelper`, remove that setting. Before v2.1.206, running `/remote-control` while signed out reported `Unknown command: /remote-control` instead of this message.
+Run `claude auth login` and choose the claude.ai option. If the message names `ANTHROPIC_API_KEY` or `ANTHROPIC_AUTH_TOKEN`, remove it wherever it’s set: your shell environment or the `env` block of a [settings file](</docs/en/settings-reference#env>). If it names `apiKeyHelper`, remove that setting.
###
@@ -380,7 +383,7 @@
”Remote Control isn’t enabled for this account”
-Claude Code checked Remote Control availability for the account you’re signed in with and the check came back off. The usual cause is cached entitlements that are out of date after a plan change. Run `claude auth logout` then `claude auth login` to refresh them, and update Claude Code if you’re on an old version. Run `claude doctor` to see which individual eligibility check failed. Environment-variable conflicts, unreachable checks, and your organization’s Remote Control setting each produce their own message, so this error means the account-level check itself. Before v2.1.239, this message read “Remote Control is not yet enabled for your account”. Before v2.1.154, a variable that disables feature-flag evaluation, such as `DISABLE_TELEMETRY` or `DO_NOT_TRACK`, also produced this message; the “Remote Control requires feature-flag evaluation” entry below covers that configuration.
+Claude Code checked Remote Control availability for the account you’re signed in with and the check came back off. The usual cause is cached entitlements that are out of date after a plan change. Run `claude auth logout` then `claude auth login` to refresh them, and update Claude Code if you’re on an old version. Run `claude doctor` to see which individual eligibility check failed. Environment-variable conflicts, unreachable checks, and your organization’s Remote Control setting each produce their own message, so this error means the account-level check itself. Before v2.1.239, this message read “Remote Control is not yet enabled for your account”.
###
@@ -388,7 +391,7 @@
”Couldn’t verify Remote Control eligibility”
-Claude Code could not reach the feature-flag service to check whether Remote Control is enabled for your account, typically because you are offline or a proxy is blocking the request. Retry once you have network access, or run `claude doctor` for details. The related message “Couldn’t verify your organization’s Remote Control policy” means Claude Code couldn’t read that policy, and has the same fix. Both messages were added in v2.1.178.
+Claude Code could not reach the feature-flag service to check whether Remote Control is enabled for your account, typically because you are offline or a proxy is blocking the request. Retry once you have network access, or run `claude doctor` for details. The related message “Couldn’t verify your organization’s Remote Control policy” means Claude Code hit an error reading that policy, and has the same fix.
###
@@ -396,7 +399,10 @@
”Remote Control requires feature-flag evaluation”
-One of these variables is set: [`DISABLE_TELEMETRY`, `DO_NOT_TRACK`, `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, or `DISABLE_GROWTHBOOK`](</docs/en/env-vars>). Each of them disables the feature-flag evaluation that Remote Control availability depends on, and the full message names the variable Claude Code found. Unset that variable wherever it’s set, in your shell environment or in the `env` block of a [`settings.json` file](</docs/en/settings-reference#all-settings>). On versions before 2.1.154, the same configuration produces “Remote Control is not yet enabled for your account” instead.
+An [environment variable](</docs/en/env-vars#features-that-need-feature-flag-fetching>) that turns off feature-flag evaluation is set, and the full message names the variable Claude Code found. On versions before 2.1.154, the same configuration produces “Remote Control is not yet enabled for your account” instead. What to do depends on the variable the message names:
+
+ * **`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` or `DISABLE_GROWTHBOOK`**: unset the variable wherever it’s set, in your shell environment or in the `env` block of a [`settings.json` file](</docs/en/settings-reference#all-settings>).
+ * **`DISABLE_TELEMETRY` or `DO_NOT_TRACK`**: on a Pro, Max, Team, or Enterprise plan with `DISABLE_GROWTHBOOK` unset, these variables leave Remote Control available unless your organization requires Trusted Devices. If it does, unset the variable wherever it’s set to use Remote Control. From v2.1.154 through v2.1.282, either variable produced this message, so update Claude Code to v2.1.283 or later.
###
@@ -404,7 +410,7 @@
”Remote Control is only available when using Claude via api.anthropic.com”
-The session isn’t talking to the Anthropic API directly, so there is no claude.ai backend to pair with. This happens on Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry. It also happens when [`ANTHROPIC_BASE_URL`](</docs/en/env-vars>) points at a host other than `api.anthropic.com`, such as an [LLM gateway](</docs/en/llm-gateway>) or proxy, even if you sign in with claude.ai. Before v2.1.196, Claude Code didn’t show this message for a custom `ANTHROPIC_BASE_URL`. See the [error reference](</docs/en/errors#remote-control-requires-the-anthropic-api>) for the full cause list. The message names what routed the session away from the Anthropic API, such as `CLAUDE_CODE_USE_BEDROCK` or a custom `ANTHROPIC_BASE_URL`. If you have an eligible claude.ai login, unset the named variable, remove it from the `env` key in [settings](</docs/en/settings>) if you set it there, and restart the session. Before v2.1.219, the message was only the sentence in this section’s header, so on older versions check your environment yourself for provider variables such as `CLAUDE_CODE_USE_BEDROCK` and `CLAUDE_CODE_USE_VERTEX`, and for `ANTHROPIC_BASE_URL`.
+The session isn’t talking to the Anthropic API directly, so there is no claude.ai backend to pair with. This happens on Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry. It also happens when [`ANTHROPIC_BASE_URL`](</docs/en/env-vars>) points at a host other than `api.anthropic.com`, such as an [LLM gateway](</docs/en/llm-gateway>) or proxy, even if you sign in with claude.ai. See the [error reference](</docs/en/errors#remote-control-requires-the-anthropic-api>) for the full cause list. The message names what routed the session away from the Anthropic API, such as `CLAUDE_CODE_USE_BEDROCK` or a custom `ANTHROPIC_BASE_URL`. If you have an eligible claude.ai login, unset the named variable, remove it from the `env` key in [settings](</docs/en/settings>) if you set it there, and restart the session.
###
@@ -412,13 +418,27 @@
”Remote Control is disabled by your organization’s policy”
-A policy blocks Remote Control, or Claude Code couldn’t load your organization’s policy on this machine and keeps Remote Control off in the meantime. Check these causes in order:
+A policy blocks Remote Control. Check these causes in order:
* **The error mentions`disableRemoteControl`**: your IT administrator has disabled Remote Control on this device through [managed settings](</docs/en/managed-settings>), independent of the organization-wide toggle and of how you’re signed in.
* **Your claude.ai plan is Pro or Max** : Claude Code is still signed in under a Team or Enterprise organization from an earlier login, so it checks that organization’s Remote Control policy. Run `/status` to see which plan and organization your sign-in uses. Run `claude auth logout` then `claude auth login` to sign in again under your current plan.
- * **The organization policy didn’t load on this machine** : run `claude doctor` and read the `Organization policy` line. If the line shows the policy isn’t loaded, that is what’s keeping Remote Control off. Before v2.1.261, `claude doctor` didn’t print this line.
* **The message doesn’t say to contact your organization admin** : your organization has a HIPAA configuration that is incompatible with Remote Control, and `/status` lists `HIPAA` in its `Compliance` row. In this state the admin panel’s Remote Control toggle is grayed out, so an Owner can’t change it there. Contact Anthropic support to discuss options. Before v2.1.267, this case showed “Remote Control isn’t available for your organization due to its compliance policy” instead.
* **Otherwise, an Owner hasn’t enabled it for your organization** : Remote Control is off by default on Team and Enterprise plans. An Owner can enable it at [claude.ai/admin-settings/claude-code](<https://claude.ai/admin-settings/claude-code>) by turning on the **Remote Control** toggle. This toggle is a server-side organization setting.
+
+Before v2.1.281, this message also appeared when Claude Code hadn’t loaded your organization’s policy on this machine, for example after starting offline. Later versions report that state as `Couldn't verify your organization's policy for remote control` instead.
+
+###
+
+
+
+“Couldn’t verify your organization’s policy for remote control”
+
+Claude Code couldn’t fetch your organization’s policy and has no saved copy on this machine to use instead, so it keeps Remote Control off until it can confirm that your organization allows it. This usually happens when you start Claude Code offline or before a VPN connects, or when a proxy interferes with the request. On a slow connection it can also appear while the first request is still in flight. The message takes one of these forms:
+
+ * From `/remote-control`, `claude remote-control`, or `claude --remote-control`: `Couldn't verify your organization's policy for remote control. Check your network connection and try again.`
+ * From auto-connect when a session starts: `couldn't verify your organization's policy — check your network connection and try again`, prefixed with `Remote Control failed` in the notification and `Remote Control disconnected` in the conversation. The session then leaves Remote Control off.
+
+Restore your network connection, then run `/remote-control` or run the command again. Each attempt checks for the policy again, so you don’t need to restart Claude Code. If the message keeps appearing, run `claude doctor` and read its `Organization policy` line, which says why the policy didn’t load. Before v2.1.281, this state showed `Remote Control is disabled by your organization's policy` instead.
###
@@ -436,24 +456,13 @@
* Network or proxy issue: a firewall or proxy may be blocking the outbound HTTPS request. Remote Control requires access to the Anthropic API on port 443.
* Session creation failed: if you also see `Session creation failed — see debug log`, the failure happened earlier in setup. Check that your subscription is active.
-A stale login token doesn’t cause this error. When the Anthropic API rejects the saved token, for example because another Claude Code process already refreshed it, Claude Code refreshes the token and retries on its own. Before v2.1.224, a stale token failed Remote Control startup with this message, so sessions set to connect automatically could fail intermittently at launch.
-
-###
-
-
-
-”Couldn’t reconnect to your Remote Control session”
-
-When you resume a conversation with `claude --resume` or `claude --continue`, Claude Code reconnects to the Remote Control session recorded in that conversation. This message means the reconnection failed for a reason that may be temporary, such as a network interruption or a server error, so Claude Code can’t confirm whether the remote session still exists. Run `/remote-control` to retry the connection, or start a new session with `claude --remote-control` to create a new Remote Control session. Your local session keeps running without Remote Control in the meantime. When you resume, you can also get one of these outcomes instead of this message:
-
- * **The server reports the recorded session gone, or the reconnection record names a different account** : Claude Code goes by what the conversation’s reconnection record says:
- * **The record names your signed-in account** : Claude Code starts a replacement session with an auto-generated name and leaves the conversation’s earlier messages out of it. You get this after you delete the session from claude.ai or the Claude app, for example.
- * **The record names a different account** : Claude Code starts a new session without the conversation’s earlier messages and without showing a message, whether or not the recorded session still exists.
- * **The record doesn’t say which account owned the session, or Claude Code can’t read your saved sign-in** : Claude Code shows `Previous session is unavailable — run /remote-control to start a new one` instead of this message, starts nothing, and removes the record from the conversation.
- * **You turned Remote Control off before resuming** : unless the app hosting Claude Code had told it that the app owns the claude.ai session, Claude Code removed the reconnection record when you turned Remote Control off from the CLI’s status panel, the VS Code extension, or a host built on the [Agent SDK](</docs/en/agent-sdk/overview>), so it doesn’t reconnect. When an owning app turned it off, Claude Code kept the record and reconnects.
- * **Another Claude Code on this machine still has the session** : you see a notice that starts with `Remote Control not started here`, and Claude Code leaves Remote Control off in the resumed session. Run `/remote-control` there to move it.
-
-Before v2.1.232, Claude Code responded differently when the server reported the recorded session gone. From v2.1.227 through v2.1.231, Claude Code refused to start a replacement even when the record matched your account. Through v2.1.226, Claude Code started a replacement whether or not the record matched your account, and in v2.1.224 through v2.1.226 created it under the account signed in on that machine, never another account’s, without uploading the conversation’s earlier messages to it. Before v2.1.200, Claude Code created a new session after any reconnection failure.
+###
+
+
+
+“Couldn’t reconnect to your Remote Control session”
+
+When you resume a conversation with `claude --resume` or `claude --continue`, Claude Code reconnects to the Remote Control session recorded in that conversation. This message means the reconnection failed for a reason that may be temporary, such as a network interruption or a server error, so Claude Code can’t confirm whether the remote session still exists. Run `/remote-control` to retry the connection, or start a new session with `claude --remote-control` to create a new Remote Control session. Your local session keeps running without Remote Control in the meantime.
###
@@ -461,7 +470,7 @@
“Previous session is unavailable — run /remote-control to start a new one”
-Claude Code couldn’t bring back the previous Remote Control session and stopped instead of starting a new one on its own. You can see this message after you resume a conversation with `claude --resume` or `claude --continue`, or after Claude Code [reconnects on its own following a disconnect](</docs/en/errors#remote-control-couldnt-refresh-your-login>). Run `/remote-control` to start a new Remote Control session under the current login; your local session keeps running without Remote Control in the meantime. The related message `Remote Control could not verify the signed-in account — run /remote-control to reconnect` has the same fix; Claude Code shows it when the signed-in account changed or couldn’t be read between validating it and reconnecting. If you run `/remote-control` after `Previous session is unavailable` without restarting Claude Code first, Claude Code leaves the conversation’s earlier messages out of the new session. On resume, Claude Code starts a new session in its place only if the conversation’s reconnection record names the account that owned the session, because the server reports a session you deleted and a session owned by another account the same way. Claude Code before v2.1.227 didn’t record that account, and Claude Code can’t check the record when it can’t read your saved sign-in. Claude Code before v2.1.232 showed `Remote Control could not resume the previous session under the current login — run /remote-control to start fresh` instead, in a different set of cases.
+Claude Code couldn’t bring back the previous Remote Control session and stopped instead of starting a new one on its own. You can see this message after you resume a conversation with `claude --resume` or `claude --continue`, or after Claude Code [reconnects on its own following a disconnect](</docs/en/errors#remote-control-couldnt-refresh-your-login>). Run `/remote-control` to start a new Remote Control session under the current login; your local session keeps running without Remote Control in the meantime. The related message `Remote Control could not verify the signed-in account — run /remote-control to reconnect` has the same fix. If you run `/remote-control` after `Previous session is unavailable` without restarting Claude Code first, Claude Code leaves the conversation’s earlier messages out of the new session.
###
@@ -469,7 +478,7 @@
”Remote Control got an unexpected server response”
-The Remote Control server accepted a request but replied in a form this version of Claude Code couldn’t read, while creating the remote session or fetching its credentials. Retrying on the same version fails the same way. Run `claude update`, then run `/remote-control` to reconnect. This message was added in v2.1.225.
+The Remote Control server accepted a request but replied in a form this version of Claude Code couldn’t read, while creating the remote session or fetching its credentials. Retrying on the same version fails the same way. Run `claude update`, then run `/remote-control` to reconnect.
###
@@ -486,23 +495,6 @@
”session expired for trusted-device check”
Your sign-in is more than 18 hours old. Run `/login` in Claude Code, or confirm with Face ID, Touch ID, Windows Hello, or a passkey when claude.ai or the mobile app prompts you. See Trusted Devices.
-
-##
-
-
-
-Choose the right approach
-
-Claude Code offers several ways to work when you’re not at your terminal. They differ in what triggers the work, where Claude runs, and how much you need to set up.
-
-| Trigger| Claude runs on| Setup| Best for
----|---|---|---|---
-[Dispatch](</docs/en/desktop#sessions-from-dispatch>)| Message a task from the Claude mobile app| Your machine (Desktop)| [Pair the mobile app with Desktop](<https://support.claude.com/en/articles/13947068>)| Delegating work while you’re away, minimal setup
-[Remote Control](</docs/en/remote-control>)| Drive a running session from [claude.ai/code](<https://claude.ai/code>) or the Claude mobile app| Your machine (CLI or VS Code)| Run `claude remote-control`| Steering in-progress work from another device
-[Channels](</docs/en/channels>)| Push events from a chat app like Telegram or Discord, or your own server| Your machine (CLI)| [Install a channel plugin](</docs/en/channels#quickstart>) or [build your own](</docs/en/channels-reference>)| Reacting to external events like CI failures or chat messages
-[Slack](</docs/en/slack>)| Mention `@Claude` in a team channel| Anthropic cloud| [Install the Slack app](</docs/en/slack#setting-up-claude-code-in-slack>) with [Claude Code on the web](</docs/en/claude-code-on-the-web>) enabled| PRs and reviews from team chat
-[Self-hosted environments](</docs/en/self-hosted-environments>)| Start a [cloud session](</docs/en/claude-code-on-the-web>) and pick your organization’s environment| Your organization’s infrastructure| [Deploy runners](</docs/en/self-hosted-environments-quickstart>), on Team and Enterprise plans| Cloud sessions that must run inside your network
-[Scheduled tasks](</docs/en/scheduled-tasks>)| Set a schedule| [CLI](</docs/en/scheduled-tasks>), [Desktop](</docs/en/desktop-scheduled-tasks>), or [cloud](</docs/en/routines>)| Pick a frequency| Recurring automation like daily reviews
##
--- a/routines.md
+++ b/routines.md
@@ -25,7 +25,8 @@
Create a routine from the web at [claude.ai/code/routines](<https://claude.ai/code/routines>), from the Desktop app, or from the CLI. All three surfaces write to the same cloud account, so a routine you create in one shows up in the others immediately. In the Desktop app’s **Code** tab, click **Routines** in the sidebar or in the sidebar’s **More** menu, then **New routine** , and choose **Cloud** ; choosing **Local** instead creates a [Desktop scheduled task](</docs/en/desktop-scheduled-tasks>), which runs on your machine rather than in the cloud. The creation form sets up the routine’s prompt, repositories, environment, connectors, and triggers. Routines run autonomously as full Claude Code cloud sessions: there is no permission-mode picker, and the session runs shell commands, uses [skills](</docs/en/skills>) committed to the cloned repository, and calls any connectors you include, all without stopping for approval apart from some [artifact](</docs/en/artifacts>) actions. What a routine can reach is determined by the repositories you select, the [environment’s](</docs/en/cloud-environments>) network access and variables, and the connectors you include. Scope each of those to what the routine actually needs. When the routine’s schedule or **Run now** starts a run, Claude republishes an existing artifact without asking only when all of these hold:
* You can edit the artifact and it belongs to your own organization
- * The artifact isn’t shared publicly, and isn’t shared with specific people or your organization with the latest version chosen as the version viewers see
+ * The artifact isn’t shared publicly
+ * If the artifact is shared with specific people or your organization, its viewers don’t automatically see each new version
* The publish carries only the page, with no supporting files or anything else added, and doesn’t force over a newer version
* The page holds no grant that reaches beyond the page, such as [connector calls](</docs/en/artifacts#pull-live-data-with-mcp-connectors>)
@@ -79,7 +80,7 @@
* API
-Pick a preset frequency for a recurring run, or schedule a single one-off run at a specific timestamp. See Add a schedule trigger for timezone handling, stagger, custom cron intervals, and one-off runs.
+Pick a preset frequency for a recurring run, or schedule a single one-off run at a specific timestamp. See Add a schedule trigger for timezone handling, late starts, custom cron intervals, and one-off runs.
Select the repository, the event to react to, and optional filters. See Add a GitHub trigger for the full list of supported events and filter fields.
@@ -119,7 +120,7 @@
Add a schedule trigger
-A schedule trigger runs the routine on a recurring cadence, or once at a specific future time. Pick a preset frequency in the **Select a trigger** section: hourly, daily, weekdays, or weekly. Times are entered in your local zone and converted automatically, so the routine runs at that wall-clock time regardless of where the cloud infrastructure is located. Runs may start a few minutes after the scheduled time due to stagger. The offset is consistent for each routine. For a custom interval such as every two hours or the first of each month, pick the closest preset in the form, then run `/schedule update` in the CLI to set a specific cron expression. The minimum interval is one hour; expressions that run more frequently are rejected.
+A schedule trigger runs the routine on a recurring cadence, or once at a specific future time. Pick a preset frequency in the **Select a trigger** section: hourly, daily, weekdays, or weekly. Times are entered in your local zone and converted automatically, so the routine runs at that wall-clock time regardless of where the cloud infrastructure is located. If you schedule a run exactly on the hour, such as 9:00, it can start several minutes late. To start close to the scheduled time, pick a few minutes past the hour, for example 9:07. For a custom interval such as every two hours or the first of each month, pick the closest preset in the form, then run `/schedule update` in the CLI to set a specific cron expression. The minimum interval is one hour; expressions that run more frequently are rejected.
####
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -92,7 +92,7 @@
On Linux and WSL2, the runtime applies write grants only to paths that already exist. In a fresh environment, create Claude Code’s configuration paths before the first launch:
- mkdir -p ~/.claude && echo '{}' > ~/.claude.json
+ mkdir -p ~/.claude && { [ -f ~/.claude.json ] || echo '{}' > ~/.claude.json; }
Once the settings file is in place, launch Claude Code with `npx` and pass `claude` as the command to wrap:
--- a/sandboxing.md
+++ b/sandboxing.md
@@ -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; 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.
+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, a [per-user temp directory](</docs/en/env-vars>), 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:
@@ -139,7 +139,7 @@
Temporary directories
-The session temp directory is writable inside the sandbox by default, alongside the working directory. Unless you disable filesystem isolation, Claude Code sets `$TMPDIR` to this directory for sandboxed commands, so tools that write temporary files work without extra configuration. Unsandboxed commands inherit your shell’s `$TMPDIR` when it is set, so while filesystem isolation is on, sandboxed and unsandboxed commands resolve `$TMPDIR` to different directories. If your shell leaves `$TMPDIR` unset or empty, an unsandboxed command that references `$TMPDIR` receives your [`CLAUDE_CODE_TMPDIR`](</docs/en/env-vars>) override, or the operating system’s temp directory when you haven’t set one or the override is a long path, so the variable doesn’t expand to an empty string. To pass temporary files between the two, write them under the working directory instead.
+A per-user temp directory is writable inside the sandbox by default, alongside the working directory. Unless you disable filesystem isolation, Claude Code sets `$TMPDIR` to this directory for sandboxed commands, so tools that write temporary files work without extra configuration. Unsandboxed commands inherit your shell’s `$TMPDIR` when it is set, so while filesystem isolation is on, sandboxed and unsandboxed commands resolve `$TMPDIR` to different directories. If your shell leaves `$TMPDIR` unset or empty, an unsandboxed command that references `$TMPDIR` receives your [`CLAUDE_CODE_TMPDIR`](</docs/en/env-vars>) override, or the operating system’s temp directory when you haven’t set one or the override is a long path, so the variable doesn’t expand to an empty string. To pass temporary files between the two, write them under the working directory instead.
##
@@ -147,7 +147,7 @@
Configure sandboxing
-Customize sandbox behavior through your `settings.json` file. See [Settings](</docs/en/settings-reference#sandbox-settings>) for the complete configuration reference. By default, sandboxed commands can write to the current 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`. If subprocess commands like `kubectl`, `terraform`, or `npm` need to write outside those directories, use `sandbox.filesystem.allowWrite` to grant access to specific paths:
+Customize sandbox behavior through your `settings.json` file. See [Settings](</docs/en/settings-reference#sandbox-settings>) for the complete configuration reference. By default, sandboxed commands can write to the current working directory, the per-user 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`. If subprocess commands like `kubectl`, `terraform`, or `npm` need to write outside those directories, use `sandbox.filesystem.allowWrite` to grant access to specific paths:
{
"sandbox": {
@@ -251,7 +251,7 @@
Two other things change:
- * Sandboxed commands inherit your shell’s `$TMPDIR` instead of the session temp directory, because every temp directory is writable and Claude Code no longer redirects commands to the session one. On Linux the variable is often unset in the parent shell. The Bash tool guidance tells Claude to create scratch directories with `mktemp -d` instead of relying on `$TMPDIR`.
+ * Sandboxed commands inherit your shell’s `$TMPDIR` instead of the per-user temp directory, because every temp directory is writable and Claude Code no longer redirects commands to the per-user one. On Linux the variable is often unset in the parent shell. The Bash tool guidance tells Claude to create scratch directories with `mktemp -d` instead of relying on `$TMPDIR`.
* [`autoAllowBashIfSandboxed`](</docs/en/settings-reference#sandbox-autoallowbashifsandboxed>) still defaults to `true`, so sandboxed commands keep running without prompts. Set it to `false` to prompt for sandboxed commands.
###
@@ -428,9 +428,9 @@
The sandboxed Bash tool restricts file system access to specific directories:
- * **Default write behavior** : read and write access to the current working directory and its subdirectories, any directories you’ve added with `--add-dir`, `/add-dir`, or [`permissions.additionalDirectories`](</docs/en/settings-reference#permissions-additionaldirectories>), plus the session temp directory that `$TMPDIR` points to
+ * **Default write behavior** : read and write access to the current working directory and its subdirectories, any directories you’ve added with `--add-dir`, `/add-dir`, or [`permissions.additionalDirectories`](</docs/en/settings-reference#permissions-additionaldirectories>), plus the per-user temp directory that `$TMPDIR` points to
* **Default read behavior** : read access to the entire computer, except certain denied directories. Note that this default still allows reading credential files such as `~/.aws/credentials` and `~/.ssh/`. Use `sandbox.credentials` to block reads of these files and unset secret environment variables, or add the paths to `denyRead`.
- * **Blocked access** : cannot modify files outside the working directory, added directories, and session temp directory without explicit permission, including shell configuration files such as `~/.bashrc` and system binaries in `/bin/`
+ * **Blocked access** : cannot modify files outside the working directory, added directories, and the per-user temp directory without explicit permission, including shell configuration files such as `~/.bashrc` and system binaries in `/bin/`
* **Git worktrees** : when the working directory is a [linked git worktree](</docs/en/worktrees>), the sandbox also allows writes to the main repository’s shared `.git` directory so commands such as `git commit` can update refs and the index. Writes to `hooks/` and `config` inside that directory remain denied.
* **Configurable** : define custom allowed and denied paths through settings
--- a/security.md
+++ b/security.md
@@ -128,10 +128,11 @@
* **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
- * **Credential protection** : Authentication is handled through a secure proxy that uses a scoped credential inside the sandbox, which is then translated to your actual GitHub authentication token
+ * **Credential protection** : GitHub credentials are stored encrypted on Anthropic’s servers and never enter the session VM. The VM holds a short-lived credential scoped to that session, and GitHub traffic goes through an [Anthropic proxy](</docs/en/cloud-environments#github-proxy>) that attaches the GitHub credential on the server side. See [GitHub authentication options](</docs/en/claude-code-on-the-web#github-authentication-options>) for how you grant access
* **Branch restrictions** : Git push operations are restricted to the current working branch
* **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
+ * **Deletion** : You can [delete a session](</docs/en/claude-code-on-the-web#delete-sessions>) at any time. See [Cloud execution data flow](</docs/en/data-usage#cloud-execution-data-flow-and-dependencies>) for what Anthropic stores for a cloud session
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/self-hosted-environments-deploy.md
+++ b/self-hosted-environments-deploy.md
@@ -206,9 +206,13 @@
&& git config --system --add safe.directory '*'
ENTRYPOINT ["claude"]
-Swap `linux-x64` for `linux-arm64` if your nodes are ARM, or for `linux-x64-musl` or `linux-arm64-musl` on a musl-based image such as Alpine; see [Alpine Linux setup](</docs/en/setup#alpine-linux-and-musl-based-distributions>) for the extra packages musl images need. The URL is the standard Claude Code release location, so you can verify the downloaded binary against the release’s signed manifest as described in [Binary integrity and code signing](</docs/en/setup#binary-integrity-and-code-signing>). Build the image with Claude Code version 2.1.224 or later, then push it to your registry and reference it in the recipes below:
-
- docker build --build-arg CLAUDE_CODE_VERSION=2.1.267 -t <your-registry>/claude-runner:latest .
+Swap `linux-x64` for `linux-arm64` if your nodes are ARM, or for `linux-x64-musl` or `linux-arm64-musl` on a musl-based image such as Alpine; see [Alpine Linux setup](</docs/en/setup#alpine-linux-and-musl-based-distributions>) for the extra packages musl images need. The URL is the standard Claude Code release location, so you can verify the downloaded binary against the release’s signed manifest as described in [Binary integrity and code signing](</docs/en/setup#binary-integrity-and-code-signing>). The runner requires Claude Code version 2.1.224 or later. Build the image, then push it to your registry and reference it in the recipes below:
+
+ docker build \
+ --build-arg CLAUDE_CODE_VERSION="$(curl -fsSL https://downloads.claude.ai/claude-code-releases/stable)" \
+ -t <your-registry>/claude-runner:latest .
+
+The command substitution looks up the current `stable` release number and passes it as the build argument, so running the same command after a new stable release rebuilds the download layer with the newer binary. To pin a specific release for reproducible builds, pass the version number directly as `CLAUDE_CODE_VERSION`. Replace `stable` with `latest` in the lookup URL when you need a release newer than the stable channel, such as one a [newly launched model requires](</docs/en/model-config>).
##
--- a/server-managed-settings.md
+++ b/server-managed-settings.md
@@ -198,8 +198,15 @@
When part of a payload fails schema validation, Claude Code surfaces a validation error and applies every remaining valid setting; [Invalid entries in managed settings](</docs/en/managed-settings#invalid-entries-in-managed-settings>) says what it drops and which keys fall back to a stricter value. Requires Claude Code v2.1.169 or later. Server-managed delivery adds these behaviors:
- * The cache at `~/.claude/remote-settings.json` stores the salvaged payload with invalid entries removed, apart from invalid `cleanupPeriodDays` and `desktopSessionCleanupPeriodDays` values, which stay in the cached copy and are never applied.
- * When no field in the payload can be salvaged and the payload isn’t only those retention keys, Claude Code rejects the payload, keeps the last-accepted cached settings, and writes `Remote settings: Settings validation failed - no fields could be salvaged` to the debug log. With `forceRemoteSettingsRefresh` set, the CLI exits instead.
+ * A startup that runs on the cache at `~/.claude/remote-settings.json` treats invalid entries the way the fetch that wrote the cache did:
+ * Entries that failed validation stay dropped.
+ * [Keys that fail closed](</docs/en/managed-settings#keys-that-fail-closed>) keep their stricter values.
+ * An invalid `cleanupPeriodDays` or `desktopSessionCleanupPeriodDays` value stays in the cached copy and is never applied.
+ * Claude Code applies nothing from a payload and leaves the cache unchanged when all three of these are true:
+ * Every setting in the payload fails validation.
+ * None of them falls back to a stricter value.
+ * The payload holds a key other than those two retention keys.
+The startup notice, `/status`, and `claude doctor` then report the [failed load](</docs/en/errors#remote-managed-settings-failed-to-load>) with the cause `no setting in the server response could be applied as written`, and that entry says which policy the session runs on. Clients that enforce fail-closed startup exit at startup instead.
* The security approval dialog evaluates the salvaged payload, so a stripped invalid entry is never presented for approval and never executes.
To debug delivery issues, run `claude --debug-file <path>` and search the log for `Remote settings`. Validate a payload change with `claude doctor` on a test machine before rolling it out to the organization.
Show diff (222 lines)
--- a/settings-reference.md
+++ b/settings-reference.md
@@ -39,6 +39,7 @@
`autoScrollEnabled`| [Follow new output](</docs/en/fullscreen#auto-follow>) to the bottom in fullscreen rendering| Interface and terminal| Any file
`autoUpdatesChannel`| Follow the stable [release channel](</docs/en/setup#configure-release-channel>) instead of latest| Updates and versioning| Any file
`availableModels`| [Restrict which models](</docs/en/model-config#restrict-model-selection>) people can pick| Model and responses| Any file
+`availableModelsMatch`| Make each `availableModels` model ID entry [permit only the version it names](</docs/en/model-config#block-specific-models-or-versions>)| Model and responses| Managed
`awaySummaryEnabled`| Turn off the [session recap](</docs/en/interactive-mode#session-recap>) shown when you come back to the terminal| Remote, desktop, and notifications| Any file
`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
@@ -56,6 +57,7 @@
`crossSessionInbound`| Choose whether Claude Code delivers [messages from your other sessions](</docs/en/cross-session-messaging#control-inbound-messages>), shows a notice without delivering them, or refuses them| Agents, sessions, and worktrees| Any file
`defaultShell`| Choose whether Bash or PowerShell runs the shell commands you type with the [`!` prefix](</docs/en/interactive-mode#shell-mode-with-prefix>)| Interface and terminal| Any file
`deniedMcpServers`| Block specific [MCP servers](</docs/en/mcp>) by URL, command, or name| MCP| Any file
+`deniedModels`| [Block specific models](</docs/en/model-config#block-specific-models-or-versions>), even ones `availableModels` permits| Model and responses| Managed
`desktopSessionCleanupPeriodDays`| Set an age limit in days for [Claude Desktop and Cowork transcripts](</docs/en/claude-directory#cleaned-up-automatically>)| Privacy and telemetry| User or managed
`dialogExpiry`| Set how long Claude Code waits for [Remote Control](</docs/en/remote-control>) or an SDK host to answer a forwarded dialog before it cancels the dialog| Interface and terminal| User or managed
`diffTool`| Choose whether Claude’s proposed file changes open in the [VS Code](</docs/en/vs-code>) or [JetBrains](</docs/en/jetbrains#features>) diff viewer or stay in the terminal| Global config settings| Global config
@@ -112,6 +114,7 @@
`managedMcpServers`| Provide remote [MCP servers](</docs/en/managed-mcp#provide-servers-through-managed-settings>) to every user alongside the ones they add| MCP| Managed
`managedSourcesBehavior`| Compose every [managed source](</docs/en/managed-settings#how-claude-code-combines-managed-sources>) you deploy instead of using the highest-priority one alone| Enterprise and managed settings| Managed
`maxEffortLevel`| Cap the [effort level](</docs/en/model-config#adjust-effort-level>) for every model or per model, on every provider| Model and responses| Any file
+`maxProseWidth`| Cap how wide the prose in Claude’s responses runs in a wide terminal| Interface and terminal| Any file
`minimumVersion`| Keep [auto-updates](</docs/en/setup#pin-a-minimum-version>) from installing anything below a version| Updates and versioning| Any file
`model`| Change the [model](</docs/en/model-config#set-a-default-model-for-new-sessions>) Claude Code starts with| Model and responses| Any file
`modelOverrides`| [Map model IDs](</docs/en/model-config#override-model-ids-per-version>) to your provider’s IDs, such as Bedrock ARNs| Model and responses| Any file
@@ -298,7 +301,7 @@
`availableModels`
-Restrict which models people can select for the main session, [subagents](</docs/en/sub-agents>), [skills](</docs/en/skills>), and the [advisor](</docs/en/advisor>). A managed list constrains `/model`, `--model`, and the `model` key in a developer’s own files; a model outside it can’t be selected. On its own this doesn’t touch the Default option; pair it with `enforceAvailableModels` for that.
+Restrict which models people can select for the main session, [subagents](</docs/en/sub-agents>), [skills](</docs/en/skills>), and the [advisor](</docs/en/advisor>). A managed list constrains `/model`, `--model`, and the `model` key in a developer’s own files; a model outside it can’t be selected. With the default prefix matching, this doesn’t touch the Default option on its own; pair it with `enforceAvailableModels` for that.
* **Scope** : `Any file`. Deploy it in managed settings to enforce it for an organization.
* **Type** : array of model aliases or IDs
@@ -312,7 +315,59 @@
"availableModels": ["sonnet", "haiku"]
}
-See [Restrict model selection](</docs/en/model-config#restrict-model-selection>).
+A model ID entry such as `"claude-opus-5"` also permits later versions that extend it, such as Opus 5.5. To block one of those versions, use `deniedModels`. To make each model ID entry permit only the version it names, use `availableModelsMatch`. See [Restrict model selection](</docs/en/model-config#restrict-model-selection>).
+
+###
+
+
+
+`availableModelsMatch`
+
+Choose how `availableModels` entries match model IDs. By default a model ID entry also permits later versions that extend it, so `"claude-opus-5"` permits Opus 5.5. With `"exact"`, each model ID entry permits only the version it names, so a newer version of that model stays blocked until you list it. Requires Claude Code v2.1.283 or later.
+
+ * **Scope** : `Managed`. Claude Code ignores the key in user, project, and local settings and in `--settings`, with a warning
+ * **Type** : string, one of:
+ * `"prefix"`: a model ID entry permits its version and any model ID that extends it with another segment
+ * `"exact"`: a model ID entry permits only the version it names, including that version’s dated IDs, so `"claude-opus-5"` permits Opus 5 but not `claude-opus-5-5`. A family alias such as `"opus"` still permits the whole family, and `best`, `opusplan`, and `default` entries are ignored
+ * **Default** : `"prefix"`
+
+This example permits Opus 5 and Sonnet 5 and no later release of either:
+
+managed-settings.json
+
+ {
+ "availableModels": ["claude-opus-5", "claude-sonnet-5"],
+ "availableModelsMatch": "exact"
+ }
+
+With `"exact"`, the Default option is also limited to the listed models whenever the list names at least one model or family. See [Block specific models or versions](</docs/en/model-config#block-specific-models-or-versions>).
+
+###
+
+
+
+`deniedModels`
+
+Block specific models, with or without an `availableModels` allowlist and even when that list permits them. Claude Code hides a blocked model from the `/model` picker, and the model can’t be selected anywhere `availableModels` is enforced. A session on the Default option doesn’t run a blocked model either, as [Block specific models or versions](</docs/en/model-config#block-specific-models-or-versions>) describes. Requires Claude Code v2.1.283 or later.
+
+ * **Scope** : `Managed`. Claude Code ignores the key in user, project, and local settings and in `--settings`, with a warning
+ * **Type** : array of model aliases or IDs
+ * A family alias such as `"opus"` blocks every model in that family
+ * A model ID such as `"claude-opus-5-5"` blocks that version in every spelling, including dated and provider-specific IDs
+ * A model ID with no minor version, such as `"claude-opus-5"`, also blocks later minor versions such as Opus 5.5. Write `"claude-opus-5-0"` to block Opus 5 alone
+ * `best`, `opusplan`, and `default` entries are ignored
+ * **Default** : unset, so no model is blocked
+
+This example permits Opus and Sonnet models and blocks Opus 5.5:
+
+managed-settings.json
+
+ {
+ "availableModels": ["opus", "sonnet"],
+ "deniedModels": ["claude-opus-5-5"]
+ }
+
+See [Block specific models or versions](</docs/en/model-config#block-specific-models-or-versions>).
###
@@ -345,12 +400,12 @@
`enforceAvailableModels`
-The `/model` picker has a **Default** option that resolves to your [organization default model](</docs/en/model-config#organization-default-model>) when one applies, and otherwise to your account type’s default. An `availableModels` allowlist limits the models you can name, but on its own it leaves **Default** alone, so **Default** can still resolve to a model outside the list. This key closes that gap. Requires Claude Code v2.1.175 or later. When your organization deploys any managed settings, Claude Code reads this key from the managed source alone and ignores it in your other files.
+The `/model` picker has a **Default** option that resolves to your [organization default model](</docs/en/model-config#organization-default-model>) when one applies, and otherwise to your account type’s default. An `availableModels` allowlist limits the models you can name, but with the default prefix matching it leaves **Default** alone, so **Default** can still resolve to a model outside the list. This key closes that gap. Requires Claude Code v2.1.175 or later. When your organization deploys any managed settings, Claude Code reads this key from the managed source alone and ignores it in your other files.
* **Scope** : `Any file`
* **Type** : Boolean
* `true`: when **Default** would resolve to a model outside `availableModels`, Claude Code resolves it to the first available model in the list
- * `false`: **Default** resolves as usual, even to a model outside `availableModels`
+ * `false`: this key doesn’t change how **Default** resolves
* **Default** : `false`
This example restricts named selections to Sonnet and Haiku models and makes **Default** resolve to the first of them that is available:
@@ -561,10 +616,10 @@
Field| Type| What it does
---|---|---
-`options`| array of rows, each with a required `model` and an optional `label` and `description`| The rows the picker shows, in this order, except that a grayed-out row moves to the bottom. Without a `label`, Claude Code titles the row with the built-in name for a model it knows, or the model ID otherwise, and without a `description` it writes a generic second line
+`options`| array of rows, each with a required `model` and optional `label`, `description`, and `behavesAs`| The rows the picker shows, in this order, except that a grayed-out row moves to the bottom. Without a `label`, Claude Code titles the row with the built-in name for a model it knows, or the model ID otherwise, and without a `description` it writes a generic second line
`replaceBuiltInOptions`| Boolean, default `false`| Set it to `true` to show only these rows, **Default** , and a row for the model the session is already using. Leave it unset to add these rows after the built-in lineup
-With `replaceBuiltInOptions` on, Claude Code hides every other row: the built-in lineup, the rows it adds for `availableModels` entries, the models [gateway discovery](</docs/en/llm-gateway-protocol#model-discovery>) found, and [`ANTHROPIC_CUSTOM_MODEL_OPTION`](</docs/en/model-config#add-a-custom-model-option>). With it off, Claude Code skips a listed model that the built-in lineup already covers. A label changes what the picker shows, not which model Claude Code runs. An `availableModels` allowlist still applies to these rows. Before you add a listed model to the allowlist, read [Merge behavior](</docs/en/model-config#merge-behavior>): a specific model ID narrows its family’s wildcard entry. Claude Code also checks each row against the session before it shows the picker:
+An entry in `options` can also carry an optional `behavesAs` string beside its `model`, which requires v2.1.257 or later. Set it to the ID of a model your Claude Code version already knows, such as `claude-opus-4-8`, on an entry whose `model` is newer than your version. Claude Code then applies that known model’s capabilities and effort defaults to the entry instead of treating its model as unknown. The entry’s label and the model ID Claude Code sends in requests don’t change. With `replaceBuiltInOptions` on, Claude Code hides every other row: the built-in lineup, the rows it adds for `availableModels` entries, the models [gateway discovery](</docs/en/llm-gateway-protocol#model-discovery>) found, and [`ANTHROPIC_CUSTOM_MODEL_OPTION`](</docs/en/model-config#add-a-custom-model-option>). With it off, Claude Code skips a listed model that the built-in lineup already covers. A label changes what the picker shows, not which model Claude Code runs. An `availableModels` allowlist still applies to these rows. Before you add a listed model to the allowlist, read [Merge behavior](</docs/en/model-config#merge-behavior>): a specific model ID narrows its family’s wildcard entry. Claude Code also checks each row against the session before it shows the picker:
* **Dropped** : a row Claude Code can’t serve, such as a retired model or a model your organization has no access to
* **Grayed out** : a row you can’t select yet, shown with the reason
@@ -922,11 +977,11 @@
`useAutoModeDuringPlan`
-Choose whether Claude Code uses the auto mode classifier to review shell commands in plan mode. With the default `true`, the classifier reviews each command during planning when auto mode is available and you see no prompt. Set `false` to get a permission prompt for every command outside the built-in read-only set. Appears in `/config` as **Use auto mode during plan**.
+Choose whether Claude Code uses the auto mode classifier to review shell commands in plan mode. With the default `true`, the classifier reviews each command during planning when auto mode is available and you see no prompt, except for [critical-path removals](</docs/en/permission-modes#critical-paths>). Set `false` to get a permission prompt for every command outside the built-in read-only set. Appears in `/config` as **Use auto mode during plan**.
* **Scope** : `User, local, or managed`. A repository can’t turn it off for you.
* **Type** : Boolean
- * `true`: the same as unset; when auto mode is available, the classifier reviews each shell command during planning instead of prompting you for it. A `false` in any of these files still turns it off
+ * `true`: the same as unset; when auto mode is available, the classifier reviews each shell command during planning instead of prompting you for it, except [critical-path removals](</docs/en/permission-modes#critical-paths>). A `false` in any of these files still turns it off
* `false`: you get a permission prompt for every command outside the built-in read-only set
* **Default** : `true`
@@ -1082,7 +1137,7 @@
`permissions.defaultMode`
-Set the [permission mode](</docs/en/permission-modes>) new sessions start in. When you leave it unset, sessions start in the [built-in default](</docs/en/permission-modes#which-mode-a-session-starts-in>) for your plan and surface.
+Set the [permission mode](</docs/en/permission-modes>) new sessions start in. When you leave it unset, sessions start in the [built-in default](</docs/en/permission-modes#which-mode-a-session-starts-in>) for your surface.
* **Scope** : `Any file`. `auto` and `bypassPermissions` don’t take effect from project or local settings, so set them in `~/.claude/settings.json` instead. Before v2.1.257, `bypassPermissions` took effect from any file. For conversations the VS Code extension starts, Claude Code reads only user, managed, and `--settings` values.
* **Type** : string, one of:
@@ -1351,7 +1406,7 @@
`sandbox.filesystem`
-Control which paths sandboxed commands can read and write. By default they can write to the working directory, the session temp directory, and directories you add with `--add-dir`, `/add-dir`, or `permissions.additionalDirectories`, and can read the rest of the filesystem, including credential files. Widen or narrow that with the four path lists, or switch the filesystem layer off with `disabled`. See [Filesystem isolation](</docs/en/sandboxing#filesystem-isolation>) for the default boundaries.
+Control which paths sandboxed commands can read and write. By default they can write to the working directory, the per-user temp directory, and directories you add with `--add-dir`, `/add-dir`, or `permissions.additionalDirectories`, and can read the rest of the filesystem, including credential files. Widen or narrow that with the four path lists, or switch the filesystem layer off with `disabled`. See [Filesystem isolation](</docs/en/sandboxing#filesystem-isolation>) for the default boundaries.
* **Scope** : `Any file`
* **Type** : object with `allowWrite`, `denyWrite`, `denyRead`, and `allowRead` arrays, plus the `allowManagedReadPathsOnly` and `disabled` Booleans
@@ -1397,11 +1452,11 @@
`sandbox.filesystem.allowWrite`
-Add paths where sandboxed commands can write, beyond the working directory, the session temp directory, and the directories you’ve added with `--add-dir`, `/add-dir`, or `permissions.additionalDirectories`. Use it when a subprocess such as `kubectl` or a build tool needs to write outside the project.
+Add paths where sandboxed commands can write, beyond the working directory, the per-user temp directory, and the directories you’ve added with `--add-dir`, `/add-dir`, or `permissions.additionalDirectories`. Use it when a subprocess such as `kubectl` or a build tool needs to write outside the project.
* **Scope** : `Any file`
* **Type** : array of path strings, using the sandbox path prefixes
- * **Default** : unset, so sandboxed commands can write to the working directory, the session temp directory, directories you’ve added with `--add-dir` or `/add-dir`, and directories in `permissions.additionalDirectories`
+ * **Default** : unset, so sandboxed commands can write to the working directory, the per-user temp directory, directories you’ve added with `--add-dir` or `/add-dir`, and directories in `permissions.additionalDirectories`
This lets a build write under `/tmp/build` and lets `kubectl` update your kubeconfig:
@@ -2512,6 +2567,8 @@
* [`CLAUDE_CODE_MESSAGING_SOCKET` and `CLAUDE_CODE_MESSAGING_TOKEN`](</docs/en/env-vars#variables>), which Claude Code exports itself, are ignored from every file. Ignoring the socket variable requires Claude Code v2.1.224 or later, and ignoring the token requires v2.1.228 or later.
* [`CLAUDE_CODE_PROJECT_DIR_NAME`](</docs/en/sessions#name-the-project-directory-yourself>), which Claude Code reads from the launch environment only, is ignored from every file; requires v2.1.234 or later.
* [`CLAUDE_CODE_RESTRICTED`](</docs/en/env-vars#variables>), which Claude Code reads from the launch environment only, is ignored from every file.
+ * [`CLAUDE_CODE_DISABLE_POWERSHELL_CMD_RM_DENY`](</docs/en/env-vars#variables>), which Claude Code reads from the launch environment only, is ignored from every file. The variable requires Claude Code v2.1.283 or later.
+ * [`CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT` and `CLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPT`](</docs/en/env-vars#variables>), which Claude Code reads from the launch environment only, are ignored from every file.
###
@@ -2930,6 +2987,24 @@
* **Scope** : `Any file`
* **Type** : string, `"classic"` or `"readline"`
* **Default** : unset
+
+###
+
+
+
+`maxProseWidth`
+
+Cap the width of the prose in Claude’s responses so lines stay readable in a wide terminal. Paragraphs, headings, lists, and blockquotes wrap within this many columns, while tables and code blocks keep the full terminal width. Requires Claude Code v2.1.282 or later.
+
+ * **Scope** : `Any file`
+ * **Type** : number of terminal columns, a whole number, minimum `40`. Claude Code ignores any other value
+ * **Default** : unset, so prose wraps at the terminal edge
+
+settings.json
+
+ {
+ "maxProseWidth": 80
+ }
###
@@ -3643,7 +3718,7 @@
* **Scope** : `Any file`
* **Type** : string
- * **Default** : unset, so Claude Code adds `Co-Authored-By: <name> <noreply@anthropic.com>`. The name is the session’s active model, such as `Claude Sonnet 5`.
+ * **Default** : unset, so Claude Code adds `Co-Authored-By: <name> <noreply@anthropic.com>`. The name is the model in use when the commit is made, such as `Claude Sonnet 5`. When a [subagent](</docs/en/sub-agents>) makes the commit, the trailer names the subagent’s model.
* When Claude Code recognizes the model as a Claude model but can’t confirm its exact version, it writes `Claude` alone.
* When it can’t match the model ID to any Claude model, such as a third-party model served through a custom [`ANTHROPIC_BASE_URL`](</docs/en/env-vars>), it writes `Claude Code`.
@@ -5335,7 +5410,7 @@
* **Type** : Boolean
* `true`: Claude Code connects Remote Control automatically when each interactive session starts
* `false`: Claude Code waits for `/remote-control`
- * **Default** : unset, so auto-connect follows your organization’s admin default when one is set, and otherwise Claude Code’s current default
+ * **Default** : unset, so the [auto-connect default](</docs/en/remote-control#enable-remote-control-for-all-sessions>) applies
* **Per-session overrides** : `--remote-control` turns Remote Control on for one session even when this key is `false`, and no flag turns it off for one session
settings.json
--- a/setup.md
+++ b/setup.md
@@ -33,9 +33,9 @@
Install Claude Code
-Prefer a graphical interface? The [Desktop app](</docs/en/desktop-quickstart>) lets you use Claude Code without the terminal. Download it for [macOS](<https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect?utm_source=claude_code&utm_medium=docs>), [Windows](<https://claude.com/download?utm_source=claude_code&utm_medium=docs>), or [Linux](</docs/en/desktop-linux>).New to the terminal? See the [terminal guide](</docs/en/terminal-guide>) for step-by-step instructions.
-
-To install Claude Code, use one of the following methods:
+Prefer a graphical interface? The [Desktop app](</docs/en/desktop-quickstart>) lets you use Claude Code without the terminal. Download it for [macOS](<https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect?utm_source=claude_code&utm_medium=docs>), [Windows](<https://claude.com/download?utm_source=claude_code&utm_medium=docs>), or [Linux](</docs/en/desktop-linux>).
+
+To install Claude Code, open a terminal and run the command for your system. If you haven’t used a terminal before, the [terminal guide](</docs/en/terminal-guide>) shows how to open one and paste the command.
* Native Install (Recommended)
@@ -55,7 +55,7 @@
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
-If you see `The token '&&' is not a valid statement separator`, you’re in PowerShell, not CMD. If you see `'irm' is not recognized as an internal or external command`, you’re in CMD, not PowerShell. Your prompt shows `PS C:\` when you’re in PowerShell and `C:\` without the `PS` when you’re in CMD.If the install command fails with `syntax error near unexpected token '<'`, a `403`, or another curl error, see [Troubleshoot installation](</docs/en/troubleshoot-install#find-your-error>) to match the error to a fix and for alternative install methods.[Git for Windows](<https://git-scm.com/downloads/win>) is recommended on native Windows so Claude Code can use the Bash tool. If Git for Windows is not installed, Claude Code uses PowerShell as the shell tool instead. WSL setups do not need Git for Windows.
+When the installer finishes, open a new terminal window and run `claude --version`. A working installation prints a version number. If your shell says `claude` isn’t found or isn’t recognized, the install directory isn’t on your PATH yet: see [Fix your PATH](</docs/en/troubleshoot-install#command-not-found-claude-after-installation>).If you see `The token '&&' is not a valid statement separator`, you’re in PowerShell, not CMD. If you see `'irm' is not recognized as an internal or external command`, you’re in CMD, not PowerShell. Your prompt shows `PS C:\` when you’re in PowerShell and `C:\` without the `PS` when you’re in CMD.If the install command fails with `syntax error near unexpected token '<'`, a `403`, or another curl error, see [Troubleshoot installation](</docs/en/troubleshoot-install#find-your-error>) to match the error to a fix and for alternative install methods.[Git for Windows](<https://git-scm.com/downloads/win>) is recommended on native Windows so Claude Code can use the Bash tool. If Git for Windows is not installed, Claude Code uses PowerShell as the shell tool instead. WSL setups do not need Git for Windows.
Native installations automatically update in the background to keep you on the latest version.
--- a/statusline.md
+++ b/statusline.md
@@ -143,7 +143,7 @@
**Sizing output to the terminal** Claude Code captures your script’s output instead of connecting it directly to the terminal, so `tput cols` and language-level width detection cannot read the terminal size from inside the script. Read the `COLUMNS` and `LINES` environment variables instead. Claude Code sets these to the current terminal dimensions before running your script.
-The status line runs locally and does not consume API tokens. It temporarily hides during certain UI interactions, including autocomplete suggestions, the help menu, and permission prompts.
+The status line runs locally and does not consume API tokens. It temporarily hides during certain UI interactions, including the help menu and permission prompts.
##
@@ -1090,7 +1090,7 @@
* On Windows with Git Bash installed, backslashes in the `command` path are likely being consumed as escape characters before the script runs. Use forward slashes in the path. See Windows configuration.
* If `disableAllHooks` is `true` outside managed settings after [settings precedence](</docs/en/hooks#disable-or-remove-hooks>) applies, Claude Code runs only a `statusLine` from managed settings, and with no managed `statusLine` the status line is disabled. Remove the setting, or set it to `false` in the file that sets it, to re-enable. See [`disableAllHooks`](</docs/en/settings-reference#disableallhooks>).
* If your organization sets `allowManagedHooksOnly` in managed settings, your custom status line disappears without warning: you can only get a status line from a `statusLine` value in those managed settings. See [what runs under `allowManagedHooksOnly`](</docs/en/settings-reference#what-runs-under-allowmanagedhooksonly>) for the full behavior, and ask your administrator whether this setting applies to you.
- * Run `claude --debug` to log the exit code and stderr from the first status line invocation in a session
+ * Run `claude --debug` to log your script’s stderr on every status line invocation, and its exit code on the first invocation in a session
* Ask Claude to read your settings file and execute the `statusLine` command directly to surface errors
**Status line shows`--` or empty values**
--- a/sub-agents.md
+++ b/sub-agents.md
@@ -1,4 +1,4 @@
-Subagents are specialized AI assistants that handle specific types of tasks. Use one when a side task would flood your main conversation with search results, logs, or file contents you won’t reference again: the subagent does that work in its own context and returns only the summary. Define a custom subagent when you keep spawning the same kind of worker with the same instructions. Each subagent runs in its own context window with a custom system prompt, specific tool access, and independent permissions. When Claude encounters a task that matches a subagent’s description, it delegates to that subagent, which works independently and returns results. To see the context savings in practice, the [context window visualization](</docs/en/context-window>) walks through a session where a subagent handles research in its own separate window.
+Subagents are specialized AI assistants that handle specific types of tasks. Use one when a side task would flood your main conversation with search results, logs, or file contents you won’t reference again: the subagent does that work in its own context and returns only the summary. Define a custom subagent when you keep spawning the same kind of worker with the same instructions. Each subagent runs in its own context window with a custom system prompt, specific tool access, and independent permissions. It also sends its own requests, which count toward the same [usage limits](</docs/en/costs#plan-usage-breakdown>) as your main conversation. When Claude encounters a task that matches a subagent’s description, it delegates to that subagent, which works independently and returns results. To see the context savings in practice, the [context window visualization](</docs/en/context-window>) walks through a session where a subagent handles research in its own separate window.
Subagents work within a single session. To run many independent sessions in parallel and monitor them from one place, see [background agents](</docs/en/agent-view>). For separate sessions that pass messages to each other, see [cross-session messaging](</docs/en/cross-session-messaging>). For a coordinated team of sessions Claude spawns and supervises, see [agent teams](</docs/en/agent-teams>).
@@ -180,7 +180,13 @@
}
'@
-The `--agents` flag accepts JSON with a `prompt` field plus these frontmatter fields: `description`, `tools`, `disallowedTools`, `model`, `permissionMode`, `mcpServers`, `hooks`, `maxTurns`, `skills`, `initialPrompt`, `memory`, `effort`, `background`, `omitClaudeMd`, and `isolation`. Use `prompt` for the system prompt, equivalent to the markdown body in file-based subagents. `color` and `experimental` aren’t accepted here and are ignored rather than rejected. Each top-level key in the JSON is the agent’s name. Don’t start a name with `-`. For what Claude Code does with a value it can’t load, and the flags and environment variable that skip that check, see [`Invalid --agents configuration`](</docs/en/errors#invalid-agents-configuration>). **Managed subagents** are deployed by organization administrators. Place markdown files in `.claude/agents/` inside the [managed settings directory](</docs/en/managed-settings#delivery-mechanisms>), using the same frontmatter format as project and user subagents. Managed definitions take precedence over project and user subagents with the same name. **Plugin subagents** come from [plugins](</docs/en/plugins/overview>) you’ve installed. They load automatically alongside your custom subagents and appear in the @-mention typeahead under their scoped name. See the [plugin components reference](</docs/en/plugins/components#agents>) for details on creating plugin subagents.
+In [non-interactive mode](</docs/en/headless>), `--agents` also accepts the path to a JSON file holding the same object, for definitions too large to pass on the command line. For example, `claude -p --agents ./agents.json "Review my changes"` reads the definitions from that file. In an interactive session, Claude Code refuses a file path. The file form requires Claude Code v2.1.281 or later. Each top-level key in the JSON is an agent’s name, and its value is that agent’s definition. Don’t start a name with `-`. A definition takes these fields:
+
+ * **`prompt`** : the agent’s system prompt, equivalent to the markdown body in file-based subagents. `prompt` may be empty. If you select an agent with an empty `prompt` and no `memory` field as the session’s agent with `--agent`, the session’s system prompt is left unchanged. An empty `prompt` requires Claude Code v2.1.281 or later.
+ * **Frontmatter fields** : `description`, `tools`, `disallowedTools`, `model`, `permissionMode`, `mcpServers`, `hooks`, `maxTurns`, `skills`, `initialPrompt`, `memory`, `effort`, `background`, `omitClaudeMd`, and `isolation`.
+ * **Ignored fields** : `color` and `experimental` aren’t accepted here and are ignored rather than rejected.
+
+For what Claude Code does with a value it can’t load, and the flags and environment variable that skip that check, see [`Invalid --agents configuration`](</docs/en/errors#invalid-agents-configuration>). **Managed subagents** are deployed by organization administrators. Place markdown files in `.claude/agents/` inside the [managed settings directory](</docs/en/managed-settings#delivery-mechanisms>), using the same frontmatter format as project and user subagents. Managed definitions take precedence over project and user subagents with the same name. **Plugin subagents** come from [plugins](</docs/en/plugins/overview>) you’ve installed. They load automatically alongside your custom subagents and appear in the @-mention typeahead under their scoped name. See the [plugin components reference](</docs/en/plugins/components#agents>) for details on creating plugin subagents.
For security reasons, plugin subagents don’t support the `hooks`, `mcpServers`, or `permissionMode` frontmatter fields. These fields are ignored when loading agents from a plugin. If you need them, copy the agent file into `.claude/agents/` or `~/.claude/agents/`. You can also add rules to [`permissions.allow`](</docs/en/settings-reference#permissions-allow>) in `settings.json` or `settings.local.json`, but these rules apply to the entire session, not only the plugin subagent.
@@ -465,7 +471,7 @@
Permission modes
-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:
+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 [permission mode](</docs/en/permission-modes>). 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 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.
@@ -735,7 +741,7 @@
claude --agent code-reviewer
-The subagent’s system prompt replaces the default Claude Code system prompt entirely, the same way [`--system-prompt`](</docs/en/cli-reference>) does. `CLAUDE.md` files and project memory still load through the normal message flow, even when the agent’s definition sets `omitClaudeMd`. The agent name appears as `@<name>` in the startup header so you can confirm it’s active. This works with built-in and custom subagents, and the choice persists when you resume the session: Claude Code restores the agent’s tool restrictions and model along with the conversation. If the agent no longer exists when you resume, the session continues with the default tools and shows a [warning naming the agent](</docs/en/errors#session-agent-no-longer-available>). For the system prompt in either case, see [System prompt flags in resumed conversations](</docs/en/cli-reference#system-prompt-flags-in-resumed-conversations>). For a plugin-provided subagent, you can pass only the agent name and Claude Code finds it:
+Unless the agent’s prompt is empty, the subagent’s system prompt replaces the default Claude Code system prompt entirely, the same way [`--system-prompt`](</docs/en/cli-reference>) does. `CLAUDE.md` files and project memory still load through the normal message flow, even when the agent’s definition sets `omitClaudeMd`. The agent name appears as `@<name>` in the startup header so you can confirm it’s active. This works with built-in and custom subagents, and the choice persists when you resume the session: Claude Code restores the agent’s tool restrictions and model along with the conversation. If the agent no longer exists when you resume, the session continues with the default tools and shows a [warning naming the agent](</docs/en/errors#session-agent-no-longer-available>). For the system prompt in either case, see [System prompt flags in resumed conversations](</docs/en/cli-reference#system-prompt-flags-in-resumed-conversations>). For a plugin-provided subagent, you can pass only the agent name and Claude Code finds it:
claude --agent security-reviewer
@@ -845,7 +851,7 @@
Each subagent explores its area independently, then Claude synthesizes the findings. This works best when the research paths don’t depend on each other.
-When subagents complete, their results return to your main conversation. Running many subagents that each return detailed results can consume significant context.
+When subagents complete, their results return to your main conversation. Running many subagents that each return detailed results can consume significant context, and each subagent spends tokens of its own while it runs.
For work that needs to keep running in parallel or won’t fit in one context window, run it in [separate sessions](</docs/en/agents>) and let Claude [pass findings between them](</docs/en/cross-session-messaging>).
--- a/terminal-config.md
+++ b/terminal-config.md
@@ -329,6 +329,14 @@
+Cap response width in wide terminals
+
+In a wide terminal, each line of prose in Claude’s responses runs the full width of the window. To wrap the prose at a set number of columns instead, set [`maxProseWidth`](</docs/en/settings-reference#maxprosewidth>) in your settings.
+
+##
+
+
+
Paste large content
When you paste more than 800 characters or more than three lines into the prompt, Claude Code collapses the input to a placeholder such as `[Pasted text #1 +120 lines]` so the input box stays usable, and still sends the full content when you submit. For very large inputs such as entire files or long logs, write the content to a file and ask Claude to read it instead of pasting. The conversation transcript stays readable and Claude can refer to the file by path in later turns. The VS Code integrated terminal can also drop characters from very large pastes before they reach Claude Code, so use a file there. If the paste carries [invisible Unicode characters](</docs/en/interactive-mode#invisible-characters-in-prompts>), Claude Code removes them when you press Enter and puts the cleaned prompt back in the input box for you to send with another Enter.
--- a/tool-search.md
+++ b/tool-search.md
@@ -109,7 +109,7 @@
Optimize tool discovery
-The search mechanism matches queries against tool names and descriptions. Names like `search_slack_messages` surface for a wider range of requests than `query_slack`. Descriptions with specific keywords (“Search Slack messages by keyword, channel, or date range”) match more queries than generic ones (“Query Slack”). You can also add a system prompt section listing available tool categories. This gives the agent context about what kinds of tools are available to search for. Pass the text through the `systemPrompt` option in TypeScript or `system_prompt` in Python, using the `claude_code` preset with `append`, which adds your text to the preset’s prompt instead of replacing it:
+The search mechanism matches queries against tool names and descriptions. Names like `search_slack_messages` surface for a wider range of requests than `query_slack`. Descriptions with specific keywords (“Search Slack messages by keyword, channel, or date range”) match more queries than generic ones (“Query Slack”). You can also add a system prompt section listing available tool categories. This gives the agent context about what kinds of tools are available to search for. Pass the text in the `systemPrompt` option of `query()` in TypeScript, or `system_prompt` in Python. Use the `claude_code` preset with `append`, which adds your text to the preset’s prompt instead of replacing it:
TypeScript
--- a/tools-reference.md
+++ b/tools-reference.md
@@ -1,6 +1,6 @@
Claude Code has access to a set of built-in tools that help it understand and modify your codebase. The tool names are the exact strings you use in [permission rules](</docs/en/permissions#tool-specific-permission-rules>), [subagent tool lists](</docs/en/sub-agents>), and [hook matchers](</docs/en/hooks>). To control which tools Claude can use and when it asks first, configure [permission rules](</docs/en/permissions#tool-specific-permission-rules>) in your settings, [hooks](</docs/en/hooks>), or a [subagent’s tool list](</docs/en/sub-agents#supported-frontmatter-fields>). See Configure tools with permission rules and hooks for each place that accepts a tool name. To add custom tools, connect an [MCP server](</docs/en/mcp>). To extend Claude with reusable prompt-based workflows, write a [skill](</docs/en/skills>), which runs through the existing `Skill` tool rather than adding a new tool entry.
-On Pro, Max, and Team plans, Claude Code starts sessions in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), where a classifier decides most of these prompts instead of you. The `Permission required` column shows whether the tool prompts in [Manual mode](</docs/en/permission-modes>) for paths inside the working directory. File-access tools marked No, including `Read`, `Grep`, and `Glob`, still prompt for paths outside the [working directory and additional directories](</docs/en/permissions#working-directories>). `Bash` is marked Yes but runs a built-in set of [read-only commands](</docs/en/permissions#read-only-commands>) without prompting.
+In [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), a classifier decides most permission prompts instead of you. The `Permission required` column shows whether the tool prompts in [Manual mode](</docs/en/permission-modes>) for paths inside the working directory. File-access tools marked No, including `Read`, `Grep`, and `Glob`, still prompt for paths outside the [working directory and additional directories](</docs/en/permissions#working-directories>). `Bash` is marked Yes but runs a built-in set of [read-only commands](</docs/en/permissions#read-only-commands>) without prompting.
Tool| Description| Permission required
---|---|---
@@ -20,7 +20,7 @@
`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 [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
+`ListMcpResourcesTool`| Lists resources exposed by connected [MCP servers](</docs/en/mcp>), leaving out [MCP Apps UI resources](</docs/en/mcp#reference-mcp-resources>), which are pages for a host application to render| 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
`NotebookEdit`| Modifies Jupyter notebook cells. See NotebookEdit tool behavior| Yes
--- a/troubleshoot-install.md
+++ b/troubleshoot-install.md
@@ -35,10 +35,12 @@
`running scripts is disabled on this system` or `PSSecurityException`| Allow the npm shims to run
`Error: claude native binary not installed`| Complete the npm install
`npm error code ENOTEMPTY` during update or reinstall| Remove the leftover package directory
+`'claude' is not recognized` right after an update on Windows| Restore `claude.exe` from its backup
On Windows, the install command prints script text and nothing installs| Run the complete install command
`App unavailable in region`| Claude Code is not available in your country. See [supported countries](<https://www.anthropic.com/supported-countries>).
`unable to get local issuer certificate`| Configure corporate CA certificates
`OAuth error` or `403 Forbidden`| Fix authentication
+`Claude Code access has not been granted for this account`| Get a role that includes Claude Code
`Unable to connect to Anthropic services` during setup| See [Unable to connect to Anthropic services](</docs/en/errors#unable-to-connect-to-anthropic-services>) in the Error reference
`Could not load the default credentials` or `Could not load credentials from any providers`| Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry credentials
`ChainedTokenCredential authentication failed` or `CredentialUnavailableError`| Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry credentials
@@ -122,10 +124,15 @@
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
-For Bash, the default on most Linux distributions:
+For Bash on Linux, where it’s the default on most distributions:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
+
+For Bash on macOS, add the line to `~/.bash_profile` instead. Terminal on macOS starts Bash as a login shell, which ignores `~/.bashrc` and reads only the first of `~/.bash_profile`, `~/.bash_login`, or `~/.profile` that exists. If you already have a `~/.bash_login` or `~/.profile` and no `~/.bash_profile`, put the line in that file rather than creating `~/.bash_profile`:
+
+ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bash_profile
+ source ~/.bash_profile
Alternatively, close and reopen your terminal.For other shells such as fish or Nushell, add `~/.local/bin` to your PATH using your shell’s own configuration syntax, then restart your terminal.Verify the fix worked:
@@ -458,6 +465,22 @@
+`claude.exe` missing after an update on Windows
+
+If your terminal reports `'claude' is not recognized` right after Claude Code updated on Windows, check whether `%USERPROFILE%\.local\bin` still contains `claude.exe`. If that directory isn’t on your PATH at all, see Fix your PATH instead. To update on Windows, Claude Code renames the existing `claude.exe` aside to a backup and moves the new version into its place. If moving the new version into place fails and Claude Code can’t rename the backup back either, the directory keeps the backup but has no `claude.exe`. The backup is a file in the same directory whose name begins with `claude.exe.old.` followed by a numeric timestamp. Run the following in PowerShell to rename the newest backup back to `claude.exe`:
+
+ Get-ChildItem "$env:USERPROFILE\.local\bin\claude.exe.old.*" | Sort-Object Name | Select-Object -Last 1 | Rename-Item -NewName claude.exe
+
+Then run `claude --version` to confirm the fix. A restored `claude.exe` prints a version number. If there’s no `claude.exe.old.*` file, or `claude` still fails after the rename, reinstall instead:
+
+ irm https://claude.ai/install.ps1 | iex
+
+Before v2.1.281, Claude Code could delete the backup while `claude.exe` was still missing.
+
+###
+
+
+
Install killed on low-memory Linux servers
A `Killed` message during install usually means the Linux out-of-memory (OOM) killer terminated the `claude install` step because the system ran out of free memory. This is common on small VPS and cloud instances. The install script reports the cause and exits with code 137. In this example, the line number and process ID vary by release and run:
@@ -784,6 +807,17 @@
+Claude Code access has not been granted for this account
+
+If the sign-in page shows `Authorization failed` with the message `Claude Code access has not been granted for this account. Contact your administrator.` after you log in from Claude Code, your Claude Enterprise organization has set your role to Custom and none of the [custom roles](<https://support.claude.com/en/articles/13930452>) assigned to your groups grants Claude Code. On the Custom role, you get access only from those custom roles, so nothing you change in Claude Code resolves this error. To get access:
+
+ 1. Ask an Owner of your Claude organization to assign a custom role that grants Claude Code access to one of your groups, or to change your role from Custom to a standard role such as User. Owners manage roles in the organization’s [role settings](<https://claude.ai/admin-settings/roles>).
+ 2. After the Owner makes the change, run `claude` and log in again.
+
+###
+
+
+
This organization has been disabled with an active subscription
If you see `API Error: 400 ... "This organization has been disabled"` despite having an active Claude subscription, an `ANTHROPIC_API_KEY` environment variable is overriding your subscription. This commonly happens when an old API key from a previous employer or project is still set in your shell profile. When `ANTHROPIC_API_KEY` is present and you have approved it, Claude Code uses that key instead of your subscription’s OAuth credentials. In non-interactive mode with the `-p` flag, the key is always used when present. See [authentication precedence](</docs/en/authentication#authentication-precedence>) for the full resolution order. To use your subscription instead, unset the environment variable and remove it from your shell profile:
Show diff (258 lines)
--- a/typescript.md
+++ b/typescript.md
@@ -33,6 +33,14 @@
* To cross-compile, install the non-matching platform package, for example `npm install @anthropic-ai/claude-agent-sdk-linux-x64 --force`.
* On Windows, the binary subpath is `claude.exe`, for example `@anthropic-ai/claude-agent-sdk-win32-x64/claude.exe`.
+
+###
+
+
+
+Import the `/core` entry when you bundle the Agent SDK
+
+If your application bundles the Agent SDK together with its own dependencies, import from `@anthropic-ai/claude-agent-sdk/core` instead of the package root. The `/core` entry requires TypeScript Agent SDK v0.3.282 or later, and its types require TypeScript 5.0 or later. The `/core` entry exports the same `query()`, `startup()`, `tool()`, `createSdkMcpServer()`, and `resolveSettings()` as the root entry, along with the functions that rename, tag, and delete sessions, `AbortError`, the runtime constants, and every type. It adds no names of its own. To keep the code your application loads small, `/core` leaves out some root exports, including `prewarm()`, the `InMemorySessionStore` class, and the helpers that list, read, fork, import, and summarize sessions. If you need one of them, use the root entry instead. The root entry inlines its own copies of `zod` and `@modelcontextprotocol/sdk`. The `/core` entry imports them from your `node_modules` at the ranges the Agent SDK’s `peerDependencies` declare, so a bundle that already includes them doesn’t carry a second copy. Import from either the root or `/core` in a given process, not both: they are separate bundles, and loading both gives you two copies of the Agent SDK’s classes and state.
##
@@ -81,7 +89,7 @@
`startup()`
-Pre-warms the CLI subprocess by spawning it and completing the initialize handshake before a prompt is available. The returned `WarmQuery` handle accepts a prompt later and writes it to an already-ready process, so the first `query()` call resolves without paying subprocess spawn and initialization cost inline.
+Pre-warms the CLI subprocess by spawning it and completing the initialize handshake before a prompt is available. The returned `WarmQuery` handle accepts a prompt later and writes it to an already-ready process, so the first `query()` call resolves without paying subprocess spawn and initialization cost inline. If you don’t know the session’s working directory yet, use `prewarm()` instead.
function startup(params?: {
options?: Options;
@@ -122,6 +130,50 @@
// Later, when a prompt is ready, this is immediate
for await (const message of warm.query("What files are here?")) {
+ console.log(message);
+ }
+
+###
+
+
+
+`prewarm()`
+
+_Alpha._ Starts a Claude Code process as a spare before you know which session it will serve, so you can bind it to a session later with `claim()`. Use it in an application that boots before the user picks a folder. Requires TypeScript Agent SDK v0.3.282 or later. `prewarm()` completes the same initialize handshake as `startup()`, with the process waiting in `options.cwd` when you set it and otherwise in a private temporary directory under your Claude Code config directory. The session’s working directory, its `SessionStart` hooks, its stdio MCP servers, and its CLAUDE.md and git context wait for the claim. A spare holds roughly 230 to 260 MB of memory while it waits. If your `spawnClaudeCodeProcess` runs Claude Code on another machine or in a container, set `options.cwd` to a directory that exists there for the spare to wait in.
+
+ function prewarm(params?: {
+ options?: Options;
+ initializeTimeoutMs?: number;
+ }): Promise<SpareProcess>;
+
+`options` and `initializeTimeoutMs` mean the same as for `startup()`, except that `options.cwd` sets only the directory the spare waits in. The promise resolves with a `SpareProcess` once the process has completed its initialize handshake. `prewarm()` throws if `options` sets `resume`, `continue`, or `forkSession`, because a spare has no session yet. Everything a claim can’t set, such as `mcpServers`, `hooks`, `canUseTool`, `settingSources`, `systemPrompt`, and `plugins`, is fixed for the life of the spare, so keep one spare per distinct set of those options and prewarm again when they change.
+
+####
+
+
+
+Example
+
+Prewarm on application boot, then claim the spare when the user starts a session:
+
+ import { prewarm } from "@anthropic-ai/claude-agent-sdk";
+
+ // On application boot, before the session's folder is known
+ const spare = await prewarm({ options: { maxTurns: 3 } });
+
+ // Later, when the user starts a session in a folder
+ const claimedQuery = spare.claim({
+ prompt: "What files are here?",
+ options: { cwd: "/path/to/project" },
+ });
+
+ spare.claimed.catch((error: Error) => {
+ // Unless the message starts with "option_not_applied", the prompt didn't run:
+ // start this session with query() instead
+ console.error("Claim failed:", error.message);
+ });
+
+ for await (const message of claimedQuery) {
console.log(message);
}
@@ -561,6 +613,7 @@
`toolAliases`| `Record<string, string>`| `undefined`| Map built-in tool names to MCP tool names so Claude calls your MCP implementation in place of the built-in. For example, `{ Bash: 'mcp__workspace__bash' }`
`toolConfig`| `ToolConfig`| `undefined`| Configuration for built-in tool behavior. See `ToolConfig` for details
`tools`| `string[] | { type: 'preset'; preset: 'claude_code' }`| `undefined`| Tool configuration. Pass an array of tool names or use the preset to get Claude Code’s default tools
+`verbatimPrompts`| `boolean`| `false`| Deliver every prompt as written. The SDK sends each user message with `client_composed: true`. See `client_composed` for what Claude Code skips on those messages. Use this option when your prompt text includes content the end user didn’t type. For per-turn control, leave it off and set `client_composed` on individual streamed messages instead. Requires TypeScript Agent SDK v0.3.280 or later and Claude Code v2.1.248 or later; the Claude Code version bundled with those SDK versions satisfies the Claude Code requirement
####
@@ -742,6 +795,39 @@
`close()`| Close the subprocess without sending a prompt. Use this to discard a warm query that is no longer needed
`WarmQuery` implements `AsyncDisposable`, so it can be used with `await using` for automatic cleanup.
+
+###
+
+
+
+`SpareProcess`
+
+_Alpha._ Handle returned by `prewarm()`: a started Claude Code process that isn’t bound to a session yet and can be claimed once. Requires TypeScript Agent SDK v0.3.282 or later.
+
+ interface SpareProcess extends AsyncDisposable {
+ claim(params: {
+ prompt: string | AsyncIterable<SDKUserMessage>;
+ options: ClaimOptions;
+ }): Query;
+ readonly claimed: Promise<{ cwd: string; sessionId: string; parkedMs?: number; sdkMcpSettled: boolean }>;
+ readonly exited: Promise<void>;
+ close(): void;
+ }
+
+####
+
+
+
+Members
+
+Member| Description
+---|---
+`claim({ prompt, options })`| Bind the spare to a session in `options.cwd` and send its first message. Returns a `Query` synchronously, as `query()` does. Can only be called once
+`claimed`| Resolves with the session’s working directory and ID once Claude Code accepts the claim. Rejects when Claude Code refuses the claim, when the process exited or was closed first, and, with a message that starts with `option_not_applied`, when the session is running without the `model` or `maxThinkingTokens` you asked for
+`exited`| Settles when the process exits, claimed or not. Replace a spare that exits before you claim it
+`close()`| Terminate the process. Before a claim this discards the spare and rejects `claimed`
+
+`options.cwd` is required. A claim can also set `additionalDirectories`, `model`, `permissionMode`, `maxThinkingTokens`, a flag-settings overlay in `settings`, `appendSystemPrompt`, `title`, `agents`, and per-session tokens in `env`. Claude Code can refuse a claim, for example for a folder that doesn’t exist or one whose project settings set `env`, `agent`, or `model`. When `claimed` rejects with a message that starts with `option_not_applied`, the session is running without the `model` or `maxThinkingTokens` you asked for. After any other rejection your prompt hasn’t run, so start the session with `query()` instead.
###
@@ -962,7 +1048,7 @@
}[];
};
-Pass `readMcpResource()` the server name as `mcpServerStatus()` reports it and a `ui://` URI, such as the `ui.resourceUri` a tool declares in its `_meta`. The call rejects for any other URI scheme, for an SDK MCP server your application hosts itself, and for a server that isn’t connected. It’s available when the init message’s `capabilities` include `mcp_read_resource_v1`. Each `contents` entry is one content item as the server sent it. `blob` holds base64 data for a binary item, and `_meta` is the item’s own `_meta`, where an MCP Apps server puts the resource’s `ui.csp` and `ui.permissions`. The contents are untrusted third-party HTML, so render them in a sandbox.
+Pass `readMcpResource()` the server name as `mcpServerStatus()` reports it and a `ui://` URI, such as the `ui.resourceUri` a tool declares in its `_meta`. The call rejects for any other URI scheme, for an SDK MCP server your application hosts itself, and for a server that isn’t connected. It’s available when the init message’s `capabilities` include `mcp_read_resource_v1`. Each `contents` entry is one content item as the server sent it, minus any `_meta` key under the `com.anthropic/` prefix, which is reserved for Claude Code. `blob` holds base64 data for a binary item, and `_meta` is the item’s own `_meta`, where an MCP Apps server puts the resource’s `ui.csp` and `ui.permissions`. The contents are untrusted third-party HTML, so render them in a sandbox.
###
@@ -1383,12 +1469,18 @@
parent_tool_use_id: string | null;
isSynthetic?: boolean;
shouldQuery?: boolean;
+ client_composed?: true;
tool_use_result?: unknown;
origin?: SDKMessageOrigin;
inline_pastes?: string[];
};
-Set `pasted_content` to send content the user pasted into your prompt UI rather than typed, one entry per paste, each a string or an array of content blocks. Claude Code appends each entry’s text after the typed text, in order, and may wrap each paste in `<pasted_content>` tags. Blocks other than text are ignored, so send images and documents in `message.content`. Requires Agent SDK v0.3.277 or later. Set `shouldQuery` to `false` to append the message to the transcript without triggering an assistant turn. The message is held and merged into the next user message that does trigger a turn. Use this to inject context, such as the output of a command you ran out of band, without spending a model call on it. On a message that carries a `tool_result` block, `tool_use_result` is the tool’s structured output object rather than the text sent to the model. Its shape depends on the tool named by the matching `tool_use` block, so the field is typed `unknown`; the built-in shapes are listed under Tool Output Types. For the `Agent` tool, `tool_use_result` is `AgentOutput`. On a `completed` result, `content` holds the subagent’s report without the agent ID and usage trailer that Claude Code appends to the `tool_result` text, so render from `tool_use_result` instead of parsing that text. For an MCP tool whose result contains `resource_link` blocks, `tool_use_result` is an object with a `resourceLinks` array of `SDKMcpResourceLink` entries. Claude receives each link as a line of text in the `tool_result` block, so read `resourceLinks` to render the files the server returned instead of parsing that text. Claude Code omits `resourceLinks` when the result has no links and on results from subagents, keeps at most 50 links per result, and stops adding links once the array reaches 64 KiB of serialized JSON. `resourceLinks` requires Agent SDK v0.3.257 or later. Set `inline_pastes` to tell Claude Code which parts of `message.content` the user pasted rather than typed, one string per paste. The prompt text stays where the user put it. Claude Code may wrap each listed paste in `<pasted_content>` tags where it stands, so Claude can tell pasted material from the user’s own words. Only pastes in the prompt’s last text block are wrapped. Requires TypeScript Agent SDK v0.3.280 or later.
+Set `pasted_content` to send content the user pasted into your prompt UI rather than typed, one entry per paste, each a string or an array of content blocks. Claude Code appends each entry’s text after the typed text, in order, and may wrap each paste in `<pasted_content>` tags. Blocks other than text are ignored, so send images and documents in `message.content`. Requires Agent SDK v0.3.277 or later. Set `shouldQuery` or `client_composed` to change how Claude Code handles a message you send:
+
+ * `shouldQuery`: set it to `false` to append the message to the transcript without triggering an assistant turn. The message is held and merged into the next user message that does trigger a turn. Use this to inject context, such as the output of a command you ran out of band, without spending a model call on it.
+ * `client_composed`: set it to `true` to have Claude Code deliver the message text as written. Claude Code then doesn’t expand `@path` or [`@server:resource`](</docs/en/mcp#use-mcp-resources>) mentions, and doesn’t run text that starts with `/` as a command. While the `verbatimPrompts` option is on, the SDK sets the field on every message. Requires TypeScript Agent SDK v0.3.280 or later and Claude Code v2.1.248 or later.
+
+On a message that carries a `tool_result` block, `tool_use_result` is the tool’s structured output object rather than the text sent to the model. Its shape depends on the tool named by the matching `tool_use` block, so the field is typed `unknown`; the built-in shapes are listed under Tool Output Types. For the `Agent` tool, `tool_use_result` is `AgentOutput`. On a `completed` result, `content` holds the subagent’s report without the agent ID and usage trailer that Claude Code appends to the `tool_result` text, so render from `tool_use_result` instead of parsing that text. For an MCP tool whose result contains `resource_link` blocks, `tool_use_result` is an object with a `resourceLinks` array of `SDKMcpResourceLink` entries. Claude receives each link as a line of text in the `tool_result` block, so read `resourceLinks` to render the files the server returned instead of parsing that text. Claude Code omits `resourceLinks` when the result has no links and on results from subagents, keeps at most 50 links per result, and stops adding links once the array reaches 64 KiB of serialized JSON. `resourceLinks` requires Agent SDK v0.3.257 or later. Set `inline_pastes` to tell Claude Code which parts of `message.content` the user pasted rather than typed, one string per paste. The prompt text stays where the user put it. Claude Code may wrap each listed paste in `<pasted_content>` tags where it stands, so Claude can tell pasted material from the user’s own words. Only pastes in the prompt’s last text block are wrapped. Requires TypeScript Agent SDK v0.3.280 or later.
###
@@ -1405,6 +1497,7 @@
message: MessageParam;
parent_tool_use_id: string | null;
isSynthetic?: boolean;
+ client_composed?: true;
tool_use_result?: unknown;
origin?: SDKMessageOrigin;
isReplay: true;
@@ -1550,7 +1643,7 @@
`user_message_uuids`
-The `uuid`s of every message you sent that Claude Code answered in this turn. When you send several messages close together, Claude Code can merge them into one turn, and `user_message_uuid` then names only the last of them. To match the reply to any of the merged messages, look for that message’s `uuid` anywhere in this list. Requires Agent SDK v0.3.259 or later. Claude Code sets the list together with `user_message_uuid` on each reply frame that carries that field and on the result. For the full set of frames that carry `user_message_uuid`, and the version each requires, see `user_message_uuid`. The list always contains `user_message_uuid` and holds at most 64 entries. When Claude Code picks up a regular message you sent while a turn was running, it adds that message’s `uuid` to the result’s list. When a first reply or result carries `user_message_uuid` without the list, it came from an earlier Claude Code version, so fall back to the single field.
+The `uuid`s of every message you sent that Claude Code answered in this turn. When you send several messages close together, Claude Code can merge them into one turn, and `user_message_uuid` then names only the last of them. To match the reply to any of the merged messages, look for that message’s `uuid` anywhere in this list. Requires Agent SDK v0.3.259 or later. Claude Code sets the list together with `user_message_uuid` on each reply frame that carries that field and on the result. For the full set of turn frames that echo the answered message’s `uuid`, and the version each requires, see `user_message_uuid`. The list always contains `user_message_uuid` and holds at most 64 entries. When Claude Code picks up a regular message you sent while a turn was running, it adds that message’s `uuid` to the result’s list. When a first reply or result carries `user_message_uuid` without the list, it came from an earlier Claude Code version, so fall back to the single field.
####
@@ -1599,7 +1692,7 @@
`org_pin_api_key_conflict`| Managed settings [require a first-party or Cloud gateway sign-in](</docs/en/authentication#restrict-login-to-your-organization>), and an Anthropic API key, auth token, or `apiKeyHelper` is configured instead
`org_verify_failed`| The sign-in’s organization couldn’t be verified against the pin, for example because of a network failure or a revoked token
`org_pin_mismatch`| The sign-in belongs to an organization the pin doesn’t allow
-`managed_settings_invalid`| Managed policy settings couldn’t be read, or the pin names no organization
+`managed_settings_invalid`| Managed policy settings couldn’t be read, the pin names no organization, or [managed model restrictions](</docs/en/errors#managed-settings-block-the-default-model>) leave no permitted model for the Default option
`remote_settings_required_unavailable`| Managed settings that the organization requires couldn’t be loaded
`gateway_signin_required`| The [Cloud gateway](</docs/en/claude-apps-gateway>) ended this sign-in
`gateway_access_denied`| The managed settings request to the Cloud gateway came back with a 403, which the gateway’s [troubleshooting table](</docs/en/claude-apps-gateway-deploy#troubleshooting>) covers
@@ -1644,6 +1737,12 @@
output_style: string;
skills: string[];
plugins: { name: string; path: string }[];
+ plugin_errors?: {
+ plugin: string;
+ type: string;
+ message: string;
+ path?: string;
+ }[];
fast_mode_state?: FastModeState;
fast_mode_disabled_reason?: FastModeDisabledReason;
effort?: "low" | "medium" | "high" | "xhigh" | "max" | null;
@@ -1661,6 +1760,15 @@
---|---
`interrupt_receipt_v1`| `interrupt()` resolves with an `SDKControlInterruptResponse` receipt listing the messages that were pending when the interrupt arrived
`interrupt_cancel_queued_v1`| The `interrupt` control request honors `cancel_queued: true`, cancelling the messages the receipt would otherwise list under `still_queued` and listing them under `cancelled` instead. See `SDKControlInterruptResponse`. Requires Claude Code v2.1.219 or later
+
+The `plugin_errors` array lists plugin load failures. An entry describes either a plugin that didn’t load and is absent from `plugins`, or a plugin that loaded without one of its parts, such as its hooks file. The key is omitted when nothing failed. `SDKSystemMessage` declares `plugin_errors` in Agent SDK v0.3.283 or later. When a directory or archive from your `plugins` option itself fails to load, the entry’s `plugin` field holds a positional tag such as `inline[0]` instead of a plugin name. This happens, for example, when the path doesn’t exist or the manifest is invalid. Match such an entry to your option by its `path` field. The table below lists the fields of each `plugin_errors` entry.
+
+Field| Type| Description
+---|---|---
+`plugin`| `string`| The failing plugin’s ID, or a positional tag such as `inline[0]` when the plugin directory or archive itself failed to load
+`type`| `string`| Error category from an open set, such as `path-not-found` or `manifest-validation-error`. Treat a value you don’t recognize as a generic failure
+`message`| `string`| Display text describing the failure
+`path`| `string`| Present only when the plugin directory or archive itself failed to load. Its absolute path, with a relative path from your `plugins` option resolved against the `cwd` option
###
@@ -1708,7 +1816,7 @@
`SDKInformationalMessage`
-Generic text banner emitted by the loop. Carries non-error status lines, hook feedback such as a `UserPromptSubmit` hook’s block reason, and command output. On Claude Code v2.1.227 or later, a hook’s [`systemMessage`](</docs/en/hooks#json-output>) can arrive as this message, with each line prefixed by the hook’s name, such as `PostToolUse:Bash says:`. Whether a hook’s `systemMessage` arrives as this message depends on the event. Each [event’s section](</docs/en/hooks#hook-events>) on the hooks page says how output surfaces. Render `content` as plaintext at the given `level`.
+Generic text banner emitted by the loop. Carries warnings, notices, and other non-error status lines Claude Code raises, and hook feedback such as a `UserPromptSubmit` hook’s block reason. On Claude Code v2.1.227 or later, a hook’s [`systemMessage`](</docs/en/hooks#json-output>) can arrive as this message, with each line prefixed by the hook’s name, such as `PostToolUse:Bash says:`. Each [event’s section](</docs/en/hooks#hook-events>) on the hooks page says how output surfaces. Render `content` as plaintext at the given `level`.
type SDKInformationalMessage = {
type: "system";
@@ -5380,7 +5488,7 @@
`SDKTaskProgressMessage`
-Emitted periodically while a subagent or background task is running. The `summary` field is populated only when `agentProgressSummaries` is enabled.
+Emitted periodically while a subagent or background task is running. For a subagent task, the `summary` field carries a model-generated progress summary and is populated only when `agentProgressSummaries` is enabled. For a [backgrounded MCP tool call](</docs/en/mcp#automatic-backgrounding-of-long-tool-calls>), `summary` carries the MCP server’s latest reported progress and doesn’t depend on that option.
type SDKTaskProgressMessage = {
type: "system";
@@ -5527,7 +5635,7 @@
`SDKCommandsChangedMessage`
-Emitted when the set of available commands changes mid-session, such as when Claude Code discovers skills as the agent enters a subdirectory. The `commands` array is the full updated list, so replace any cached command list with this payload. Calling `supportedCommands()` after this message returns the same updated list, because the method tracks the latest push; this requires Agent SDK v0.3.216 or later. In earlier SDK versions, `supportedCommands()` returns the snapshot captured at initialization and never reflects mid-session changes.
+Emitted when the set of available commands changes mid-session, such as when Claude Code discovers skills as the agent enters a subdirectory. The `commands` array is the full updated list, so replace any cached command list with this payload. Calling `supportedCommands()` after this message returns the same updated list, because the method tracks the latest push; this requires Agent SDK v0.3.216 or later. In earlier SDK versions, `supportedCommands()` returns the snapshot captured at initialization and never reflects mid-session changes. Claude Code also emits this message when an MCP server’s [prompts](</docs/en/mcp#use-mcp-prompts-as-commands>) join or leave the list, for example when a server finishes connecting after the session starts. This requires Claude Code v2.1.281 or later.
type SDKCommandsChangedMessage = {
type: "system";
@@ -5565,9 +5673,18 @@
new_conversation_id: UUID;
uuid: UUID;
session_id: string;
- };
-
-The SDK’s published typings declare `SDKConversationResetMessage` in Claude Code v2.1.203 and later. Before v2.1.203, `SDKMessage` referenced the type without declaring it, so narrowing on `type === "conversation_reset"` failed to typecheck when `skipLibCheck` was disabled.
+ trigger?: "clear" | "plan_mode_exit" | "fresh_session" | "onboarding";
+ user_message_uuid?: string;
+ timestamp?: string;
+ };
+
+The optional fields describe the reset:
+
+ * `trigger`: what discarded the conversation. Reset your transcript on every `conversation_reset` message, including one where this field is absent or carries a value you don’t recognize.
+ * `user_message_uuid`: the `uuid` of the user message that carried the `/clear`. Use it to match the reset to that message.
+ * `timestamp`: when the reset happened, as an ISO 8601 string in UTC. Use it for display, not for ordering messages.
+
+The `trigger`, `user_message_uuid`, and `timestamp` fields require Claude Code v2.1.281 or later. The SDK’s published typings declare `SDKConversationResetMessage` in Claude Code v2.1.203 and later. Before v2.1.203, `SDKMessage` referenced the type without declaring it, so narrowing on `type === "conversation_reset"` failed to typecheck when `skipLibCheck` was disabled.
###
--- a/voice-dictation.md
+++ b/voice-dictation.md
@@ -20,7 +20,7 @@
Enable voice dictation
-Run `/voice` to enable dictation. The first time you enable it, Claude Code runs a microphone check. On macOS, this triggers the system microphone permission prompt for your terminal if it has never been granted.
+Run `/voice` to enable dictation. When you enable it, Claude Code runs a microphone check. On macOS, this triggers the system microphone permission prompt for your terminal if it has never been granted.
/voice
Voice mode enabled (hold). Hold space to record. Dictation language: en (/config to change).
@@ -156,7 +156,7 @@
* **`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`.
* **`Voice mode requires a microphone, but SoX could not open an audio capture device`** : SoX is installed, but the host has no audio capture device, for example a headless server or a container. Run Claude Code on a machine with a microphone. As of v2.1.195, Claude Code on Linux reports this message in that situation; earlier versions asked you to install SoX even when it was already installed.
* **`Voice mode could not find a working audio recorder in WSL`** : WSLg routes audio through PulseAudio rather than an ALSA device, so SoX needs its PulseAudio backend installed explicitly. Run `sudo apt install sox libsox-fmt-pulse`. Installing `sox` alone pulls in the ALSA backend, which cannot record on WSL because there is no `/dev/snd` device.
- * **`Voice input is failing repeatedly and has been paused`** : voice dictation hit three capture failures within 10 seconds. Claude Code pauses dictation until 10 seconds have passed since the first of those failures. A failure counts whether the microphone fails to start or the recorder starts and then stops without producing any audio. This usually means the microphone or audio stack on this host can’t capture audio, for example a headless server, a remote shell with no audio passthrough, or a denied microphone permission. Confirm a working input device, fix the underlying cause from the entries above, then trigger voice again. Before v2.1.202, only start-up failures counted toward the pause.
+ * **`Voice input is failing repeatedly and has been paused`** : voice dictation hit three failures within 10 seconds. Claude Code pauses dictation until 10 seconds have passed since the first of those failures. This usually means the microphone or audio stack on this host can’t capture audio, for example a headless server, a remote shell with no audio passthrough, or a denied microphone permission. Confirm a working input device, fix the underlying cause from the entries above, then trigger voice again. Before v2.1.202, only start-up failures counted toward the pause.
* **Nothing happens when holding`Space` in hold mode**: watch the prompt input while you hold. If spaces keep accumulating, voice dictation is likely off; run `/voice hold` to enable it. If only one or two spaces appear and then nothing, voice dictation is on but hold detection is not triggering. Hold detection requires your terminal to send key-repeat events, so it can’t detect a held key if key-repeat is disabled at the OS level. Switch to tap mode with `/voice tap` to avoid the key-repeat requirement.
* **Tapping`Space` types a space instead of recording in tap mode**: the first tap only starts recording when the prompt input is empty. Clear the input first, or check that you are in tap mode by running `/voice tap`.
* **`No audio detected from microphone`** : recording started but captured silence. Confirm the correct input device is set as the system default and that its input level is not muted or near zero. On Windows, open Settings → System → Sound → Input and select your microphone. On macOS, open System Settings → Sound → Input.
--- a/vs-code.md
+++ b/vs-code.md
@@ -87,7 +87,7 @@
The prompt box supports several features:
- * **Permission modes** : click the mode indicator at the bottom of the prompt box to switch permission modes. On Pro, Max, and Team plans, Auto is the built-in starting permission mode. See [how the extension chooses the starting permission mode](</docs/en/permission-modes#switch-permission-modes>) for what changes that, and every permission mode the indicator offers.
+ * **Permission modes** : click the mode indicator at the bottom of the prompt box to switch permission modes. With Claude Code v2.1.283 or later, Auto is the built-in starting permission mode, and on earlier versions only on Pro, Max, and Team plans. See [how the extension chooses the starting permission mode](</docs/en/permission-modes#switch-permission-modes>) for what changes that, and every permission mode the indicator offers.
* **Auto** : a classifier reviews most actions instead of asking you. See [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) for what it reviews and blocks.
* **Manual** : Claude asks permission before file edits and most shell commands.
* **Plan** : Claude describes what it will do and waits for approval before making changes. VS Code automatically opens the plan as a full Markdown document where you can add inline comments to give feedback before Claude begins. You can also type `/plan` in the prompt box. Requires Claude Code v2.1.280 or later.
@@ -190,9 +190,11 @@
Select a session to resume
-Browse or search your cloud sessions. Click any session to download it and continue the conversation locally.
-
-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.
+Browse or search the sessions. Click one to continue the conversation locally.
+
+When the folder you have open is a GitHub repository, the Web tab shows only sessions from that repository.When you resume a cloud session, the extension downloads a copy of the conversation history; changes don’t sync back to claude.ai.
+
+The Web tab also lists your [Remote Control](</docs/en/remote-control>) sessions. If you click one that ran in the folder you have open, the extension opens that local conversation instead of downloading a copy, and focuses the tab already showing it if there is one. If the extension can’t rule out that another Claude process has the conversation open, you get a downloaded copy instead. If any part of a conversation fails to download, an error appears and no copy is saved. Select the session again to retry. If you select a session that has no conversation to download yet, an error tells you where to continue it instead.
###
@@ -430,7 +432,7 @@
The extension has two types of settings:
* **Extension settings** in VS Code: control the extension’s behavior within VS Code. Open with `Cmd+,` (Mac) or `Ctrl+,` (Windows/Linux), then go to Extensions → Claude Code. You can also type `/` and select **General config…** to open settings.
- * **Claude Code settings** in `~/.claude/settings.json`: shared between the extension and CLI. Use it for allowed commands, environment variables, hooks, and MCP servers. On Pro, Max, and Team plans, it’s also one input to the permission mode conversations start in. [Switch permission modes](</docs/en/permission-modes#switch-permission-modes>) lists the order. See [Settings](</docs/en/settings>) for details.
+ * **Claude Code settings** in `~/.claude/settings.json`: shared between the extension and CLI. Use it for allowed commands, environment variables, hooks, and MCP servers. With Claude Code v2.1.283 or later, it’s also one input to the permission mode conversations start in, and on earlier versions only on Pro, Max, and Team plans. [Switch permission modes](</docs/en/permission-modes#switch-permission-modes>) lists the order. See [Settings](</docs/en/settings>) for details.
Add `"$schema": "https://json.schemastore.org/claude-code-settings.json"` to your `settings.json` to get autocomplete and inline validation for all available settings directly in VS Code.
@@ -638,7 +640,7 @@
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, such as opening diffs, reading selections, and saving files. They 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. If you [queue a message while Claude works](</docs/en/interactive-mode#queue-messages-while-claude-works>), it keeps the selection you had when you pressed `Enter`, whatever you select afterward. 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
---|---|---
--- a/workflows.md
+++ b/workflows.md
@@ -155,7 +155,13 @@
/effort ultracode
-To start a session with ultracode already on, launch with `claude --effort ultracode`. Requires Claude Code v2.1.203 or later. To turn it on while you choose a model, move the `/model` picker’s effort slider to `ultracode` with the arrow keys. [Adjust effort level](</docs/en/model-config#adjust-effort-level>) lists the routes that turn ultracode on. With ultracode on, Claude decides when a task warrants a workflow. A single request can turn into several workflows in a row: one to understand the code, one to make the change, and one to verify it. This applies to every task in the session, so each request uses more tokens and takes longer than at lower effort levels. `/effort ultracode` lasts for the current session; to have every session start with it, set the [`ultracode`](</docs/en/settings-reference#ultracode>) setting. Drop back with `/effort high` when you return to routine work. The `/effort` menu offers it only [when ultracode is available](</docs/en/model-config#when-ultracode-is-available>).
+To start a session with ultracode already on, launch with `claude --effort ultracode`. Requires Claude Code v2.1.203 or later. To turn it on while you choose a model, move the `/model` picker’s effort slider to `ultracode` with the arrow keys. [Adjust effort level](</docs/en/model-config#adjust-effort-level>) lists the routes that turn ultracode on. With ultracode on, Claude decides when a task warrants a workflow. A single request can turn into several workflows in a row: one to understand the code, one to make the change, and one to verify it. This applies to every task in the session, so each request uses more tokens and takes longer than at lower effort levels. On a subscription plan those tokens draw on your usage limits, so a session with ultracode on reaches a session or weekly limit sooner than the same work at `high`. Turning ultracode on already opts you in to large runs, so these checks don’t apply while it’s on:
+
+ * The `Large workflow` warning doesn’t appear on a workflow run
+ * The session’s [concurrent subagent limit](</docs/en/sub-agents#concurrent-subagent-limit>) isn’t enforced for the subagents Claude spawns with the Agent tool
+ * In auto permission mode, you aren’t asked to approve the first workflow launch
+
+`/effort ultracode` lasts for the current session; to have every session start with it, set the [`ultracode`](</docs/en/settings-reference#ultracode>) setting. Drop back with `/effort high` when you return to routine work. The `/effort` menu offers it only [when ultracode is available](</docs/en/model-config#when-ultracode-is-available>).
###
@@ -456,7 +462,7 @@
* Set `"disableWorkflows": true` in `~/.claude/settings.json`. Persists across sessions.
* Set `CLAUDE_CODE_DISABLE_WORKFLOWS=1`. Read at startup, so it applies wherever you set it.
-To turn workflows off for your whole organization, set `"disableWorkflows": true` in [managed settings](</docs/en/server-managed-settings>), or use the toggle on the [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) page. When workflows are disabled, the bundled workflow commands and the `/workflow-authoring` skill are unavailable, the `ultracode` keyword no longer triggers a run, and `ultracode` is removed from the `/effort` menu.
+To turn workflows off for your whole organization, set `"disableWorkflows": true` in [managed settings](</docs/en/server-managed-settings>), or use the toggle on the [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) page. When workflows are disabled, the bundled workflow commands and the `/workflow-authoring` skill are unavailable, the `ultracode` keyword no longer triggers a run, and `ultracode` is removed from the `/effort` menu. A run that was already in progress keeps going. No setting turns off ultracode alone. To keep workflows but rule out ultracode, set an [effort cap](</docs/en/model-config#organization-effort-limits>) below `xhigh` on the models you want to cover. Ultracode needs `xhigh`, so it’s then [unavailable](</docs/en/model-config#when-ultracode-is-available>) on those models.
##
--- a/worktrees.md
+++ b/worktrees.md
@@ -48,7 +48,7 @@
When you exit an interactive worktree session, Claude checks the worktree for work that removal would delete: changed or untracked files, uncommitted work inside checked-out submodules, and new commits.
* **The worktree is clean** : for an unnamed session, Claude removes the worktree and its branch automatically. A [named](</docs/en/sessions#name-your-sessions>) session prompts you first so you can keep the worktree for later
- * **The worktree has work in it** : Claude prompts you to keep or remove the worktree. Keeping preserves the directory and branch so you can return later. Removing deletes the worktree directory and its branch, along with all the work in them
+ * **The worktree has work in it** : Claude prompts you to keep or remove the worktree. Keeping preserves the directory and branch. To return later, run the `claude --worktree <name> --resume` command that Claude Code prints on exit. Removing deletes the worktree directory and its branch, along with all the work in them
* **The worktree’s state can’t be verified** : when Claude Code can’t count the worktree’s changes or can’t inspect its submodule checkouts, it prompts you rather than removing the worktree automatically. The prompt names what it couldn’t check
Non-interactive runs with `-p` have no exit prompt, so Claude doesn’t clean up their worktrees, and Claude Code leaves the lock it took on each one at creation in place until a later session’s stale-lock sweep releases it. To remove one, run `git worktree remove`; if git refuses because the worktree is locked, run `git worktree unlock` on it first. On Windows, removing a worktree doesn’t delete files outside it. If a folder inside the worktree is a link to somewhere else, such as an NTFS junction or a directory symlink, Claude Code deletes only the link and keeps the folder it points to. Before v2.1.205, removing a worktree with a link nested in a subdirectory could delete the folder it pointed to.
@@ -59,9 +59,9 @@
Resume a worktree session
-When you resume a session that was inside a worktree, Claude Code returns the session to that worktree. This holds for interactive resumes, for `--continue` and `--resume` in [non-interactive mode](</docs/en/headless>) with `-p`, and for the Agent SDK. Back inside the worktree, Claude can still exit it with the [`ExitWorktree`](</docs/en/tools-reference>) tool. Before returning the session to its worktree, Claude Code verifies that the worktree is still a checkout separate from the main one, and declines to re-enter a worktree that fails the check. For a git worktree, the check reads its git metadata. A worktree without git metadata, such as one a `WorktreeCreate` hook created, can pass the check; the cases Claude Code still refuses are listed with their recoveries under Claude Code refuses to use a worktree. For the messages and how to recover from each, see The session resumes outside its worktree. Where you launch from, and how you resume, change what Claude Code re-enters:
-
- * **Launch directory** : resume from the main checkout or another directory of the repository. Claude Code re-enters a worktree it created with git under `.claude/worktrees/` even when you launch from inside it. When you launch from inside any other worktree, Claude Code re-enters it only if it can vouch for it from there: a worktree that is its own repository, one without git metadata, or a launch from a subdirectory of a worktree you created with `git worktree add` declines, so launch those from the main checkout.
+When you resume a session that ended inside a worktree without exiting it, Claude Code returns the session to that worktree. This holds for interactive resumes, for `--continue` and `--resume` in [non-interactive mode](</docs/en/headless>) with `-p`, and for the Agent SDK. `--continue` picks the most recent session recorded under the directory you launch from. Back inside the worktree, Claude can still exit it with the [`ExitWorktree`](</docs/en/tools-reference>) tool. Before returning the session to its worktree, Claude Code verifies that the worktree is still a checkout separate from the main one, and declines to re-enter a worktree that fails the check. For a git worktree, the check reads its git metadata. A worktree without git metadata, such as one a `WorktreeCreate` hook created, can pass the check; the cases Claude Code still refuses are listed with their recoveries under Claude Code refuses to use a worktree. For the messages and how to recover from each, see The session resumes outside its worktree. Where you launch from, and how you resume, change what Claude Code re-enters:
+
+ * **Launch directory** : resume with `--resume` from the main checkout or another directory of the repository. Claude Code re-enters a worktree it created with git under `.claude/worktrees/` even when you launch from inside it. When you launch from inside any other worktree, Claude Code re-enters it only if it can vouch for it from there: a worktree that is its own repository, one without git metadata, or a launch from a subdirectory of a worktree you created with `git worktree add` declines, so launch those from the main checkout.
* **`--fork-session`** : the forked session starts in the directory you launched Claude from, and Claude Code leaves the original session’s worktree untouched.
* **Deleted worktree** : if the worktree directory no longer exists, Claude Code resumes the session in the directory you launched Claude from. It tells you the worktree is gone and clears the session’s worktree binding.