Changes on
48 changes detected
--- a/admin.md
+++ b/admin.md
@@ -102,7 +102,7 @@
`session.append{door=hook-context}`| The stored row for context from a settings hook
`session.append{door=compaction}`| The stored rows for a compaction’s summary and boundary
-The guard also passes over a user’s hooks in some other cases, such as the descriptions of your organization’s tools, on [`tool.describe`](</docs/en/plugins/mods/reference#tools>), and the stored row for a skill’s text. `/plugin` shows no note for those. If a hook on another event does nothing, see [Find out why a mod does nothing](</docs/en/plugins/mods/troubleshoot#find-out-why-a-mod-does-nothing>). The note appears in the plugin’s details and in the **Errors** tab of `/plugin`. It requires Claude Code v2.1.299 or later. It names each hook from the table as the mod registered it, as in this example:
+The guard also passes over a user’s hooks in some other cases, such as the descriptions of your organization’s tools, on [`tool.describe`](</docs/en/plugins/mods/reference#tools>). `/plugin` shows no note for that case. If a hook on another event does nothing, see [Find out why a mod does nothing](</docs/en/plugins/mods/troubleshoot#find-out-why-a-mod-does-nothing>). The note appears in the plugin’s details and in the **Errors** tab of `/plugin`. It requires Claude Code v2.1.299 or later. It names each hook from the table as the mod registered it, as in this example:
Its hooks on classic.Stop, prompt.section do not run here: where an organization manages Claude Code, these events pass over the plugins you install
Only a plugin that counts as your organization's own runs hooks on these events. An administrator sets that up in managed settings
@@ -148,13 +148,21 @@
`$.process.run`, `$.process.spawn`| Starts programs as the user
`$.http.fetch`| Makes network requests
`$.env.get`, `$.settings.read`| Reads environment variables and settings, which can hold API keys. An `env reads:` line in the output names each variable.
-`$.env.set`| Sets an environment variable for Claude Code and for every command and MCP server it starts afterward, which can change what those programs run. An `env writes:` line names each variable.
+`$.env.set`| Sets an environment variable for Claude Code and for commands and MCP servers it starts afterward, which can change what those programs run. An `env writes:` line names each variable.
`$.mcp.call`| Calls a tool on a connected MCP server, with no permission prompt
`$.model.complete`| Uses the user’s plan or API key for model calls
`$.prompt.submit`| Submits a prompt, and can send it as the user’s own words
`$.session.send`| Sends a message that another session’s, subagent’s, or [teammate’s](</docs/en/agent-teams>) Claude reads
-In the `hooks:` line, [`tool.call`](</docs/en/plugins/mods/reference#tools>) and [`prompt.submit`](</docs/en/plugins/mods/reference#prompts-and-what-claude-reads>) mean the mod sees every tool call and every prompt, and can change them. [`session.append`](</docs/en/plugins/mods/reference#session>) means the mod can rewrite each row of the conversation before it’s stored, apart from the rows the guard passes over. [`ui.render{component=AskUserQuestion}`](</docs/en/plugins/mods/interface#change-what-claude-code-already-draws>) means the mod can redraw the dialog Claude uses to ask the user a question. `tool.check` means the mod can approve or deny a tool call before a permission prompt appears. Know what happens by default lists which of your rules and hooks take precedence over its answer.
+In the `hooks:` lines, look for the events that let a mod change what runs, what Claude reads, or what the user sees:
+
+Hook| What it means| Example
+---|---|---
+[`tool.call`](</docs/en/plugins/mods/reference#tools>), [`prompt.submit`](</docs/en/plugins/mods/reference#prompts-and-what-claude-reads>)| Sees every tool call and every prompt, and can change them| Change a Bash command before it runs
+`tool.check`| Can approve or deny a tool call before a permission prompt appears. Know what happens by default lists which of your rules and hooks take precedence over its answer.| Approve a Bash command with no prompt
+[`session.append`](</docs/en/plugins/mods/reference#session>)| Can rewrite each row of the conversation before it’s stored, except the rows the guard passes over and rows that hold a [skill from an MCP server](</docs/en/mcp#use-skills-from-mcp-servers>)| Replace the text of a tool result
+[`skill.prompt`](</docs/en/plugins/mods/reference#prompts-and-what-claude-reads>)| Can change a skill’s text before Claude reads it, including a skill from an MCP server| Add instructions to a skill
+[`ui.render{component=AskUserQuestion}`](</docs/en/plugins/mods/interface#change-what-claude-code-already-draws>)| Can redraw the dialog Claude uses to ask the user a question| Show its own text above a question
## Choose how much to allow
--- a/analytics.md
+++ b/analytics.md
@@ -102,7 +102,7 @@
3. PR lines are matched against Claude Code output using multiple strategies
4. Metrics are calculated for AI-assisted lines and total lines
-Before comparison, lines are normalized: whitespace is trimmed, multiple spaces are collapsed, quotes are standardized, and text is converted to lowercase. Merged pull requests containing Claude Code-assisted lines are labeled as `claude-code-assisted` in GitHub.
+Before comparison, lines are normalized: whitespace is trimmed, multiple spaces are collapsed, quotes are standardized, and text is converted to lowercase.
#### Time window
@@ -156,7 +156,7 @@
#### Access data programmatically
-On the Enterprise plan, the [Claude Enterprise Analytics API](<https://platform.claude.com/docs/en/api/admin/analytics>) returns per-user engagement, usage, and cost reports for your organization across Claude surfaces, including Claude Code. A Primary Owner creates a key with the `read:analytics` scope at [claude.ai/analytics/api-keys](<https://claude.ai/analytics/api-keys>). The API is not available on the Teams plan. To query contribution data through GitHub instead, search for PRs labeled with `claude-code-assisted`.
+On the Enterprise plan, the [Claude Enterprise Analytics API](<https://platform.claude.com/docs/en/api/admin/analytics>) returns per-user engagement, usage, and cost reports for your organization across Claude surfaces, including Claude Code. A Primary Owner creates a key with the `read:analytics` scope at [claude.ai/analytics/api-keys](<https://claude.ai/analytics/api-keys>). The API is not available on the Teams plan.
## Access analytics for API customers
--- a/approvals.md
+++ b/approvals.md
@@ -8,7 +8,12 @@
## Find Claude Approvals on a pull request
-Approvals adds a check named **Claude Approvals** to the pull requests that it evaluates. The check’s title says what’s still needed, such as **Waiting on human review from any person (1/2)**. A title that starts with **(observe mode)** means that the policy wasn’t enforced when the check ran. In observe mode, the check shows what your policy would decide. Claude also posts a comment with the reasons. Where the policy allows it, Claude can post an approving review. For the common titles and what to do about each, see [Find your approval status and what to do next](</docs/en/approvals-pull-requests#find-your-approval-status-and-what-to-do-next>). If a pull request has no check, see [No Claude Approvals check appeared](</docs/en/approvals-troubleshooting#no-claude-approvals-check-appeared>).
+Approvals adds a check named **Claude Approvals** to the pull requests that it evaluates. The check’s title says what’s still needed, such as **Waiting on human review from any person (1/2)**. A title that starts with **(observe mode)** means that the policy wasn’t enforced when the check ran. In observe mode, the check shows what your policy would decide. Claude also posts a comment with the reasons. Where the policy allows it, Claude can post an approving review:
+
+ * **In github.com repositories where the Claude GitHub App reports the check** : that review comes from `claude[bot]`
+ * **On a pull request that`claude[bot]` opened**: that review comes from `claude-approvals[bot]`, once you add the [Claude Approvals GitHub App](</docs/en/approvals-pull-requests#pull-requests-that-claude-opens>)
+
+For the common titles and what to do about each, see [Find your approval status and what to do next](</docs/en/approvals-pull-requests#find-your-approval-status-and-what-to-do-next>). If a pull request has no check, see [No Claude Approvals check appeared](</docs/en/approvals-troubleshooting#no-claude-approvals-check-appeared>).
## Example policy
--- a/approvals-troubleshooting.md
+++ b/approvals-troubleshooting.md
@@ -24,7 +24,6 @@
---|---
Approvals “did not run on this change”| Do what the comment says. One cause is a pull request that moves a file into or out of the paths that the policy’s rules cover. Make that move in two pull requests, one that adds the file under its new name and one that removes the old one
”More than one Claude organization is connected to this GitHub account”| Ask an Owner of the Claude organization that should run Approvals to click **Connect** next to the repository’s GitHub organization on [**Organization settings > Claude Ship**](<https://claude.ai/admin-settings/claude-ship>). Then push a commit
-”Claude Approvals can’t start in this repository yet”| Tell an Owner that the organization has no usage credits available
### Ask an Owner to check your Claude organization
@@ -35,6 +34,10 @@
Whether the organization qualifies| [Availability](</docs/en/approvals#availability>)
Whether the [Claude GitHub App](<https://github.com/apps/claude>) can access the repository and is linked| [**Organization settings > Git providers**](<https://claude.ai/admin-settings/source-control>)
Whether Approvals is turned off here| The **Approvals** column and the **Approve** row on [**Organization settings > Claude Ship**](<https://claude.ai/admin-settings/claude-ship>)
+
+### Check for a GitHub IP allow list
+
+GitHub refuses Approvals’ requests from an address that isn’t on an organization’s IP allow list, which can leave no check or comment. Ask an owner of the repository’s GitHub organization or enterprise whether it restricts access by IP address. If it does, ask the owner to allow all of Anthropic’s outbound addresses, as [GitHub allow lists and firewalls](</docs/en/network-config#github-allow-lists-and-firewalls>) describes. Once the addresses are allowed, push a commit to your pull request.
## Approvals doesn’t pass after you resolve a review thread
--- a/auto-mode-config.md
+++ b/auto-mode-config.md
@@ -1,4 +1,4 @@
-[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](</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 what it judges irreversible, destructive, or aimed outside your environment. Use the `autoMode` settings block to tell that classifier which repos, buckets, and domains your organization trusts, so it stops blocking routine internal operations.
This page is the configuration reference. Turning auto mode on and off is covered on the Permission modes page:
@@ -35,7 +35,7 @@
---|---|---
Prompt before the action| `permissions.ask`| By default, prompts for a command that matches a content-scoped rule like the recipe above. The classifier cannot auto-approve a matching action.
Never run the action| `permissions.deny`| Blocks before the classifier is consulted. Neither the classifier nor user intent can override it.
-One-off boundary for this session| State it in conversation, like “don’t push until I review”| The classifier blocks matching actions, but the boundary can be lost if [context compaction](</docs/en/costs#reduce-token-usage>) removes the message that stated it. Use an ask or deny rule for a durable guarantee.
+One-off boundary for this session| State it in conversation, like “don’t push until I review”| The classifier blocks matching actions it reviews, but the boundary can be lost if [context compaction](</docs/en/costs#reduce-token-usage>) removes the message that stated it. To keep the boundary from being lost, use an ask or deny rule instead.
## Where the classifier reads configuration
Show diff (158 lines)
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,155 @@
This page is generated from the [CHANGELOG.md on GitHub](<https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md>). Longer releases are grouped by type of change, with long lists of improvements and bug fixes collapsed. Run `claude --version` to check your installed version.
+
+2.1.331
+
+November 23, 2026
+
+**Added**
+
+ * Added Code Mode support in terminal sessions on Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry and Claude Platform on AWS
+ * Added `oidc.groups_jsonpath` to the Claude apps gateway, to read groups from the matching entries of a list of objects with a small subset of JSONPath (RFC 9535)
+ * Added an API connectivity section to `claude doctor` that reports whether the API can be reached, with the HTTP status or the error, or says why it wasn’t tested
+ * Added a notice when tap-mode voice dictation stops by itself, after 15 seconds without recognized speech or at its 2-minute limit
+ * Added `CLAUDE_CODE_DISABLE_RESPONSE_COMPRESSION` to ask for uncompressed model responses behind a proxy that cuts compressed ones off; not advised yet for self-hosted runners or Remote Control
+ * Added `CLAUDE_GATEWAY_IDP_CONNECT_BY_HOSTNAME=1` for Claude apps gateways: with `oidc.use_proxy: true`, sign-in requests hand the proxy an `https` IdP’s hostname even with `NO_PROXY` set
+ * Added `gen_ai.usage.*`, `gen_ai.response.model` and `gen_ai.operation.name` to `claude_code.llm_request` trace spans; `gen_ai.usage.input_tokens` includes prompt cache tokens
+ * Added `optionalDependencies` to plugin manifests: plugins that install with the plugin listing them and can be disabled or uninstalled on their own
+ * [VSCode] Added a warning and a link to the revoke page when you log out and the request to revoke your claude.ai login isn’t confirmed
+ * [VSCode] Added a notice before sending a very large selection or attached text file, and advice under “Prompt is too long” that names the large part and what to do next
+ * [VSCode] Added “Add Cell to Chat” to the notebook cell menu, which attaches a cell with its outputs or error
+ * [VSCode] Added “Fix with Claude Code” as a quick fix for errors and warnings and to failed tests in the test peek and the Test Results view, which puts the problem into the chat box
+ * [VSCode] Added “Add to Chat” to the right-click menu of changed files in the Source Control view
+ * [VSCode] Added “Resolve Merge Conflicts” to the editor title of a file with merge conflicts and to the Merge Changes group in Source Control
+
+**Changed**
+
+ * Changed the questions for stopping auto-connect in `/ide` and for `/clear`, `/compact` or `/rewind` in a subagent’s view to list Yes first; they still start on No, so Down then Enter now answers No
+ * Changed what a `PermissionDenied` hook’s `retry: true` tells Claude: make the refused call again only if you asked for that call
+ * Changed in a future release, on or after November 30, 2026: plugin marketplaces in managed `extraKnownMarketplaces` will auto-update by default. To opt one out, set `"autoUpdate": false` on its entry
+ * Windows: Changed start-up with managed settings in the registry: check them before upgrading, as an `HKLM` policy outranks `managed-settings.json` and a broken value can stop the start
+ * [VSCode] Changed saving a proposed diff to accept it only after you click or type in its proposed (right) side; a notification says when a save is refused or a close with Save applies nothing
+ * [VSCode] Changed diffs from a terminal session to open without moving keyboard focus, and beside a file with unsaved changes; to answer, click Accept or use the terminal
+ * [VSCode] Changed permission cards to show only Yes and No when `allowManagedPermissionRulesOnly` is set and the card would offer an allow rule; key 2 on those cards now answers No
+ * [VSCode] Changed a Claude tab to ignore Enter and show a notice when its Find box has lost the keyboard
+
+Show 18 improvements
+
+ * Improved typing speed in screen reader mode, most of all in long sessions
+ * Improved start-up time: a session started soon after another no longer waits for the model list, and one outside a git repository without `.claude/settings.local.json` no longer waits on git
+ * Windows: Improved the speed of the first Bash command in a session on machines with no custom shell start-up files
+ * Improved the plugin auto-update notice to name plugins it newly installs as dependencies, separately from updated plugins
+ * Improved Code Mode tool search to show more of an MCP tool’s description, with its limits, formats and defaults
+ * Improved the Console sign-in link shown by /login and `claude auth login --console`: it is now much shorter
+ * Improved Claude’s list of your artifacts: it now marks web pages, so Claude is less likely to try opening one with the Claude Docs connector
+ * Improved the folder trust prompts in short terminals: fullscreen `/cd` and `/add-dir` show their choices in fewer rows, and the prompt at launch keeps the folder path in view when it has many warnings
+ * [VSCode] Improved the time to the first reply in a new folder when the Python extension is installed and the folder has no Python
+ * [VSCode] Improved the sign-in screen to say when it opened because a request was refused
+ * [VSCode] Improved the speed of opening, restoring and switching back to long conversations, most of all with many file edits or where git is slow
+ * [VSCode] Improved responsiveness in long chats: smooth typing and large file writes while a reply streams, faster permission prompts, and far less freezing on send with accessibility support on
+ * [VSCode] Improved startup and memory use: the panel and new chat tabs open faster, a first message in a new tab is answered sooner, and on Pro and Max plans the folder trust dialog comes up sooner
+ * [VSCode] Improved speed in remote windows (SSH, WSL, containers): the panel starts, replies appear and sessions reopen faster
+ * [VSCode] Improved the time to a response for the first message after a chat has been idle for a few minutes on a machine that is low on memory
+ * [VSCode] Improved how fast chats start, open from history and come back after a restart on slow or antivirus-scanned disks
+ * [VSCode] Improved how fast diffs appear in reopened conversations, and removed diff menu entries that did not work
+ * [VSCode] Improved the @ file menu to list the files of open editor tabs first, the most recently used on top
+
+Show 95 bug fixes
+
+ * Fixed MCP tool calls hanging for up to 30 minutes on some malformed replies from a local or WebSocket server
+ * Fixed PushNotification telling a headless run, such as a scheduled one, that the terminal was active in its first minute, instead of saying whether a mobile push was requested
+ * Fixed `/install-github-app` skipping the repository step after setup warnings when no repository was found, and Esc not going back from its workflow list and sign-in steps
+ * Fixed one-line tool results cut with no ellipsis in narrow windows, Markdown stars in the Auto mode tab of /permissions, and a hook’s reason to stop a forked skill showing twice
+ * Fixed `/diff` hiding its key hints and not selecting files in windows of 24 to 26 rows, and leaving out files added with `git add -N` in a repository with no commits
+ * Fixed the first-run theme list showing too few themes in short windows, and /usage and other tall screens coming out garbled there
+ * Fixed `/bug` in fullscreen hiding its Yes and No answers behind a long report, and Yes staying out of view in very short windows
+ * Fixed /compact and auto-compact sometimes losing part of the conversation summary when the summary quoted certain XML tags
+ * Fixed Claude not being told when permission rules on the Agent tool dropped its queued message to a subagent that had already ended
+ * Fixed a Remote Control message sometimes showing above the reply that was finishing when it was sent
+ * Fixed Stop hooks that read the transcript missing the last reply in Claude Desktop; SubagentStop hooks now wait for it too
+ * Fixed turns and subagents failing in cloud sessions, or timing out on long replies elsewhere, when a reply went silent while Claude was still thinking; Claude Code now tries the request once more
+ * Fixed Esc and Stop waiting about a minute or more when the contents of a cloud or network file that Claude is reading stall
+ * Fixed Code Mode sessions resumed with `--resume` or `--continue` in another permission mode losing thinking and the prompt cache; one begun in a mode that asks keeps that mode’s limits on scripts
+ * Fixed Code Mode sending a request about every second when a `!` or slash command was typed while a script was running
+ * Fixed an interrupted or failed plugin update leaving a partial plugin folder that later loaded with skills or other components missing (anthropics/claude-code#102186)
+ * Windows: Fixed file writes on FAT32 and exFAT drives asking for permission every time in some plugin sessions
+ * Fixed Claude failing to read a notebook that has a null output or an error output with no traceback
+ * Fixed a rewind deleting files after a restore had failed
+ * Fixed auto mode sometimes refusing Claude’s call to stop a /loop, which left the next wake-up to fire
+ * Fixed a Workflow agent’s background shells and MCP servers sometimes being left running after it handed back its report
+ * Windows: Fixed `/desktop` downloading the older Claude Desktop installer, and asking for an update when an older install’s folder was left behind
+ * Fixed `claude plugin install`, `marketplace add` and similar commands hanging with no output when managed settings needed an approval that could not be asked for
+ * Fixed a permission rule on a subagent’s model, such as `Agent(model:*)`, blocking Claude’s follow-up message to a subagent started on this version with no model named
+ * Fixed PermissionRequest hooks not saving `Skill(name:*)` allow rules outside local settings
+ * Fixed “Ask your admin” asking to raise your own limit when your team’s pooled group budget blocked you, and saying “Request sent” when an admin had approved your request in the last few minutes
+ * Fixed Code Mode losing the middle of a long script output; Claude now gets a path to the uncut text (anthropics/claude-code#111373)
+ * Fixed hold-to-talk dictation stopping early and losing words when Claude Code was busy
+ * Fixed Code Mode with `--bare` not telling Claude what its scripts can call
+ * Fixed a crash when a custom API endpoint returned a tool call with no tool name; the call now fails with an error and the session continues
+ * Windows: Fixed a possible crash when the machine is almost out of memory
+ * Fixed the CLI freezing on some replies, and quoted text sometimes going missing or showing twice
+ * Windows: Fixed Claude Code refusing to start when managed settings in the registry contain non-ASCII characters such as Japanese (anthropics/claude-code#93280)
+ * Windows: Fixed Remote Control clients showing no steps for a new subagent
+ * Fixed @-mentions written as `@file#10-12` attaching the whole file instead of those lines
+ * Fixed Claude misreading a pasted artifact invitation link; it now asks you to accept the invitation and paste the artifact’s own link
+ * Fixed sandboxed Bash commands sometimes failing to start on a full temp disk, for sandboxes whose file rules keep commands out of the temp directory
+ * [VSCode] Fixed raw tags for selected code under a reworded prompt, the mode button flashing Manual, the slash menu hiding its highlighted row, a broken sign-in image, and a blinking Accept/Reject bar
+ * [VSCode] Fixed a forked conversation overwriting the original conversation’s plan file; a fork or rewind that can’t copy the plan now shows a warning
+ * [VSCode] Fixed voice dictation saying no speech was recognized when its connection closed or never opened; it now says the connection was lost or couldn’t connect
+ * [VSCode] Fixed an unsent side question being lost when its panel closes
+ * [VSCode] Fixed Escape stopping Claude after renaming a session, and typing going nowhere after closing the session history with Escape
+ * [VSCode] Fixed Rename, Mark as Unread and Add to Group saying “still connecting” on a tab that resumed a session from its history
+ * [VSCode] Fixed wide tables and long paths cut off, long errors hiding their close button, errors out of view in the Add MCP server form and Chrome dialog, and plugin pictures ignoring the editor theme
+ * [VSCode] Fixed later prompts and the message box covering the Rewind code dialog, and focus jumping from “Never mind” to “Rewind” when it finishes checking files
+ * [VSCode] Fixed the command menu keeping an earlier match highlighted while you type more in its filter, so Enter could run the wrong row
+ * [VSCode] Fixed the @ menu showing “No files found” before its first search results arrived, or when it couldn’t search all files of a very large workspace, which it now says
+ * [VSCode] Fixed Escape stopping Claude at a Remove or Delete confirmation in MCP, Hooks and Memory dialogs, on a side question panel’s button or link, and on the Bookmarks button with its panel open
+ * [VSCode] Fixed empty boxes showing instead of the + and − signs in diffs (anthropics/claude-code#73069)
+ * [VSCode] Fixed the chat no longer following Claude’s reply after the panel was resized, or hidden and shown again
+ * [VSCode] Fixed a chat left in bypass permissions mode reopening in Auto mode instead of your initial permission mode when settings disable bypass
+ * [VSCode] Fixed the chat panel freezing on some CSS code blocks and diffs
+ * [VSCode] Fixed the context usage indicator disappearing after an API error, “Prompt is too long”, or a slash command
+ * [VSCode] Fixed a message queued behind a queued /clear being lost
+ * [VSCode] Fixed Manage Plugins losing its search box or showing no message when a search has no match, and not saying that the list of available plugins failed to load
+ * [VSCode] Fixed proposed changes to notebooks and files with a custom editor opening in a tab with no Accept or Reject that stayed open after the answer
+ * [VSCode] Fixed the spend limit message telling Team and Enterprise members to run `/usage-credits`, which can’t send a request to their admin from the panel
+ * [VSCode] Fixed a written message being wiped by Tab on a command in the ”/” button’s menu or by a click on an onboarding suggestion
+ * [VSCode] Fixed Claude continuing to edit files after you rewind code while it is working
+ * [VSCode] Fixed typed text being lost after /tasks, /copy, /export, a skipped /feedback, or /plan while already in plan mode
+ * [VSCode] Fixed the question card dropping a typed “Other” answer on Ctrl/Cmd+Enter, and sending the word “Other” when nothing was typed
+ * [VSCode] Fixed the panel showing “Something went wrong” for a conversation in which a gateway sent a tool call with no name
+ * [VSCode] Fixed unsaved changes being missed, and Claude’s edit being overwritten by the next save, in a folder opened through a symlink
+ * [VSCode] Fixed @-mentions attaching nothing, or another file of the same name, after Claude changed folders with `cd`
+ * [VSCode] Fixed the arrow keys replacing typed text with an old prompt while selecting, and dropping edits to a recalled prompt
+ * [VSCode] Fixed an @-mention added while a permission prompt was open being lost
+ * [VSCode] Fixed shortcuts such as Ctrl+1, Alt+1 or Ctrl+Space answering an open dialog, which could restore files in the rewind confirmation or switch the git branch
+ * [VSCode] Fixed prompts that start with a file path or code comment being sent without the selected code and having no fork or rewind menu
+ * [VSCode] Fixed file links in the chat ignoring your editor associations for files in the workspace, except notebooks (anthropics/claude-code#81482)
+ * [VSCode] Fixed selected lines staying attached to your next message after their file’s tab was closed
+ * [VSCode] Fixed new sessions starting in Edit automatically after pressing Shift+Tab through it to reach Plan mode
+ * [VSCode] Fixed an edited command on the permission prompt running without the line breaks that were typed or pasted into it
+ * [VSCode] Fixed a newly opened Claude tab not focusing its message box, or taking the keyboard late from the terminal or command palette and sending the typed text as a prompt
+ * [VSCode] Fixed Alt+K line ranges such as `@app.ts#5-10` sending the whole file, or its first 2,000 lines, instead of the selected lines
+ * [VSCode] Fixed diff tabs opening out of order when several subagents wait for approval, and a later edit to the same file cancelling an earlier one
+ * [VSCode] Fixed Enter rewriting a message or running a menu action when a `/word` such as the path `/api` stands beside other text, and running a typed slash command without its arguments
+ * [VSCode] Fixed Electron apps and extension tests failing to start from Claude, a hook or an MCP server; a wrapper, hook or server that runs VS Code as Node must now set `ELECTRON_RUN_AS_NODE=1`
+ * [VSCode] Fixed Claude not being told when you reject part of a proposed edit or change it in the diff view before accepting
+ * [VSCode] Fixed Escape on a permission prompt sending a half-typed instruction to Claude instead of cancelling
+ * [VSCode] Fixed Ctrl+J and Ctrl+O in the chat also opening VS Code’s terminal or Open File dialog on Windows and Linux
+ * [VSCode] Fixed the @ menu inserting the wrong file on a quick Tab or Enter, and Enter not sending a prompt that ends in an @word with no matching file
+ * [VSCode] Fixed new Claude tabs staying blank and the side bar failing to load after closing a tab while Claude was still starting
+ * [VSCode] Fixed a quick double click in the panel pressing a button or row that appeared after the first click, or starting a second compaction from the context usage circle
+ * [VSCode] Fixed switching models failing with “Settings file is not valid JSON” when settings.json is empty or starts with a byte order mark
+ * [VSCode] Fixed memory growing with each fork or rewind of a long conversation until the window was reloaded
+ * [VSCode] Fixed plan comments not showing on the plan approval card in Focus view
+ * [VSCode] Fixed file links without a line number moving the cursor of an open file to line 1
+ * [VSCode] Fixed a missing notification when a conversation running behind another one in the same panel needs a permission or an answer
+ * [VSCode] Fixed Manage Plugins not loading when Claude Code is slow to start or fails to start, so a plugin that blocks startup can be turned off
+ * [VSCode] Fixed proposed diffs showing and saving garbled non-ASCII text when `files.encoding` is not UTF-8
+ * [VSCode] Fixed approved edits and writes saving right-to-left marks as literal `\u200F` escapes on lines with Hebrew, Arabic or Persian text
+ * [VSCode] Fixed a model pick being ignored for the next message when Claude’s process had ended or was still starting
+ * [VSCode] Fixed Rewind showing “No active session” after Claude’s process had ended
+ * [VSCode] Fixed typing @ leaving a helper process running per tab when no browser is connected, except when Claude in Chrome’s service can’t be reached
+ * [VSCode] Fixed the session list opening every transcript at once, which stalled the editor’s extensions and could leave sessions out in projects with many sessions
2.1.330
--- a/chrome.md
+++ b/chrome.md
@@ -96,7 +96,7 @@
### Permission prompts in VS Code sessions
-In a VS Code session, when Claude Code asks before a browser action, the prompt appears as a card in the chat panel. When the action targets a site you haven’t allowed, the card also offers to allow that site. In a session that connected to your browser at start because Enabled by default is on, Claude Code asks you before browser actions on a site you haven’t allowed, in Manual, Edit automatically, Auto, and Bypass permissions modes. In Auto and Bypass permissions modes, this applies until you type `@browser` in that session.
+In a VS Code session, when Claude Code asks before a browser action, the prompt appears as a card in the chat panel. In a session that connected to your browser at start because Enabled by default is on, Claude Code asks you before browser actions on a site you haven’t allowed, in Manual, Edit automatically, Auto, and Bypass permissions modes. In Auto and Bypass permissions modes, this applies until you type `@browser` in that session.
### Browser tools in plan mode
--- a/claude-apps-gateway-config.md
+++ b/claude-apps-gateway-config.md
@@ -451,10 +451,10 @@
`region`| Yes| AWS region. The gateway derives the endpoint from it as `https://bedrock-mantle.<region>.api.aws/anthropic`.
`models`| Yes| The models your AWS account has been granted on Mantle, named as clients send them, such as `claude-haiku-4-5`. Only these go to this upstream, and every other model skips to the next one.
`auth`| No| Takes the same keys as the Amazon Bedrock upstream’s `auth` block, under the same rules.
-`assume_role`| No| The role that this upstream’s requests go through, with the same keys as on a `bedrock` upstream, including `session_name` for per-developer attribution. Give the role Mantle’s IAM actions. Requires a gateway running Claude Code v2.1.318 or later. An earlier gateway exits at startup with `Unrecognized key(s) in object: 'assume_role'`.
+`assume_role`| No| The role that this upstream’s requests go through, with the same keys as on a `bedrock` upstream, including `session_name` for per-developer attribution. Requires a gateway running Claude Code v2.1.318 or later. An earlier gateway exits at startup with `Unrecognized key(s) in object: 'assume_role'`.
`base_url`| No| Override the derived endpoint. Keep the `/anthropic` path at the end.
-Grant the upstream’s AWS identity Mantle’s own IAM actions for inference and token counting, which [Use the Mantle endpoint](</docs/en/amazon-bedrock#use-the-mantle-endpoint>) lists. For a Mantle model ID that the gateway doesn’t know, add an entry to the top-level `models:` block whose `upstream_model` maps this upstream’s name to that ID. Then put that entry’s `id` in this upstream’s `models` field too. A `bedrock` upstream’s `guardrail` and `assume_role` settings don’t extend to the requests Mantle serves:
+Grant [Mantle’s IAM actions](</docs/en/amazon-bedrock#use-the-mantle-endpoint>) to the `assume_role` role if you set one, otherwise to the upstream’s AWS identity. For a Mantle model ID that the gateway doesn’t know, add an entry to the top-level `models:` block whose `upstream_model` maps this upstream’s name to that ID. Then put that entry’s `id` in this upstream’s `models` field too. A `bedrock` upstream’s `guardrail` and `assume_role` settings don’t extend to the requests Mantle serves:
* **`guardrail`** : the gateway applies no Bedrock guardrail to requests it sends to Mantle, so it refuses to start when a `mantle` upstream is listed while any `bedrock` upstream sets `guardrail`.
* **`assume_role`** : set it on the `mantle` upstream itself. Without it, requests that Mantle serves are sent with the `mantle` upstream’s own `auth` credentials.
--- a/claude-apps-gateway-deploy.md
+++ b/claude-apps-gateway-deploy.md
@@ -340,6 +340,7 @@
On an upstream other than `provider: anthropic`, a turn with a long thinking pause fails. The proxy in front of the gateway logs one or two requests, each open for about 12.5 minutes, then a run of `504` errors| Claude Code ended a stream that had delivered its first response event and then carried only keepalive pings. It re-sent the request without streaming, and each reply takes longer than the proxy’s timeout.| Raise `CLAUDE_STREAM_IDLE_TIMEOUT_MS` for your developers. See Long thinking ends in proxy timeouts.
On `provider: anthropic`, a turn with a long thinking pause fails. The proxy logs one or two requests, each open for about 20 minutes, then `502` or `504` errors| Claude Code ended a stream that had delivered its first response event and then carried only keepalive pings. It re-sent the request without streaming. Each reply takes longer than the gateway’s `timeouts.upstream_ttfb_ms` wait or the proxy’s timeout.| Raise `CLAUDE_STREAM_IDLE_TIMEOUT_MS` for your developers. See Long thinking on an Anthropic API upstream.
A developer’s requests fail with `API Error: 400 you aren't in a group that can use this gateway. Ask your administrator to add you to one`| Every upstream has a [`groups` list](</docs/en/claude-apps-gateway-config#what-happens-when-a-developer-is-in-no-listed-group>), and the developer’s session carries none of the listed groups.| Add the developer to a listed group in your IdP, or list an upstream with no `groups` last to serve everyone else. The gateway reads groups again at the developer’s next token refresh. If the IdP left groups out and its userinfo endpoint returns them, set [`oidc.userinfo_fallback: true`](</docs/en/claude-apps-gateway-config#oidc>).
+A `400` that starts with a field path, such as `tools.0.model:`, and contains `is not in your role's availableModels allowlist`, `is blocked by your role's deniedModels denylist`, `is not in the operator's model allowlist`, or `refused by this gateway:`| The gateway refused that field’s model or value| To allow the model, edit the list the message names in the [`managed`](</docs/en/claude-apps-gateway-config#managed>) policy that sets the developer’s list. For `deniedModels`, edit every policy that applies. For the operator’s allowlist, edit [`models`](</docs/en/claude-apps-gateway-config#models>). For `refused by this gateway:`, have the developer fix the request field at that path.
IdP error: unknown or unsupported scope| The IdP rejects scopes it doesn’t recognize| Set `oidc.scopes` to exactly the list your IdP accepts; it must include `openid`. The default is `openid profile email offline_access`.
Sessions don’t silently renew after setting `oidc.scopes`| `offline_access` was dropped from the override| Add `offline_access` back if your IdP supports it. Without a refresh token, developers re-run the browser login every `session.ttl_hours`.
Browser shows “This request came from another site and was blocked”| Cross-site form POST, blocked as CSRF protection. Expected for embedded or proxied pages| Open the verification link directly
--- a/claude-code-on-the-web.md
+++ b/claude-code-on-the-web.md
@@ -217,7 +217,7 @@
* **`/model`, `/effort`, `/color`, and `/rename`**: pass the value as an argument, for example `/model sonnet`, instead of opening the terminal picker or slider. The argument forms follow each command’s [availability notes](</docs/en/commands#all-commands>).
* **`/fast`** : toggles [fast mode](</docs/en/fast-mode#use-fast-mode-in-cloud-sessions>) for the session when fast mode is [available on your account](</docs/en/fast-mode#requirements>). Requires Claude Code v2.1.271 or later in the session’s environment.
- * **`/config`** : in your browser at claude.ai/code, opens **Settings > Code** or **Settings > Claude Code** instead of setting a value. To change a setting for a cloud session, set an [environment variable](</docs/en/cloud-environments#set-environment-variables>) on the environment. In a session with one repository outside a [project](</docs/en/claude-projects>)’s threads, commit the key to that repository’s `.claude/settings.json` instead. [Settings in cloud sessions](</docs/en/settings#settings-in-cloud-sessions>) lists what each session reads.
+ * **`/config`** : in your browser at claude.ai/code, opens **Settings > Code** instead of setting a value. To change a setting for a cloud session, set an [environment variable](</docs/en/cloud-environments#set-environment-variables>) on the environment. In a session with one repository outside a [project](</docs/en/claude-projects>)’s threads, commit the key to that repository’s `.claude/settings.json` instead. [Settings in cloud sessions](</docs/en/settings#settings-in-cloud-sessions>) lists what each session reads.
For context management in a cloud session outside a [project’s threads](</docs/en/claude-projects#choose-models-and-let-claude-manage-context>):
@@ -379,8 +379,8 @@
Cloud sessions stop after a period of inactivity and the session’s VM is reclaimed. A session counts as inactive while it waits for you to approve an [MCP connector](</docs/en/cloud-environments#network-access>) tool call or to sign in to an MCP server, and it can expire during that wait. Reopen the session from [claude.ai/code](<https://claude.ai/code>) to provision a fresh VM:
- * **Restored** : your conversation history
- * **Not restored** : background work that was still running or pending when the VM was reclaimed, including:
+ * **Restored** : your conversation history, and tracking of [MCP tasks](</docs/en/mcp#mcp-task-results-in-the-cloud>) still running on a connector
+ * **Not restored** : other background work that was still running or pending when the VM was reclaimed, including:
* **Shell commands** : Claude Code tells Claude which commands stopped. Ask Claude to rerun the ones you still need.
* **Subagents** : Claude Code tells Claude which subagents stopped, and which of those can be [resumed](</docs/en/sub-agents#resume-subagents>) instead of started over. Ask Claude to continue their work.
* **Session-scoped scheduled tasks** : tasks you [scheduled in the session](</docs/en/scheduled-tasks>) and a `/loop` waiting for its next iteration don’t carry over to the reopened session. Ask Claude to schedule the tasks again, or run `/loop` again to restart the loop.
--- a/claude-directory.md
+++ b/claude-directory.md
@@ -119,7 +119,7 @@
`feedback-bundles/`| Redacted transcript archives written by `/feedback` on third-party providers or when no Anthropic credentials are configured, for sending to your Anthropic account team
`feedback/drafts/`| Queued [Claude-drafted feedback](</docs/en/tools-reference#sendfeedback-tool-behavior>) awaiting your review in `/feedback`. Swept after `cleanupPeriodDays` or 30 days, whichever is shorter. When the queue is at its 10-draft limit, Claude Code deletes the oldest draft to make room.
`usage-data/`| `report.html` and timestamped report copies written by [`/insights`](</docs/en/costs#analyze-your-usage-patterns>), plus cached per-session analysis data used to build them
-`skills/.trash/`, `plugins/.trash/`| [Skills](</docs/en/skills#how-synced-skills-behave>) and [plugins](</docs/en/plugins/loading#synced-plugins>) that the claude.ai sync removed, such as after you turn one off on claude.ai or stop syncing. The files stay here so you can recover them until the sweep deletes them
+`skills/.trash/`, `plugins/.trash/`| [Skills](</docs/en/skills#how-synced-skills-behave>) and [plugins](</docs/en/plugins/loading#synced-plugins>) that the claude.ai sync removed, such as after you turn one off on claude.ai or stop syncing. Recover them here. Claude Code can delete a folder before the age cutoff when it’s over 7 days old and has three newer copies, or when `.trash/` holds over 1,024 folders
`plugins/installed_plugins.set-aside.<date>.<hash>.json`, `plugins/installed_plugins.unreadable.<date>.<hash>.kept`| Dated copies Claude Code makes before rewriting [`installed_plugins.json`](</docs/en/plugins/loading#find-plugins-on-disk>): install records it dropped, and the contents of a file it couldn’t read.
`plugins/data/.set-aside/`| Data directories of plugins from a marketplace that your organization replaced with one of the same name. Their age counts from the day Claude Code moved them, and a shorter `cleanupPeriodDays` in project settings doesn’t apply. To keep one, move it somewhere else before the sweep deletes it.
`plugins/mcpb/`| The files Claude Code extracted from the [MCP bundles](</docs/en/plugins/components#include-a-packaged-mcpb-server>) that plugins declare. A bundle’s age counts from the last session that used it.
--- a/claude-platform-on-aws.md
+++ b/claude-platform-on-aws.md
@@ -41,7 +41,7 @@
A workspace API key is a long-lived secret, useful when you don’t want to manage federated AWS credentials. Generate one in the AWS Console under **Claude Platform on AWS → API keys** and set it as `ANTHROPIC_AWS_API_KEY`:
- export ANTHROPIC_AWS_API_KEY=sk-ant-xxxxx
+ export ANTHROPIC_AWS_API_KEY=your-workspace-api-key
The key is sent as `x-api-key` and takes precedence over SigV4, so any AWS credentials in your environment are ignored. API keys from a separate Claude Console organization won’t work here. Treat workspace API keys like any other production credential. The [user settings file](</docs/en/settings>) `env` block is a convenient way to scope the key to your machine without exporting it globally.
--- a/cli-reference.md
+++ b/cli-reference.md
@@ -53,7 +53,7 @@
`--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>). 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. While `bypassPermissions` is in the cycle of an interactive terminal session, most edits and commands Claude attempts in plan mode run with no prompt, before you approve a plan. See [permission modes](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>)| `claude --permission-mode default --allow-dangerously-skip-permissions`
+`--allow-dangerously-skip-permissions`| Add `bypassPermissions` to the `Shift+Tab` mode cycle without starting in it. While `bypassPermissions` is in the cycle of an interactive terminal session, most edits and commands Claude attempts in plan mode can run with no prompt, before you approve a plan. See [permission modes](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>)| `claude --permission-mode default --allow-dangerously-skip-permissions`
`--allowedTools`, `--allowed-tools`| Tools that execute without prompting for permission, apart from reads from [network paths](</docs/en/permissions#network-paths>). 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"`
`--append-subagent-system-prompt-file`| Load text from a file and append it to [subagent](</docs/en/sub-agents>) system prompts. An alternative to `--append-subagent-system-prompt` for text too long to pass on the command line. The two flags can’t be combined. Only applies in non-interactive mode with `-p`. Requires Claude Code v2.1.261 or later| `claude -p --append-subagent-system-prompt-file ./subagent-rules.txt "query"`
--- a/cloud-environments.md
+++ b/cloud-environments.md
@@ -249,7 +249,7 @@
Your organization’s [server-managed settings](</docs/en/server-managed-settings>)| Yes, except in [Claude Tag](<https://claude.com/docs/claude-tag/overview>) sessions| Fetched from Anthropic’s servers when the session starts. See [Surface coverage](</docs/en/model-config#surface-coverage>) for how `availableModels` is enforced in cloud sessions. Settings deployed to your device through MDM or managed settings files don’t apply, because the session runs on an Anthropic-managed VM; in a [self-hosted environment](</docs/en/self-hosted-environments>), sessions also read the managed settings file in the runner image, per [how Claude Code combines managed sources](</docs/en/managed-settings#how-claude-code-combines-managed-sources>)
Your user `~/.claude/CLAUDE.md`| No| Lives on your machine, not in the repo. See Add personal preferences without committing to the repo
Your user `~/.claude/skills/`, `~/.claude/agents/`, `~/.claude/commands/`| No| Live on your machine, not in the repo. Commit them to the repo’s `.claude/` directory instead. Cloud sessions automatically load [skills you enable on claude.ai](</docs/en/skills#skills-in-cowork-and-cloud-sessions>)
-Plugins enabled only in your user settings| No| User-scoped `enabledPlugins` lives in `~/.claude/settings.json` on your machine
+Plugins enabled only in your user settings| No| User-scoped `enabledPlugins` lives in `~/.claude/settings.json` on your machine. To use one, see the **Cloud session** tab under [Install a plugin](</docs/en/plugins/install#install-a-plugin>)
MCP servers you added with `claude mcp add` at the default local scope or the user scope| No| At those scopes, the command writes to `~/.claude.json` on your machine. Run `claude mcp add --scope project` from the repository root to write the repo’s [`.mcp.json`](</docs/en/mcp#project-scope>), and commit that file. A session with one repository loads it
Transport variables in your repo’s `.claude/settings.json` `env` block, such as `NODE_EXTRA_CA_CERTS` and the [mTLS client certificate variables](</docs/en/network-config#mtls-authentication>)| No| The hosting environment manages the session’s API connection, so Claude Code ignores these keys and notes each ignored key in the session’s debug log
API keys and tokens for services Claude calls| In an Anthropic-hosted environment, as network secrets| You add the key once on the environment and the agent proxy attaches it to requests for the hosts you list. A key the agent proxy can’t attach stays in an environment variable
Show diff (169 lines)
--- a/code-mode.md
+++ b/code-mode.md
@@ -25,26 +25,27 @@
Before you turn on Code Mode, check that you can accept these limits:
- * **Resuming** : you can resume a Code Mode session only in the terminal, with Code Mode on
+ * **Resuming** : you can resume a Code Mode session only with Code Mode on. After a Code Mode session has run with a Claude subscription or a Console account, you can’t resume it on a cloud provider such as Amazon Bedrock
* **Auto mode** : auto mode’s classifier reviews the code, not each tool call
* **Long-running code** : unless code can run in the background, you wait for it to finish, and it stops after ten minutes
- * **Hooks** : you can see tool calls refused when a `PreToolUse` hook doesn’t finish, for example after a timeout
+ * **Hooks** : by default, expect a refused tool call when a `PreToolUse` hook doesn’t finish, and a call that can still run when the hook fails another way
* **Unavailable features** : you can’t use [Remote Control](</docs/en/remote-control>), [Claude in Chrome](</docs/en/chrome>), or [computer use](</docs/en/computer-use>)
* **Moving the session** : you can’t move the session to the Desktop app or turn it into a [background session](</docs/en/agent-view>), and `/fork` can’t start a background copy
## Requirements
* **Version** : Claude Code v2.1.323 or later, on either [release channel](</docs/en/setup#configure-release-channel>). An older version starts without Code Mode, with or without the reason `it isn't open to your account yet`
- * **Account** : a Claude subscription or Console account. You can’t use Code Mode through a gateway, Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, Microsoft Foundry, or [Claude Models on Google Cloud (Anthropic managed)](</docs/en/claude-models-on-google-cloud-anthropic-managed>)
+ * **Account or provider** : a Claude subscription, a Console account, or a [cloud provider](</docs/en/feature-availability#availability-by-model-provider>) such as Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. With a cloud provider, you need v2.1.331 or later. You can’t use Code Mode through a [gateway](</docs/en/gateways>) or with Claude for Government. If you reach a cloud provider with an [Enterprise Admin Console sign-in](</docs/en/authentication#log-in-to-claude-code>), you need Agent Platform, or Amazon Bedrock without the [Mantle endpoint](</docs/en/amazon-bedrock#use-the-mantle-endpoint>)
* **Organization** : your organization doesn’t use the [HIPAA configuration](</docs/en/hipaa-setup>) or [zero data retention](</docs/en/zero-data-retention>)
- * **Model** : Claude Opus 5.5, Sonnet 5.5, Haiku 5.5, or Fable 5.2
+ * **Model** : Claude Opus 5.5, Sonnet 5.5, Haiku 5.5, or Fable 5.2. If you select the model by a deployment name or an application inference profile, ask whoever manages that name whether it points to one of these models
* **Surface** : an interactive `claude` session in a terminal. Code Mode doesn’t work with the VS Code panel, the Desktop app, or cloud sessions
* **Agent teams** : to use Code Mode with [agent teams](</docs/en/agent-teams>) on, you need v2.1.326 or later. Teammates run in Code Mode in the default [in-process display mode](</docs/en/agent-teams#choose-a-display-mode>), and start without it in split panes
+ * **Mods** : to use Code Mode with a [mod](</docs/en/plugins/mods/overview>) that hooks tool calls, you need v2.1.327 or later. If you’re on the `stable` channel and an update doesn’t reach that version, [switch to `latest`](</docs/en/setup#configure-release-channel>)
* **Telemetry settings** : to use Code Mode with [feature-flag fetching off](</docs/en/env-vars#features-that-need-feature-flag-fetching>) or [OpenTelemetry](</docs/en/monitoring-usage>) events and metrics on, you need v2.1.329 or later. Keep [tracing](</docs/en/monitoring-usage#traces-beta>) off on any version
* **Installation** : the [native build](</docs/en/setup>) of Claude Code
* **Windows** : [Git for Windows](<https://git-scm.com/downloads/win>) is installed
-You also can’t start Code Mode with some settings on, such as an API key helper. For the fix for each, see Code Mode doesn’t start.
+You also can’t start Code Mode with some settings on, such as an API key helper on a direct connection to Anthropic. For the fix for each, see Code Mode doesn’t start.
## Try Code Mode
@@ -54,7 +55,7 @@
Check your version
-Run `claude --version`. If the version is older than v2.1.323, run `claude update`. If you’re on the `stable` channel and the update doesn’t reach v2.1.323, wait for `stable` to catch up or [switch to `latest`](</docs/en/setup#configure-release-channel>).
+Run `claude --version`. If the version is older than the one you need for your setup, run `claude update`. If you’re on the `stable` channel and the update doesn’t reach that version, wait for `stable` to catch up or [switch to `latest`](</docs/en/setup#configure-release-channel>).
2
@@ -111,7 +112,7 @@
### Turn off Code Mode
-Remove `CLAUDE_CODE_EXPERIMENTAL_CODE_MODE` from your shell and from `~/.claude/settings.json`, then start a new session. You can also keep the variable and change its value to `0` in either place. With a `0` in one place, Code Mode stays off even if you set `1` in the other.
+Remove `CLAUDE_CODE_EXPERIMENTAL_CODE_MODE` from your shell, `~/.claude/settings.json`, and any `--settings` file, then start a new session. You can also keep the variable and change its value to `0` in any of them. With a `0` in one place, Code Mode stays off even if you set `1` in another.
### Block Code Mode for your organization
@@ -123,7 +124,7 @@
}
}
-Users who are in a Code Mode session stay in it until they exit or restart Claude Code. After that, your users start without Code Mode and can’t resume their Code Mode sessions while the `0` is in place. You can’t turn on Code Mode for your users from managed settings.
+If your users can connect through a cloud provider, deploy this setting through [MDM or a managed settings file](</docs/en/managed-settings#delivery-mechanisms>). A user who sets a provider variable such as `CLAUDE_CODE_USE_BEDROCK` in their shell or user settings can start Code Mode without receiving [server-managed settings](</docs/en/server-managed-settings#platform-availability>). Users who are in a Code Mode session stay in it until they exit or restart Claude Code. After that, your users start without Code Mode and can’t resume their Code Mode sessions while the `0` is in place. You can’t turn on Code Mode for your users from managed settings.
### Monitor Code Mode with OpenTelemetry
@@ -139,7 +140,7 @@
### Permission checks
-In auto and `bypassPermissions` modes, code can run from start to finish without a permission prompt. Some calls still prompt you, such as the [actions no mode auto-approves](</docs/en/permission-modes#actions-no-mode-auto-approves>). Each tool call in the code goes through your `deny` and `ask` [permission rules](</docs/en/permissions>) and [`PreToolUse` hooks](</docs/en/hooks#pretooluse>) under the tool’s usual name, such as `Bash` or an [MCP tool’s name](</docs/en/permissions#mcp>). Beyond rules and hooks, a classifier reviews the code in auto mode, and you answer prompts in the modes that ask:
+In auto and `bypassPermissions` modes, code can run from start to finish without a permission prompt. Some calls still prompt you, such as the [actions no mode auto-approves](</docs/en/permission-modes#actions-no-mode-auto-approves>). To control tool calls in the code, write `deny` and `ask` [permission rules](</docs/en/permissions>) and [`PreToolUse` hooks](</docs/en/hooks#pretooluse>) under the tool’s usual name, such as `Bash` or an [MCP tool’s name](</docs/en/permissions#mcp>). Beyond rules and hooks, a classifier reviews the code in auto mode, and you answer prompts in the modes that ask:
* **[Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>)** : the classifier reviews each piece of code before it runs, not each tool call. It doesn’t see values computed at run time, such as a path taken from search output, so keep rules or hooks for calls you must control. You can still be prompted for some calls, such as calls in code that you approved yourself after repeated classifier blocks
* **Other[permission modes](</docs/en/permission-modes>)**: you’re prompted for each tool call that would prompt you in that mode
@@ -192,10 +193,10 @@
For background code, start your session in auto or `bypassPermissions` mode. If Claude still waits, check your current mode and how you started the session:
- * **You switched to another mode** : press `Shift+Tab` until you’re back in the mode you started in
- * **You started in another mode** : if [auto mode is available](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) to you, exit, then run `claude --continue --permission-mode auto` with Code Mode on
- * **You’re on a version before v2.1.328 and picked the session from the`claude --resume` list**: exit, [update Claude Code](</docs/en/setup#update-claude-code>), then run the same `claude --resume` command with Code Mode on. To stay on your version, replace `--resume` with `--continue`
- * **You passed tool names to`--tools`**: start again in auto mode without that flag
+ * **You’re on a version before v2.1.328 and picked the session from the`claude --resume` list**: exit, [update Claude Code](</docs/en/setup#update-claude-code>), then run the same `claude --resume` command with Code Mode on. To stay on your version, replace `--resume` with `--continue`. If Claude still waits after the update, start a new session in auto mode
+ * **You passed tool names to`--tools`**: start a new session in auto mode, with Code Mode on and without that flag
+ * **The session first started in auto or`bypassPermissions` mode**: press `Shift+Tab` until you’re back in that mode. If that doesn’t help, exit, then run `claude --continue --permission-mode auto` with Code Mode on
+ * **The session first started in another mode** : if [auto mode is available](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) to you, exit, then run `claude --permission-mode auto` with Code Mode on to start a new session. On v2.1.331 or later, expect Claude to keep waiting if you resume the old session instead
### Stop code in progress
@@ -203,7 +204,7 @@
### Check code output with a hook
-To check or redact what the code returns before Claude reads it, write a [`PostToolUse` hook](</docs/en/hooks#posttooluse>) that matches `REPL`, the tool that runs the code. The same hook runs when background code finishes and when code throws an error.
+To check or redact what the code returns, write a [`PostToolUse` hook](</docs/en/hooks#posttooluse>) that matches `REPL`, the tool that runs the code. The same hook runs when background code finishes and when code throws an error.
#### Read code output in the hook
@@ -223,7 +224,8 @@
* **Change the text** : redact `result`, `stdout`, `stderr`, and `error`. Handle a `result` that’s missing or `null`, and expect `error` only when the code failed or was stopped
* **Keep the shape** : return `code`, `stdout`, and `stderr` as strings, and return `error` as a string or leave it out. If you break this shape, Claude gets the original output
- * **Remove images and PDFs** : if the copy has `images` or `documents` to hide, set that field to `[]`
+ * **Remove images, PDFs, and page errors** : if the copy has `images`, `documents`, or `imagePagesFailed` to hide, set that field to `[]`. The `imagePagesFailed` field lists the file path and error for each PDF page that couldn’t be shown
+ * **Remove the path to long output** : on v2.1.331 or later, omit `uncutOutputNote` from the copy. The field gives Claude a path to the uncut text
To hide the deploy token in the `notes.txt` result, print this JSON:
@@ -265,17 +267,20 @@
---|---
`it isn't open to your account in this version` or `it isn't open to your account yet`| If your version is older than v2.1.323, update. Otherwise, check your network connection and start again. If the reason stays, try again another day
`Anthropic has turned it off for now`| [Update Claude Code](</docs/en/setup#update-claude-code>), or start again later
-`it only works directly with the Anthropic API` or `it only works with the Anthropic API`| Remove the settings that route requests through a cloud provider, a gateway, or a custom `ANTHROPIC_BASE_URL`
+`it only works directly with the Anthropic API` or `it only works with the Anthropic API`| If you use a cloud provider without a gateway, [update Claude Code](</docs/en/setup#update-claude-code>) to v2.1.331 or later. If you use a gateway, follow the next row
+`it isn't offered yet through a gateway or proxy`| If your administrator set up the [gateway](</docs/en/gateways>), you need it, or you use Claude for Government, turn off Code Mode to stop seeing the line. Otherwise, remove [the gateway’s settings](</docs/en/llm-gateway-connect>) and key, and connect directly. You can keep `HTTPS_PROXY`. If you signed in to a Claude apps gateway, also remove [its entries from your user settings](</docs/en/claude-apps-gateway#set-the-gateway-url-in-user-settings>) and run `/logout`, which removes saved MCP server logins and plugin secrets too
+`it isn't offered yet through a gateway or proxy`, with an [Enterprise Admin Console sign-in](</docs/en/authentication#log-in-to-claude-code>)| Run `/status`. If `API provider` shows a provider that the requirements rule out, such as `Microsoft Foundry` or `Amazon Bedrock (Mantle)`, turn off Code Mode to stop seeing the line. Otherwise, follow the previous row
`it doesn't work with an API key helper`| Remove `apiKeyHelper`, `ANTHROPIC_AUTH_TOKEN`, and any `Authorization` or `X-Api-Key` header in `ANTHROPIC_CUSTOM_HEADERS`. Then sign in or set `ANTHROPIC_API_KEY`
-`it only works with Opus 5.5, Sonnet 5.5 and later models`| Start with a supported model, for example with `--model opus`. Haiku 5.5 and Fable 5.2 also work
+`it only works with Opus 5.5, Sonnet 5.5 and later models`| Pass the full name of a supported model that your account can use, for example `--model claude-opus-5-5`, or on Microsoft Foundry the name of your deployment of one. Avoid aliases such as `sonnet`, which [select older models on some providers](</docs/en/model-config#model-aliases>)
`it doesn't work in background jobs`| Start in the foreground, without `--remote-control`. If the reason shows in a teammate’s split pane, use the [in-process display mode](</docs/en/agent-teams#choose-a-display-mode>) to run teammates in Code Mode
`it needs settings that Claude Code downloads from Anthropic`| [Update Claude Code](</docs/en/setup#update-claude-code>) to meet the telemetry settings requirement. To stay on your version, unset the variable that [turns off feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>), such as `DISABLE_TELEMETRY`
`OpenTelemetry tracing is on`| Unset `CLAUDE_CODE_ENHANCED_TELEMETRY_BETA`, `ENABLE_ENHANCED_TELEMETRY_BETA`, and `ENABLE_BETA_TRACING_DETAILED` if you can work without [traces](</docs/en/monitoring-usage#traces-beta>)
`OpenTelemetry is on`| To keep events and metrics on, [update Claude Code](</docs/en/setup#update-claude-code>) and meet the telemetry settings requirement. To stay on your version, unset `CLAUDE_CODE_ENABLE_TELEMETRY` and `ENABLE_BETA_TRACING_DETAILED` if you can work without [OpenTelemetry export](</docs/en/monitoring-usage>)
-`it doesn't yet work with the plugin`| In a session, run `/plugin` and disable each plugin that the reason names. If your organization turned one on, ask your administrator to turn it off
-`it doesn't yet work with an installed mod`| Turn off the [mod](</docs/en/plugins/mods/overview>) that checks tool calls
+`it doesn't yet work with the plugin`| [Update Claude Code](</docs/en/setup#update-claude-code>) to meet the mods requirement. To stay on your version, run `/plugin` and disable each plugin that the reason names. If your organization turned one on, ask your administrator to turn it off
+`it doesn't yet work with an installed mod`| [Update Claude Code](</docs/en/setup#update-claude-code>) to meet the mods requirement. To stay on your version, run `/plugin` and disable each mod you installed
`it can't be used together with agent teams yet`| To keep agent teams on, [update Claude Code](</docs/en/setup#update-claude-code>) to v2.1.326 or later. To stay on your version, unset `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS`
`this launch's tool options`| Start without `--restricted`, add `REPL` to `--tools`, and remove `REPL` from `--disallowedTools` and your `deny` rules
+`couldn't read your organization's settings or policy`| Start again. If your Enterprise Admin Console sign-in ended, run `claude auth login` and select your organization. If the reason stays and your network blocks `api.anthropic.com`, ask your administrator to allow that host. If you use a cloud provider and not that sign-in, you can instead unset `ANTHROPIC_API_KEY` and run `claude auth logout`, which also removes saved MCP server logins and plugin secrets
`couldn't save your answer`| Make `~/.claude.json` writable
`your organization's settings don't allow it`| Ask your administrator about the managed setting
@@ -283,7 +288,7 @@
### Permission prompt with a countdown
-In auto mode, if you approve code yourself after [repeated classifier blocks](</docs/en/permission-modes#when-auto-mode-falls-back>), you can be asked about tool calls in that code and in earlier code that’s still running. With no IDE connected, the prompt can show a countdown:
+In auto mode, if you approve code yourself after [repeated classifier blocks](</docs/en/permission-modes#when-auto-mode-falls-back>), you can be asked about tool calls in that code and in earlier code that’s still running. Expect the same in auto mode after an `ask` rule or a `PreToolUse` hook on `REPL` has you approve the code. With no IDE connected, the prompt can show a countdown:
Claude Code will automatically block this request in 1:59, to avoid holding up an unattended session
@@ -291,15 +296,20 @@
### Tool call refused by a hook
-If Claude reports a refused tool call, ask it for the error text. These errors mean that your [`PreToolUse` hook](</docs/en/hooks#pretooluse>) didn’t give a decision:
-
- * **`the hook did not finish`** : your hook timed out, or your agent hook ended without a decision. After a timeout, raise the hook’s [`timeout`](</docs/en/hooks#common-fields>). For an agent hook that gives no decision, move the check to a `command` hook. You can see this error on calls from code, and on other tool calls after Claude runs code in the session
- * **`the hook failed`** : on a call from code, your hook couldn’t start, was killed, exited with 126, 127, or a code above 128, or returned an HTTP error or invalid output. Fix the hook. You can see this error before v2.1.329. On later versions it’s rare: one cause is [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) turning off during a session, after Claude has run code
-
-On v2.1.329 or later, expect a call from code to run by default after a hook failure other than `the hook did not finish`. To choose whether the call runs, use a `command` or `http` hook and set [`onFailure`](</docs/en/hooks#block-the-action-when-a-hook-fails>) on it:
-
- * **To stop the call after a timeout or failure** : set `"onFailure": "block"`. Do this for a hook that guards calls
- * **To let the call run after a timeout or failure** : set `"onFailure": "continue"`
+If Claude reports a refused call, ask it for the error text. These errors mean your [`PreToolUse` hook](</docs/en/hooks#pretooluse>) gave no decision:
+
+ * **`the hook did not finish`** : your hook timed out, or your agent hook ended without a decision. Raise the hook’s [`timeout`](</docs/en/hooks#common-fields>), or set `"onFailure": "continue"` on a `command` or `http` hook. If an agent hook still gives this error, move the check to a `command` hook. After Claude runs code, you can see this error on calls outside code too
+ * **`the hook failed`** : your hook failed on a call from code, for example because it couldn’t start. Find the failure in the [debug log](</docs/en/hooks#debug-hooks>) and fix it. Expect this error before v2.1.329. On later versions, you can see it after you turn off [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) during a session
+
+### Tool call ran after a hook failed
+
+To stop a call from code when its `PreToolUse` hook fails, use a `command` or `http` hook and set [`"onFailure": "block"`](</docs/en/hooks#block-the-action-when-a-hook-fails>). If several settings files have that hook, give it the same `onFailure` value in each. On v2.1.329 or later, expect these results for `command` and `http` hooks:
+
+`onFailure`| Hook times out| Hook fails another way, such as a missing script
+---|---|---
+Not set| Refused| Goes on to permission checks, with rare exceptions
+`"block"`| Refused| Refused
+`"continue"`| Goes on to permission checks| Goes on to permission checks
### Code output withheld by a hook
--- a/code-review-setup.md
+++ b/code-review-setup.md
@@ -47,7 +47,7 @@
Click Turn on
-In the **Choose what Claude does on these repositories** dialog, leave **Code review** selected. If **Steward** is selected and you can change it, clear it unless you also want PR Steward on these repositories. Then click **Turn on** , which is the click that turns Code Review on.If you close the dialog any other way, your repositories stay added and nothing is turned on. To turn Code Review on then, use the switch under **Review** again.Each repository starts set to review after every push, which runs the most reviews. To run fewer, set when reviews run.
+In the **Choose what Claude does on these repositories** dialog, leave **Code review** selected. If **Steward** is selected and you can change it, clear it unless you also want [PR Steward](</docs/en/pr-steward>) on these repositories. Then click **Turn on** , which is the click that turns Code Review on.If you close the dialog any other way, your repositories stay added and nothing is turned on. To turn Code Review on then, use the switch under **Review** again.Each repository starts set to review after every push, which runs the most reviews. To run fewer, set when reviews run.
6
@@ -82,7 +82,9 @@
* **After every push** : a review runs on pushes to the pull request branch, catching new issues as the pull request evolves and auto-resolving threads when you fix flagged issues
* **Manual (@claude review)** : opening or pushing to a pull request doesn’t start a review. Comment [`@claude review`](</docs/en/code-review-pull-requests#comment-commands>) to request one, or `@claude review always` to also subscribe the pull request to reviews on subsequent pushes.
-Manual is useful for high-traffic repositories where you want to opt specific pull requests into review, or to start reviewing pull requests only once they’re ready. To compare what each option does to spend, see [How often reviews run](</docs/en/code-review-costs#how-often-reviews-run>). To change the setting, click **Edit** on the repository’s row in the **Repositories** table and select a **Review runs** option. The choice saves as soon as you select it. The table’s **Code review** column shows it shortened to Once per PR, Every push, or Manual.
+Manual is useful for high-traffic repositories where you want to opt specific pull requests into review, or to start reviewing pull requests only once they’re ready. To compare what each option does to spend, see [How often reviews run](</docs/en/code-review-costs#how-often-reviews-run>). To change the setting on the [**Claude Ship**](<https://claude.ai/admin-settings/claude-code#code-review>) page, click **Edit** on the repository’s row in the **Repositories** table and select a **Review runs** option:
+
+Your choice saves as soon as you select it. The **Repositories** table’s **Code review** column shows it shortened to Once per PR, Every push, or Manual.
* **Drafts and pull requests from forks** : whichever option you choose, [automatic reviews skip both](</docs/en/code-review-pull-requests#review-drafts-and-pull-requests-from-forks>)
* **New repositories** : a repository you add from the **Add a repository** dialog starts at **After every push**. If its GitHub organization is covered as a whole, it takes that organization row’s setting instead.
@@ -142,11 +144,11 @@
In [**Organization settings > Claude Ship**](<https://claude.ai/admin-settings/claude-code#code-review>), pick the control that matches what you want to stop:
* **One repository, keeping it in the list** : click **Edit** on its row and turn off **Code review**. The table shows the repository as Off.
- * **One repository, removing it** : click **Edit** on its row, then **Remove repository** at the bottom of the dialog. Reviews stop there, and another Claude organization can then set that repository up. While the repository’s GitHub organization is covered as a whole, you can’t remove it; turn off its **Code review** switch instead.
+ * **One repository, removing it** : click **Edit** on its row, then **Remove repository** at the bottom of the dialog. Another Claude organization can then set that repository up. While the repository’s GitHub organization is covered as a whole, you can’t remove it; turn off its **Code review** switch instead.
* **A whole GitHub organization** : click **Edit** on the organization’s row and select **Off**. This also turns off repositories in that organization that you added one at a time.
- * **Everything** : turn off the switch under **Review**. No new reviews start in any repository, and your repository list stays so you can turn it back on later.
+ * **Everything** : turn off the switch under **Review**. Your repository list stays so you can turn the switch back on later.
-With a repository’s **Code review** switch off, or with **Allow code review** off, a [Claude Approvals](</docs/en/approvals-setup#what-approvals-costs>) policy can start billed reviews. To stop those, change the policy or [turn off Approvals](</docs/en/approvals-setup#turn-off-approvals>). Code Review’s spend limit applies to them.
+With a repository’s **Code review** switch off, or with the switch under **Review** off, a [Claude Approvals](</docs/en/approvals-setup#what-approvals-costs>) policy can start billed reviews. To stop those, change the policy or [turn off Approvals](</docs/en/approvals-setup#turn-off-approvals>). Code Review’s spend limit applies to them.
## Related resources
--- a/commands.md
+++ b/commands.md
@@ -80,6 +80,7 @@
`/memory`| Edit `CLAUDE.md` files, enable or disable [auto memory](</docs/en/memory#auto-memory>), and view auto memory entries
`/mobile`| Show QR code to download the Claude mobile app. Aliases: `/ios`, `/android`
`/model [model]`| Switch the AI model and save it as your default for new sessions. For models that support it, use left/right arrows to [adjust effort level](</docs/en/model-config#adjust-effort-level>). With no argument, opens a picker; press `s` on a row to switch for the current session only. See [when the new model starts](</docs/en/interactive-mode#when-claude-code-sends-what-you-queued>). Before v2.1.242, it could wait. With `-p`, pass a model argument, which isn’t saved as your default; requires v2.1.205 or later
+`/motion [brief]`| **[Skill](</docs/en/skills#bundled-skills>).** Make a new animation from your brief as a [Claude Motion](<https://support.claude.com/en/articles/17454997-get-started-with-claude-motion>) artifact, for example `/motion an explainer of how our deploy pipeline works`. Available in local sessions in the [Desktop app](</docs/en/desktop>) and in Anthropic-hosted [cloud sessions](</docs/en/claude-code-on-the-web>), not in the terminal or IDE extensions. Requires Claude Code v2.1.323 or later and a Team or Enterprise account where the [Motion template is available](</docs/en/artifacts#start-from-a-slides-design-or-docs-template>)
`/output-style [style]`| List [output styles](</docs/en/output-styles>) or switch to one, for example `/output-style concise`. See [Change your output style](</docs/en/output-styles#change-your-output-style>). Requires Claude Code v2.1.269 or later
`/passes`| Share a free week of Claude Code with friends. Only visible if your account is eligible
`/permissions`| Manage allow, ask, and deny rules for tool permissions. Opens an interactive dialog where you can view rules by scope, add or remove rules, manage working directories, and review [recent auto mode denials](</docs/en/auto-mode-config#review-denials>). You can also view and edit [auto mode classifier rules](</docs/en/auto-mode-config#edit-rules-from-permissions>) from the dialog’s **Auto mode** tab. In the desktop app, edit your [settings files](</docs/en/auto-mode-config#where-the-classifier-reads-configuration>) instead. Alias: `/allowed-tools`
@@ -139,6 +140,7 @@
`/vim`| Removed in v2.1.92. To toggle between Vim and Normal editing modes, use `/config` → Editor mode
`/voice [hold|tap|off]`| Toggle [voice dictation](</docs/en/voice-dictation>), or enable it in a specific mode. Requires a Claude.ai account
`/web-setup`| Connect your GitHub account for [cloud sessions](</docs/en/web-quickstart#connect-from-your-terminal>) using your local `gh` CLI credentials
+`/whiteboard [brief]`| **[Skill](</docs/en/skills#bundled-skills>).** Make a new whiteboard from your brief as a [Claude Whiteboards](<https://support.claude.com/en/articles/18324319-get-started-with-claude-whiteboards>) artifact, for example `/whiteboard a service map of the checkout flow`. Requires Claude Code v2.1.323 or later, a session where [artifacts are available](</docs/en/artifacts#availability>), and an account where the [Whiteboards template is available](</docs/en/artifacts#start-from-a-slides-design-or-docs-template>). When your organization has that template off, the command doesn’t appear, so ask an Owner to [turn it on](<https://support.claude.com/en/articles/16994751-artifacts-admin-guide-for-team-and-enterprise-plans#h_6e06d8f1a8>)
`/workflow-authoring`| **[Skill](</docs/en/skills#bundled-skills>).** Load the reference for writing [dynamic workflow](</docs/en/workflows>) scripts: the script API, resume behavior, quality patterns, and worked examples. Claude normally loads it on its own before writing a script; run it yourself before [editing a saved script by hand](</docs/en/workflows#edit-a-saved-script>). Available when dynamic workflows are enabled, and requires Claude Code v2.1.248 or later
`/workflows`| Open the [workflow](</docs/en/workflows#watch-the-run>) progress view to watch, pause, resume, or save running and completed workflows
--- a/costs.md
+++ b/costs.md
@@ -147,7 +147,7 @@
* **Cap spend** : the seat allowance is the default ceiling. To let members continue past it, turn on [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>) and set spend limits at the organization, group, or individual member level.
* **Pull per-user numbers** : on the Enterprise plan, the [Enterprise Analytics API](<https://platform.claude.com/docs/en/api/admin/analytics>) returns per-user usage and cost reports across Claude surfaces, including Claude Code. A Primary Owner creates a key with the `read:analytics` scope at [claude.ai/analytics/api-keys](<https://claude.ai/analytics/api-keys>). On the Teams plan, export the [spend report CSV](<https://support.claude.com/en/articles/12883420-view-usage-analytics-for-team-and-enterprise-plans>), which lists token usage and estimated spend per user and per model.
-The [Claude Enterprise consumption guide](<https://support.claude.com/en/articles/14782391-claude-enterprise-consumption-guide>) is the planning reference for admins. It explains how consumption differs across Claude chat, Claude Code, and Cowork, and gives per-user dollar starting points for budgeting. Budget more for a coding seat than a chat seat: each Claude Code turn carries file contents, tool calls, and multi-step reasoning, so one debugging session can consume more than a day of chat.
+The [Claude Enterprise consumption guide](<https://support.claude.com/en/articles/14782391-claude-enterprise-consumption-guide>) is the planning reference for admins. It explains how consumption differs across Claude chat, Claude Code, and Cowork. Budget more for a coding seat than a chat seat: each Claude Code turn carries file contents, tool calls, and multi-step reasoning, so one debugging session can consume more than a day of chat.
### Claude Console
--- a/desktop.md
+++ b/desktop.md
@@ -12,7 +12,7 @@
apt or .deb for Ubuntu and Debian
-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>). After installing, launch Claude, sign in, and click the **Code** tab. For a walkthrough of your first session, see the [Get started guide](</docs/en/desktop-quickstart>). In the Code tab, each conversation is a **session** : it has its own chat history and project folder, independent of any other session. The sidebar lists your sessions and lets you run several in parallel. Within a session you can:
+For Windows ARM64, download the [ARM64 installer](<https://claude.ai/claude-code/desktop-download?platform=win-arm64&utm_source=claude_code&utm_medium=docs>). On Linux, install with apt; see [Claude Desktop on Linux](</docs/en/desktop-linux>). After installing, launch Claude, sign in, and click the **Code** tab. For a walkthrough of your first session, see the [Get started guide](</docs/en/desktop-quickstart>). In the Code tab, each conversation is a **session** : it has its own chat history and project folder, independent of any other session. The sidebar lists your sessions and lets you run several in parallel. Within a session you can:
* Review and comment on diffs, then watch the resulting PR through CI
* Preview your running app in the Browser pane while Claude verifies its own changes, and open external sites alongside it
@@ -514,7 +514,7 @@
## Extend Claude Code
-Connect external services, add reusable workflows, customize Claude’s behavior, and configure preview servers. To manage connectors, skills, and plugins in one place, click **Customize** or **Plugins** in the sidebar. [Cowork](<https://claude.com/product/cowork>) in the Desktop app sources its skills, plugins, and connectors from this configuration, which syncs through your claude.ai account, not from the CLI’s `~/.claude` directory. Claude Code also loads the skills and plugins enabled for your claude.ai account in terminal sessions where you sign in with the same account. See [Skills synced from claude.ai](</docs/en/skills#how-synced-skills-behave>) and [Plugins synced from claude.ai](</docs/en/plugins/loading#synced-plugins>).
+Connect external services, add reusable workflows, customize Claude’s behavior, and configure preview servers. To manage connectors, skills, and plugins in one place, click **Customize** or **Plugins** in the sidebar. [Cowork](<https://claude.com/product/cowork>) in the Desktop app sources its skills, plugins, and connectors from this configuration, which syncs through your claude.ai account, not from the CLI’s `~/.claude` directory. To find out where else the skills and plugins enabled for your claude.ai account load, see [Skills synced from claude.ai](</docs/en/skills#how-synced-skills-behave>) and [Plugins synced from claude.ai](</docs/en/plugins/loading#synced-plugins>).
### Connect external tools
@@ -544,7 +544,7 @@
To enable, disable, or uninstall plugins when the **+** menu shows **Plugins** , select **Plugins > Manage plugins**. In a local session, you can also click **Customize** or **Plugins** in the sidebar. You can scope plugins to your user account, a specific project, or local-only. If your organization manages plugins centrally, those plugins are available in desktop sessions the same way they are in the CLI, except the ones the desktop app [withholds under `disableSideloadFlags`](</docs/en/settings-reference#disablesideloadflags>).
-Plugins you install on your computer at user or local scope aren’t available in cloud sessions. See [What carries over from your setup](</docs/en/cloud-environments#what-carries-over-from-your-setup>). Plugins aren’t available in WSL sessions.
+Plugins you install on your computer at user or local scope aren’t available in cloud sessions. To use one there, see the **Cloud session** tab under [Install a plugin](</docs/en/plugins/install#install-a-plugin>). Plugins aren’t available in WSL sessions.
For the full plugin reference including creating your own plugins, see [plugins](</docs/en/plugins/overview>).
@@ -1843,7 +1843,7 @@
* **SSH sessions** : the session reads the managed settings file from the remote host. Desktop itself reads `sshConfigs`, `sshHostAllowlist`, `disableSshSavedPasswords`, and `disableDesktopLocalSessions` on the local machine. If you deliver more than one managed source, it reads them from [one by default](</docs/en/managed-settings#how-claude-code-combines-managed-sources>). If you set `permissions.disableBypassPermissionsMode` or `disableAutoMode` in the managed settings in force on the local machine, an SSH session’s mode selector doesn’t offer that mode, whatever the remote host sets.
* **[Cowork](<https://claude.com/docs/cowork/overview>) sessions**: in a Cowork session on this machine, Claude Code never fetches admin-console settings, even when the user signs in with a Team or Enterprise account, and reads policy deployed to the machine unless your Claude Desktop configuration sets `requireCoworkFullVmSandbox`. Remote Cowork sessions receive neither. See [where and when a policy applies](</docs/en/managed-settings#where-and-when-a-policy-applies>) for which device files reach Cowork, and [MCP permission rules](</docs/en/permissions#mcp>) for how `Bash` and `WebFetch` rules apply to Cowork’s tools.
-In local and SSH sessions, the desktop app delivers each user’s connected claude.ai connectors to Claude Code directly. No MCP setting or `managed-mcp.json` reaches those connectors, whichever settings source or file location you use. To block a connector’s tools in these sessions, use your organization’s [connector tool controls](</docs/en/mcp#organization-controls-on-connector-tools>). [How connectors reach Claude Code](</docs/en/mcp#how-connectors-reach-claude-code>) shows which settings govern connectors in each kind of session. `permissions.disableBypassPermissionsMode` and `disableAutoMode` also work in user and project settings, but placing them in managed settings prevents users from overriding them. For the permission, plugin, and delivery keys only a managed source can set, see [Keys only managed settings can set](</docs/en/managed-settings#managed-only-settings>).
+In local and SSH sessions, the desktop app delivers each user’s connected claude.ai connectors to Claude Code directly. No MCP setting or `managed-mcp.json` reaches those connectors, whichever settings source or file location you use. To block a connector’s tools in these sessions, use your organization’s [connector tool controls](</docs/en/mcp#organization-controls-on-connector-tools>). [How connectors reach Claude Code](</docs/en/mcp#how-connectors-reach-claude-code>) shows which settings govern connectors in each kind of session. To keep users from overriding `permissions.disableBypassPermissionsMode` or `disableAutoMode`, set it in managed settings. For the permission, plugin, and delivery keys only a managed source can set, see [Keys only managed settings can set](</docs/en/managed-settings#managed-only-settings>).
#### Claude Code settings that behave differently in the Code tab
--- a/desktop-quickstart.md
+++ b/desktop-quickstart.md
@@ -12,7 +12,7 @@
apt or .deb for Ubuntu and Debian
-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>).
+For Windows ARM64, download the [ARM64 installer](<https://claude.ai/claude-code/desktop-download?platform=win-arm64&utm_source=claude_code&utm_medium=docs>). On Linux, install with apt; see [Claude Desktop on Linux](</docs/en/desktop-linux>).
These cases are covered on other pages:
--- a/env-vars.md
+++ b/env-vars.md
@@ -223,7 +223,7 @@
`CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS`| Set to `1` to remove built-in commit and PR workflow instructions and the git status snapshot from Claude’s context. Useful when using your own git workflow skills. Takes precedence over the [`includeGitInstructions`](</docs/en/settings-reference#includegitinstructions>) setting when set
`CLAUDE_CODE_DISABLE_INLINE_SHELL_RM_PROMPT`| Set to `1` to stop Claude Code from reading scripts passed to a shell with `-c`, such as `bash -c 'rm -rf ~'`, for [critical-path](</docs/en/permission-modes#removals-inside-nested-commands-and-inline-scripts>) removals. Claude Code still checks the shell variable and positional parameter targets in those scripts, and 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.288 or later
`CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP`| Set to `1` to prevent automatic remapping of Opus 4 and Opus 4.1 to the current Opus version on the Anthropic API. The remap doesn’t run on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry
-`CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND`| Set to `1` so that Claude waits for the result of an [MCP task](</docs/en/mcp#make-claude-wait-for-the-result-of-an-mcp-task>) in an interactive session. While [automatic backgrounding](</docs/en/mcp#automatic-backgrounding-of-long-tool-calls>) is on, it still moves the call to the background after two minutes by default. Requires Claude Code v2.1.304 or later
+`CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND`| Set to `1` so that Claude waits for the result of an [MCP task](</docs/en/mcp#make-claude-wait-for-the-result-of-an-mcp-task>) in an interactive terminal session. While [automatic backgrounding](</docs/en/mcp#automatic-backgrounding-of-long-tool-calls>) is on, it still moves the call to the background after two minutes by default. Requires Claude Code v2.1.304 or later
`CLAUDE_CODE_DISABLE_MODEL_ACCESS_FALLBACK`| Set to `1` to stop Claude Code on [Amazon Bedrock](</docs/en/amazon-bedrock#when-a-model-is-disabled-mid-session>) and [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai#when-a-model-is-disabled-mid-session>) from switching to an older model when your account loses access to a session’s model mid-session; the refused request fails at once instead. A [fallback model chain](</docs/en/model-config#fallback-model-chains>) you configure still switches on that refusal, and the [startup model checks](</docs/en/amazon-bedrock#startup-model-checks>) still fall back at launch. Requires Claude Code v2.1.285 or later
`CLAUDE_CODE_DISABLE_MOUNTED_DRIVE_RM_PROMPT`| Set to `1` to turn off the [mounted drive prompt](</docs/en/permission-modes#the-mounted-drive-prompt>) for paths such as `/Volumes/USB`. Set it in the environment that launches Claude Code, because Claude Code [ignores it in a settings `env` block](</docs/en/settings-reference#variables-claude-code-ignores-in-env>). Requires Claude Code v2.1.304 or later
`CLAUDE_CODE_DISABLE_MOUSE`| Set to `1` to disable mouse tracking in [fullscreen rendering](</docs/en/fullscreen>). Keyboard scrolling with `PgUp` and `PgDn` still works. Use this to keep your terminal’s native copy-on-select behavior
@@ -303,7 +303,7 @@
`CLAUDE_CODE_MAX_TURNS`| Cap the number of agentic turns when no explicit limit is passed. Equivalent to passing [`--max-turns`](</docs/en/cli-reference#cli-flags>), which takes precedence when both are set. A value that is not a positive integer is rejected at startup with an error rather than treated as no cap
`CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION`| Cap on [WebSearch](</docs/en/tools-reference#session-search-limit>) calls (default: 200). When Claude reaches the cap, further WebSearch calls return a notice telling it to continue with the information it already gathered and say so in its answer. Accepts a positive whole number with no upper bound. Anything else is ignored and the default applies, so the cap can be raised but not turned off. Requires Claude Code v2.1.212 or later
`CLAUDE_CODE_MCP_ALLOWLIST_ENV`| Set to `1` to spawn stdio MCP servers with only a safe baseline environment plus the server’s configured `env`, instead of inheriting your shell environment
-`CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS`| Elapsed time in milliseconds before a still-running MCP tool call [moves to a background task](</docs/en/mcp#automatic-backgrounding-of-long-tool-calls>) (default: 120000, or 2 minutes). Set to `0` to turn automatic backgrounding off and, in an interactive session, to make Claude wait for [MCP tasks](</docs/en/mcp#make-claude-wait-for-the-result-of-an-mcp-task>). Requires Claude Code v2.1.212 or later
+`CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS`| Elapsed time in milliseconds before a still-running MCP tool call [moves to a background task](</docs/en/mcp#automatic-backgrounding-of-long-tool-calls>) (default: 120000, or 2 minutes). Set to `0` to turn automatic backgrounding off. In an interactive terminal session, `0` also makes Claude wait for [MCP tasks](</docs/en/mcp#make-claude-wait-for-the-result-of-an-mcp-task>). Requires Claude Code v2.1.212 or later
`CLAUDE_CODE_MCP_STARTUP_WAIT_MS`| How long in milliseconds the first turn of a [non-interactive](</docs/en/headless>) session waits for MCP servers that are still connecting, in place of the default [first-turn wait](</docs/en/agent-sdk/mcp#connection-timing>). In a [self-hosted environment](</docs/en/self-hosted-environments-configuration#connection-timing>), it changes only how long the wait lasts. Some servers keep a wait of their own regardless of the value; [Connection timing](</docs/en/agent-sdk/mcp#connection-timing>) lists them. Set to `0` to skip the wait for every other server. Requires Claude Code v2.1.274 or later
`CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT`| Idle timeout in milliseconds for MCP tool calls. When a stdio, HTTP, SSE, WebSocket, or [claude.ai connector](</docs/en/mcp#use-mcp-servers-from-claude-ai>) MCP server sends no response and no progress notification for this long, the tool call aborts with an error instead of waiting for the overall `MCP_TOOL_TIMEOUT`. Overrides the per-transport defaults of 300000 (5 minutes) for network servers and 1800000 (30 minutes) for stdio servers. Set to `0` to disable the idle check. Values below 1000 are raised to one second, and the value is capped at the effective `MCP_TOOL_TIMEOUT`. A per-server `timeout` in `.mcp.json` of at least 1000 raises that server’s idle window to at least the `timeout` value. Doesn’t apply to IDE servers or SDK in-process servers. Requires Claude Code v2.1.187 or later. Before v2.1.203, stdio servers were exempt from the idle timeout
`CLAUDE_CODE_MESSAGING_SOCKET`| Set by Claude Code, not by you: in sessions that bind an [inbox socket](</docs/en/cross-session-messaging#the-sessions-inbox-socket>), Claude Code exports that socket’s path to hooks and Bash commands when it binds the socket. In a session that starts with messaging on, Claude Code binds the socket before any hook runs. Other sessions on the machine deliver messages to this path. Each session exports its own socket rather than one inherited from a parent, and messages arriving on it go through the session’s [inbound controls](</docs/en/cross-session-messaging#control-inbound-messages>). Settings `env` blocks can’t set it. Requires Claude Code v2.1.224 or later
@@ -349,7 +349,7 @@
`CLAUDE_CODE_RESUME_INTERRUPTED_TURN_MAX_AGE_MS`| Maximum age in milliseconds of the last transcript message for a session that ended mid-turn to continue automatically on resume. When the last message is older than this bound, Claude Code skips the `CLAUDE_CODE_RESUME_INTERRUPTED_TURN` automatic resume and its `CLAUDE_CODE_RESUME_PROMPT` continuation message, and the session starts idle so you continue explicitly. Unset or `0` sets no bound, except that some turns resume only within six hours of their last message, such as one that ended with an API error. A positive value bounds every turn, including those; a negative or non-numeric value applies a one-hour bound. Spawn scripts for long-running agents can set this so a restart against an old transcript doesn’t re-run a stale prompt. Claude Code sets a one-hour bound itself when it restarts a crashed [agent view](</docs/en/agent-view>) session that inherited its conversation from an interactive session. Requires Claude Code v2.1.211 or later
`CLAUDE_CODE_RESUME_PROMPT`| Override the continuation message Claude Code sends to Claude when `CLAUDE_CODE_RESUME_INTERRUPTED_TURN` continues an interrupted turn instead of resending its prompt, or when you resume a [deferred tool call](</docs/en/hooks#defer-a-tool-call-for-later>) with `-p`. Defaults to `Continue from where you left off.`. An empty string uses the default
`CLAUDE_CODE_RESUME_SHOWS_CUT_OFF_CALLS`| Set to `1` to keep [interrupted tool calls](</docs/en/sessions#what-a-resumed-session-restores>), marked as cut off, in a turn that `CLAUDE_CODE_RESUME_INTERRUPTED_TURN` continues. When unset, those calls are dropped before the turn continues. Some calls stay dropped, such as calls to subagents, skills, workflows, and tools that wait on a person. For the VS Code chat panel, see [Continue conversations after a reload](</docs/en/vs-code#continue-conversations-after-a-reload>). Requires Claude Code v2.1.309 or later
-`CLAUDE_CODE_RETRY_WATCHDOG`| Set to `1` for unattended sessions such as eval harnesses, CI jobs, or remote workers. Retries `429` and `529` capacity errors indefinitely instead of failing after `CLAUDE_CODE_MAX_RETRIES` attempts. Claude Code fails at once when a standard-speed request gets a `429` that reports a spend limit or exhausted usage credits, even one from a [gateway spend cap](</docs/en/errors#spend-limit-reached>) that resets on a schedule. Before v2.1.239, the watchdog retried these indefinitely. For fast mode requests, see [Handle rate limits](</docs/en/fast-mode#handle-rate-limits>). The watchdog backs off up to 5 minutes between attempts, or until the limit resets when the response carries a rate-limit reset time, so a session that hits a usage limit waits out the remaining window. On v2.1.199 or later it also raises the default retry count for other transient errors, such as server errors, timeouts, and dropped connections, to 300, roughly three hours of backoff, and removes the cap of 15 on `CLAUDE_CODE_MAX_RETRIES` if you set that variable explicitly. Requires Claude Code v2.1.186 or later
+`CLAUDE_CODE_RETRY_WATCHDOG`| Set to `1` for unattended sessions. Keeps retrying `429` and `529` capacity errors past `CLAUDE_CODE_MAX_RETRIES`. Spend limits and exhausted usage credits [can end the retries](</docs/en/errors#when-the-retry-watchdog-stops-retrying>). See [retry limits](</docs/en/errors#tune-retry-behavior>) and [fast mode](</docs/en/fast-mode#handle-rate-limits>). Requires Claude Code v2.1.186 or later
`CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MS`| Maximum time in milliseconds that each API request spends waiting out `429` and `529` errors when `CLAUDE_CODE_RETRY_WATCHDOG` is set. Once that time is spent, the next such error ends the request. Give a positive whole number in plain digits, such as `1800000` for 30 minutes. When unset, the wait has no limit. Requires Claude Code v2.1.295 or later
`CLAUDE_CODE_RETRY_WATCHDOG_USAGE_LIMIT_RECHECK_MS`| Minimum interval in milliseconds between checks of whether a [usage limit](</docs/en/errors#youve-hit-your-session-limit>) was already lifted, while a request waits for that limit to reset with `CLAUDE_CODE_RETRY_WATCHDOG` set. When a check finds the limit lifted, the request goes out at once. Give a whole number in plain digits from `60000`, one minute, to `10800000`, three hours. Checks are made only for a claude.ai subscription’s session or weekly limit while usage credits aren’t in use, and not while `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set. When this variable is unset or its value is outside that range, no checks are made. Requires Claude Code v2.1.305 or later
`CLAUDE_CODE_SAFE_MODE`| Set to `1` to start in safe mode: 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, for troubleshooting a broken configuration. 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. Equivalent to passing [`--safe-mode`](</docs/en/cli-reference#cli-flags>). Directly spawned child processes inherit the variable
@@ -554,7 +554,8 @@
* 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
* Turn on the [You should know mod](</docs/en/interactive-mode#you-should-know-suggestions>)
* Use [the advisor tool](</docs/en/advisor#requirements>), except with Claude Code v2.1.300 or later on Claude Platform on AWS or [Claude Models on Google Cloud (Anthropic managed)](</docs/en/feature-availability#availability-by-model-provider>)
- * Use [MCP tasks](</docs/en/mcp#mcp-tasks-that-run-on-the-server>)
+ * Use [MCP tasks](</docs/en/mcp#requirements-for-mcp-tasks>) outside an interactive terminal session, or from a subagent
+ * Use [skills from MCP servers](</docs/en/mcp#use-skills-from-mcp-servers>)
* Have Claude read [another organization’s public artifact](</docs/en/artifacts#read-an-artifact-shared-with-you>)
* Get the [PowerShell tool](</docs/en/tools-reference#powershell-tool>) by default for claude.ai and Console accounts on Windows with Git Bash installed; Claude Code routes shell commands through Git Bash unless you set `CLAUDE_CODE_USE_POWERSHELL_TOOL=1`. On Windows without Git Bash, the tool stays on
* Get [Claude-drafted feedback](</docs/en/tools-reference#sendfeedback-tool-behavior>), which Claude Code turns on through a fetched flag
--- a/errors.md
+++ b/errors.md
@@ -318,6 +318,9 @@
`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
+`Failed to resolve base branch "HEAD"` / `Failed to resolve HEAD in <folder>`| [Run parallel sessions with worktrees](</docs/en/common-workflows#run-parallel-sessions-with-worktrees>)
+`points to a bare repository`| [Manage worktrees manually](</docs/en/worktrees#manage-worktrees-manually>)
+`Cannot use PR/MR #<number>`| Follow the fix in the message.
`Cannot switch renderers in this session`| Command-line errors
`Cannot switch renderers while work is running in the background`| Command-line errors
`Can't restart while work is running in the background`| Command-line errors
@@ -338,6 +341,7 @@
`Marketplace "<name>" is registered from an untrusted source`| Plugin errors
`Claude Code refuses the marketplace name "<name>"`| Plugin errors
`Marketplace name impersonates an official Anthropic/Claude marketplace`| Plugin errors
+`Can't use the marketplace name "<name>"`| [Reserved names](</docs/en/plugins/marketplace-reference#reserved-names>)
`Marketplace "<name>" is already added from a different source`| Plugin errors
`"<name>" is another spelling of "<reserved>", a reserved marketplace name`| Plugin errors
`Cannot add marketplace "<name>": Claude Code cannot install plugins from a marketplace with this name`| [Plugin troubleshooting](</docs/en/plugins/troubleshooting#cannot-install-plugins-from-a-marketplace-with-this-name>)
@@ -355,6 +359,8 @@
`does not load (...), so Claude Code ignores the whole file`| [Plugin troubleshooting](</docs/en/plugins/troubleshooting#does-not-load-so-claude-code-ignores-the-whole-file>)
`path escapes plugin directory`| Plugin errors
`path not read: <path> is absolute or has a ".." part`| Plugin errors
+`Plugin path not found: <path>`| Fix the plugin path you started the session with. For a plugin synced from claude.ai, restart Claude Code.
+`commands path not found: <path>`| [Plugin troubleshooting](</docs/en/plugins/troubleshooting#commands-path-not-found>)
`Plugin not loaded: its manifest <path> was not read`| Plugin errors
`path couldn't be checked` / `path could not be checked`| Plugin errors
`its marketplace entry path does not stay inside the marketplace directory`| Plugin errors
@@ -395,6 +401,7 @@
`Sandbox is required (sandbox.failIfUnavailable) and stopped being available in this session: <reason>`| [Sandboxing troubleshooting](</docs/en/sandboxing#commands-refused-with-sandbox-is-required>)
`pkill: refusing to run`| Tool errors
`Sandbox settings can't be changed here` / `Sandbox settings are overridden by a higher-priority configuration`| [Sandboxing troubleshooting](</docs/en/sandboxing#sandbox-settings-overridden>)
+`GH_HOST names a host other than github.com` / `GH_REPO names a host other than github.com`| Ask Claude to pass `--hostname <host>` on the `gh api` command, as in `gh api --hostname ghe.example.com repos/my-org/my-repo/pulls`. For `GH_REPO`, also have Claude replace the command’s `{owner}` and `{repo}` with real names.
`Failed to write to <name>'s inbox — nothing was sent`| Tool errors
`Failed to write the plan approval request to the lead's inbox — plan not submitted`| Tool errors
`Its agent definition was not restored: the folder its definition file came from is not trusted`| Tool errors
@@ -511,6 +518,7 @@
`Managed settings drop-in directory could not be read`| Configuration warnings
`Unable to read managed policy settings`| Configuration warnings
`Managed settings contain invalid entries, including PreToolUse/PermissionRequest hooks that are NOT loaded; fix or remove each entry:`| Configuration warnings
+`did not load, so nothing in them is in effect` / `These settings entries were skipped` in a `-p` run| [Broken settings in a `-p` run](</docs/en/settings#broken-settings-in-a-p-run>)
`otelHeadersHelper failed; telemetry is not being exported. See /status: ...`| Configuration warnings
`apply_flag_settings: nothing in this request was applied and earlier settings stay in force. Fix or remove these invalid settings and send it again`| [`applyFlagSettings()`](</docs/en/agent-sdk/typescript#applyflagsettings>)
`Invalid JSON provided to --settings` / `Invalid JSON provided to the settings option`| [`--settings` flag](</docs/en/cli-reference#cli-flags>) or [`settings` option](</docs/en/agent-sdk/typescript#options>)
@@ -597,8 +605,8 @@
Variable| Default| Effect
---|---|---
-[`CLAUDE_CODE_MAX_RETRIES`](</docs/en/env-vars>)| 10| Number of retry attempts. Capped at 15 as of v2.1.186; as of v2.1.199 `CLAUDE_CODE_RETRY_WATCHDOG` raises the default and removes the cap. Lower it to surface failures faster in scripts.
-[`CLAUDE_CODE_RETRY_WATCHDOG`](</docs/en/env-vars>)| unset| Set to `1` in unattended sessions such as CI jobs to retry `429` and `529` capacity errors indefinitely instead of failing after `CLAUDE_CODE_MAX_RETRIES` attempts. Claude Code fails at once when a standard-speed request gets a `429` that reports a spend limit or exhausted usage credits, even one from a gateway spend cap that resets on a schedule. Before v2.1.239, the watchdog retried these indefinitely. For fast mode requests, see [Handle rate limits](</docs/en/fast-mode#handle-rate-limits>). On v2.1.199 or later it also raises the default retry count for other transient errors, such as server errors, timeouts, and dropped connections, to 300, roughly three hours of backoff, and removes the cap of 15 on `CLAUDE_CODE_MAX_RETRIES` if you set that variable explicitly.
+[`CLAUDE_CODE_MAX_RETRIES`](</docs/en/env-vars>)| 10| Number of retry attempts, capped at 15. Lower it to surface failures faster in scripts. With `CLAUDE_CODE_RETRY_WATCHDOG` set on v2.1.199 or later, the cap doesn’t apply, and the default for transient errors other than capacity errors is 300.
+[`CLAUDE_CODE_RETRY_WATCHDOG`](</docs/en/env-vars>)| unset| Set to `1` in unattended sessions such as CI jobs to keep retrying `429` and `529` capacity errors past `CLAUDE_CODE_MAX_RETRIES`. For exceptions, see When the retry watchdog stops retrying. For fast mode requests, see [Handle rate limits](</docs/en/fast-mode#handle-rate-limits>).
[`CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MS`](</docs/en/env-vars>)| unset| Maximum time in milliseconds that each API request spends waiting out `429` and `529` errors when `CLAUDE_CODE_RETRY_WATCHDOG` is set. When unset, the wait has no limit. Requires Claude Code v2.1.295 or later.
`CLAUDE_CODE_RETRY_WATCHDOG_MAX_USAGE_LIMIT_WAIT_MS`| no cap| With `CLAUDE_CODE_RETRY_WATCHDOG` set, the longest time in milliseconds one request waits for your plan’s usage limit, such as the session or weekly limit, to reset. When the reset is further away than this cap, the request fails at once, unless usage credits have room or the API couldn’t check them. In those cases it’s retried, and fails if the cap passes before it succeeds. Requires Claude Code v2.1.301 or later.
[`CLAUDE_CODE_RETRY_WATCHDOG_USAGE_LIMIT_RECHECK_MS`](</docs/en/env-vars>)| unset| Minimum interval in milliseconds between checks of whether a usage limit was already lifted, while a request waits for that limit to reset with `CLAUDE_CODE_RETRY_WATCHDOG` set. When a check finds the limit lifted, the request goes out at once. Give plain digits from `60000` to `10800000`. When unset or outside that range, no checks are made. For when Claude Code skips these checks, see the [environment variables reference](</docs/en/env-vars>). Requires Claude Code v2.1.305 or later.
@@ -607,6 +615,16 @@
[`API_TIMEOUT_MS`](</docs/en/env-vars>)| 600000| Time in milliseconds that each request attempt has to receive its response headers. It doesn’t limit how long a streaming response runs after that. Raise it for slow networks or proxies. For how it caps the first-byte deadline, see No response from API.
[`CLAUDE_CODE_NONSTREAMING_TIMEOUT_RETRIES`](</docs/en/env-vars>)| unset| Limit on re-sends of a non-streaming request that times out. At the limit, the request fails. A response from Claude that takes longer than the timeout to generate times out again on every re-send, so set a low number such as `0` to fail sooner. For each attempt’s timeout, see How long a non-streaming attempt waits. Requires Claude Code v2.1.285 or later.
[`CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS`](</docs/en/env-vars>)| unset| Deadline in milliseconds for the first response byte of a streaming request. Requires Claude Code v2.1.242 or later. For how Claude Code picks the deadline when this is unset, see No response from API.
+
+#### When the retry watchdog stops retrying
+
+With `CLAUDE_CODE_RETRY_WATCHDOG` set, Claude Code stops retrying a request outside fast mode on responses such as these:
+
+ * **Spend limit** : a `429` for a usage-credit spend limit, or for a gateway spend cap that resets on a schedule.
+ * **Exhausted[usage credits](</docs/en/costs#add-usage-credits-to-your-subscription>)**: an out-of-credits `429` with no `anthropic-ratelimit-unified-overage-status` or `anthropic-ratelimit-unified-representative-claim` header.
+ * **Marked not retryable** : a `429` or `529` with the [`x-should-retry: false`](</docs/en/llm-gateway-protocol#response-headers>) header. Claude Code still retries the request when the API couldn’t check your usage credits.
+
+The spend limit and usage credit cases require Claude Code v2.1.239 or later. The `x-should-retry` case requires v2.1.311 or later.
#### How long a non-streaming attempt waits
@@ -3095,7 +3113,7 @@
### Skill, command, or hook over the 4,000,000-character limit
-A message with `more than 4,000,000 characters` means a skill, a command, or a [prompt or agent hook](</docs/en/hooks#prompt-and-agent-hook-fields>) didn’t run. If you pasted long text as arguments, save it to a file, run `/clear`, since the text stays in the conversation, then pass its path. If your `PreToolUse` prompt or agent hook is over the limit, a tool call that Claude makes directly isn’t blocked. Use a [command hook](</docs/en/hooks#command-hook-fields>), which has no such limit. For a call from code in Code Mode, see [Tool call refused by a hook](</docs/en/code-mode#tool-call-refused-by-a-hook>).
+A message with `more than 4,000,000 characters` means a skill, a command, or a [prompt or agent hook](</docs/en/hooks#prompt-and-agent-hook-fields>) didn’t run. If you pasted long text as arguments, save it to a file, run `/clear`, since the text stays in the conversation, then pass its path. If your `PreToolUse` prompt or agent hook is over the limit, a tool call that Claude makes directly isn’t blocked. Use a [command hook](</docs/en/hooks#command-hook-fields>), which has no such limit. For a call from code in Code Mode, see [Tool call ran after a hook failed](</docs/en/code-mode#tool-call-ran-after-a-hook-failed>).
### Input must be provided when using `--print`
@@ -3641,7 +3659,7 @@
* One of a plugin’s [default component locations](</docs/en/plugins/manifest-reference#standard-layout>), such as the `skills/` folder, the `monitors/monitors.json` file, or a [`SKILL.md` at the plugin root](</docs/en/plugins/components#skills>): the plugin’s other components still load
* The plugin’s own directory: nothing from that plugin loads
-You don’t see this error for a path that doesn’t exist at all. In `/plugin`, the error appears under the plugin and names the path and the code the operating system returned:
+In `/plugin`, the error names the path and the code the operating system returned:
skills path couldn't be checked: /home/user/my-plugin/skills (ELOOP)
--- a/events.md
+++ b/events.md
@@ -318,7 +318,7 @@
### Handle the settings hook events
-Settings hooks are the command, HTTP, prompt, and agent hooks you configure in settings files. Each [settings hook event](</docs/en/hooks#hook-events>), such as `Stop`, `SessionEnd`, or `PostToolUse`, is also an event named `classic.` followed by the settings hook event’s name, such as `classic.Stop`. `e` is the JSON a settings hook receives on stdin, including `transcript_path`. Where the [built-in guard](</docs/en/plugins/mods/admin#know-what-happens-by-default>) loads, [a hook on these events in a mod you install doesn’t run](</docs/en/plugins/mods/admin#hooks-the-guard-passes-over>). This hook uses `Stop`, which fires when Claude finishes responding, to log where the session’s transcript is saved:
+To handle a [settings hook event](</docs/en/hooks#hook-events>), add the `classic.` prefix to its name, as in `classic.Stop`. Where the [built-in guard](</docs/en/plugins/mods/admin#know-what-happens-by-default>) loads, [a hook on these events in a mod you install doesn’t run](</docs/en/plugins/mods/admin#hooks-the-guard-passes-over>). On `classic.PreToolUse`, `e` describes only the tool call: the tool’s name in `e.tool` and a built-in tool’s arguments as fields, such as `e.command` for Bash. On other events, `e` has the fields their settings hooks read from stdin. This hook uses `Stop`, which fires when Claude finishes responding, to log where the session’s transcript is saved:
on('classic.Stop', async ($, e, next) => {
// e has the same fields a Stop hook in a settings file reads from stdin
--- a/feature-availability.md
+++ b/feature-availability.md
@@ -60,7 +60,7 @@
[Fast mode](</docs/en/fast-mode>)| ✓ ([Owner-enabled](</docs/en/fast-mode#enable-fast-mode-for-your-organization>) on Team and Enterprise)| ✓ (Opus 5 and 4.8 need provisioning)| ✗| ✗| ✗| ✓ ([Fable 5.2, with conditions](</docs/en/fast-mode#use-fast-mode-on-agent-platform>))| ✗
[Auto mode](</docs/en/auto-mode-config>)| ✓| ✓| See note 2| ✓| ✓| See note 2| See note 2
[Advisor](</docs/en/advisor>)| ✓| ✓| ✗| ✓ (Claude Code v2.1.300 or later)| ✓ (Claude Code v2.1.300 or later)| ✗| ✗
-[Code Mode](</docs/en/code-mode>)| ✓ (experimental, [requirements apply](</docs/en/code-mode#requirements>))| ✓ (experimental, [requirements apply](</docs/en/code-mode#requirements>))| ✗| ✗| ✗| ✗| ✗
+[Code Mode](</docs/en/code-mode>)| ✓ (experimental, [requirements apply](</docs/en/code-mode#requirements>))| ✓ (experimental, [requirements apply](</docs/en/code-mode#requirements>))| ✓ (experimental, [requirements apply](</docs/en/code-mode#requirements>))| ✓ (experimental, [requirements apply](</docs/en/code-mode#requirements>))| ✓ (experimental, [requirements apply](</docs/en/code-mode#requirements>))| ✓ (experimental, [requirements apply](</docs/en/code-mode#requirements>))| ✓ (experimental, [requirements apply](</docs/en/code-mode#requirements>))
[Cross-session messaging](</docs/en/cross-session-messaging>)| ✓ 5| ✓ (same machine) 5| ✓ (same machine) 5| ✓ (same machine) 5| ✓ (same machine) 5| ✓ (same machine) 5| ✓ (same machine) 5
[Channels](</docs/en/channels>)| ✓| ✓| ✗| ✗| ✗| ✗| ✗
[GitHub Actions](</docs/en/github-actions>)| ✓| ✓| ✓| ✗| ✗| ✓| ✓
@@ -97,7 +97,7 @@
* Anthropic Console
-**Not available:** all features that require a Claude subscription, plus [web search](</docs/en/tools-reference#websearch-tool-behavior>), [fast mode](</docs/en/fast-mode>), [Advisor](</docs/en/advisor>), [Channels](</docs/en/channels>), [Code Mode](</docs/en/code-mode>), the [analytics dashboard](</docs/en/analytics>), [server-managed settings](</docs/en/server-managed-settings>), and the [`/design-sync` and `/import` commands](</docs/en/commands#all-commands>).**Partial support:**
+**Not available:** all features that require a Claude subscription, plus [web search](</docs/en/tools-reference#websearch-tool-behavior>), [fast mode](</docs/en/fast-mode>), [Advisor](</docs/en/advisor>), [Channels](</docs/en/channels>), the [analytics dashboard](</docs/en/analytics>), [server-managed settings](</docs/en/server-managed-settings>), and the [`/design-sync` and `/import` commands](</docs/en/commands#all-commands>).**Partial support:**
* [Desktop](</docs/en/desktop>): only via [Claude Desktop on 3P](<https://claude.com/docs/third-party/claude-desktop/overview>)
* [Auto mode](</docs/en/auto-mode-config>): Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5, and Fable models only
@@ -106,20 +106,20 @@
**Alternatives:** for scheduling, use [`/loop`](</docs/en/scheduled-tasks>) instead of `/schedule`. For cloud sessions, use [GitHub Actions](</docs/en/github-actions>) or [GitLab CI/CD](</docs/en/gitlab-ci-cd>). For web lookups, use the [WebFetch tool](</docs/en/tools-reference#webfetch-tool-behavior>) with a specific URL.
-**Not available:** all features that require a Claude subscription, plus [fast mode](</docs/en/fast-mode>), [Channels](</docs/en/channels>), [GitHub Actions](</docs/en/github-actions>), [Code Mode](</docs/en/code-mode>), the [analytics dashboard](</docs/en/analytics>), [server-managed settings](</docs/en/server-managed-settings>), and the [`/design-sync` and `/import` commands](</docs/en/commands#all-commands>).**Available here, not on Amazon Bedrock:** [web search](</docs/en/tools-reference#websearch-tool-behavior>), plus the [Advisor](</docs/en/advisor>) in Claude Code v2.1.300 or later.**Partial support:**
+**Not available:** all features that require a Claude subscription, plus [fast mode](</docs/en/fast-mode>), [Channels](</docs/en/channels>), [GitHub Actions](</docs/en/github-actions>), the [analytics dashboard](</docs/en/analytics>), [server-managed settings](</docs/en/server-managed-settings>), and the [`/design-sync` and `/import` commands](</docs/en/commands#all-commands>).**Available here, not on Amazon Bedrock:** [web search](</docs/en/tools-reference#websearch-tool-behavior>), plus the [Advisor](</docs/en/advisor>) in Claude Code v2.1.300 or later.**Partial support:**
* [Cross-session messaging](</docs/en/cross-session-messaging>): between your sessions on this machine only 5
**Alternatives:** for scheduling, use [`/loop`](</docs/en/scheduled-tasks>) instead of `/schedule`. For cloud sessions, use [GitLab CI/CD](</docs/en/gitlab-ci-cd>).
-**Not available:** all features that require a Claude subscription, plus [fast mode](</docs/en/fast-mode>), [Channels](</docs/en/channels>), [GitHub Actions](</docs/en/github-actions>), [Code Mode](</docs/en/code-mode>), the [analytics dashboard](</docs/en/analytics>), [server-managed settings](</docs/en/server-managed-settings>), and the [`/design-sync` and `/import` commands](</docs/en/commands#all-commands>).**Available here, not on Google Cloud (Google managed):** the [Advisor](</docs/en/advisor>) in Claude Code v2.1.300 or later.**Partial support:**
+**Not available:** all features that require a Claude subscription, plus [fast mode](</docs/en/fast-mode>), [Channels](</docs/en/channels>), [GitHub Actions](</docs/en/github-actions>), the [analytics dashboard](</docs/en/analytics>), [server-managed settings](</docs/en/server-managed-settings>), and the [`/design-sync` and `/import` commands](</docs/en/commands#all-commands>).**Available here, not on Google Cloud (Google managed):** the [Advisor](</docs/en/advisor>) in Claude Code v2.1.300 or later.**Partial support:**
* [Cross-session messaging](</docs/en/cross-session-messaging>): between your sessions on this machine only 5
* [Zero Data Retention](<https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#data-retention>): available on request. Contact your Anthropic account representative
**Alternatives:** for scheduling, use [`/loop`](</docs/en/scheduled-tasks>) instead of `/schedule`.
-If you set `CLAUDE_CODE_USE_VERTEX` to use Claude Code with Google Cloud’s Agent Platform, you’re on this provider.**Not available:** all features that require a Claude subscription, plus [Advisor](</docs/en/advisor>), [Channels](</docs/en/channels>), [Code Mode](</docs/en/code-mode>), the [analytics dashboard](</docs/en/analytics>), [server-managed settings](</docs/en/server-managed-settings>), and the [`/design-sync` and `/import` commands](</docs/en/commands#all-commands>).**Partial support:**
+If you set `CLAUDE_CODE_USE_VERTEX` to use Claude Code with Google Cloud’s Agent Platform, you’re on this provider.**Not available:** all features that require a Claude subscription, plus [Advisor](</docs/en/advisor>), [Channels](</docs/en/channels>), the [analytics dashboard](</docs/en/analytics>), [server-managed settings](</docs/en/server-managed-settings>), and the [`/design-sync` and `/import` commands](</docs/en/commands#all-commands>).**Partial support:**
* [Desktop](</docs/en/desktop>): via [managed settings](<https://claude.com/docs/third-party/claude-desktop/configuration>) or [Claude Desktop on 3P](<https://claude.com/docs/third-party/claude-desktop/overview>)
* [Web search](</docs/en/tools-reference#websearch-tool-behavior>): Opus 4, Sonnet 4, Haiku 4.5, and later models
@@ -130,7 +130,7 @@
**Alternatives:** for scheduling, use [`/loop`](</docs/en/scheduled-tasks>) instead of `/schedule`. For cloud sessions, use [GitHub Actions](</docs/en/github-actions>) or [GitLab CI/CD](</docs/en/gitlab-ci-cd>).
-**Not available:** all features that require a Claude subscription, plus [fast mode](</docs/en/fast-mode>), [Advisor](</docs/en/advisor>), [Channels](</docs/en/channels>), [GitLab CI/CD](</docs/en/gitlab-ci-cd>), [Code Mode](</docs/en/code-mode>), the [analytics dashboard](</docs/en/analytics>), [server-managed settings](</docs/en/server-managed-settings>), and the [`/design-sync` and `/import` commands](</docs/en/commands#all-commands>).**Partial support:**
+**Not available:** all features that require a Claude subscription, plus [fast mode](</docs/en/fast-mode>), [Advisor](</docs/en/advisor>), [Channels](</docs/en/channels>), [GitLab CI/CD](</docs/en/gitlab-ci-cd>), the [analytics dashboard](</docs/en/analytics>), [server-managed settings](</docs/en/server-managed-settings>), and the [`/design-sync` and `/import` commands](</docs/en/commands#all-commands>).**Partial support:**
* [Desktop](</docs/en/desktop>): only via [Claude Desktop on 3P](<https://claude.com/docs/third-party/claude-desktop/overview>)
* [Auto mode](</docs/en/auto-mode-config>): Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5, and Fable models only
@@ -153,6 +153,7 @@
[Cloud scheduled tasks](</docs/en/routines>)| ✓| ✓| ✓| ✓| ✓
[Remote Control](</docs/en/remote-control>)| ✓| ✓| ✓| Admin-enabled| Admin-enabled
[Channels](</docs/en/channels>)| ✓| ✓| ✓| Admin-enabled| Admin-enabled
+[Skills from MCP servers](</docs/en/mcp#requirements-for-skills-from-mcp-servers>)| ✓| ✓| ✓| Admin-enabled| Admin-enabled
[Computer use](</docs/en/computer-use>)| ✓| ✓| ✓| ✗| ✗
Dispatch ([Desktop](</docs/en/desktop#sessions-from-dispatch>))| Not available to new users| Not available to new users| Not available to new users| ✗| ✗
[Code Review](</docs/en/code-review>)| ✗| ✗| ✗| ✓| ✓
--- a/headless.md
+++ b/headless.md
@@ -144,7 +144,7 @@
claude -p "Explain recursion" --output-format stream-json --verbose --include-partial-messages
-The last line of the stream is a `result` message with the final response text, cost, and session metadata. If your consumer reads the stream slowly, Claude Code waits for the queued output to drain before exiting, scaling the wait with how much is still queued, capped at 30 seconds. The following example uses [jq](<https://jqlang.org/>) to filter for text deltas and display only the streaming text. The `-r` flag outputs raw strings (no quotes) and `-j` joins without newlines so tokens stream continuously:
+Find each [`result` message](</docs/en/agent-sdk/typescript#sdkresultmessage>) by `type`, because a message such as a task notification can follow a result and start another turn. A successful `result` message holds any final response text, the running cost total, and session metadata. If your consumer reads the stream slowly, Claude Code waits for the queued output to drain before exiting, scaling the wait with how much is still queued, capped at 30 seconds. The following example uses [jq](<https://jqlang.org/>) to filter for text deltas and display only the streaming text. The `-r` flag outputs raw strings (no quotes) and `-j` joins without newlines so tokens stream continuously:
claude -p "Write a poem" --output-format stream-json --verbose --include-partial-messages | \
jq -rj 'select(.type == "stream_event" and .event.delta.type? == "text_delta") | .event.delta.text'
@@ -273,6 +273,7 @@
Command support differs in `-p` mode:
* User-invoked [skills](</docs/en/skills>) and custom commands work. Include `/skill-name` in the prompt string and Claude Code expands it before running.
+ * [Skills from MCP servers](</docs/en/mcp#requirements-for-skills-from-mcp-servers>) aren’t supported.
* Built-in commands that only run in the terminal interface, such as `/login`, aren’t available.
* `/model`, `/effort`, `/fast`, `/color`, and `/rename` accept the value as an argument, for example `/model sonnet`, and `/mcp` with no argument prints a text summary of server status. These forms follow each command’s [availability notes](</docs/en/commands#all-commands>).
* To change a setting, pass `key=value` to `/config`, for example `/config verbose=true`.
--- a/install.md
+++ b/install.md
@@ -123,7 +123,7 @@
Your changes apply to open sessions without a restart. See [Manage plugins in VS Code](</docs/en/vs-code#manage-plugins>).
-Plugins you install on your computer at user or local scope aren’t available in a [cloud session](</docs/en/cloud-environments>), including one in [the browser at claude.ai/code](</docs/en/claude-code-on-the-web>). For plugins your organization distributes through managed settings, see [Manage plugins for your organization](</docs/en/plugins/org>).See [which parts of your setup are also available in a cloud session](</docs/en/cloud-environments#what-carries-over-from-your-setup>) for the rest of your setup.
+To use a plugin in a [cloud session](</docs/en/cloud-environments>), add it to your claude.ai account at [claude.ai/customize/plugins](<https://claude.ai/customize/plugins>), then start a new session. You can [pick a listed plugin, add a marketplace, or upload a plugin](<https://claude.com/docs/plugins/overview#find-and-add-a-plugin>). On Team and Enterprise plans, an [Owner](</docs/en/server-managed-settings#access-control>) controls which of these you can use. For a self-hosted environment, see [what differs on Amazon Bedrock or Google Cloud’s Agent Platform](</docs/en/self-hosted-environments-configuration#what-differs-from-sessions-on-the-anthropic-api>).Plugins you install on your computer at user or local scope aren’t available in cloud sessions. For plugins your organization distributes through managed settings, see [Manage plugins for your organization](</docs/en/plugins/org>). For the rest of your setup, see [What carries over from your setup](</docs/en/cloud-environments#what-carries-over-from-your-setup>).
### Choose an install scope
--- a/loading.md
+++ b/loading.md
@@ -90,9 +90,10 @@
### 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 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:
+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, cloud sessions, and 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
+ * **[Cloud sessions](</docs/en/claude-code-on-the-web>)** : they download when you start a session or Claude starts a thread in your [project](</docs/en/claude-projects>). For a self-hosted environment, see [what differs on Amazon Bedrock or Google Cloud’s Agent Platform](</docs/en/self-hosted-environments-configuration#what-differs-from-sessions-on-the-anthropic-api>)
* **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
#### Sync timing in cloud Cowork sessions
--- a/managed-settings.md
+++ b/managed-settings.md
@@ -141,6 +141,7 @@
* `allowAllClaudeAiMcps`
* `allowManagedMcpServersOnly`: a `true` in any admin source turns the MCP allowlist lock on. While the lock is on, the managed `allowedMcpServers` list comes from the highest-ranked admin source that sets one. A server-managed list replaces a lower source’s list rather than combining with it. If no admin source sets a list, every server that passes the denylist loads, unless parent settings supply a list. Without the lock, Claude Code reads `allowedMcpServers` from the managed source it applies, so under `"first-wins"` an unselected admin source’s list is ignored. Requires Claude Code v2.1.273 or later
* `deniedMcpServers` and [`disableClaudeAiConnectors`](</docs/en/settings-reference#disableclaudeaiconnectors>): an entry or a `true` in any admin source applies. Requires Claude Code v2.1.273 or later
+ * [`disableDirectMcpSkills`](</docs/en/settings-reference#disabledirectmcpskills>): a `true` in any admin source turns off skills from MCP servers other than claude.ai connectors. To turn them on, set `false` in the highest-ranked admin source you use. Claude Code ignores a `false` in the HKCU registry. Skills from MCP servers require Claude Code v2.1.331 or later
* The sandbox binary paths `sandbox.bwrapPath` and `sandbox.socatPath`
* The sandbox `ripgrep` binary, [`sandbox.ripgrep`](</docs/en/settings-reference#sandbox-ripgrep>)
* `sandbox.filesystem.disabled` and `sandbox.network.strictAllowlist`
@@ -338,6 +339,7 @@
[`blockedMarketplaces`](</docs/en/settings-reference#blockedmarketplaces>)| Blocklist of marketplace sources. Blocked sources are checked before downloading, so they never touch the filesystem. See [managed marketplace restrictions](</docs/en/plugins/org#restrict-what-users-can-install>)
[`channelsEnabled`](</docs/en/settings-reference#channelsenabled>)| Allow [channels](</docs/en/channels>) for the organization. See [enterprise controls](</docs/en/channels#enterprise-controls>) for the default on each plan
[`disableCommandPluginSources`](</docs/en/settings-reference#disablecommandpluginsources>)| When `true`, blocks [`command` plugin sources](</docs/en/plugins/marketplace-reference#command-plugin-source>) entirely, so the marketplace-declared command never runs. Also blocks marketplace [`headersHelper` commands](</docs/en/plugins/host-marketplace#authenticate-archive-downloads>), except for a marketplace that managed settings themselves declare. When unset, follows `allowManagedHooksOnly`. Requires Claude Code v2.1.229 or later, and the `headersHelper` block requires v2.1.238 or later
+[`disableDirectMcpSkills`](</docs/en/settings-reference#disabledirectmcpskills>)| Controls [skills from MCP servers other than claude.ai connectors](</docs/en/mcp#turn-on-skills-for-an-organization>). Set to `false` to turn them on for Team and Enterprise plans, or to `true` to turn them off. Skills from MCP servers require Claude Code v2.1.331 or later
[`disableSideloadFlags`](</docs/en/settings-reference#disablesideloadflags>)| Reject the `--plugin-dir`, `--plugin-url`, `--agents`, and `--mcp-config` flags at startup. In cloud sessions, Claude Code instead starts the session and drops the server-delivered `--mcp-config` servers, apart from the exceptions its [reference entry](</docs/en/settings-reference#disablesideloadflags>) lists. Requires Claude Code v2.1.193 or later
[`forceRemoteSettingsRefresh`](</docs/en/settings-reference#forceremotesettingsrefresh>)| When `true`, blocks CLI startup until remote managed settings are freshly fetched and exits if the fetch fails. See [fail-closed enforcement](</docs/en/server-managed-settings#enforce-fail-closed-startup>)
[`managedMcpServers`](</docs/en/settings-reference#managedmcpservers>)| Remote MCP servers provided to every user alongside their own. It provides servers rather than locking anything down. See [Provide servers through managed settings](</docs/en/managed-mcp#provide-servers-through-managed-settings>). Requires Claude Code v2.1.259 or later
--- a/monitoring-usage.md
+++ b/monitoring-usage.md
@@ -255,7 +255,7 @@
**`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
+ * A Read that returns anything other than file text, such as an image or a PDF
* 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 while it ran so that a waiting message could reach Claude. The result that arrives later isn’t recorded either. To learn when Claude Code moves a call, see [When Claude Code sends what you queued](</docs/en/interactive-mode#when-claude-code-sends-what-you-queued>) for the terminal and the [`priority` field](</docs/en/agent-sdk/typescript#sdkusermessage>) for Agent SDK sessions
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -208,7 +208,7 @@
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.
+ * **Interactive terminal sessions with bypass permissions available** : planning commands can run with neither the classifier nor a prompt. Skip all checks with bypassPermissions mode covers what still prompts 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.
@@ -234,7 +234,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. 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, Ultra, and Team plans. By default, the classifier doesn’t review recognized `rm` and `rmdir` critical-path removals, 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 lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run and blocks the ones it judges risky. It looks for actions that go beyond your request, target unrecognized infrastructure, or follow hostile content Claude read. 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, Ultra, and Team plans. By default, the classifier doesn’t review recognized `rm` and `rmdir` critical-path removals, 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.
@@ -407,7 +407,7 @@
### Boundaries you state in conversation
-The classifier treats boundaries you state in the conversation as a block signal. If you tell Claude “don’t push” or “wait until I review before deploying”, the classifier blocks matching actions it reviews even when the default rules would allow them. A boundary stays in force until you lift it in a later message. Claude’s own judgment that a condition was met does not lift it. Boundaries are not stored as rules. The classifier re-reads them from the transcript on each check, so a boundary can be lost if [context compaction](</docs/en/costs#reduce-token-usage>) removes the message that stated it. For a hard guarantee, add a [deny rule](</docs/en/permissions#permission-rule-syntax>) instead.
+The classifier treats boundaries you state in the conversation as a block signal. If you tell Claude “don’t push” or “wait until I review before deploying”, the classifier blocks matching actions it reviews even when the default rules would allow them. A boundary stays in force until you lift it in a later message. Claude’s own judgment that a condition was met does not lift it. Boundaries are not stored as rules. The classifier re-reads them from the transcript on each check, so a boundary can be lost if [context compaction](</docs/en/costs#reduce-token-usage>) removes the message that stated it. To keep the boundary from being lost, add a [deny rule](</docs/en/permissions#permission-rule-syntax>) instead.
### Approvals you state in conversation
@@ -510,7 +510,7 @@
* The [`isolatePeerMachines`](</docs/en/settings-reference#isolatepeermachines>) approval prompt for messages to your sessions beyond this machine still appears.
* When no [`crossSessionInbound`](</docs/en/cross-session-messaging#control-inbound-messages>) value applies, Claude Code holds an inbound message from another of your sessions for your approval, and delivers without asking only when the sending session identifies itself as also bypassing permission prompts. If you leave the permission mode while messages are held, Claude Code re-applies the inbound rules and delivers any held message they now accept.
-In interactive terminal sessions with bypass permissions available, Claude Code also doesn’t enforce plan mode’s blocks. Claude is still instructed to plan without editing, but a file edit or shell command it attempts during planning runs without prompting. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and recognized `rm` and `rmdir` critical-path removals still prompt. Plan mode keeps its blocks wherever Claude Code runs without an interactive terminal, including [non-interactive runs](</docs/en/headless>) with `-p`, [Agent SDK](</docs/en/agent-sdk/permissions#plan-mode-plan>) sessions, and conversations in the [VS Code extension](</docs/en/vs-code>)’s chat panel. There, `--allow-dangerously-skip-permissions` makes `bypassPermissions` selectable later.
+In interactive terminal sessions with bypass permissions available, don’t rely on plan mode’s blocks. A file edit or shell command Claude attempts during planning can run without prompting. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and recognized `rm` and `rmdir` critical-path removals still prompt. Plan mode keeps its blocks wherever Claude Code runs without an interactive terminal, including [non-interactive runs](</docs/en/headless>) with `-p`, [Agent SDK](</docs/en/agent-sdk/permissions#plan-mode-plan>) sessions, and conversations in the [VS Code extension](</docs/en/vs-code>)’s chat panel. There, `--allow-dangerously-skip-permissions` makes `bypassPermissions` selectable later.
Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system.
@@ -562,7 +562,7 @@
Mode| Protected-path writes
---|---
`default`, `acceptEdits`| Prompted
-`plan`| Allowed in interactive terminal sessions with bypass permissions available. Otherwise, routed to the classifier when auto mode is available during planning, and prompted when it isn’t
+`plan`| Can be allowed in interactive terminal sessions with bypass permissions available. Otherwise, routed to the classifier when auto mode is available during planning, and prompted when it isn’t
`auto`| Routed to the classifier, which decides
`dontAsk`| Denied
`bypassPermissions`| Allowed
--- a/pr-steward.md
+++ b/pr-steward.md
@@ -24,7 +24,7 @@
### Stop or limit PR Steward
-To stop PR Steward on one pull request, remove the `claude-pr-steward-watching` label or [comment `@claude stop`](</docs/en/pr-steward-pull-requests#start-or-stop-pr-steward-on-one-pull-request>). To turn off or limit PR Steward on the pull requests that you open later, go to [**PR Steward**](<https://claude.ai/settings/claude-code#pr-steward>) in **Settings > Code** or **Settings > Claude Code**.
+To stop PR Steward on one pull request, remove the `claude-pr-steward-watching` label or [comment `@claude stop`](</docs/en/pr-steward-pull-requests#start-or-stop-pr-steward-on-one-pull-request>). To turn off or limit PR Steward on the pull requests that you open later, go to [**PR Steward**](<https://claude.ai/settings/claude-code#pr-steward>) in **Settings > Code** on claude.ai.
## Decide whether PR Steward fits your team
--- a/pr-steward-pull-requests.md
+++ b/pr-steward-pull-requests.md
@@ -73,7 +73,7 @@
### Turn off or limit PR Steward on all your pull requests
-Go to [**PR Steward**](<https://claude.ai/settings/claude-code#pr-steward>) in **Settings > Code** or **Settings > Claude Code** on claude.ai and select how much PR Steward does on the pull requests that you open. To change the setting, you need a [connected GitHub account](</docs/en/web-quickstart#connect-github>).
+Go to [**PR Steward**](<https://claude.ai/settings/claude-code#pr-steward>) in **Settings > Code** on claude.ai and select how much PR Steward does on the pull requests that you open. To change the setting, you need a [connected GitHub account](</docs/en/web-quickstart#connect-github>).
Option| What PR Steward does on your pull requests
---|---
@@ -88,7 +88,7 @@
To tell PR Steward what to work on, for every pull request that you open, use the toggles in your settings. A repository’s `.claude/skills/steward/SKILL.md` can say something else, so see which instructions take priority.
- 1. Go to [**PR Steward**](<https://claude.ai/settings/claude-code#pr-steward>) in **Settings > Code** or **Settings > Claude Code** on claude.ai
+ 1. Go to [**PR Steward**](<https://claude.ai/settings/claude-code#pr-steward>) in **Settings > Code** on claude.ai
2. For **How much should Steward do on its own?** , select **Customize**
3. Turn off the toggle for each thing that you don’t want PR Steward to do. Each toggle is on until you turn it off:
* **Failing CI and merge conflicts**
@@ -105,7 +105,7 @@
### Save PR Steward instructions for every pull request you open
-To give PR Steward the same instructions on every pull request that you open, go to [**PR Steward**](<https://claude.ai/settings/claude-code#pr-steward>) in **Settings > Code** or **Settings > Claude Code** on claude.ai. Under **My instructions for Steward** , enter up to 1,000 characters. These instructions ask for small commits and no replies to reviewers:
+To give PR Steward the same instructions on every pull request that you open, go to [**PR Steward**](<https://claude.ai/settings/claude-code#pr-steward>) in **Settings > Code** on claude.ai. Under **My instructions for Steward** , enter up to 1,000 characters. These instructions ask for small commits and no replies to reviewers:
Keep commits small.
Don't reply to reviewers for me.
--- a/pr-steward-setup.md
+++ b/pr-steward-setup.md
@@ -99,7 +99,9 @@
### Choose when PR Steward starts in each repository
-On the **Claude Ship** page, click **Edit** beside a repository and set **Steward** :
+On the **Claude Ship** page, click **Edit** beside a repository and open the **Steward** menu:
+
+Select when you want PR Steward to start:
Option| When PR Steward starts
---|---
@@ -120,7 +122,7 @@
### See what PR Steward spent
-To see the average for each merged pull request, open a repository’s **Edit** dialog. For your organization’s total over the last 30 days, go to [claude.ai/analytics/pr-steward](<https://claude.ai/analytics/pr-steward>).
+To see a repository’s estimated spend on PR Steward, open its **Edit** dialog. For your organization’s estimated total over the last 30 days, go to [claude.ai/analytics/pr-steward](<https://claude.ai/analytics/pr-steward>).
### Set PR Steward’s spend limits
@@ -147,6 +149,32 @@
In a self-hosted environment, PR Steward doesn’t load a `CLAUDE.md` or rules file from the runner or from the runner’s checkout of the pull request. It doesn’t load a [managed `CLAUDE.md`](</docs/en/memory#deploy-organization-wide-claude-md>). Put what PR Steward should follow [on the repository’s default branch](</docs/en/pr-steward-pull-requests#save-pr-steward-instructions-for-everyone-in-a-repository>).
+### Give PR Steward credentials from a Claude Tag bundle
+
+To give PR Steward a credential, such as a login for a private package registry, keep it in a [Claude Tag bundle](<https://claude.com/docs/claude-tag/concepts/glossary#bundle>) and turn on the bundle for PR Steward. PR Steward can use a bundle when it runs in an Anthropic-hosted environment, which is any environment other than a self-hosted one. To put a credential in a bundle, [set up Claude Tag](<https://claude.com/docs/claude-tag/admins/setup-overview>) and [create a bundle](<https://claude.com/docs/claude-tag/admins/add-connections#create-a-bundle>).
+
+PR Steward works unattended and [reads pull request text that other people write](</docs/en/pr-steward-security#pr-steward%E2%80%99s-session-environment>), which could steer how it uses a credential. [Limit each credential](<https://claude.com/docs/claude-tag/admins/add-connections#limit-access-to-specific-resources>) to the hosts and permissions that building and testing your code needs.
+
+To turn on the bundle for PR Steward:
+
+1
+
+Open the bundle
+
+Go to [**Organization settings > Claude Tag**](<https://claude.ai/admin-settings/claude-tag>), select the **Bundles** tab, and open the bundle.
+
+2
+
+Turn on PR Steward for the bundle
+
+Under **Where it applies** , turn on the switch in the **PR Steward** row and click **Save changes**.
+
+The bundle is then on for PR Steward across your organization, and the switch covers every credential in the bundle. An install or a test in a PR Steward session can fail with a 403 that starts with this text:
+
+ denied by policy: this host's bundle of logins and rules isn't turned on for PR Steward
+
+If PR Steward needs that host to build or test your code, turn on the **PR Steward** switch for the bundle that holds the host’s credential. That can be a bundle with **Everywhere** turned on, because the two switches are separate. If the bundle holds more than PR Steward needs, [create a bundle](<https://claude.com/docs/claude-tag/admins/add-connections#create-a-bundle>) with that credential alone, and turn on PR Steward for that one.
+
## Turn off PR Steward
When you turn off PR Steward, new starts stop. It keeps working for a time on pull requests that already have the `claude-pr-steward-watching` label. When you turn it off for one author, that time can be about a week. To stop PR Steward there as well, first remove the label from the pull requests that the change covers. Then turn off PR Steward on the **Claude Ship** page:
--- a/python.md
+++ b/python.md
@@ -828,7 +828,7 @@
)
* [`API_TIMEOUT_MS`](</docs/en/env-vars>): how long each request attempt can wait for response headers, in milliseconds. It doesn’t limit how long a streaming response runs after the headers arrive. Default `600000`. Applies to the main loop and all subagents.
- * `CLAUDE_CODE_MAX_RETRIES`: maximum API retries. Default `10`, capped at `15`. Each retry gets its own `API_TIMEOUT_MS` window. For unattended runs that need to wait through longer outages, set [`CLAUDE_CODE_RETRY_WATCHDOG=1`](</docs/en/errors#tune-retry-behavior>): it retries transient capacity errors indefinitely and, on Claude Code v2.1.199 or later, raises the default for other transient errors to `300` and removes the cap on this variable.
+ * `CLAUDE_CODE_MAX_RETRIES`: maximum API retries. Default `10`, capped at `15`. Each retry gets its own `API_TIMEOUT_MS` window. For unattended runs that need to wait through longer outages, set [`CLAUDE_CODE_RETRY_WATCHDOG=1`](</docs/en/errors#tune-retry-behavior>) to keep retrying transient capacity errors. With `CLAUDE_CODE_RETRY_WATCHDOG` set on v2.1.199 or later, the cap doesn’t apply, and the default for other transient errors is `300`.
* `CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS`: stall watchdog for subagents. While the stream watchdog is on, the default is `CLAUDE_STREAM_IDLE_TIMEOUT_MS` plus 5 minutes, which comes to `600000` unless you raise that variable. With the stream watchdog off, the default is `600000`. Before v2.1.257, the default was always `600000`. The timer resets on each stream event. On a stall, Claude Code aborts the subagent and reports the stall to the parent. For a background subagent, it also marks the task failed and attaches any partial result.
* `CLAUDE_ENABLE_STREAM_WATCHDOG` with `CLAUDE_STREAM_IDLE_TIMEOUT_MS`: stream watchdog that aborts the request when headers have arrived but the response body stops streaming. The watchdog is on by default for all providers; set `CLAUDE_ENABLE_STREAM_WATCHDOG=0` to disable it. `CLAUDE_STREAM_IDLE_TIMEOUT_MS` defaults to `300000` and is clamped to that minimum. After the abort, [Automatic retries](</docs/en/errors#automatic-retries>) covers what Claude Code does, based on how far the response had progressed. While the watchdog waits out a response that a gateway behind `ANTHROPIC_BASE_URL` holds open with keep-alive pings, a host that sets `include_partial_messages` keeps receiving `ping` `StreamEvent` messages. Read those frames as liveness rather than timing the session out on silence. Before v2.1.257, the frames stopped 5 minutes after the last real stream event.
--- a/reference.md
+++ b/reference.md
@@ -132,7 +132,7 @@
`session.end`| The session ends, or `/clear`, `/resume`, or `/branch` runs. `e.reason` is `clear`, `resume`, `logout`, `prompt_input_exit`, or `other`. `/branch` reports `resume`.| `next(e)`
`session.compact`| The conversation is about to be compacted| `{ skip: reason }`
[`session.receive`](</docs/en/plugins/mods/api#send-and-receive-messages-between-sessions>), [`session.send`](</docs/en/plugins/mods/api#send-and-receive-messages-between-sessions>)| A message arrives from, or is about to go to, another agent or session. See [Send and receive messages between sessions](</docs/en/plugins/mods/api#send-and-receive-messages-between-sessions>).| `{ consumed: reason }` for `receive`, `{ isDelivered: false, reason }` for `send`
-`session.append`| Once for each row the conversation keeps, such as a prompt, a response block, a tool result, or a notice, before it’s stored| `next({ ...e, message })` with a changed `message.content`, to rewrite the row’s text blocks or the `content` of a `tool_result` block in it
+`session.append`| Once for each row the conversation keeps, such as a prompt, a response block, a tool result, or a notice, before it’s stored| `next({ ...e, message })` with a changed `message.content`, to rewrite the row’s text blocks or the `content` of a `tool_result` block in it. You can’t rewrite a row that holds a [skill from an MCP server](</docs/en/mcp#use-skills-from-mcp-servers>). To change that skill’s text, hook `skill.prompt` instead.
`session.attach`, `session.detach`| Another app connects to or disconnects from the session| `next(e)`
`session.measure`| After each turn, and when a plan limit’s percent used changes| `next(e)`
`session.stop`| The user stops Claude, such as with Esc during a turn. Requires Claude Code v2.1.326 or later.| `next(e)`
@@ -185,7 +185,7 @@
### Settings hook events
-Each [settings hook event](</docs/en/hooks#hook-events>) is an event named `classic.<Event>`, such as `classic.Stop` or `classic.PostToolUse`. `e` is the hook’s stdin JSON.
+Each [settings hook event](</docs/en/hooks#hook-events>) is an event named `classic.<Event>`, such as `classic.Stop`. For the fields on `e`, see [Handle the settings hook events](</docs/en/plugins/mods/events#hook-the-settings-hook-events>).
### Mods API calls
--- a/remote-control.md
+++ b/remote-control.md
@@ -58,7 +58,7 @@
Press `w` at runtime to toggle between `same-dir` and `worktree`. The mode you switch to becomes the default for this project.
`--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.
+`--permission-mode <mode>`| Set the starting [permission mode](</docs/en/permission-modes>), such as `acceptEdits`. Accepts `manual` as an alias for `default`; an unrecognized mode stops the server at startup and lists the valid modes.
`--settings <file>`| Apply a JSON settings file to the server’s sessions, at the same [precedence](</docs/en/settings#settings-precedence>) as `claude --settings`. Give a file path, not a JSON string. Requires Claude Code v2.1.321 or later.
`--chrome` / `--no-chrome`| Turn [Chrome integration](</docs/en/chrome>) on or off in the sessions the server creates, so Claude can use Chrome on your machine while you work from another device. Without either flag, the session the server pre-creates and any session you start yourself from claude.ai/code or the Claude app begin with Chrome off, even if you [enabled Chrome by default](</docs/en/chrome#enable-chrome-by-default>). A session the server starts for one of your [project](</docs/en/claude-projects>) threads follows that setting instead, except in `bypassPermissions` mode. Requires Claude Code v2.1.273 or later.
`-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.
@@ -304,7 +304,7 @@
* Text-output commands: `/compact`, `/clear`, `/context`, `/usage`, `/exit`, `/usage-credits`, `/recap`, and `/reload-plugins`. `/usage-credits` replies in text, such as where to manage usage credits. `/reload-plugins` works only when the session runs in an interactive terminal; a session without one declines it.
* `/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 when the session runs in an interactive terminal. `/mcp reconnect` with no server name retries every server that has failed or needs authentication. To authorize a claude.ai connector without the picker, see Authorize a connector again from your shell.
- * `/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 **Settings > Code** or **Settings > Claude Code** instead.
+ * `/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 **Settings > Code** instead.
* If you’re a Team or Enterprise member without billing access, `/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.
--- a/self-hosted-environments-configuration.md
+++ b/self-hosted-environments-configuration.md
@@ -499,7 +499,7 @@
A session that sends model requests to Amazon Bedrock or Google Cloud’s Agent Platform differs from a session on the Anthropic API in these ways:
* **Policy from claude.ai** : [server-managed settings](</docs/en/server-managed-settings>) don’t reach these sessions. Neither do the organization policies an Owner sets in Claude Code admin settings, so Claude Code doesn’t enforce them inside the session. Put the rules you rely on in the runner image’s [managed settings file](</docs/en/managed-settings#delivery-mechanisms>).
- * **Account skills** : these sessions don’t download the skills enabled for a person’s claude.ai account. See How each session’s config is assembled.
+ * **Account skills and plugins** : these sessions don’t download the skills or plugins enabled for a person’s claude.ai account. See How each session’s config is assembled.
* **Files** : files that people attach to a session in claude.ai or the mobile or desktop app don’t reach it, and Claude can’t send files back with the [`SendUserFile` tool](</docs/en/tools-reference>). Put input files in the repository or on the runner instead.
* **Model selection** : Anthropic’s control plane sends each session’s model, and when a session starts without one, Claude Code uses its default for the provider. You can’t choose the model with `ANTHROPIC_MODEL` or `ANTHROPIC_DEFAULT_MODEL` in the runner’s environment, but you can pin what an alias resolves to:
* **`ANTHROPIC_MODEL` and `ANTHROPIC_DEFAULT_MODEL`**: the runner removes them from the environment it passes to sessions, even though the provider pages’ examples set `ANTHROPIC_MODEL`.
@@ -747,7 +747,7 @@
* **`--capacity 1`, the default, with the built-in checkout**: the session starts in the first repository in its list of repositories. That repository’s `.claude/settings.json` takes effect as project settings and its `.mcp.json` loads, and the other repositories’ don’t.
* **A`--capacity` above one, or a `checkout` hook**: the session starts in a per-session directory that contains the checkouts. No repository’s `.claude/settings.json` takes effect as project settings, no repository’s `.mcp.json` loads, and [`$CLAUDE_PROJECT_DIR`](</docs/en/hooks#reference-scripts-by-path>) in a hook command is that directory, not a checkout.
-Each repository’s `CLAUDE.md` loads wherever the session starts. Outside a project thread, its skills load too. The runner passes every repository to Claude Code as an [additional directory](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>), so outside a project thread, Claude Code also reads the `enabledPlugins` and `extraKnownMarketplaces` keys from each repository’s `.claude/settings.json`. If you start the runner with [`--trust-workspace false`](</docs/en/self-hosted-environments-reference#runner-cli-flags>), Claude Code skips both keys. Skipping `enabledPlugins` requires Claude Code v2.1.323 or later. To run a hook or apply a permission rule in every session, put it in `~/.claude/settings.json` on the runner host. The runner seeds the host file into every session, wherever the session starts. Write a path in a `Read` or `Edit` rule as a `//` absolute or `~/` home-relative [pattern](</docs/en/permissions#read-and-edit>), because other patterns anchor at the settings source or the current directory.
+Each repository’s `CLAUDE.md` loads wherever the session starts. Outside a project thread, its skills load too. The runner passes every repository to Claude Code as an [additional directory](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>). Outside a project thread, the `enabledPlugins` and `extraKnownMarketplaces` keys can also come from each repository’s `.claude/settings.json`. If you start the runner with [`--trust-workspace false`](</docs/en/self-hosted-environments-reference#runner-cli-flags>), Claude Code skips both keys. Skipping `enabledPlugins` requires Claude Code v2.1.323 or later. To run a hook or apply a permission rule in every session, put it in `~/.claude/settings.json` on the runner host. The runner seeds the host file into every session, wherever the session starts. Write a path in a `Read` or `Edit` rule as a `//` absolute or `~/` home-relative [pattern](</docs/en/permissions#read-and-edit>), because other patterns anchor at the settings source or the current directory.
### Repository-committed permission rules
--- a/server-managed-settings.md
+++ b/server-managed-settings.md
@@ -156,7 +156,7 @@
### Per-key exceptions across managed sources
-These keys are exceptions to the no-merge rule:
+By default, Claude Code reads most keys from one managed source. Exceptions include:
* **Cross-source lock keys** : a small set of keys, such as the sandbox allowlist locks, [listed on the managed settings page](</docs/en/managed-settings#precedence-within-the-managed-tier>). Claude Code honors them when any admin-controlled managed source sets them; the user-writable HKCU registry tier is excluded. When a [`policyHelper`](</docs/en/settings-reference#policyhelper>) supplies managed settings, its output is the only source these checks read, apart from [`forceRemoteSettingsRefresh`](</docs/en/settings-reference#forceremotesettingsrefresh>), which Claude Code reads from the admin sources directly at startup.
* **The`env` block**: apart from the telemetry unit and routing variables paired with a credential key, both covered below, it merges per key across the admin-controlled sources. For each environment variable, the highest-priority source defining it wins, and lower admin sources fill in variables the higher sources leave unset. An endpoint-managed `env` entry therefore applies whenever the server-managed configuration leaves that variable unset, or while a cached server value for it is withheld pending server confirmation. Requires Claude Code v2.1.223 or later. Before v2.1.223, Claude Code applies the selected source’s whole `env` block only.
--- a/settings.md
+++ b/settings.md
@@ -143,7 +143,19 @@
* **Managed settings** : Claude Code keeps enforcing the rest of the file. [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 until you fix them. For a managed settings document that isn’t valid JSON, see [Managed settings document could not be parsed](</docs/en/errors#managed-settings-document-could-not-be-parsed>).
* **Configuration error** : [`~/.claude.json`](</docs/en/claude-directory#ce-claude-json>) can’t be parsed. A `claude -p` run exits. See [Configuration error in ~/.claude.json](</docs/en/errors#configuration-error-in-claude-json>) to restore an earlier copy. Claude Code copies the broken file to `~/.claude/backups/.claude.json.corrupted.<timestamp>`, and in an interactive session asks whether to exit and fix it or reset to the default configuration. When the file is blank and there’s no backup to restore, Claude Code starts with default settings.
-After you continue, run `/status` to see the affected files and `claude doctor` for the details of each error. A `-p` run shows no dialog. Unless [a managed settings document can’t be parsed](</docs/en/errors#managed-settings-document-could-not-be-parsed>), Claude Code skips a broken user, project, or local file or its broken values and continues with the rest. After a `-p` run that ignores a setting, run `claude doctor` from your terminal to see what it dropped.
+After you continue, run `/status` to see the affected files and `claude doctor` for the details of each error.
+
+#### Broken settings in a `-p` run
+
+A `-p` run shows no dialog. Unless [a managed settings document can’t be parsed](</docs/en/errors#managed-settings-document-could-not-be-parsed>), Claude Code skips a broken user, project, or local file or its broken values and continues with the rest. With the default `text` [output format](</docs/en/headless#get-structured-output>), stderr lists what didn’t load or was skipped:
+
+ These settings did not load, so nothing in them is in effect, including hooks, permission rules and sandbox settings, though environment variables they already set can stay:
+ /home/you/.claude/settings.json (cleanupPeriodDays): Expected number, but received string
+ These settings entries were skipped; the rest of each source is in effect:
+ /home/you/app/.claude/settings.json (permissions.allow): Invalid permission rule "Bash(ls) x" was skipped: Malformed Tool(content) rule. Rules take the form Tool or Tool(content) and must end at the closing ")"; parentheses inside the content are literal
+ Fix each problem listed, then start Claude Code again. For settings sent with applyFlagSettings, shown as SDK inline settings, send them again instead.
+
+After a `-p` run that ignores a setting, run `claude doctor` from your terminal to see what it dropped.
## Settings precedence
@@ -250,7 +262,7 @@
* **Shared project settings with several repositories** : in an Anthropic-hosted environment, a session with several repositories starts above the clones and reads only the `enabledPlugins` and `extraKnownMarketplaces` keys from each repository’s `.claude/settings.json`, not permission rules, hooks, `env`, or other keys. The marketplaces a repository declares still [aren’t added in a cloud session](</docs/en/cloud-environments#what-carries-over-from-your-setup>). For a self-hosted environment, see [which repository’s settings apply](</docs/en/self-hosted-environments-configuration#repository-settings-in-sessions-with-several-repositories>).
* **User and project local settings** (`~/.claude/settings.json` and `.claude/settings.local.json`): not read. Both stay on your machine, and the local file isn’t in the clone.
* **Managed settings** : a `managed-settings.json` file or MDM profile on your device doesn’t reach a cloud session. Your organization’s [server-managed settings](</docs/en/server-managed-settings>) do; [surface coverage](</docs/en/model-config#surface-coverage>) lists which cloud sessions receive them. A [self-hosted environment](</docs/en/self-hosted-environments>) also reads the managed settings file in its runner image. [How Claude Code combines managed sources](</docs/en/managed-settings#how-claude-code-combines-managed-sources>) says when that file applies.
- * **`/config`** : in your browser at claude.ai/code, opens your claude.ai **Code** or **Claude Code** settings page instead of changing a value. To change a setting for a cloud session, set an [environment variable](</docs/en/cloud-environments#set-environment-variables>) on the environment. In a session with one repository outside a project’s threads, you can instead commit the key to that repository’s `.claude/settings.json`.
+ * **`/config`** : in your browser at claude.ai/code, opens **Settings > Code** instead of changing a value. To change a setting for a cloud session, set an [environment variable](</docs/en/cloud-environments#set-environment-variables>) on the environment. In a session with one repository outside a project’s threads, you can instead commit the key to that repository’s `.claude/settings.json`.
[What carries over from your setup](</docs/en/cloud-environments#what-carries-over-from-your-setup>) lists the rest: `CLAUDE.md`, skills, MCP servers, plugins, and credentials.
--- a/settings-reference.md
+++ b/settings-reference.md
@@ -73,6 +73,7 @@
`disableCommandPluginSources`| Block [plugins](</docs/en/plugins/overview>) that install by running a marketplace-declared command| Plugins and skills| Managed
`disableDeepLinkRegistration`| Stop Claude Code from registering the [`claude-cli://` handler](</docs/en/deep-links>)| Remote, desktop, and notifications| Any file
`disableDesktopLocalSessions`| Turn off [Desktop Code sessions](</docs/en/desktop#local-sessions-on-managed-devices>) that run on the device, leaving SSH to other hosts and cloud| Remote, desktop, and notifications| Managed
+`disableDirectMcpSkills`| Turn [skills from MCP servers](</docs/en/mcp#turn-on-skills-for-an-organization>) other than connectors on or off for your organization| MCP| Managed
`disabledMcpjsonServers`| Reject specific servers from a project’s [`.mcp.json`](</docs/en/mcp#project-scope>)| MCP| Any file
`disableMobileSimulatorTools`| Block Claude’s tools in the [desktop](</docs/en/desktop>) iOS Simulator pane| Tools| Managed
`disableRemoteControl`| Turn off [Remote Control](</docs/en/remote-control>) everywhere it can start| Remote, desktop, and notifications| Any file
@@ -3969,7 +3970,7 @@
### `strictPluginOnlyCustomization.skills`
-Lock the `skills` surface. Claude Code stops loading skills from `~/.claude/skills/` and `.claude/skills/`, custom commands from `~/.claude/commands/` and `.claude/commands/`, skills and commands under `--add-dir` directories, and skills synced from your claude.ai account. It keeps loading bundled skills, skills in the managed policy directory, and skills from plugins other than [skills-directory plugins](</docs/en/plugins/loading#skills-directory-plugins-blocked-by-managed-settings>).
+Lock the `skills` surface. Claude Code stops loading skills from `~/.claude/skills/` and `.claude/skills/`, custom commands from `~/.claude/commands/` and `.claude/commands/`, skills and commands under `--add-dir` directories, and skills synced from your claude.ai account. It keeps loading bundled skills, skills in the managed policy directory, and skills from plugins other than [skills-directory plugins](</docs/en/plugins/loading#skills-directory-plugins-blocked-by-managed-settings>). With the lock on, [skills from MCP servers](</docs/en/mcp#use-skills-from-mcp-servers>) that users, projects, and `--mcp-config` add don’t load. Skills from claude.ai connectors still load.
* **Scope** : `Managed`
* **Type** : the string `"skills"` in the `strictPluginOnlyCustomization` array
@@ -4310,6 +4311,26 @@
The denylist takes precedence over `allowedMcpServers`, so a server on both lists is blocked. See [Policy-based control with allowlists and denylists](</docs/en/managed-mcp#policy-based-control-with-allowlists-and-denylists>).
+### `disableDirectMcpSkills`
+
+Turn [skills from MCP servers](</docs/en/mcp#turn-on-skills-for-an-organization>) on or off for your organization. This key covers every server except claude.ai connectors. For connectors, an Owner uses the **Skills over MCP** switch in [**Organization settings > Connectors**](<https://claude.ai/admin-settings/connectors>) instead. Skills from MCP servers require Claude Code v2.1.331 or later.
+
+ * **Scope** : `Managed`. If you use several [managed sources](</docs/en/managed-settings#how-claude-code-combines-managed-sources>), set `false` in the highest-ranked one. Claude Code ignores a `false` in the Windows HKCU registry
+ * **Type** : Boolean
+ * `true`: Claude Code doesn’t list or load skills from these servers. The servers keep their tools, and claude.ai connectors keep their skills
+ * `false`: on Team and Enterprise plans, allows these skills. They stay off for servers you lock out with `strictPluginOnlyCustomization`, and if your organization isn’t [eligible](</docs/en/mcp#requirements-for-skills-from-mcp-servers>). On other plans, `false` is the same as unset
+ * **Default** : unset. These skills are off for Team and Enterprise members who sign in to claude.ai with `/login`. For other sign-ins, see [MCP skill availability](</docs/en/mcp#requirements-for-skills-from-mcp-servers>)
+
+This example allows these skills for Team and Enterprise members:
+
+managed-settings.json
+
+ {
+ "disableDirectMcpSkills": false
+ }
+
+If any [admin source](</docs/en/managed-settings#keys-read-from-every-admin-source>) sets `true`, the skills stay off. Anthropic doesn’t scan these skills. They can contain instructions or code that cause Claude to take unintended actions, including through [prompt injection](</docs/en/security#protect-against-prompt-injection>). Set this to `false` only if you trust the servers your members add.
+
### `disableClaudeAiConnectors`
Turn off the [claude.ai MCP connectors](</docs/en/mcp#use-mcp-servers-from-claude-ai>) [Claude Code fetches itself](</docs/en/mcp#how-connectors-reach-claude-code>), so it neither fetches nor connects them. A `true` in any settings file applies: a checked-in project `.claude/settings.json` can opt a repository out of those connectors, but a project-level `false` can’t override a user- or managed-level `true`.
--- a/setup.md
+++ b/setup.md
@@ -22,7 +22,7 @@
## 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>).
+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/claude-code/desktop-download?platform=mac&utm_source=claude_code&utm_medium=docs>), [Windows](<https://claude.ai/claude-code/desktop-download?platform=win&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.
--- a/share-sessions.md
+++ b/share-sessions.md
@@ -45,10 +45,7 @@
* **Visibility options** : **Private** and **Public**
* **Repository access** : **Require repository access** is off by default. Turn it on to limit the cloud sessions you share to recipients with access to each session’s private repositories. People without repository access may be able to open a Remote Control session’s link.
-To turn on **Require repository access** or turn off **Show your name** , open Settings on claude.ai, then:
-
- * **If the Settings menu shows Code instead of Claude Code** : go to [**Privacy**](<https://claude.ai/settings/data-privacy-controls>)
- * **Otherwise** : go to [**Claude Code > Sharing settings**](<https://claude.ai/settings/claude-code>)
+To turn on **Require repository access** or turn off **Show your name** , go to [**Settings > Privacy**](<https://claude.ai/settings/data-privacy-controls>) on claude.ai and click **Manage** next to **Shared Code sessions**.
## Stop sharing a session
--- a/sub-agents.md
+++ b/sub-agents.md
@@ -485,7 +485,7 @@
* When the main conversation is in `bypassPermissions`, `acceptEdits`, or [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), your subagent runs in that same mode and Claude Code ignores the `permissionMode` you set. Under auto mode, the classifier evaluates your subagent’s tool calls with the main conversation’s block and allow rules. When a subagent that Claude started with the Agent tool finishes, the classifier also reviews its work and its final report before the report is delivered. This review runs for a subagent other than an [agent team](</docs/en/agent-teams>) teammate. See [How auto mode handles subagents](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>). If a subagent asks for permission while the main conversation is in `bypassPermissions`, check whether its tool call is one of the [actions no mode auto-approves](</docs/en/permission-modes#actions-no-mode-auto-approves>).
* When the main conversation is in `plan` mode, the subagent stays in plan mode whichever `permissionMode` you set, unless it runs as an agent team teammate under the [agent teams rules](</docs/en/agent-teams#have-teammates-plan-before-implementing>). If you set `dontAsk`, the subagent also doesn’t prompt you: an action that plan mode would ask you to approve is denied instead.
- * When the main conversation is in `default` or `dontAsk` mode, the subagent runs in the permission mode you set. It keeps the main conversation’s permission mode instead in these cases:
+ * When the main conversation is in `default` or `dontAsk` mode, the subagent runs in the permission mode you set. It keeps the main conversation’s permission mode instead in cases such as these:
* You set `bypassPermissions`. The `bypassPermissions` exception requires Claude Code v2.1.267 or later.
* You set `auto` and [auto mode isn’t available](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) to the subagent, such as when a settings file sets [`disableAutoMode`](</docs/en/settings-reference#disableautomode>) or the subagent’s model doesn’t support auto mode.
@@ -894,7 +894,7 @@
* For work you’ll continue later, use `general-purpose` or a custom subagent. The built-in Explore and Plan agents can finish without giving Claude an ID to resume them with.
* When a subagent stops at its `maxTurns` limit, Claude Code marks the returned output as partial, and Claude can resume the subagent to continue its work.
-Claude uses the `SendMessage` tool with the agent’s ID or name as the `to` field to resume it. `SendMessage` doesn’t require [agent teams](</docs/en/agent-teams>) to be enabled; only structured team-protocol messages such as `shutdown_request` and `plan_approval_response` do. Beyond subagents and teammates, in sessions where cross-session messaging is enabled, Claude can use the same tool to message [your other Claude Code sessions](</docs/en/cross-session-messaging>), on this machine or [beyond it](</docs/en/cross-session-messaging#message-sessions-on-other-machines>). To resume a subagent, ask Claude to continue the previous work:
+Claude uses the `SendMessage` tool with the agent’s ID or name as the `to` field to resume it. `SendMessage` doesn’t require [agent teams](</docs/en/agent-teams>) to be enabled. Only structured team-protocol messages such as `shutdown_request` and `plan_approval_response` require them. To resume a subagent, ask Claude to continue the previous work:
Use the code-reviewer subagent to review the authentication module
[Agent completes]
@@ -902,7 +902,11 @@
Continue that code review and now analyze the authorization logic
[Claude resumes the subagent with full context from previous conversation]
-When Claude sends a completed subagent a message with the `SendMessage` tool, the subagent resumes in the background without a new `Agent` invocation. The same applies to a subagent that Claude stopped with the `TaskStop` tool, once its stopped run has exited. The resumed run keeps the tool set from where the subagent first ran and can keep reading the [prompt cache the original run warmed](</docs/en/prompt-caching#subagents-and-the-cache>). A subagent that has the `SendMessage` tool can send that message too. In an interactive session, the resumed agent then reports back to the subagent that resumed it, not to your main conversation. That subagent waits for the result before finishing its own work. When a subagent messages an agent it reports to, such as its own launcher, Claude Code resumes that agent without redirecting its results. A subagent you stopped yourself, with `x` in `/tasks` or an SDK `stop_task` request, doesn’t auto-resume. If Claude sends it a message, the message is refused and Claude is told the agent was cancelled. While that subagent’s row is still in the subagent panel, type into its transcript to resume it yourself. After that, a message from Claude can auto-resume it again. Resuming starts a new run of the agent under the same ID, so a subagent that had already failed or completed shows as running again in the task list and in the Agent SDK’s task events. `SendMessage` checks that a name still refers to the same agent it reached earlier in the conversation. If a newer agent has taken the name, such as a re-spawned background agent that reused it, Claude Code refuses the send rather than delivering it to the wrong agent, and the error reports which agent the name now reaches so Claude can retarget. To reach the earlier agent while it’s still running, Claude addresses it by the agent ID it received when it spawned that agent. The check is scoped to the current conversation and resets on `/clear`. A subagent treats messages from the agent that launched it as normal task direction, including mid-task course corrections, and acts on them within its own permission settings. Two limits hold regardless of who sent the message: no message from any agent counts as your approval for a pending permission prompt, and no agent message can change a subagent’s permission settings, `CLAUDE.md`, or configuration. Only the permission system or your own messages can grant approval. You can also ask Claude for the agent ID if you want to reference it explicitly, or find IDs in the transcript files at `~/.claude/projects/{project}/{sessionId}/subagents/`. Each transcript is stored as `agent-{agentId}.jsonl`. Subagent transcripts persist independently of the main conversation:
+When Claude sends a completed subagent a message with the `SendMessage` tool, the subagent can resume in the background without a new `Agent` invocation. The same applies to a subagent that Claude stopped with the `TaskStop` tool, once its stopped run has exited. The resumed run keeps the tool set from where the subagent first ran and can keep reading the [prompt cache the original run warmed](</docs/en/prompt-caching#subagents-and-the-cache>). A subagent that has the `SendMessage` tool can send that message too. In an interactive session, the resumed agent then reports back to the subagent that resumed it, not to your main conversation. That subagent waits for the result before finishing its own work. When a subagent messages an agent it reports to, such as its own launcher, Claude Code resumes that agent without redirecting its results. A subagent you stopped yourself, with `x` in `/tasks` or an SDK `stop_task` request, doesn’t auto-resume. If Claude sends it a message, the message is refused and Claude is told the agent was cancelled. While that subagent’s row is still in the subagent panel, type into its transcript to resume it yourself. After that, a message from Claude can auto-resume it again. Resuming starts a new run of the agent under the same ID, so a subagent that had already failed or completed shows as running again in the task list and in the Agent SDK’s task events. `SendMessage` checks that a name still refers to the same agent it reached earlier in the conversation. If a newer agent has taken the name, such as a re-spawned background agent that reused it, Claude Code refuses the send rather than delivering it to the wrong agent, and the error reports which agent the name now reaches so Claude can retarget. To reach the earlier agent while it’s still running, Claude addresses it by the agent ID it received when it spawned that agent. The check is scoped to the current conversation and resets on `/clear`.
+
+A subagent treats messages from the agent that launched it as normal task direction, including mid-task course corrections, and acts on them within its own permission settings. A message from an agent doesn’t count as your approval for a pending permission prompt.
+
+You can also ask Claude for the agent ID if you want to reference it explicitly, or find IDs in the transcript files at `~/.claude/projects/{project}/{sessionId}/subagents/`. Each transcript is stored as `agent-{agentId}.jsonl`. Subagent transcripts persist independently of the main conversation:
* **Main conversation compaction** : when the main conversation compacts, subagent transcripts are unaffected. They’re stored in separate files.
* **Session persistence** : subagent transcripts persist within their session. You can resume a subagent after restarting Claude Code by resuming the same session.
--- a/tools-reference.md
+++ b/tools-reference.md
@@ -40,7 +40,7 @@
`SendMessage`| Sends a message to another agent: an [agent team](</docs/en/agent-teams>) teammate, a [subagent it resumes](</docs/en/sub-agents#resume-subagents>) by agent ID or name, or one of your other Claude Code sessions, on this machine or beyond it. Messaging other sessions requires Claude Code v2.1.224 or later. [Cross-session messaging](</docs/en/cross-session-messaging>) covers which sessions Claude can reach, [what a message looks like when it arrives](</docs/en/cross-session-messaging#what-a-message-looks-like>), and [how Claude gets a notice when another session goes idle](</docs/en/cross-session-messaging#get-a-notice-when-another-session-goes-idle>). Claude can include an optional `summary` input, typically 5-10 words, that Claude Code shows as a one-line preview. When Claude omits it on a [plain-text message](</docs/en/cross-session-messaging#limitations>), Claude Code uses the first line of the message as the summary. Claude Code truncates a summary longer than 200 characters with an ellipsis| No
`SendUserFile`| Sends files from the session to you with an optional caption, so a generated report, diagram, screenshot, or built artifact reaches your device instead of only being mentioned in the transcript. The optional `display` input controls presentation: `render` opens the file inline in the client, `attach` shows a download card only, and when unset the client decides by file type. Available when a [Remote Control](</docs/en/remote-control>) client is connected or in a [cloud session](</docs/en/claude-code-on-the-web>). Delivery runs through Anthropic-hosted infrastructure, so the tool is not available on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry| No
`ShareOnboardingGuide`| Uploads `ONBOARDING.md` and returns a share link teammates can open in Claude Code. Called from `/team-onboarding` after the guide is written. Available to claude.ai subscribers on Team and Enterprise plans| Yes
-`Skill`| Executes a [skill](</docs/en/skills#control-who-invokes-a-skill>) within the main conversation. Can prompt for skills that set `allowed-tools`, `disallowed-tools`, or `hooks`| Some skills
+`Skill`| Executes a [skill](</docs/en/skills#control-who-invokes-a-skill>) within the main conversation. Can prompt for skills that set `allowed-tools`, `disallowed-tools`, or `hooks`, and for [skills from MCP servers](</docs/en/mcp#approvals-for-mcp-skills>)| Some skills
`SubagentHandback`| Delivers a subagent’s final report to whichever conversation receives that subagent’s result. Provided only in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), to subagents that the Agent tool runs locally other than [forks](</docs/en/sub-agents#fork-the-current-conversation>), and available in the terminal CLI, IDE extensions, cloud sessions, and the Agent SDK; the classifier reviews the report before it’s delivered. Requires Claude Code v2.1.271 or later| No
`SuggestPluginInstall`| Shows a [card of suggested plugins](</docs/en/claude-code-on-the-web#plugin-suggestions-in-the-conversation>) you can add. Available in the same sessions as `ListPlugins`| No
`SuggestSkills`| Shows a card of claude.ai skills you can add. Available in the same sessions as `ListPlugins`| No
@@ -176,6 +176,7 @@
When a foreground command reaches its timeout without finishing, Claude Code moves it to the background instead of stopping it, unless the command starts with `sleep`. Setting [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1`](</docs/en/env-vars#variables>) or running in [bare mode](</docs/en/headless#start-faster-with-bare-mode>) disables auto-backgrounding, so a command that reaches its timeout stops instead. The result of a command moved to the background states what happened:
* When the timeout triggers the move, the result reports it explicitly: `Command did not complete within its 120s timeout and was moved to the background`, with the seconds matching the timeout that applied, followed by the task ID and the path of the file the output is being written to.
+ * In an interactive session, a [background subagent’s](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) command can move after 3 minutes, before its timeout. The result then includes `Command was moved to the background (ID: <id>) after running for 180s`.
* A `cd`, `pushd`, `popd`, or `chdir` inside a command that is moved to the background never carries over: the result states `Session cwd remains <dir>; directory changes made by the backgrounded command do not apply to subsequent commands.`, so Claude doesn’t act on a directory change that didn’t happen.
### Memory limit on Linux and WSL
--- a/troubleshoot.md
+++ b/troubleshoot.md
@@ -52,13 +52,15 @@
### Messages from the built-in guard
-Where the [built-in guard](</docs/en/plugins/mods/admin#know-what-happens-by-default>) loads, it can refuse a mod or one of its answers. Some messages name the option your organization’s administrator sets to change the rule.
+Where the [built-in guard](</docs/en/plugins/mods/admin#know-what-happens-by-default>) loads, it can refuse a mod or one of its answers or calls. Some messages name the option your organization’s administrator sets to change the rule.
Message contains| What it means| Where it appears
---|---|---
`mods are limited to your organization's by policy (allowManagedModsOnly)`| Your organization allows only [its own mods](</docs/en/plugins/mods/admin#install-your-organizations-mods>), so yours was refused| The debug log, and the transcript in a session that hot-reloads a plugin directory
-`tried to lift a deny rule in your settings`| Your mod’s [`tool.check`](</docs/en/plugins/mods/reference#tools>) hook approved a call that a `deny` rule refuses. The call stays denied.| The transcript and the debug log, once for each mod in a session. In a `claude -p` run, the debug log.
+`tried to lift` or `tried to reword`, such as `tried to lift a deny rule in your settings`| A hook in your mod, such as [`tool.check`](</docs/en/plugins/mods/events#approve-or-refuse-a-tool-call-before-the-user-is-asked>), tried to loosen or reword the decision the message names. That decision stands. Return what `await next(e)` gives you, or a stricter decision.| The transcript and the debug log. In a `claude -p` run, the debug log.
`the rules and hooks in your settings could not be checked for this call, so it is refused`| The guard failed while checking a call that a mod approved, so it refused the call| The reason Claude reads for the denied call
+`is not for plugins outside policy to change`| Your mod tried to change an environment variable the guard refuses. Remove that `$.env.set` call.| The error `$.env.set` throws
+`would be named as a tool of one of the organization's servers`| One cause is a plugin name that matches one of your organization’s MCP server or plugin names. Rename the plugin and update hooks that match the tool’s old [full name](</docs/en/plugins/mods/api#add-a-tool>). If the error stays, ask an administrator whether [`managed-mcp.json`](</docs/en/managed-mcp#deploy-managed-mcp-json>) is readable and valid.| The error `$.tool.register` throws
### `validate` passes and lists no `hooks` line
--- a/troubleshoot-install.md
+++ b/troubleshoot-install.md
@@ -57,7 +57,7 @@
If your issue isn’t listed, work through the diagnostic checks below to narrow down the cause.
-If you’d rather skip the terminal entirely, the [Claude Code Desktop app](</docs/en/desktop-quickstart>) lets you install and use Claude Code through a graphical interface. Download it for [macOS](<https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect?utm_source=claude_code&utm_medium=docs>) or [Windows](<https://claude.com/download?utm_source=claude_code&utm_medium=docs>) and start coding without any command-line setup. On Linux, install the app with apt by following the [Linux install instructions](</docs/en/desktop-linux>).
+If you’d rather skip the terminal entirely, the [Claude Code Desktop app](</docs/en/desktop-quickstart>) lets you install and use Claude Code through a graphical interface. Download it for [macOS](<https://claude.ai/claude-code/desktop-download?platform=mac&utm_source=claude_code&utm_medium=docs>) or [Windows](<https://claude.ai/claude-code/desktop-download?platform=win&utm_source=claude_code&utm_medium=docs>) and start coding without any command-line setup. On Linux, install the app with apt by following the [Linux install instructions](</docs/en/desktop-linux>).
## Run diagnostic checks
--- a/typescript.md
+++ b/typescript.md
@@ -555,7 +555,7 @@
});
* [`API_TIMEOUT_MS`](</docs/en/env-vars>): how long each request attempt can wait for response headers, in milliseconds. It doesn’t limit how long a streaming response runs after the headers arrive. Default `600000`. Applies to the main loop and all subagents.
- * `CLAUDE_CODE_MAX_RETRIES`: maximum API retries. Default `10`, capped at `15`. Each retry gets its own `API_TIMEOUT_MS` window. For unattended runs that need to wait through longer outages, set [`CLAUDE_CODE_RETRY_WATCHDOG=1`](</docs/en/errors#tune-retry-behavior>): it retries transient capacity errors indefinitely and, on Claude Code v2.1.199 or later, raises the default for other transient errors to `300` and removes the cap on this variable.
+ * `CLAUDE_CODE_MAX_RETRIES`: maximum API retries. Default `10`, capped at `15`. Each retry gets its own `API_TIMEOUT_MS` window. For unattended runs that need to wait through longer outages, set [`CLAUDE_CODE_RETRY_WATCHDOG=1`](</docs/en/errors#tune-retry-behavior>) to keep retrying transient capacity errors. With `CLAUDE_CODE_RETRY_WATCHDOG` set on v2.1.199 or later, the cap doesn’t apply, and the default for other transient errors is `300`.
* `CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS`: stall watchdog for subagents. While the stream watchdog is on, the default is `CLAUDE_STREAM_IDLE_TIMEOUT_MS` plus 5 minutes, which comes to `600000` unless you raise that variable. With the stream watchdog off, the default is `600000`. Before v2.1.257, the default was always `600000`. The timer resets on each stream event. On a stall, Claude Code aborts the subagent and reports the stall to the parent. For a background subagent, it also marks the task failed and attaches any partial result.
* `CLAUDE_ENABLE_STREAM_WATCHDOG` with `CLAUDE_STREAM_IDLE_TIMEOUT_MS`: stream watchdog that aborts the request when headers have arrived but the response body stops streaming. The watchdog is on by default for all providers; set `CLAUDE_ENABLE_STREAM_WATCHDOG=0` to disable it. `CLAUDE_STREAM_IDLE_TIMEOUT_MS` defaults to `300000` and is clamped to that minimum. After the abort, [Automatic retries](</docs/en/errors#automatic-retries>) covers what Claude Code does, based on how far the response had progressed. While the watchdog waits out a response that a gateway behind `ANTHROPIC_BASE_URL` holds open with keep-alive pings, a host that sets `includePartialMessages` keeps receiving `ping` stream events, so read those frames as liveness rather than timing the session out on silence. Before v2.1.257, the frames stopped 5 minutes after the last real stream event.
--- a/worktrees.md
+++ b/worktrees.md
@@ -48,13 +48,17 @@
* **Claude Code finds another session in the worktree** : the worktree and branch stay even if you choose removal. Follow the `Worktree kept at` message
* **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. 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 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
* **Another branch is checked out** : if the worktree is on a branch other than its own that has commits past the worktree’s starting commit, Claude prompts you to keep or remove the worktree. Either answer keeps that other branch and its commits. Removing deletes the worktree directory and the worktree’s own branch, the one Claude created with it
* **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.
## Resume a worktree session
+
+To return to a worktree you kept, run `claude --worktree <name> --resume <session-id>` from the main checkout, using the session ID printed on exit. For `<name>`, type the folder name under `.claude/worktrees/` with `/` in place of any `+`.
+
+### Resume without `--worktree`
When you resume a session that ended isolated in its worktree without exiting it, Claude Code returns the session there and keeps it isolated. 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 leave with the [`ExitWorktree`](</docs/en/tools-reference>) tool when the session has that 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:
@@ -64,6 +68,8 @@
* **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.
Before v2.1.212, a non-interactive resume stayed in the starting directory and `ExitWorktree` reported that there was no active worktree session to exit.
+
+### Transcript location
When Claude enters or exits a worktree that Claude Code created with git, the transcript follows. Claude Code records the session under the session’s new working directory, the same way [`/cd`](</docs/en/commands>) does, so `/desktop` and `--resume` find it there. Exiting moves it back the same way. A worktree created by a `WorktreeCreate` hook keeps its transcript at the launch directory.
@@ -101,9 +107,7 @@
* A checked-out submodule in the worktree holds changed or untracked files, or Claude Code can’t inspect the worktree’s submodules. This check requires Claude Code v2.1.274 or later.
* One of the four cases that also block worktree creation applies: Claude Code can’t determine which filter drivers the repository config defines, or finds a setting there it can’t switch off.
* The worktree belongs to a `--worktree` session you haven’t backgrounded, whatever its age.
- * You created the worktree yourself with `git worktree add`, even if you then ran a `--worktree <name>` session in it and backgrounded that session.
-
-Claude Code writes a marker into the git metadata of every worktree it creates with git, and the sweep keeps any worktree without one, including a worktree a `WorktreeCreate` hook created.
+ * You created the worktree with `git worktree add` outside `.claude/worktrees/`.
#### Worktree locks and manual removal
@@ -140,11 +144,11 @@
claude --worktree "#1234"
-Claude Code reads only the number from the URL. It always fetches from your repository’s `origin` remote, and picks the fetch path by `origin`’s host:
+Claude Code ignores the host and repository in a URL you pass, and picks the fetch path by `origin`’s host:
* **github.com** : fetches `pull/<number>/head`
* **gitlab.com** : fetches `merge-requests/<number>/head`
- * **GitHub Enterprise, self-managed GitLab, or any other host** : tries `pull/<number>/head` first, then `merge-requests/<number>/head`
+ * **GitHub Enterprise, self-managed GitLab, or any other host** : uses `pull/` for a pull request URL, `merge-requests/` for a merge request URL, and whichever exists for a `#` number. If both exist at different commits, follow the `Cannot use PR/MR #<number>` message.
This fetch never waits for input in your terminal. If git or ssh would ask for a password, a key passphrase, or confirmation of a new SSH host, the fetch fails instead and Claude Code exits with an `Error creating worktree: Failed to fetch PR/MR #<number>` message. A key that `ssh-agent` holds still works, so load your key there and run `git fetch` once by hand to record a new host before you start.