Changes on
86 changes detected
--- a/admin-setup.md
+++ b/admin-setup.md
@@ -38,7 +38,7 @@
Windows: `C:\Program Files\ClaudeCode\managed-settings.json`| Medium| All
Windows user registry| `HKCU\SOFTWARE\Policies\ClaudeCode`| Lowest| Windows only
-Claude Code fetches server-managed settings at startup and refreshes them hourly during the session, with no endpoint infrastructure to deploy. Delivery through the claude.ai admin console requires a Claude for Teams or Enterprise plan. Deployments on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry can get the same remote delivery by running a [Claude apps gateway](</docs/en/claude-apps-gateway>), or use one of the file-based or OS-level mechanisms instead. If you set your provider or gateway at claude.ai under **Organization settings > Desktop 3P**, see [which settings take priority](<https://claude.com/docs/third-party/claude-desktop/admin-console-claude-code#which-settings-take-priority>) in the Enterprise Admin Console guide. If your organization mixes providers, configure [server-managed settings](</docs/en/server-managed-settings>) for claude.ai users plus a [file-based or plist/registry fallback](</docs/en/managed-settings#delivery-mechanisms>) so other users still receive managed policy. The plist and HKLM registry locations work with any provider and resist tampering because they require admin privileges to write. The Windows user registry at HKCU is writable without elevation, so treat it as a convenience default rather than an enforcement channel. By default, WSL reads only the Linux file path at `/etc/claude-code`. To extend your Windows registry and `C:\Program Files\ClaudeCode` policy to WSL on the same machine, set [`wslInheritsWindowsSettings: true`](</docs/en/settings-reference#wslinheritswindowssettings>) in either of those admin-only Windows sources. Whichever mechanism you choose, managed values take precedence over user and project settings, apart from a few security-sensitive [exceptions](</docs/en/settings#exceptions-to-managed-settings-precedence>). Array settings such as `permissions.allow` and `permissions.deny` merge entries from [lower-precedence settings](</docs/en/settings#lists-merge-instead-of-overriding>) into [the managed settings that apply](</docs/en/managed-settings#how-claude-code-combines-managed-sources>), so developers can extend managed lists but not remove from them. For `fallbackModel`, `availableModels`, and [`modelPicker`](</docs/en/settings-reference#modelpicker>), the managed value replaces lower layers rather than merging.
+Claude Code fetches server-managed settings at startup and refreshes them hourly during the session, with no endpoint infrastructure to deploy. Delivery through the claude.ai admin console requires a Claude for Teams or Enterprise plan. Deployments on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry can get the same remote delivery by running a [Claude apps gateway](</docs/en/claude-apps-gateway>), or use one of the file-based or OS-level mechanisms instead. If you set your provider or gateway at claude.ai under [**Organization settings > Desktop 3P**](<https://claude.ai/admin-settings/desktop-deployment>), see [which settings take priority](<https://claude.com/docs/third-party/claude-desktop/admin-console-claude-code#which-settings-take-priority>) in the Enterprise Admin Console guide. If your organization mixes providers, configure [server-managed settings](</docs/en/server-managed-settings>) for claude.ai users plus a [file-based or plist/registry fallback](</docs/en/managed-settings#delivery-mechanisms>) so other users still receive managed policy. The plist and HKLM registry locations work with any provider and resist tampering because they require admin privileges to write. The Windows user registry at HKCU is writable without elevation, so treat it as a convenience default rather than an enforcement channel. By default, WSL reads only the Linux file path at `/etc/claude-code`. To extend your Windows registry and `C:\Program Files\ClaudeCode` policy to WSL on the same machine, set [`wslInheritsWindowsSettings: true`](</docs/en/settings-reference#wslinheritswindowssettings>) in either of those admin-only Windows sources. Whichever mechanism you choose, managed values take precedence over user and project settings, apart from a few security-sensitive [exceptions](</docs/en/settings#exceptions-to-managed-settings-precedence>). Array settings such as `permissions.allow` and `permissions.deny` merge entries from [lower-precedence settings](</docs/en/settings#lists-merge-instead-of-overriding>) into [the managed settings that apply](</docs/en/managed-settings#how-claude-code-combines-managed-sources>), so developers can extend managed lists but not remove from them. For `fallbackModel`, `availableModels`, and [`modelPicker`](</docs/en/settings-reference#modelpicker>), the managed value replaces lower layers rather than merging.
### WSL sessions in Claude Code Desktop
@@ -117,7 +117,7 @@
Allow organizations
-As an Owner on a Team or Enterprise plan, open the GitHub section of [**Organization settings > Git providers**](<https://claude.ai/admin-settings/source-control>) in your browser and click **Choose organizations**. Select the organizations you approve in the table and click **Allow**. Include ones that are already linked, because they aren’t allowed automatically.
+On a Team or Enterprise plan, an [Owner](</docs/en/server-managed-settings#access-control>) can set this up. Open the GitHub section of [**Organization settings > Git providers**](<https://claude.ai/admin-settings/source-control>) in your browser and click **Choose organizations**. Select the organizations you approve in the table and click **Allow**. Include ones that are already linked, because they aren’t allowed automatically.
2
@@ -154,7 +154,7 @@
Usage monitoring| OpenTelemetry export of sessions, tools, and tokens| All providers| [Monitoring usage](</docs/en/monitoring-usage>)
Analytics dashboard| Adoption and contribution metrics with a leaderboard on Teams / Enterprise; per-user usage and spend metrics on Console| Teams / Enterprise at [claude.ai/analytics](<https://claude.ai/analytics/claude-code>), Console at [platform.claude.com/claude-code](<https://platform.claude.com/claude-code>)| [Analytics](</docs/en/analytics>)
Programmatic reporting| Per-user usage and cost data over an API| [Enterprise Analytics API](<https://platform.claude.com/docs/en/api/admin/analytics>) for Enterprise, [Claude Code Analytics API](<https://platform.claude.com/docs/en/build-with-claude/claude-code-analytics-api>) for Console| [Costs](</docs/en/costs#manage-costs-for-your-organization>)
-Spend controls| Spend limits and rate limits| Organization settings for Teams / Enterprise, workspace limits for Console; on third-party clouds, cloud budget controls or a [Claude apps gateway](</docs/en/claude-apps-gateway>) with per-user [spend limits](</docs/en/claude-apps-gateway-spend-limits>)| [Costs](</docs/en/costs#manage-costs-for-your-organization>)
+Spend controls| Spend limits and rate limits| [Organization settings](<https://claude.ai/admin-settings/usage>) for Teams / Enterprise, workspace limits for Console; on third-party clouds, cloud budget controls or a [Claude apps gateway](</docs/en/claude-apps-gateway>) with per-user [spend limits](</docs/en/claude-apps-gateway-spend-limits>)| [Costs](</docs/en/costs#manage-costs-for-your-organization>)
On Teams and Enterprise, per-user usage and spend numbers come from the [spend report](<https://support.claude.com/en/articles/12883420-view-usage-analytics-for-team-and-enterprise-plans>) in your organization’s analytics settings, not the analytics dashboard. Cloud providers expose spend through AWS Cost Explorer, GCP Billing, or Azure Cost Management. For planning enterprise budgets across Claude chat, Claude Code, and Cowork, see the [Claude Enterprise consumption guide](<https://support.claude.com/en/articles/14782391-claude-enterprise-consumption-guide>).
--- a/advisor.md
+++ b/advisor.md
@@ -28,7 +28,7 @@
* Run `/advisor` with a model, such as `/advisor opus`, to set it.
* Run `/advisor off` to turn it off.
-Claude Code doesn’t invoke a saved advisor that your organization’s [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist excludes. To use the advisor, pick an allowed model with `/advisor`. Claude Code still saves an advisor that your current main model doesn’t support. That advisor activates after you switch to a compatible main model with [`/model`](</docs/en/model-config#setting-your-model>). If the API already refused the saved advisor in the current conversation, it stays off until `/clear` or `/compact`, even after you switch models. On some plans, Fable as the advisor also needs your one-time [consent to bill Fable usage to usage credits](</docs/en/model-config#fable-and-usage-credits>). For what `/advisor fable` does before you have given that consent, see Fable advisor and usage credits.
+Claude Code doesn’t invoke a saved advisor that an [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist in your settings excludes. To use the advisor, pick an allowed model with `/advisor`. Claude Code still saves an advisor that your current main model doesn’t support. That advisor activates after you switch to a compatible main model with [`/model`](</docs/en/model-config#setting-your-model>). If the API already refused the saved advisor in the current conversation, it stays off until `/clear` or `/compact`, even after you switch models. On some plans, Fable as the advisor also needs your one-time [consent to bill Fable usage to usage credits](</docs/en/model-config#fable-and-usage-credits>). For what `/advisor fable` does before you have given that consent, see Fable advisor and usage credits.
### Set `advisorModel` in settings
@@ -48,7 +48,7 @@
* The session’s main model doesn’t support the advisor
* The requested model, such as Haiku 4.5, can’t act as an advisor
- * Your organization’s [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist excludes the requested model
+ * An [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist excludes the requested model
* You requested Fable and your account still requires the usage-credits consent
If you start a [background session](</docs/en/agent-view>) with `--advisor` and one of these applies, Claude Code starts the session without the advisor instead of exiting. If the model you pass can act as an advisor but ranks below your main model, the session starts whether or not it’s a background session. Your main model then runs without the advisor.
--- a/agent-teams.md
+++ b/agent-teams.md
@@ -130,7 +130,7 @@
`teammateDefaultModel` was removed in v2.1.234; Claude Code ignores a leftover value. Name the model in your prompt instead.
-Claude Code checks the model it selects for a teammate against your organization’s [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist. When the allowlist blocks a value, Claude Code substitutes another model:
+Claude Code checks the model it selects for a teammate against any [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist. When the allowlist blocks a value, Claude Code substitutes another model:
* **Family alias such as`opus`**: On the Anthropic API and Claude Platform on AWS, Claude Code runs the teammate on the newest version of that family the allowlist permits. On providers with provider-specific model IDs, where the [substitution doesn’t operate](</docs/en/model-config#restrict-model-selection>), a blocked alias falls back like any other blocked value per the next bullet
* **Any other blocked value, including a family alias on providers where the substitution doesn’t operate, or one whose family has no permitted version** : Claude Code runs the teammate on the lead’s model instead. If you set `CLAUDE_CODE_SUBAGENT_MODEL`, Claude Code tries that model first, under these same rules
--- a/agent-view.md
+++ b/agent-view.md
@@ -183,7 +183,7 @@
### Attach to a session
-Press `Enter` or `→` on a selected row to attach. Agent view is replaced by the full interactive session. When you attach, Claude posts a short recap of what happened while you were away. While attached, the session behaves like any other Claude Code session: [commands](</docs/en/commands>), keyboard shortcuts, and features all work, with the exceptions below. While you’re attached, `/install-github-app` and the [`/mcp`](</docs/en/mcp>) settings list work normally, since a human at the terminal can complete their dialogs. When nobody is attached, these commands can’t open their dialogs, so the session appears under `Needs input` in agent view with a row such as `open this session to manage MCP servers`, and the transcript reply says the same. Attach and run the command again to continue; the needs-input row clears when you attach. `/mcp reconnect <server>`, `/mcp enable`, and `/mcp disable` work without attaching either way. Attached sessions always render in [fullscreen mode](</docs/en/fullscreen>), regardless of your `tui` setting, because a background session has no terminal scrollback to append to. Scroll with `PgUp`, `PgDn`, or the mouse wheel, and press `Ctrl+O` for transcript mode. Your terminal’s native scroll and tmux copy mode show only the current viewport, the same as when you run any fullscreen application. An attached session doesn’t [report its status to your terminal](</docs/en/terminal-config#see-session-status-in-your-terminal>). Press `←` on an empty prompt, or run `/exit`, to detach and return to agent view, whether you opened the session from agent view or with `claude attach <id>` from your shell. `←` also detaches while the [`/btw` overlay](</docs/en/interactive-mode#side-questions-with-%2Fbtw>) is open. Requires Claude Code v2.1.257 or later. A side question that’s still answering keeps running while you’re away. The next time you attach, the overlay reopens with it, or with its answer. On Windows, if you press `←` within about half a second of attaching, Claude Code shows `Ambiguous ←, press again to detach`, because in that window the terminal can redeliver a press from before you attached. Press `←` again to detach. `Ctrl+Z` also detaches but goes back to where you started instead: agent view if you attached from there, or your shell if you ran `claude attach`. Use `Ctrl+Z` when a dialog has focus and isn’t responding to `←`. `Ctrl+C` keeps its standard interrupt behavior while attached: it cancels a running response or `!` shell command rather than detaching. Pressing `Ctrl+C` twice on an empty prompt detaches. Detaching never stops a background session: `←`, `Ctrl+Z`, `/exit`, and double `Ctrl+C` or double `Ctrl+D` all leave it running. If you detach while a `/loop` is waiting for its next iteration, the loop keeps running and that iteration starts on schedule without you. To stop the loop before you detach, see [Stop a loop](</docs/en/scheduled-tasks#stop-a-loop>). To end a session from inside it, run `/stop`.
+Press `Enter` or `→` on a selected row to attach. Agent view is replaced by the full interactive session. When you attach, Claude posts a short recap of what happened while you were away. While you’re attached, [commands](</docs/en/commands>), keyboard shortcuts, and features all work, with the exceptions below. A [`/ship` or `/steward` watch](</docs/en/ship-command-troubleshooting#a-session-setting-blocks-a-watch>) doesn’t start in a background session. While you’re attached, `/install-github-app` and the [`/mcp`](</docs/en/mcp>) settings list work normally, since a human at the terminal can complete their dialogs. When nobody is attached, these commands can’t open their dialogs, so the session appears under `Needs input` in agent view with a row such as `open this session to manage MCP servers`, and the transcript reply says the same. Attach and run the command again to continue; the needs-input row clears when you attach. `/mcp reconnect <server>`, `/mcp enable`, and `/mcp disable` work without attaching either way. Attached sessions always render in [fullscreen mode](</docs/en/fullscreen>), regardless of your `tui` setting, because a background session has no terminal scrollback to append to. Scroll with `PgUp`, `PgDn`, or the mouse wheel, and press `Ctrl+O` for transcript mode. Your terminal’s native scroll and tmux copy mode show only the current viewport, the same as when you run any fullscreen application. An attached session doesn’t [report its status to your terminal](</docs/en/terminal-config#see-session-status-in-your-terminal>). Press `←` on an empty prompt, or run `/exit`, to detach and return to agent view, whether you opened the session from agent view or with `claude attach <id>` from your shell. `←` also detaches while the [`/btw` overlay](</docs/en/interactive-mode#side-questions-with-%2Fbtw>) is open. Requires Claude Code v2.1.257 or later. A side question that’s still answering keeps running while you’re away. The next time you attach, the overlay reopens with it, or with its answer. On Windows, if you press `←` within about half a second of attaching, Claude Code shows `Ambiguous ←, press again to detach`, because in that window the terminal can redeliver a press from before you attached. Press `←` again to detach. `Ctrl+Z` also detaches but goes back to where you started instead: agent view if you attached from there, or your shell if you ran `claude attach`. Use `Ctrl+Z` when a dialog has focus and isn’t responding to `←`. `Ctrl+C` keeps its standard interrupt behavior while attached: it cancels a running response or `!` shell command rather than detaching. Pressing `Ctrl+C` twice on an empty prompt detaches. Detaching never stops a background session: `←`, `Ctrl+Z`, `/exit`, and double `Ctrl+C` or double `Ctrl+D` all leave it running. If you detach while a `/loop` is waiting for its next iteration, the loop keeps running and that iteration starts on schedule without you. To stop the loop before you detach, see [Stop a loop](</docs/en/scheduled-tasks#stop-a-loop>). To end a session from inside it, run `/stop`.
#### Switch sessions without leaving the terminal
@@ -329,7 +329,11 @@
#### Send the session to the background
-Run `/background` or its alias `/bg` to move the current conversation into a background session. Pass a prompt such as `/bg run the test suite and fix any failures` to give one more instruction first. If Claude is responding when you run `/bg`, the response continues in the background session. If you exit a session while some kinds of background work are running, such as subagents or workflows, a `Background work is running` dialog warns that the work stops. Choose `Move to background and exit` to background the session the same way `/background` does and return to your shell. The option isn’t shown when agent view is turned off. If a background session on the list already has the conversation’s name, Claude Code numbers the new row’s name, such as `my-session (2)`, and leaves the existing row’s name alone. To rename the new row, select it in agent view and press `Ctrl+R`.
+Run `/background` or its alias `/bg` to move the current conversation into a background session. Pass a prompt such as `/bg run the test suite and fix any failures` to give one more instruction first. If Claude is responding when you run `/bg`, the response continues in the background session.
+
+While a [`/ship` or `/steward` watch](</docs/en/ship-command>) is on, `/bg` leaves the session in the foreground and prints the reason. See [Messages during a watch](</docs/en/ship-command-troubleshooting#messages-during-a-watch>).
+
+If you exit a session while some kinds of background work are running, such as subagents or workflows, a `Background work is running` dialog warns that the work stops. Choose `Move to background and exit` to background the session the same way `/background` does and return to your shell. The option isn’t shown when agent view is turned off. If a background session on the list already has the conversation’s name, Claude Code numbers the new row’s name, such as `my-session (2)`, and leaves the existing row’s name alone. To rename the new row, select it in agent view and press `Ctrl+R`.
#### Copy the session with /fork
@@ -617,7 +621,7 @@
* **Working, paused on a permission prompt or other dialog, or attached** : the process keeps running. A running subagent, workflow, or monitor counts as working, and so does a pending [session-scoped scheduled task](</docs/en/scheduled-tasks>), such as a `/loop` wakeup.
* **Finished or waiting for your next message, and unattached for about an hour** : the supervisor stops the process to free resources. A session that ended its turn by asking you a question counts as waiting for your next message. The conversation stays on disk, and the next time you attach or reply, the session resumes where it left off. Pin a session with `Ctrl+T` to keep its process running.
- * **Exited unexpectedly while the supervisor is running** : the supervisor restarts the process. Ending a session you backgrounded yourself with `←` or `/background`, for example with `kill`, marks it stopped instead of restarting it. For sessions that ended with a shutdown, see Sessions show as failed or stopped after shutdown.
+ * **Exited unexpectedly while the supervisor is running** : the supervisor can restart the process. Ending a session you backgrounded yourself with `←` or `/background`, for example with `kill`, marks it stopped instead of restarting it. If the session’s row shows `∙`, select it and press `Enter` to restart the session. For sessions that ended with a shutdown, see Sessions show as failed or stopped after shutdown.
* **After an auto-update** : the supervisor restarts itself onto the new version and moves idle sessions over in the background. Sessions that are working, waiting on you, or attached aren’t interrupted.
* **The supervisor itself stops** , for example because its process was ended from outside Claude Code: on macOS and Linux, your sessions stop unless a new supervisor connects within about a minute. To start one, run `claude agents` in your shell. After that minute, see Keep sessions running after the supervisor stops.
@@ -786,6 +790,8 @@
Version| Change
---|---
+v2.1.331| A [`/ship` or `/steward` watch](</docs/en/ship-command-troubleshooting#a-session-setting-blocks-a-watch>) doesn’t start in a background session. Before this release, one can start there.
+v2.1.331| `/background` doesn’t move a session to the background while a `/ship` or `/steward` watch is on. Before this release, the session moves and the watch ends.
v2.1.323| In agent view’s input, `Ctrl+Y` restores cleared text.
v2.1.299| `/effort` and `/fast` in the dispatch input set the effort level and fast mode for the sessions you dispatch next. `/model`, `/effort`, or `/fast` typed with no value opens a picker.
v2.1.299| Claude Code reads `--bg` and `--background` as the flag only before any bare `--` separator and outside another flag’s value, and refuses an ambiguous position instead of guessing. Before this release, a prompt or reply of `--bg` or `--background` to a background session could be taken for the flag. That could start new background sessions over and over instead of delivering the text.
--- a/amazon-bedrock.md
+++ b/amazon-bedrock.md
@@ -1,3 +1,10 @@
+This page covers setting up Amazon Bedrock for the Claude Code CLI and IDE extensions.
+
+To use Amazon Bedrock in the **Code** tab of the Claude Desktop app, you or your administrator configures the app:
+
+ * **Your organization installed the app** : ask your administrator to [configure it for Amazon Bedrock](<https://claude.com/docs/third-party/claude-desktop/bedrock>)
+ * **You install the app yourself** : follow the [single-machine setup steps](<https://claude.com/docs/third-party/claude-desktop/installation#single-machine-setup>) and enter the [connection and model values for Amazon Bedrock](<https://claude.com/docs/third-party/claude-desktop/bedrock#configure-the-app>)
+
## Prerequisites
Before configuring Claude Code with Amazon Bedrock, ensure you have:
--- a/approvals-policy.md
+++ b/approvals-policy.md
@@ -58,9 +58,18 @@
* **Each policy file has its own`mode`**: while the root policy file observes, none of its rules count under a directory’s enforcing policy file, the `nested: inherit` rules included
* **Some custom classifiers go only under`advisory`**: that’s a classifier whose [`tools`](</docs/en/approvals-classifiers#tools>) list `reviewers` or `labels`, or that has an [input](</docs/en/approvals-classifiers#inputs>) with no `merge`. List it in an enforced rule with no `if`. If a rule reads its result, the check on pull requests under a directory’s policy file can read **Cannot evaluate: classifier outside advisory**
+## Rules for the whole file
+
+Follow these rules in every part of the file:
+
+ * **Keys and fixed values** : write keys, and fixed values such as `observe` and `approves`, in lower case. Approvals refuses a file that has an unknown key
+ * **Purposes, patterns, and conditions** : put double quotes around every purpose, `paths` pattern, and condition
+ * **`!` items**: put double quotes around each `"!"` item outside a condition. Inside a condition, a `!` item takes single quotes. Approvals refuses a file that has an unquoted `!` item
+ * **YAML** : keep the file to one YAML document, or Approvals refuses the file. Indent with spaces. Anchors, aliases, and `!!` tags draw at least a warning
+
## Top-level keys
-Approvals refuses a file that has an unknown key. Write keys, and fixed words such as `observe` and `approves`, in lower case. Put double quotes around every purpose, pattern, condition, and `"!"` item. Keep the file to one YAML document, quote each `!` item, and indent with spaces, or Approvals refuses the file. Anchors, aliases, and `!!` tags draw a warning. Write these keys at the top level of the file:
+Write these keys at the top level of the file:
Key| Required| Values| Default| Description
---|---|---|---|---
@@ -99,7 +108,7 @@
`*`| Any characters within one folder
`**`| Any number of folders, dot folders too. It has to be a whole segment, as in `**/*.go`
`{a,b}`, `[ab]`, `?`| Alternatives, one character of a set, and any one character
-`infra/**`| Every file in the folder. A bare `infra` matches no file in it
+`infra/**`| Every file in the folder. A bare `infra` matches no file in it, and `infra/` is refused
`*.md`| Markdown files beside the policy file’s `.claude` folder. For any depth, write `**/*.md`
`"!docs/**"`| Takes the files out of this rule only. A rule needs at least one pattern with no `!`
@@ -109,8 +118,8 @@
* **Operators** : `=`, `!=`, `<`, `<=`, `>`, `>=`
* **Joining** : `AND` and `OR` in capitals. Use parentheses to mix the two.
- * **Lists** : write `ANY` or `ALL` before `pr/authors` and `pr/approved_by`. Where the condition leads to a lighter verdict, use `ALL`: with `ANY`, one listed author relaxes the rule for everyone else’s commits. Where it leads to a stricter one, use `ANY`: with `ALL`, one unlisted author switches it off.
- * **Quotes** : single quotes around a login or a branch pattern, and none around a team, a `bot:` name, or a fact, as in `"ALL pr/authors = ['ana-acme', acme/payments]"`
+ * **Lists** : write `ANY` or `ALL` before `pr/authors` and `pr/approved_by`. Where the condition leads to a lighter verdict, use `ALL`: with `ANY`, one listed author relaxes the rule for everyone else’s commits. Where it leads to a stricter one, use `ANY`: with `ALL`, one unlisted author switches it off. To test for an empty list, write neither, as in `"pr/approved_by = empty"`.
+ * **Quotes** : single quotes around a login, a branch pattern, or a whole `!` item in a list of people, as in `"ANY pr/authors = [humans, '!acme/interns']"`. No quotes around a team, a `bot:` name, or a fact without a `!`, as in `"ALL pr/authors = ['ana-acme', acme/payments]"`
* **Classifiers** : `claude/code_review = pass`, `repo/change_risk <= medium`, and the other forms under [Read a classifier’s answer from a rule](</docs/en/approvals-classifiers#read-a-classifier%E2%80%99s-answer-from-a-rule>)
A fact comes from the pull request itself:
@@ -122,7 +131,7 @@
`rule/files_changed`, `rule/files_added`, `rule/files_removed`| `"rule/files_changed = pr/files_changed"`| Counts among the files that this rule’s `paths` match
`pr/authors`| `"ALL pr/authors = bot:dependabot"`| Accounts that wrote or pushed a commit, and the account that opened the pull request
`pr/opened_by`| `"pr/opened_by = acme/release"`| The account that opened the pull request. After someone else pushes to a bot’s pull request, an override on `pr/opened_by = bot:dependabot` stops lowering what the rule asks for
-`pr/approved_by`| `"ANY pr/approved_by = acme/security"`| People with write access who approved the current diff. Authors and bots aren’t among them. Also takes `= empty` and `!= empty`
+`pr/approved_by`| `"ANY pr/approved_by = acme/security"`| People with write access who approved the current diff. Authors and bots aren’t among them. Also takes `= empty` and `!= empty`, with no `ANY` or `ALL`
`pr/base`| `"pr/base = 'release/**'"`| The branch that the pull request targets
### `verdict`
@@ -151,7 +160,7 @@
`acme/payments`| A team of the repository’s GitHub organization
`bot:dependabot`| One bot, with no `[bot]` suffix. `bot:claude` means Claude’s apps
`pr/authors`, `pr/opened_by`| The accounts that the fact holds
-`"!pr/authors"`| Takes accounts away. Quote it, and put it beside an item with no `!`
+`"!pr/authors"`| Takes accounts away. Quote it, with single quotes in a condition, and put it beside an item with no `!`
If a set’s `from` admits Claude, for example through `bots`, `everyone`, or `bot:claude`, and every rule that applies says `approves`, Approvals counts a seat in that set as filled before Claude approves. The **Claude Approvals** check can then pass with no person’s approval.
@@ -311,7 +320,7 @@
* **Git files** : `.gitmodules`, `.gitattributes`, symlinks, and submodule pointers
* **Code owners** : any file named `CODEOWNERS`
-Don’t rely on other files being protected. Write a rule for the ones that matter to you, such as `.github/`, `CLAUDE.md`, `AGENTS.md`, `.mcp.json`, and the rest of `.claude/`.
+Don’t rely on other files being protected. Write a rule for the ones that matter to you, such as the `.github` folder, `CLAUDE.md`, `AGENTS.md`, `.mcp.json`, and the rest of the `.claude` folder.
### Who has to approve a change to a protected file
--- a/approvals-pull-requests.md
+++ b/approvals-pull-requests.md
@@ -16,7 +16,7 @@
## Find your approval status and what to do next
-The **Claude Approvals** check gives your pull request’s approval status in its title, the text beside its name in the list of checks. Find your check’s title in these tables to see what it means and what to do next. For a title that isn’t here, open the **Claude Approvals** check’s summary, which gives the cause and the next step. To find who maintains the policy file, `.claude/approvals.yml`, see who last changed it on the default branch.
+The **Claude Approvals** check gives your pull request’s approval status in its title, the text beside its name in the list of checks. Find your check’s title in these tables to see what it means and what to do next. For any other title, open the **Claude Approvals** check’s summary, which gives the cause and the next step. To find who maintains the policy file, `.claude/approvals.yml`, see who last changed it on the default branch.
### Approvals waits for people
@@ -30,20 +30,20 @@
### Approvals waits for Code Review or a classifier
-With these titles, Approvals is waiting for an answer from [Code Review](</docs/en/code-review-pull-requests>) or a [classifier](</docs/en/approvals-classifiers>), or didn’t get one:
+With these titles, Approvals needs an answer from [Code Review](</docs/en/code-review-pull-requests>) or a [classifier](</docs/en/approvals-classifiers>):
Title| What to do
---|---
-**Waiting for Code Review** , **Waiting for repo/change_risk** , **Waiting for classifiers**| Nothing yet
-**A classifier had no result** , **A classifier has not run** , or a name in place of “A classifier”, as in **repo/change_risk has not run**| Rerun the Claude Approvals check. See [when a run gives no answer](</docs/en/approvals-classifiers#what-a-rule-sees-when-a-classifier-run-gives-no-answer>)
+**Waiting for Code Review** , **Waiting for repo/change_risk** , **Waiting for classifiers**| Wait for the result
+**A classifier had no result** , **A classifier has not run** , or a name in place of “A classifier”, as in **repo/change_risk has not run**| Rerun the Claude Approvals check. See [what a rule sees without an answer](</docs/en/approvals-classifiers#what-a-rule-sees-when-a-classifier-run-gives-no-answer>)
### A rule or a policy file keeps Approvals from passing
-With these titles, a rule holds the pull request, no rule applies to a changed file, or a policy file can’t be used:
+With these titles, a rule holds the pull request or the policy needs a fix:
Title| What to do
---|---
-**Held by Code Review’s findings**| Fix the findings that Code Review posted on the pull request, then push. If the policy’s [`findings`](</docs/en/approvals-policy#findings>) list names you, you can resolve the findings’ threads. If the **Claude Approvals** check doesn’t pass after you resolve them, push a fix
+**Held by Code Review’s findings**| Fix the findings that Code Review posted on the pull request, then push. If the policy’s [`findings`](</docs/en/approvals-policy#findings>) list names you, you can resolve the findings’ threads. If the **Claude Approvals** check is still held after you resolve them, push a fix
**Held by** and a rule’s purpose in quotes, **Held by a policy rule**| Ask whoever maintains the policy file what the rule in the check’s summary needs, then push a fix
**No rule applies to** and a file’s name in quotes, **No rule applies to a changed file**| Ask whoever maintains the policy file for a rule with no `if` that covers the file. Rerun the check once that rule merges
**This change breaks a policy file** , **Default branch policy file cannot be used**| [Fix the policy file](</docs/en/approvals-troubleshooting#fix-a-policy-file-that-approvals-refuses>)
@@ -57,10 +57,10 @@
Title| What to do
---|---
**Passed; no approval from Claude**| If GitHub requires an approval, ask a person
-**Nothing ran, not blocking: no file is covered**| Nothing. If someone should review the files that the pull request changes, ask whoever maintains the [policy file](</docs/en/approvals-policy>) to cover them
+**Nothing ran, not blocking: no file is covered**| If someone should review the files that the pull request changes, ask whoever maintains the [policy file](</docs/en/approvals-policy>) to cover them
**Observe mode ended: not evaluated yet**| Push a commit or rerun the Claude Approvals check. If it passes, a pull request with auto-merge on or in a merge queue can merge at once
-Under **Passed; no approval from Claude** , Claude posts no approval in cases such as these:
+If you see **Passed; no approval from Claude** , check for causes such as these:
* A rule says `claude: comments`
* A changed file has no rule, or is a [symlink, submodule pointer, or `.gitattributes` file](</docs/en/approvals-policy#protected-files>)
@@ -68,13 +68,13 @@
## Approvals in observe mode
-In observe mode, the **Claude Approvals** check ends neutral, which GitHub counts as passing, with a title that starts **(observe mode)**. The check isn’t neutral in cases such as these:
+In observe mode, the **Claude Approvals** check ends neutral, which GitHub counts as passing, with a title that starts **(observe mode)**. The check can wait, fail, be withheld, or be missing in cases such as these:
Case| What the check does
---|---
The pull request changes a policy or classifier file| It can wait for one person, who can be the author. It fails if the change breaks one of those files
The default branch’s policy file can’t be used| It fails until you [fix the policy file](</docs/en/approvals-troubleshooting#fix-a-policy-file-that-approvals-refuses>)
-The title says Withheld| Approvals holds back a passing check, for example because another open pull request has the same latest commit. The check’s summary says what clears it
+The title says Withheld| Approvals holds back a passing check, for example because another open pull request has the same latest commit. Read the check’s summary for what clears it
The pull request targets another branch than the default| No check appears, unless the pull request changes a policy or classifier file
## Comment commands for Approvals
@@ -91,20 +91,20 @@
## Pull requests from Claude, forks, and outside contributors
-A pull request that `claude[bot]` opened needs a second GitHub App before Claude can approve it. A pull request from a fork, or from a person without write access, can need a maintainer.
+Before Claude can approve a pull request that `claude[bot]` opened, you need a second GitHub App. A pull request from a fork, or from a person without write access, can need a maintainer.
### Pull requests that Claude opens
-GitHub doesn’t let the account that opened a pull request approve it. Without a second app, Claude gives no approval on a pull request that `claude[bot]` opened, and the **Claude Approvals** check can pass with the title **Passed; no approval from Claude**. To get Claude’s approval on those pull requests, add a second app:
+Until you add a second GitHub App, the **Claude Approvals** check on a pull request that `claude[bot]` opened can pass with the title **Passed; no approval from Claude**. To get Claude’s approval on those pull requests, add a second app:
1. **Install it** : ask an owner of your GitHub organization to install the [Claude Approvals GitHub App](<https://github.com/apps/claude-approvals/installations/new>) on the repository.
- 2. **Link it** : [link the app to your Claude organization](<https://claude.ai/settings/claude-approvals/github/finish>). That takes someone who is an owner of the GitHub organization and an Owner or Primary Owner of the Claude organization. If nobody is both, contact [Anthropic support](<https://support.claude.com>).
+ 2. **Link it** : ask someone who is an owner of the GitHub organization and an Owner or Primary Owner of the Claude organization to [link the app to your Claude organization](<https://claude.ai/settings/claude-approvals/github/finish>). If they can’t link it, contact [Anthropic support](<https://support.claude.com>).
Then rerun the check on an open pull request that `claude[bot]` opened. Leave the required check’s source as it is, because the [Claude GitHub App](<https://github.com/apps/claude>) still reports the check.
### Pull requests from forks and outside contributors
-Approvals can’t confirm that someone with write access pushed a fork’s commits. On a fork’s pull request, Approvals can wait for a maintainer, meaning someone with write access:
+On a fork’s pull request, Approvals can wait for a maintainer, meaning someone with write access:
* **Until a maintainer vouches for a commit** : no classifier’s answer counts, Code Review’s included. Where a rule depends on one, the **Claude Approvals** check’s title can read **No classifier result counts on this commit**.
* **To vouch for a commit** : outside observe mode, if you have write access, read the change. Then comment `@claude approvals rerun` followed by the latest commit’s full SHA, as the comment’s only text. Classifiers can then run for that commit. With no SHA, the command can cover the commit that was latest when you commented.
Show diff (101 lines)
--- a/approvals-setup.md
+++ b/approvals-setup.md
@@ -8,20 +8,22 @@
* The [Claude GitHub App](<https://github.com/apps/claude>), installed on the repository and [linked to your Claude organization](</docs/en/admin-setup#connected-github-accounts>)
* Permission to merge into the default branch
* Admin access to the repository on GitHub, to require the **Claude Approvals** check. A private repository also needs a [paid GitHub plan](<https://docs.github.com/en/get-started/learning-about-github/githubs-plans>)
- * Two people with write access, before you enforce either policy on this page. With only one, the check can’t pass on a change under `.claude/`, or where Claude’s review fails or gives no result. Under the policy that keeps two people on each change, it can’t pass on any change
+ * Two people with write access, before you enforce either policy on this page. Both policies require two people on a change under `.claude/`, which includes the policy file
## Plan your first policy
-A [policy file](</docs/en/approvals-policy>) tells Approvals who has to approve a pull request. For your first one, decide whether Claude can approve, then copy the starter policy that matches:
+In a [policy file](</docs/en/approvals-policy>), you set who has to approve a pull request. For your first one, decide whether Claude can approve, then copy the starter policy that matches:
- * **Let Claude approve when Code Review passes** : a pull request that passes Claude’s review usually needs no approval from another person
- * **Keep two people on each change** : a pull request usually needs one person besides the author, and Claude doesn’t approve
+ * **Let Claude approve when Code Review passes** : a pull request that passes Claude’s review usually needs only its author
+ * **Keep two people on each change** : a pull request usually needs one person besides the author, and Claude only comments
-Both policies start in observe mode, where the **Claude Approvals** check shows what the policy would decide, Claude doesn’t approve, and the check [normally counts as passing](</docs/en/approvals-pull-requests#approvals-in-observe-mode>). Both also name `claude/code_review`. Keep it in your policy file. Once the file is on the default branch, in observe mode or enforced, automatic Code Reviews normally stop where no matching rule names it.
+Both policies start in observe mode, where the **Claude Approvals** check shows what the policy would decide and [normally counts as passing](</docs/en/approvals-pull-requests#approvals-in-observe-mode>). Both also name `claude/code_review`. Keep it in a rule that matches the files you want reviewed, so that [automatic Code Reviews continue](</docs/en/approvals#keep-automatic-code-reviews>) in observe mode and once you enforce.
+
+To have Claude write or change a policy file for you, type [`/claude-approvals`](</docs/en/commands>) at the Claude Code prompt in your repository, followed by what you want. Requires Claude Code v2.1.331 or later and [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>).
### Let Claude approve when Code Review passes
-Once this starter policy is enforced, a pull request that passes Claude’s review usually needs no approval from another person, except for changes under `.claude/`. Other pull requests usually need one person [besides the author](</docs/en/approvals-policy#whether-a-pull-request%E2%80%99s-author-counts>). In this policy, the first rule asks for two people on a change. Its `override` lowers that to one and lets Claude approve when `claude/code_review` reads `pass`. The second rule asks for two people on a change under `.claude/`:
+Once you enforce this starter policy, a pull request that passes Claude’s review usually needs only its author, except for changes under `.claude/`. Other pull requests usually need one person [besides the author](</docs/en/approvals-policy#whether-a-pull-request%E2%80%99s-author-counts>). In this policy, the first rule asks for two people on a change. Its `override` lowers that to one and lets Claude approve when `claude/code_review` reads `pass`. The second rule asks for two people on a change under `.claude/`:
# .claude/approvals.yml
version: 1
@@ -41,7 +43,7 @@
### Keep two people on each change
-This starter policy asks for two people on each change. Once the policy is enforced, a pull request usually needs one person besides the author, and Claude doesn’t approve. In this policy, both rules ask for two people. The first rule lists `claude/code_review` under [`advisory`](</docs/en/approvals-policy#advisory>), so reviews follow your Code Review settings:
+Use this starter policy to ask for two people on each change. Once you enforce it, a pull request usually needs one person besides the author, and Claude only comments. In this policy, both rules ask for two people. The first rule lists `claude/code_review` under [`advisory`](</docs/en/approvals-policy#advisory>), so reviews follow your Code Review settings:
# .claude/approvals.yml
version: 1
@@ -88,13 +90,13 @@
Before you switch your policy from observe mode to enforcement, decide which files need a person, which branches the check gates, and when to change GitHub’s required approvals:
- * **Files** : decide which ones need a person’s approval whatever Claude finds, then copy [this rule](</docs/en/approvals-github-rules#ask-for-a-person-who-isn%E2%80%99t-an-author>) and narrow its `paths`
+ * **Files** : decide which ones need a person’s approval whatever Claude finds, then copy [this rule](</docs/en/approvals-github-rules#ask-for-a-person-who-isn%E2%80%99t-an-author>) and narrow its `paths` list
* **Branches** : an enforced policy also covers pull requests into branches other than the default branch, so list each branch whose merges the **Claude Approvals** check should gate. On those branches, a pull request with no covered file gets no check, so a required check waits
* **GitHub’s required approvals** : [change the number of approvals that GitHub requires](</docs/en/approvals-github-rules#required-reviews-and-codeowners>) only after the last step of the switch
### Switch from observe mode to enforcement
-A policy file’s [`mode`](</docs/en/approvals-policy#top-level-keys>) is one of these:
+A policy file’s [`mode`](</docs/en/approvals-policy#top-level-keys>) key is one of these:
* **`observe`** : the **Claude Approvals** check shows what the policy would decide, Claude doesn’t approve, and the check [normally counts as passing](</docs/en/approvals-pull-requests#approvals-in-observe-mode>)
* **`enforce`** : the check can block a merge, and Claude can approve where the policy allows it. This is the default, so a policy file with no `mode` line is enforced
@@ -129,7 +131,7 @@
### Set the source that GitHub accepts for Claude Approvals
-Set the required check’s source to the Claude app. With **any source** , GitHub accepts a check named **Claude Approvals** from elsewhere. To set the source through GitHub’s API, put the Claude app’s ID, `1236702`, in `integration_id` in a ruleset or `app_id` in a branch protection rule.
+Set the required check’s source to the Claude app. If you allow **any source** , GitHub accepts a check named **Claude Approvals** from elsewhere. To set the source through GitHub’s API, put the Claude app’s ID, `1236702`, in `integration_id` in a ruleset or `app_id` in a branch protection rule.
## Control what Approvals spends
@@ -137,7 +139,7 @@
### What Approvals costs
-A policy with `claude/code_review` in an `if` condition can start a [billed Code Review](</docs/en/code-review-costs>) when a pull request opens and at each push. To stop those reviews, move it from the conditions to `advisory`. When `claude/code_review` is only under `advisory`, with no [`level`](</docs/en/approvals-classifiers#read-a-classifier%E2%80%99s-answer-from-a-rule>), reviews follow your Code Review settings. A rule can also read other [classifiers](</docs/en/approvals-classifiers>). For `claude/diff` and custom classifiers, each [run that calls a model](</docs/en/approvals-classifiers#what-a-classifier-run-costs>) is billed. To limit each run of a custom classifier, set its [`budget`](</docs/en/approvals-classifiers#budget>).
+A policy with `claude/code_review` in an `if` condition can start a [billed Code Review](</docs/en/code-review-costs>) when a pull request opens and at each push. To stop those reviews, move it from the conditions to `advisory`. When `claude/code_review` is only under `advisory`, with no [`level`](</docs/en/approvals-classifiers#read-a-classifier%E2%80%99s-answer-from-a-rule>), reviews follow your Code Review settings. A rule can also read other [classifiers](</docs/en/approvals-classifiers>). For `claude/diff` and custom classifiers, each [run that calls a model](</docs/en/approvals-classifiers#what-a-classifier-run-costs>) is billed. To limit each run of a custom classifier, set its [`budget`](</docs/en/approvals-classifiers#budget>) key.
### Limit what a policy costs
@@ -158,7 +160,7 @@
You can turn off Approvals for one repository, for a GitHub organization, or for your whole Claude organization.
-Suspend or uninstall the Claude GitHub App, or unlink your GitHub organization, only after you turn off Approvals. If you do it first, new commits get no check, so a required check can block merges. GitHub can also continue to count Claude’s approving reviews that are left on open pull requests.
+Suspend or uninstall the Claude GitHub App, or unlink your GitHub organization, only after you turn off Approvals. If you take any of those steps first, a required **Claude Approvals** check can block merges. GitHub can also continue to count Claude’s approving reviews that are left on open pull requests.
Follow this order:
@@ -167,7 +169,7 @@
3. **Turn Approvals off** : choose how, by the scope that you want.
4. **Dismiss Claude’s reviews** : on open pull requests that Claude approved, dismiss that review in GitHub.
-To stop the check from blocking without turning Approvals off, first stop requiring it on branches other than the default branch. Then put `mode: observe` in every policy file. The check then normally stops blocking, and classifiers still run and bill. Pull requests into those other branches get no check unless they change a policy or classifier file.
+To keep Approvals on and stop the check from blocking, first stop requiring it on branches other than the default branch. Then put `mode: observe` in every policy file. The check then [normally stops blocking](</docs/en/approvals-pull-requests#approvals-in-observe-mode>), and classifiers still run and bill.
### Ways to turn off Approvals
@@ -179,7 +181,7 @@
A GitHub organization, or a repository whose **Edit** dialog shows **Claude Approvals**| With an [Owner role](</docs/en/server-managed-settings#access-control>), go to [**Organization settings > Claude Ship**](<https://claude.ai/admin-settings/claude-ship>), click **Edit** on its row, and turn off **Claude Approvals**
The whole Claude organization| With an Owner role, go to [**Organization settings > Claude Ship**](<https://claude.ai/admin-settings/claude-ship>) and click **Block globally** in the **Approve** row. To turn it back on, click **Allow policy files** in the same row
-What you turn off for the whole Claude organization stays off when a policy file merges later. If you’re turning off Code Review too, turn off Approvals first, because a policy can start billed reviews where Code Review is off.
+After you turn off Approvals for the whole Claude organization, it stays off when a policy file merges later. If you’re turning off Code Review too, turn off Approvals first, because a policy can start billed reviews where Code Review is off.
## Related resources
--- a/approvals-troubleshooting.md
+++ b/approvals-troubleshooting.md
@@ -68,12 +68,18 @@
”no key of this name is read at this place”| Check the key’s spelling and its level against [Top-level keys](</docs/en/approvals-policy#top-level-keys>) and [Rule keys](</docs/en/approvals-policy#rule-keys>)
”this names no fact and no usable classifier”| Check the name against the [facts](</docs/en/approvals-policy#if>). For `repo/<name>`, check that `.claude/classifiers/<name>/def.yml` loads, beside the policy file or in a directory above it
”a condition has no NOT”| Write the opposite operator
+”a login goes in single quotes inside a condition”| If the word is a login, put it in single quotes, as in `"pr/opened_by = 'ana-acme'"`. For a bot, write `bot:` and its name with no quotes, as in `"pr/opened_by = bot:dependabot"`
”no local has this name”| Define the local in this file or a policy file above it. Write a login or a team with no `@`
”this is not YAML”| Look near the line that the message names for a quote or bracket that doesn’t close, or a tab. Indent with spaces
## A classifier gave no answer or its definition is refused
-To see each [classifier](</docs/en/approvals-classifiers>) run’s state and the reason for a missing answer, open **Classifier results** in Claude’s comment on the pull request. If a run reached its budget, split the pull request, or raise a `time` or `cost` that is under its [maximum](</docs/en/approvals-classifiers#budget>). Then find the **Claude Approvals** check’s title here:
+To see each [classifier](</docs/en/approvals-classifiers>) run’s state and the reason for a missing answer, open **Classifier results** in Claude’s comment on the pull request:
+
+ * **A run reached its budget** : split the pull request, or raise a `time` or `cost` that is under its [maximum](</docs/en/approvals-classifiers#budget>)
+ * **A run had more to read than one run can handle** , for example a large diff: try a smaller pull request
+
+Then find the **Claude Approvals** check’s title here:
Title| What to do
---|---
Show diff (105 lines)
--- a/artifacts.md
+++ b/artifacts.md
@@ -27,7 +27,7 @@
Build a dashboard artifact of last week's deploy failures by service and keep it updated as you investigate.
-Unless you name a location, Claude writes the page to an HTML or Markdown file in a temporary directory outside your project, then publishes it. The artifact stays private to you until you share it. After the first publish, Claude prints the URL, and your browser opens to the new page.
+The artifact stays private to you until you share it. After the first publish, Claude prints the URL, and your browser opens to the new page.
* **Reopen the page** : press `Ctrl+]` at any time to reopen the session’s most recent artifact
* **See this session’s artifacts** : a `⧉` pill below the prompt shows the artifact’s name, or a count when the session has several. In [fullscreen rendering](</docs/en/fullscreen>), click it to open the `/artifacts` list
@@ -38,7 +38,7 @@
### When Claude Code asks before publishing
-A new artifact that Claude publishes in response to a prompt you type goes through without a permission prompt or classifier review. In these cases Claude Code asks you first, or in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) has the classifier review the publish:
+A new artifact that Claude publishes in response to a prompt you type can go through without a permission prompt or classifier review. Outside `bypassPermissions` mode, the publish needs your approval in cases such as these, or the classifier’s review in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>):
When| What Claude Code does
---|---
@@ -46,14 +46,14 @@
The publish declares runtime capabilities for the page, such as connector calls or file downloads| Asks before that publish
You shared the artifact publicly| Asks at least once per conversation before changing it, and before each reply to a comment on it
Claude publishes in a turn that a [session-scoped scheduled task](</docs/en/scheduled-tasks>) firing in your session started, rather than a prompt you typed| Asks before the first publish of each artifact
-Claude can’t read the file without your approval| Asks before publishing it. An allow rule for the `Artifact` tool doesn’t skip this prompt
+Claude publishes from a file it can’t read without your approval| Asks before publishing, or refuses the file. An allow rule for the `Artifact` tool doesn’t count as approval
In [Manual](</docs/en/permission-modes>) or `acceptEdits` mode, Claude makes a small change to an artifact’s file it can’t edit without your approval, such as a project file in Manual mode| Asks before publishing the change. You’re asked even if an allow rule covers the `Artifact` tool, because the edit to the file needs your approval
-To let Claude read a file outside your [working directories](</docs/en/permissions#working-directories>) without your approval, add its folder as a working directory with [`--add-dir`](</docs/en/cli-reference#cli-flags>) at launch or `/add-dir` during the session. Claude already reads files in those directories, and in the temporary directory it writes pages to, without asking. If a publish prompt includes a sentence such as `Also makes 1 edit to that file on disk.`, Claude is changing the artifact’s file and publishing it in one step. When you approve the prompt, Claude Code publishes the page, then writes the change to your file.
+To let Claude read a file outside your [working directories](</docs/en/permissions#working-directories>) without your approval, add its folder as a working directory with [`--add-dir`](</docs/en/cli-reference#cli-flags>) at launch or `/add-dir` during the session. If a publish prompt includes a sentence such as `Also makes 1 edit to that file on disk.`, Claude is changing the artifact’s file and publishing it in one step. When you approve the prompt, Claude Code publishes the page, then writes the change to your file.
## Update an artifact
-Ask Claude to revise the page, or let a long-running task republish as it makes progress. Claude edits the underlying file and publishes again to the same URL.
+Ask Claude to revise the page, or let a long-running task republish as it makes progress. Claude publishes again to the same URL.
Add a per-region breakdown below the summary chart and republish.
@@ -106,10 +106,10 @@
## Read an artifact shared with you
-When someone shares an artifact with you, you can have Claude read it: give Claude its URL, or attach it from `/artifacts`. Claude reads a page someone else wrote the way it reads a web page with [WebFetch](</docs/en/tools-reference#webfetch-tool-behavior>): it gets a summary of what it asked about rather than the raw page, and the summary reports instructions written into the page instead of relaying them. Claude Code also saves the page’s full source to a local file, which Claude can open when it needs the exact content, such as to republish the artifact as an editor. Claude Code asks for your approval before Claude reads the artifact in these cases, in addition to any prompt your permission mode or rules call for:
+When someone shares an artifact with you, you can have Claude read it: give Claude its URL, or attach it from `/artifacts`. Claude Code can save the page’s full source to a local file, which Claude can open. Claude Code can ask for your approval before the [Artifact tool](</docs/en/tools-reference>) reads an artifact in these cases, in addition to any prompt your permission mode or rules call for:
* **Cloud session without network access** : for a [cloud environment](</docs/en/cloud-environments#access-levels>), that’s the **None** level. In [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), the classifier can approve instead; in a [Cowork](<https://claude.com/product/cowork>) session, the approval is yours alone.
- * **Another organization’s public artifact** : Claude Code asks you first, even in auto mode. Where Claude Code can’t ask you, such as in `bypassPermissions` mode, Claude can’t read the artifact. Claude can read these artifacts only while [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) is on.
+ * **Another organization’s public artifact** : the tool asks you first, even in auto mode. Where Claude Code can’t ask you, such as in `bypassPermissions` mode, the tool can’t read one you haven’t approved in this conversation. The tool can read these artifacts only while [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) is on.
* **Unconfirmed owner or network setting** : when Claude Code can’t confirm who made the artifact, or can’t confirm a cloud session’s network setting, it asks, and your approval covers that one request. In [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), the classifier can approve or block the read instead of asking you.
* **Plan mode** : in [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>), Claude Code asks before the Artifact tool reads an artifact someone else in your organization made.
@@ -119,7 +119,7 @@
When you share an artifact within your organization, the people you share it with can leave comments on the page, and you can have Claude read those comments and reply to them. You need Claude Code v2.1.221 or later. Claude reads the comments in two cases:
- * **You ask Claude to read them** : give Claude the artifact’s URL and ask for the comments. Claude lists each thread and marks the comments someone who can edit the artifact sent to it.
+ * **You ask Claude to read them** : give Claude the artifact’s URL and ask for the comments.
* **Someone who can edit the artifact sends a comment to Claude** : in a thread on the page, they send a comment with **Send to Claude** , or mention `@claude` in one. Either way, they activate the thread.
Claude can reply to or resolve only an activated thread. Other threads stay open until a person resolves them on the page. Viewers see each reply attributed to Claude, via you. If you share an artifact publicly, people whose only access is the public link don’t see its comments and can’t add any. Existing comment threads stay on the artifact, and you and its editors can still read and reply to them. To ask for the comments yourself, give Claude the URL:
@@ -132,7 +132,7 @@
After your session publishes an artifact, Claude Code watches that artifact for comments. When someone who can edit the artifact sends a comment to Claude, it reaches your session right away, and Claude can read the thread and reply without you asking. You need Claude Code v2.1.228 or later. Your [permission mode](</docs/en/permission-modes>) decides what Claude does when a sent comment arrives:
- * **Claude replies on its own** : if you’re in a permission mode that lets Claude post the reply without asking you, Claude reads the thread and replies. You see `Auto-replied to comment thread on Artifact: <name>`.
+ * **Claude replies on its own** : if you’re in a permission mode that lets Claude post the reply without asking you, Claude reads the thread and replies. You see a notice such as `Auto-replied to comment thread on Artifact: <name>`.
* **Claude waits for you** : outside plan mode, when posting the reply would need your approval, you see `Comments are waiting on Artifact: <name>`. Claude then asks you for approval to read the thread, and again to post the reply.
* **Claude pauses in plan mode** : you see `Comments are waiting on Artifact: <name>`, and Claude doesn’t reply until you leave plan mode and ask it to read and reply.
@@ -142,7 +142,7 @@
* **Stop the task in`/tasks`**: Claude stops replying on that artifact until you ask it to resume replies there. Publishing the artifact again doesn’t start replies again, and the stop still applies when you resume the session later.
* **Press`Ctrl+X Ctrl+K` twice within 3 seconds**: the chord that [stops every running background subagent](</docs/en/interactive-mode#general-controls>) also stops Claude from replying on every artifact for the rest of the session. Asking Claude to resume replies doesn’t undo this stop.
-A watch that Claude Code started on its own can end after the artifact goes several hours without activity. You see `Stopped watching Artifact: <name> (idle)`. To start the watch again, publish the artifact again or ask Claude to watch it. If you see `(made room for a newer watch)` in place of `(idle)`, your session reached its limit of 25 watches. Publish again to restart that watch. If the service that delivers comments becomes unavailable or stops answering, Claude Code keeps trying to reconnect for a while, then stops watching each artifact your session was watching.
+If you see `Stopped watching Artifact: <name>` followed by `(idle)`, `(connection lost)`, or `(made room for a newer watch)`, ask Claude to republish the artifact to restart the watch. A watch that Claude Code started on its own can end after several hours without activity.
## Pull live data with MCP connectors
@@ -232,7 +232,7 @@
The [artifact templates](<https://support.claude.com/en/articles/17153992-what-are-artifacts-and-how-do-i-use-them#h_11d5a9a5fa>) on your claude.ai account also work from Claude Code. For example, use the [Claude Design](<https://support.claude.com/en/articles/14604416-get-started-with-claude-design>) template for a visual design, or the [Claude Docs](<https://support.claude.com/en/articles/16923645-get-started-with-claude-docs>) template for a document other people will read and edit. Your account can include others, such as Sheets, Whiteboards, or Data. To see which ones your session has, ask Claude to list the artifact templates available to you. To use a template from Claude Code, you need:
* A session where artifacts are available
- * On Team and Enterprise plans, the template turned on for your organization. If it’s off, ask an Owner to [turn the template on](<https://support.claude.com/en/articles/16994751-artifacts-admin-guide-for-team-and-enterprise-plans#h_6e06d8f1a8>) under **Organization settings > Artifacts** on claude.ai.
+ * On Team and Enterprise plans, the template turned on for your organization. If it’s off, ask an Owner to [turn the template on](<https://support.claude.com/en/articles/16994751-artifacts-admin-guide-for-team-and-enterprise-plans#h_6e06d8f1a8>) under [**Organization settings > Artifacts**](<https://claude.ai/admin-settings/artifacts>) on claude.ai.
* On Enterprise plans with custom roles, a role that [includes the template](<https://support.claude.com/en/articles/16994751-artifacts-admin-guide-for-team-and-enterprise-plans#h_d830917488>)
* For the Docs and Sheets templates, the Claude Docs connector, which Claude uses to write the content of both. If you [turned the connector off](</docs/en/mcp#disable-claude-ai-connectors>), turn it back on first.
* Claude Code v2.1.265 or later, if you start the Design template with its `/design` command
@@ -253,7 +253,7 @@
## Page constraints
-Each artifact is one self-contained page. Claude Code wraps the file you publish in an HTML document shell and serves it under a strict Content Security Policy (CSP), which shapes what the page can do.
+Each artifact is served under a strict Content Security Policy (CSP) that limits what the page can do.
Constraint| Effect
---|---
@@ -282,7 +282,7 @@
Organization policy| Customer-managed encryption keys (CMEK), HIPAA, and [Zero Data Retention](</docs/en/zero-data-retention>) are not enabled for the organization.
Surface| Claude Code CLI, or the Claude desktop app version 1.13576.0 or later. [Claude Tag](<https://claude.com/docs/claude-tag/overview>) sessions can also publish artifacts when both Claude Tag and artifacts are enabled for the organization. Sessions served by [`claude remote-control`](</docs/en/remote-control>) can publish artifacts when you started the session yourself. Requires Claude Code v2.1.281 or later. Off by default in the [Agent SDK](</docs/en/agent-sdk/overview>), the GitHub Action, and MCP-server contexts, when you run Claude Code with [`-p`](</docs/en/headless>) from your own terminal or scripts, and when [`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`](</docs/en/env-vars>) is set.
-Whether artifacts are allowed for your organization comes from your organization’s policy, which Claude Code loads from `api.anthropic.com`. When Claude Code can’t load the policy, artifacts are unavailable. When you ask for one, Claude says why. If a proxy, VPN, or web filter is involved, ask your IT admin to let `api.anthropic.com` through. Claude Code keeps retrying in the background, and artifacts become available once the policy loads and allows them.
+Whether artifacts are allowed for your organization comes from your organization’s policy, which Claude Code loads from `api.anthropic.com`. When Claude Code can’t load the policy, artifacts are unavailable. When you ask for one, Claude says why. If a proxy, VPN, or web filter is involved, ask whoever runs it to let `api.anthropic.com` through. Claude Code keeps retrying in the background, and artifacts become available once the policy loads and allows them.
## Disable artifacts
--- a/authentication.md
+++ b/authentication.md
@@ -11,8 +11,8 @@
* **Claude Pro, Max, or Ultra subscription** : log in with your claude.ai account. Subscribe at [claude.com/pricing](<https://claude.com/pricing?utm_source=claude_code&utm_medium=docs&utm_content=authentication_pro_max>).
* **Claude for Teams or Enterprise** : log in with the claude.ai account your team admin invited you to.
- * **Claude Console** : log in with your Console credentials. Your admin must have invited you first. You can sign in with or without creating an API key.
- * **Cloud providers** : if your organization uses [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), or [Microsoft Foundry](</docs/en/microsoft-foundry>), set the required environment variables before running `claude`. You can also select **3rd-party platform** at the login prompt, which launches an interactive setup wizard for Bedrock and Agent Platform.
+ * **Claude Console** : log in with your Console credentials. You can sign in with or without creating an API key.
+ * **Cloud providers** : if you use [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), or [Microsoft Foundry](</docs/en/microsoft-foundry>), set the required environment variables before running `claude`. You can also select **3rd-party platform** at the login prompt, which launches an interactive setup wizard for Bedrock and Agent Platform.
* **Cloud gateway** : if your organization runs a self-hosted [Claude apps gateway](</docs/en/claude-apps-gateway>), sign in with corporate SSO through `/login` or [from VS Code](</docs/en/vs-code#sign-in-to-a-claude-apps-gateway>). The gateway-issued token is the session’s only credential.
* **Enterprise Admin Console** : if an Owner [turned on this sign-in](<https://claude.com/docs/third-party/claude-desktop/admin-console-claude-code#turn-on-sign-in-from-claude-code>) for your organization’s provider or gateway, run `claude auth login` in your shell and select your organization in the browser. To confirm, look for `Signed in to the organization` in the terminal. For the Claude Code version you need, see [Before you start](<https://claude.com/docs/third-party/claude-desktop/admin-console-claude-code#before-you-start>).
--- a/best-practices.md
+++ b/best-practices.md
@@ -26,7 +26,7 @@
Every instruction you give Claude Code is one of these:
- 1. Non-deterministic: you write the instruction, and Claude (the model) reads it. This can be your prompt, `CLAUDE.md`, or a skill. The model then decides what to do with this information. It usually follows your commands, and current models are good at understanding your intent without much context, but there’s no _guarantee_ that it’ll follow your instructions. It can still decide not to do things, or do other things.
+ 1. Non-deterministic: you write the instruction, and Claude (the model) reads it. This can be your prompt, `CLAUDE.md`, or a skill. The model then decides what to do with this information. It usually follows your commands, and current models are good at understanding your intent without much context, but there’s no _guarantee_ that it’ll follow your instructions.
2. Deterministic: you configure the instruction, and Claude Code (the harness) _has_ to execute this. This can be a hook, a deny rule, or a managed setting. Claude Code applies this every time, no matter what the model decided to do.
Most things in Claude Code come in both forms:
@@ -474,8 +474,7 @@
Keep it to small files: it copies rather than links, so `node_modules` in there would mean a full copy per worktree. For large directories there’s the [`worktree.symlinkDirectories`](</docs/en/settings-reference#worktree-symlinkdirectories>) setting, or keep the install command in `CLAUDE.md` so Claude runs it whenever it starts in a new checkout. You rarely have to clean any of this up yourself:
* When you exit an unnamed worktree session, Claude Code [removes a worktree it created with git](</docs/en/worktrees#clean-up-worktrees>) if there’s nothing in it. For a named session, or one with changes, it asks what to do.
- * Subagent worktrees disappear when the subagent finishes without changes.
- * Subagent and background-session worktrees that do get left behind are swept once they’re older than `cleanupPeriodDays` and hold no work.
+ * Subagent and background-session worktrees that get left behind [can be removed automatically](</docs/en/worktrees#clean-up-subagent-and-background-session-worktrees>) once they’re older than `cleanupPeriodDays` and hold no work.
A `claude -p --worktree` run is one you clean up yourself, since it exits without asking. Remove those with `git worktree remove <path>`, and if git refuses because the worktree is locked, `git worktree unlock <path>` first.
--- a/champion-kit.md
+++ b/champion-kit.md
@@ -108,7 +108,7 @@
### Thirty-day playbook
-If a loose plan is helpful, the sequence below reflects what tends to work across most teams. Adjust freely to fit your context.
+If a loose plan is helpful, the sequence below reflects what tends to work across most teams.
1
Show diff (173 lines)
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,170 @@
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.332
+
+November 25, 2026
+
+**Added**
+
+ * Added skills from MCP servers (beta). They show as `server:skill` in the `/` menu; other skills keep their names
+ * Added a `PreSkillShellCommand` hook event that can refuse a skill or command’s inline shell commands as it loads; on 2.1.331 and older, a settings file naming it opens a dialog at start
+ * Added “Always deliver” to the prompt for held messages from other sessions
+ * Added a footer line that stays while a flagged message has your session on a different model, until you pick one with `/model`
+ * Added an OpenTelemetry `assistant_response` event for text Claude sends through SendUserMessage or Cowork’s message tool, when response logging is on
+ * Added a warning in VS Code and Desktop’s Code tab when part of a session couldn’t be saved, saying how to save it with `/compact`
+ * Added a notice in VS Code and Desktop’s Code tab when a resumed session’s earlier messages weren’t loaded, as the terminal already shows
+ * Added your Cyber Verification Program access tier to the startup header, beside the model name when your tier applies to that model and you’re signed in with a claude.ai account
+ * [VSCode] Added a notification in more cases when closing a proposed diff leaves the edit unapplied, and stopped the diff notifications on a split copy of an answered diff
+ * [VSCode] Added a warning when restoring a conversation with `/rewind` in the side bar stops a self-paced `/loop`
+ * [VSCode] Added the installed version to the rows of Manage plugins
+
+**Changed**
+
+ * Updated computer use on macOS to newer safety rules, so some actions are refused and typing can be slower
+ * Changed terminal and VS Code sessions moved to Sonnet 5 or 5.5 on Bedrock Mantle, Agent Platform and Foundry to start in auto mode if no mode is set; set `disableAutoMode` to `"disable"` to stop it
+ * Changed the `sonnet` model alias on Google Cloud’s Agent Platform and Microsoft Foundry to Sonnet 5.5, and Foundry’s `opus` alias to Opus 5.5; `sonnet` on Amazon Bedrock stays at Sonnet 4.5
+ * Changed the default model on Microsoft Foundry to Sonnet 5.5: deploy `claude-sonnet-5-5`, or set `ANTHROPIC_DEFAULT_SONNET_MODEL` to a model you have deployed
+ * Changed `sonnet` and background requests on Google Cloud’s Agent Platform to read `VERTEX_REGION_CLAUDE_5_5_SONNET`; with only the `4_5` variable set they go to `CLOUD_ML_REGION` or `us-east5`
+ * Changed `--model default` and a Default pick to move to an older model when that model isn’t available, instead of stopping with an error; in auto mode, only to a model auto mode accepts
+ * Changed Microsoft Foundry: Claude Sonnet 4, Opus 4 and Opus 4.1 now count as retired, so step-downs stop above them and a pin to one warns that it was retired
+ * Changed the Claude apps gateway’s built-in model list: Sonnet 5.5 replaces Sonnet 4.5 as its second model, and Claude Desktop starts on it where a policy allows no Opus 4.6
+ * Changed SDK and `claude -p` mid-turn messages to count as the user’s where feature flags aren’t fetched, as on clouds or with telemetry off, from Opus 4.8 on; mark relayed text `isSynthetic: true`
+ * Changed `computer-use` to a reserved skill name on Macs with computer use on: your own skill or command of that name stops loading, and a start-up notice says to rename it
+ * Changed the default OpenTelemetry `service.name` of desktop Code tab sessions to `claude-code-desktop`; update filters keyed on `claude-code`, or set `OTEL_SERVICE_NAME` to keep the old name
+ * Changed OpenTelemetry `tool_input` to show only the length of text sent through SendUserMessage or Cowork’s message tool, unless response logging is on (`OTEL_LOG_ASSISTANT_RESPONSES=1`)
+ * Self-hosted runner: Changed `CLAUDE_CODE_OAUTH_TOKEN`: its prefix can now end in `oat02-` as well as `oat01-`. Update proxy rules and log scrubbers that match `oat01-`, and mask the whole value
+ * Changed `claude self-hosted-runner setup` with no arguments on macOS and Linux to ask for the environment key in the terminal before Claude starts, and to hide it as you paste
+ * Changed Claude Desktop’s Code tab on Anthropic’s API to ignore default, side-request, alias and subagent model ids not starting with `claude` in your own settings beside a gateway address
+ * Changed Claude Desktop’s Code tab on Anthropic’s API to ignore a `CLAUDE_CODE_AUTO_COMPACT_WINDOW` under 200K in your own settings beside a gateway address; use `/autocompact` instead
+ * Changed plan mode in the desktop app’s Code tab and VS Code to ask for approval instead of refusing when no auto mode safety check can judge a command, for plans entered from Manual or Accept edits
+ * Changed PgUp and Home to go to No on destructive questions, such as `/clear` from an agent’s view
+ * Changed `/feedback` drafts in the terminal to open on Not now, above separate rows to send the report alone or with the transcript
+ * Changed tap-mode voice dictation to keep the microphone on until 60 seconds without new words or 10 minutes, up from 15 seconds and 2 minutes, then keep the text unsent; the next tap adds to it
+ * Changed tap-mode voice dictation to stop when you send the prompt, and to stop and say why when you edit it, a panel covers it, or the connection or a separate recorder program is lost
+ * Changed `/schedule`, permission prompts and `/loop`’s cloud offer to say “cloud scheduled task” instead of “routine” or “cloud schedule”; `/routines` still works
+ * Changed model switches from the Claude mobile app or claude.ai to keep the effort level you saved for the previous model when none is saved for the new one
+ * Changed the `hint` a mod’s `PromptHint` hook receives to leave out the hint for selected text when the fullscreen footer has a label on its right
+ * Changed `awsCredentialExport` to time out after 10 minutes instead of waiting forever
+ * [VSCode] Changed voice dictation to stop by itself after 60 seconds without recognized speech or 10 minutes, up from 15 seconds and 2 minutes, so the microphone can stay on longer
+ * [VSCode] Changed voice dictation to stop, and say why, when the microphone stops sending audio or the panel stays hidden
+
+Show 19 improvements
+
+ * Improved `claude plugin marketplace add` on Windows to wait and try again in some cases when another program, such as a virus scanner, briefly holds the downloaded files
+ * Windows: Improved stability on some company PCs, where Claude Code could exit with no output shortly after start
+ * Improved computer use setup: the Screen Recording permission prompt can now restart Claude Code and resume the chat
+ * Improved computer use to take less context until Claude uses it
+ * Improved the error when a proxy or gateway cuts or damages a compressed response: a turn now ends in plain words instead of raw “ZlibError fetching” text
+ * Improved `/context`: shorter output in fullscreen, so the total is less likely to scroll off in a short window, and the legend names its unit once
+ * Improved peak memory use and speed of `/usage` on machines with many recent sessions
+ * Improved `/permissions` to refuse a rule that would be skipped at the next start, such as `rm -rf` with no tool name, and to show the reason
+ * Improved resuming a session in Code Mode: Claude is now told up front that its earlier script variables are gone
+ * Improved Claude in Code Mode to confirm before discarding worktree changes, to read artifact files before publishing them, and to update an existing artifact instead of creating a second one
+ * Improved Code Mode’s tool search to show long MCP tool descriptions whole where they fit, as a cut description could lead to wrong calls
+ * Linux: Improved the Ctrl+V message to name the package to install (`wl-clipboard` or `xclip`) when images can’t be read from the clipboard
+ * Improved recovery for long conversations behind a proxy or gateway with a request size limit, where every message and `/compact` failed with a 413
+ * Improved Glob speed in large local folders on Windows machines with 6 or more CPUs: folders are walked in parallel, and a search stopped at its time limit now lists what it found
+ * Improved memory use when resuming a long conversation
+ * Improved memory use at startup with MCP servers that list many tools
+ * Improved memory use of `claude -p` and SDK-hosted sessions at the start of a conversation
+ * [VSCode] Improved the time it takes to open the Claude panel and long sessions, performance while long replies stream, and the speed of reading diagnostics in very large workspaces
+ * [VSCode] Improved commands and one-line output opened in a plain text tab: they now wrap
+
+Show 93 bug fixes
+
+ * Fixed `claude auth login` reporting `Login successful.` when a claude.ai login could not be saved: it now exits 1 and says what to check, such as a leftover lock file or a full disk
+ * Fixed Read, @-mentions and compaction hanging on a named pipe that nothing writes to, such as a `.env` mounted by a locked secrets manager; the read now fails after 20 seconds
+ * Fixed turns ending in “Prompt is too long” after repeated auto-compaction failures when one more compaction at the context limit could have kept them going
+ * Fixed compaction failing when a summary kept running past the output limit: after three cut-off replies, the last try now asks for a shorter summary
+ * Fixed a freeze when a permission rule or hook condition with several wildcards was checked against a long command
+ * Fixed freezes and runaway memory use in most cases while a hook prints output without end
+ * Fixed a freeze and context overflow when a hook blocks or fails during a turn, or after `/compact`, with a very large log; text over about 50,000 characters is now shortened
+ * Fixed the terminal freezing, and ignoring Ctrl+C, while a local MCP server floods its standard output
+ * Fixed a freeze when a prompt or piped input holds an `@` followed by a very long unbroken string, such as minified CSS with an embedded font
+ * Fixed a long freeze when opening a rewind point after a large tracked file was rewritten
+ * Fixed SSE MCP servers hanging or refusing every tool call after their event stream was cut and came back on a new endpoint or not at all, until reconnected by hand
+ * Fixed Remote Control showing a session in the desktop app, VS Code or the Agent SDK as running while it waited there on a dialog or an MCP server’s question
+ * Fixed a usage limit being reported as reached to Remote Control, IDE and SDK clients after it had already reset
+ * Fixed CLAUDE.md and rules files being sent to the model a second time, in most cases, after a session moves into a worktree under `.claude/worktrees` with EnterWorktree or is resumed there
+ * Fixed tool calls that never ran being counted as done in a claude.ai chat’s summary line after you declined a permission prompt in a session that had restarted
+ * Linux: Fixed the Bash edit diff showing an unchanged symlink as edited after Claude had read the file through it
+ * Fixed resuming a session and `/stats` freezing for seconds when a transcript holds many damaged lines
+ * Fixed a family name such as `sonnet` in `--fallback-model` being dropped when `availableModels` allows only an older version of it
+ * Fixed keys lagging for seconds while `/stats` reads large session transcripts, also after the dialog is closed, and with debug logging on while a language server floods its stderr
+ * Fixed a session failing when the cloud refused its default model and an `availableModels` list that isn’t enforced named neither it nor an older model of that family
+ * Fixed an enforced list of older models failing on Google Cloud’s Agent Platform and Foundry when the first is refused: it now steps down to the next in that family, if listed newest first
+ * Fixed `opus` failing on Bedrock, Google Cloud’s Agent Platform and Foundry behind a gateway that refuses a model in its own words: it now steps down to an older model that answers
+ * Fixed the start-up model upgrade offer on Bedrock and Google Cloud’s Agent Platform naming a model that your `availableModels` list leaves out
+ * Fixed Bedrock sub-agents failing when your account lists no profile for their model in the parent’s region: they now use the model’s own profile, which can be outside that region
+ * Fixed Foundry sessions leaving a model family when an admin’s list blocks the version `sonnet`, `opus` or `haiku` points to: they now use its newest allowed version under a built-in or mapped name
+ * Fixed the `sonnet` alias on Bedrock Mantle resolving to Haiku 4.5: it now means Sonnet 5, not Sonnet 5.5, and an account without Sonnet 5 gets an error, so enable it first
+ * Fixed Ctrl+C at the prompt starting a new turn, and a double Ctrl+C not exiting, when a background agent it stopped had an unread subagent report
+ * Fixed `/install-github-app` ticking a workflow again after going back with Esc
+ * Fixed dictated text past 10,000 characters being lost
+ * Fixed raw “JSON Parse error” and “The operation was aborted.” API errors when the non-streaming retry got a broken response or was interrupted
+ * Fixed Esc not stopping computer use between actions on macOS when Claude Code’s window or an app you allowed is in front; an Esc meant for that app’s popup now stops computer use instead
+ * Fixed a rare hang when a helper command, such as an API key helper, ran past its time limit
+ * Fixed selecting text in fullscreen pushing the footer’s right-hand label onto a second row, which moved the text under the mouse and could copy the wrong line
+ * Fixed a PreToolUse hook’s reason for asking not showing on terminal Read, Grep, Glob, Edit and Write prompts (anthropics/claude-code#102892, anthropics/claude-code#105343)
+ * Fixed `temp_*` folders piling up in `~/.claude/plugins/cache` when a downloaded plugin couldn’t be copied into place
+ * Fixed `--effort` being ignored when starting an interactive session with `--environment` while `CLAUDE_CODE_EFFORT_LEVEL` is set to the same level
+ * Fixed headless and cloud sessions reporting a foreground fork’s Agent call as finished the moment the fork started
+ * Fixed local MCP servers seeing a new session ID after a Remote Control session’s process restarts
+ * Fixed idle compaction being skipped for subscribers still well under their weekly limit
+ * Fixed an @-mentioned text file with an extension being silently dropped when even its first 2,000 lines exceed the read limit; Claude is now told its size and how to read it
+ * Fixed the plugin “not cached” error pointing to `/plugin` instead of `/reload-plugins`, the command that reloads plugins
+ * Fixed self-hosted runner sessions failing their first clone under Anthropic-managed git when the machine’s git config has an `includeIf "gitdir:"` or (git 2.44 to 2.46) `"onbranch:"` section
+ * Fixed replies that start with phrases like “You’ve used” or “You’ve hit your” showing as a red usage limit error
+ * Fixed a resumed conversation sometimes missing its last messages after a crash or kill on Bedrock, Google Cloud’s Agent Platform, Foundry and other third-party providers
+ * Fixed NotebookEdit saving an invalid notebook when an edit changes a cell’s type; turning a cell with attachments into code is now refused
+ * Fixed a long README in a design system moved from standalone Claude Design losing its list of files to load when Claude starts a deck or design
+ * Fixed MCP tool calls failing with “malformed task handle” when the server’s task ID is longer than 128 characters; IDs of up to 1,024 characters now work
+ * Self-hosted runner: Fixed `--configure-git` sometimes reporting a hung `git --version` as a git that isn’t on PATH
+ * Fixed task ids being reused and deleted tasks coming back when several tasks were deleted or updated at once, and TaskGet listing completed tasks as blockers
+ * Fixed stale and repeated rows in the fullscreen Ctrl+R history picker when prompts share a timestamp
+ * Fixed Code Mode silently skipping a tool call whose input has a list of over 4,096 items, and freezing on a very large typed array in a tool’s input, which is now refused
+ * Fixed Code Mode leaving a message unanswered when it was typed during a command and Esc was pressed before Claude replied; the message now starts a new turn, which a second Esc stops
+ * Fixed Code Mode not telling Claude when a slow command moved to the background and left its script with empty output, or of the time limit on background commands in `claude -p` and the Agent SDK
+ * Fixed Code Mode sometimes waiting for minutes on a command that had already been stopped
+ * Fixed a typed slash command’s inline shell commands not running in Code Mode after a background script’s output arrived
+ * Fixed Code Mode sessions in the Agent SDK and `claude -p` sometimes losing Claude’s last reply on resume after being stopped while a script was running
+ * Remote Control: Fixed sessions hosted by the desktop app or VS Code showing as idle while /compact runs
+ * Fixed a session sometimes losing its “needs input” status after a background task’s report in Claude Desktop
+ * Fixed Grep: -o missing an empty match at the end of a file with no last newline, -o with multiline adding an empty line or misnumbering lines in non-UTF-8 files, and -A and -B ignored beside a zero -C
+ * Fixed unbinding a chord in `keybindings.json` still leaving its first key waiting for a second when it was spelled `meta` and bound as `alt`, or the reverse
+ * Fixed moving an empty session to the background sometimes failing with “Couldn’t load transcript from file”
+ * Fixed OpenTelemetry reporting a failed `mcp_server_connection` event at each start for a built-in server that isn’t turned on for the account
+ * Fixed Esc not stopping a Bash command while it waited for its file diff in large or slow git repositories, which held the next message
+ * Fixed pasted links and relative paths ending in an image file name appearing late and swallowing an Enter pressed right after
+ * Fixed `/mcp reconnect all` and `/mcp disable all` counting a built-in server that isn’t turned on for the account
+ * Fixed interrupting a turn while a mod’s `turn.step` hook was waiting showing “user-cancel” as an error instead of “Interrupted”
+ * Fixed `~/.claude.json` being reported as corrupted when another session was in the middle of saving it
+ * Fixed web searches failing with an API error when Claude’s list of allowed or blocked domains was empty or had duplicates
+ * Fixed resuming a paused workflow in Code Mode waiting for minutes while other background work was running
+ * Fixed subagents in Code Mode failing with “Agent stalled” and losing their command when a script ran for more than 10 minutes
+ * [VSCode] Fixed Rewind staying on “Checking code changes…” while Claude’s process hung at its start
+ * [VSCode] Fixed the model picker’s arrow keys starting from the wrong row right after it opens, and screen readers not announcing its highlighted model when opened with `/model` or the command menu
+ * [VSCode] Fixed the diff view’s “Copy deleted line” and “Copy changed line” copying a different line than they name, and a double-click near the bottom copying unasked
+ * [VSCode] Fixed the blocked microphone’s tooltip being cut off, long addresses running out of Web Fetch rows, usage bars looking full in High Contrast, and a Thinking row jumping away when clicked
+ * [VSCode] Fixed a second Logout in the same window reporting success while the first was still running, and added a Show logs button to the error when logout fails
+ * [VSCode] Fixed the chat showing no notice when a background command, agent, workflow or monitor finished while Claude was idle
+ * [VSCode] Fixed forking a conversation, opening and saving memories, and creating project output styles failing on NTFS drives in VS Code 1.101 and 1.102 on Windows 11 24H2 and later
+ * [VSCode] Fixed Web Fetch showing “Fetched from” with a success dot when the site returned an error or a redirect that wasn’t followed
+ * [VSCode] Fixed the compaction summary showing as your own prompt, and in Rewind and prompt history, after reloading, resuming or forking a compacted conversation
+ * [VSCode] Fixed `spinnerVerbs` from Claude Code user and managed settings being ignored
+ * [VSCode] Fixed right-to-left text from mods showing its punctuation on the wrong side, and a mod’s band or pane filling only part of its width when the panel font has no box-drawing characters
+ * [VSCode] Fixed an empty, locked editor pane staying beside the next file or Claude tab after the last Claude tab was closed
+ * [VSCode] Fixed a session rename that cannot be saved reverting silently, and screen readers not hearing a session’s status, which session is open or which groups are collapsed
+ * [VSCode] Fixed a hidden panel’s notice not naming the waiting session, Hebrew and Arabic questions reading out of order, and a question cut off when Claude’s process ended showing only a red dot
+ * [VSCode] Fixed a sign-in that failed with no error message returning to the sign-in screen with nothing shown, and an authentication error still looking current after you signed in again in that tab
+ * [VSCode] Fixed the chat moving when a menu opened over some banners, and an agent’s tool call count shrinking in long sessions; it now shows how many of the calls are listed
+ * [VSCode] Fixed most links to files without an extension, to folders, and with a line and column doing nothing
+ * [VSCode] Fixed queued messages and attached files showing in reverse order after a conversation was reopened
+ * [VSCode] Fixed a question that ended in an error showing “Something went wrong” when its stored result had no text
+ * [VSCode] Fixed redacted thinking showing as “Unsupported content type”
+ * [VSCode] Fixed the message box not underlining the word that an input method (IME) is composing
+ * [VSCode] Fixed a held Up key replacing an unsent message with an earlier prompt, and Down not bringing the message back after the recalled prompt got a new line or was cleared
+ * [VSCode] Fixed `/model` completed with Tab sometimes switching the model, and closing the model picker right away when nothing is running
2.1.331
--- a/channels.md
+++ b/channels.md
@@ -301,7 +301,7 @@
Feature| What it does| Good for
---|---|---
[Cloud sessions](</docs/en/claude-code-on-the-web>)| Run tasks in a fresh cloud sandbox, cloned from GitHub| Delegating self-contained async work you check on later
-[Claude in Slack](</docs/en/slack>)| Spawns a cloud session from an `@Claude` mention in a channel or thread| Starting tasks directly from a team conversation
+[Claude Tag](<https://claude.com/docs/claude-tag/overview>)| Spawns a cloud session from an `@Claude` mention in a channel or thread| Starting tasks directly from a team conversation
Standard [MCP server](</docs/en/mcp>)| Claude queries it during a task; nothing is pushed to the session| Giving Claude on-demand access to read or query a system
[Remote Control](</docs/en/remote-control>)| You drive your local session from claude.ai or the Claude mobile app| Steering an in-progress session while away from your desk
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -9,7 +9,7 @@
Claude Code tracks all changes made by its file editing tools:
* Every prompt you send that starts a turn creates a new checkpoint
- * Claude Code keeps file snapshots for the 100 most recent checkpoints in a session. Discarding an older checkpoint deletes the snapshot files that no remaining checkpoint references, except each file’s first snapshot, which the VS Code extension uses as the baseline for its session diffs.
+ * Claude Code keeps file snapshots for the 100 most recent checkpoints in a session. Discarding an older checkpoint deletes the snapshot files that no remaining checkpoint references, except each file’s first snapshot.
* Claude Code saves checkpoints with the conversation, so you can still run `/rewind` after you resume a session
* Claude Code deletes a session’s file snapshots in the [retention sweep](</docs/en/claude-directory#cleaned-up-automatically>), by default about 30 days after the session last saved one. Rewinding to a checkpoint whose snapshots are gone can fail with [`No files were restored`](</docs/en/errors#no-files-were-restored>). To keep snapshots longer, set [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>).
--- a/claude-code-on-the-web.md
+++ b/claude-code-on-the-web.md
@@ -172,7 +172,7 @@
* **You’re signed in with an API key or Console account** : run `claude auth login` in your shell, then sign in with claude.ai
* **The error names your provider** : cloud sessions aren’t available through third-party providers. See the error table
- * **You’re already signed in via claude.ai** : your organization may have disabled cloud sessions
+ * **You sign in to claude.ai through an organization** : ask an [Owner](</docs/en/server-managed-settings#access-control>) whether [cloud sessions are turned on](</docs/en/errors#cloud-sessions-are-disabled-by-your-organizations-policy>)
## Work with sessions
--- a/claude-directory.md
+++ b/claude-directory.md
@@ -1,4 +1,4 @@
-Claude Code reads instructions, settings, skills, subagents, and memory from your project directory and from `~/.claude` in your home directory. Commit project files to git to share them with your team; files in `~/.claude` are personal configuration that applies across all your projects. On Windows, `~/.claude` resolves to `%USERPROFILE%\.claude`. If you set [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>), every `~/.claude` path on this page lives under that directory instead. The same applies to `.claude.json`, which otherwise sits at `~/.claude.json`. Most users only edit `CLAUDE.md` and `settings.json`. If your repository already has an `AGENTS.md` for other coding agents, Claude Code [can read that](</docs/en/memory#agents-md>) in place of a `CLAUDE.md`. The rest of the directory is optional: add skills, rules, or subagents as you need them.
+Claude Code reads instructions, settings, skills, subagents, and memory from your project directory and from `~/.claude` in your home directory. Commit project files to git to share them; files in `~/.claude` are personal configuration that applies across all your projects. On Windows, `~/.claude` resolves to `%USERPROFILE%\.claude`. If you set [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>), every `~/.claude` path on this page lives under that directory instead. The same applies to `.claude.json`, which otherwise sits at `~/.claude.json`. Most users only edit `CLAUDE.md` and `settings.json`. If your repository already has an `AGENTS.md` for other coding agents, Claude Code [can read that](</docs/en/memory#agents-md>) in place of a `CLAUDE.md`. The rest of the directory is optional: add skills, rules, or subagents as you need them.
## Explore the directory
--- a/claude-projects.md
+++ b/claude-projects.md
@@ -64,7 +64,7 @@
### Start a new project from scratch
-Starting a project from scratch means opening the **New project** dialog, naming the stream of work, and optionally giving it a goal and the repositories and files it works on. Only the name is required, so you can create the project first and fill in the rest as the work takes shape.
+Starting a project from scratch means opening the **New project** dialog, naming the stream of work, and optionally giving it a goal and the repositories and files it works on.
1
@@ -250,7 +250,7 @@
Claude answers with an **Allow Claude to work in a folder on your computer** card. Pick the folder if you connected several. Two threads working in one folder at the same time can overwrite each other’s changes. If the folder is a git repository, you can turn on **Worktree** in the folder’s options to give this thread its own worktree instead. Then click **Allow once**.
-The thread runs in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), so Claude runs commands and edits files in that folder without asking you each time. If auto mode is unavailable or turned off in that computer’s Claude Code, the thread runs without it, and any permission prompt it raises waits for your answer in the thread, as Unblock a thread waiting on approval describes. To run the thread in another mode, start `claude remote-control` with [`--settings`](</docs/en/remote-control#start-a-remote-control-session>). Then [`permissions.defaultMode`](</docs/en/permission-modes#start-in-a-different-mode>), in that file or in that computer’s settings, can pick another mode. While the thread runs, a laptop icon in its header shows whether your computer is connected. Click it to see which folder the thread is using or to turn the connection off. The thread pauses while that computer is asleep, and stops if the desktop app or `claude remote-control` quits.
+The thread runs in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), so Claude runs commands and edits files in that folder without asking you each time. If auto mode is unavailable or turned off in that computer’s Claude Code, the thread runs without it, and any permission prompt it raises waits for your answer in the thread, as Unblock a thread waiting on approval describes. To run the thread in another mode, start `claude remote-control` with [`--settings`](</docs/en/remote-control#start-a-remote-control-session>) and a file that sets [`disableAutoMode`](</docs/en/settings-reference#disableautomode>) to `"disable"`. Then [`permissions.defaultMode`](</docs/en/permission-modes#start-in-a-different-mode>), in that file or in that computer’s settings, can pick another mode, such as `default`, `plan`, or `dontAsk`. While the thread runs, a laptop icon in its header shows whether your computer is connected. Click it to see which folder the thread is using or to turn the connection off. The thread pauses while that computer is asleep, and stops if the desktop app or `claude remote-control` quits.
* **To get the thread going again** : see Lost contact with your folder
* **To keep the computer from sleeping on its own** : in the desktop app, turn on **Keep this computer awake for Remote Control** in **Settings > Code** or **Settings > Claude Code**
Show diff (304 lines)
--- a/claude-security.md
+++ b/claude-security.md
@@ -1,19 +1,29 @@
-The Claude Security plugin runs a multi-agent vulnerability scan of your codebase inside a Claude Code session. By default, when you scan a whole repository, Claude agents map your architecture, build a threat model, hunt for vulnerabilities, and independently review every finding before writing the report. Use the plugin to scan a whole repository or only a set of changes, such as a branch’s diff, a pull request’s diff, or a single commit, then turn the findings you choose into patches that you review and apply yourself. The plugin runs locally in your session, uses whichever models you have access to in Claude Code, and each scan counts toward your [usage](</docs/en/costs>). If you want a managed service that monitors your repositories, or want to run scans on [Claude Mythos](<https://platform.claude.com/docs/en/about-claude/models/introducing-claude-fable-5-and-claude-mythos-5>), see the [Claude Security](<https://claude.com/product/claude-security>) product, available on the Enterprise plan. The plugin is also distinct from the review tools already in Claude Code: the [security guidance plugin](</docs/en/security-guidance>) reviews code as Claude writes it, [`/security-review`](</docs/en/commands#all-commands>) runs a single pass over your branch, and [Code Review](</docs/en/code-review>) reviews pull requests. For how the layers stack, see How the plugin fits with other security tools.
+The Claude Security plugin runs a multi-agent vulnerability scan of your codebase inside a Claude Code session. By default, when you scan a whole repository, Claude agents map your architecture, hunt for vulnerabilities, and independently review every finding before writing the report. Use the plugin to scan a whole repository or only a set of changes, such as a branch’s diff, a pull request’s diff, or a single commit. Then turn the findings you choose into patches that you review and apply yourself. Scan only code that you own or have permission to test. Run a scan in your session, your shell, or GitHub Actions:
+
+ * **In your session** : scan and fix your codebase with whichever models you have access to in Claude Code
+ * **From your shell** : use the `claude-security` command
+ * **In GitHub Actions** : add the plugin’s job to scan pull requests
+
+A scan in your session or shell counts toward your [usage](</docs/en/costs>), and a scan in GitHub Actions counts toward the account that owns the job’s model credential.
+
+If you want a managed service that monitors your repositories, or want to run scans on [Claude Mythos](<https://platform.claude.com/docs/en/about-claude/models/introducing-claude-fable-5-and-claude-mythos-5>), see the [Claude Security](<https://claude.com/product/claude-security>) product, available on the Enterprise plan.
+
+The plugin is also distinct from review tools already in Claude Code: the [security guidance plugin](</docs/en/security-guidance>) reviews code as Claude writes it, and [Code Review](</docs/en/code-review>) reviews pull requests. For how the layers stack, see How the plugin fits with other security tools.
## Prerequisites
To run the plugin, you need:
* A paid plan, Anthropic API access, or a third-party provider, for the [dynamic workflows](</docs/en/workflows>) the scan uses to orchestrate its agents. On Pro, turn them on from the Dynamic workflows row in `/config`.
- * Python 3.9 or later available on your `PATH` as `python3`. Check with `python3 --version`. The plugin’s tooling uses only the Python standard library, so nothing is installed.
+ * Python 3.9 or later available on your `PATH` as `python3`. Check with `python3 --version`. The plugin’s tooling uses only the Python standard library.
* Linux, macOS, or Windows.
* Git, for change scans and for turning findings into patches; those jobs don’t support other version control systems. A full scan works in any directory, with or without version control.
## Models and providers
-A scan runs inside your Claude Code session. The plugin makes no model calls of its own, so there’s no separate API key or provider setting to configure.
-
- * **Model** : the agents that hunt for vulnerabilities, verify findings, and write and review patches run on [your session’s model](</docs/en/sub-agents#choose-a-model>). To change it, run [`/model`](</docs/en/model-config#setting-your-model>) in your session before you start a scan. A few supporting steps, such as mapping the repository, use the [`sonnet` alias](</docs/en/model-config#model-aliases>) instead.
+The plugin makes no model calls of its own, so a scan in your session needs no separate API key or provider setting.
+
+ * **Model** : the agents that hunt for vulnerabilities, verify findings, and write and review patches run on [your session’s model](</docs/en/sub-agents#choose-a-model>). To change it, run [`/model`](</docs/en/model-config#setting-your-model>) in your session before you start a scan. A few supporting steps use the [`sonnet` alias](</docs/en/model-config#model-aliases>) instead.
* **Provider** : scans run on a paid plan, with Anthropic API access, or on a [third-party provider](</docs/en/third-party-integrations>) such as [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), or [Microsoft Foundry](</docs/en/microsoft-foundry>).
On a third-party provider, the `sonnet` alias can resolve to a different version than it does on the Anthropic API. If your account can’t use that version, [pin your model versions](</docs/en/model-config#pin-models-for-third-party-deployments>), including `ANTHROPIC_DEFAULT_SONNET_MODEL`. [Automatic model fallback](</docs/en/model-config#automatic-model-fallback>) re-runs a request that a model’s safeguards flag. On Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, the request can end with a refusal message instead, depending on [how your deployment is set up](</docs/en/model-config#enable-fallback-on-bedrock-agent-platform-and-foundry>).
@@ -24,7 +34,7 @@
/plugin install claude-security@claude-plugins-official
-The command opens the plugin’s details, where you choose an [installation scope](</docs/en/plugins/install#install-a-plugin>) to start the install. If the install fails, match the message Claude Code reports:
+The command opens the plugin’s details, where you choose an [installation scope](</docs/en/plugins/install#install-a-plugin>) to start the install. Choose user scope to have the plugin in every project. If the install fails, match the message Claude Code reports:
* `Marketplace "claude-plugins-official" not found`: add the marketplace with `/plugin marketplace add anthropics/claude-plugins-official`, then retry the install.
* `Plugin "claude-security" not found in marketplace "claude-plugins-official"`: your local copy of the marketplace catalog may be out of date. Refresh it with `/plugin marketplace update claude-plugins-official`, then retry the install. If the retry prints the same message, see [Plugin not found in marketplace](</docs/en/plugins/troubleshooting#plugin-not-found-in-marketplace>).
@@ -33,7 +43,7 @@
### Update the plugin
-To update the plugin yourself, see [Update plugins now](</docs/en/plugins/install#update-plugins-now>). Claude Code also [updates the plugin automatically](</docs/en/plugins/install#keep-plugins-updated>) unless auto-update is turned off.
+If a command or option doesn’t work, [check](</docs/en/plugins/install#install-a-plugin>) that you have version 0.13.0 or later of the plugin. To update the plugin yourself, see [Update plugins now](</docs/en/plugins/install#update-plugins-now>). Claude Code also [updates the plugin automatically](</docs/en/plugins/install#keep-plugins-updated>) unless auto-update is turned off.
### Uninstall the plugin
@@ -41,49 +51,70 @@
## Scan and fix your codebase
-The plugin adds one command, `/claude-security`, which opens a menu of its three jobs: scanning the codebase, scanning a set of changes, and suggesting patches. The happy path runs a full scan, then turns its findings into patches:
+At the Claude Code prompt, `/claude-security` opens a menu of jobs, such as scanning the codebase, scanning a set of changes, and suggesting patches. The happy path runs a full scan, then turns its findings into patches:
1
+Start from a clean working tree
+
+If you want patches later, commit all your changes and untracked files, or stash them with `git stash -u` from your shell until the scan ends.
+
+2
+
Open the Claude Security menu
-Run `/claude-security` and pick **Scan codebase**.
-
-2
+Start Claude Code in your repository, run `/claude-security`, and pick **Scan codebase**.
+
+3
Choose what to scan
The plugin reads your repository first, then offers the whole repository or a focused area. Pick the whole repository, or answer “I don’t know” and the plugin picks a sensible default for your repository’s size.
-3
+4
Confirm the run
A scan may take a while, may use a significant number of tokens, and needs Claude Code left open while it completes. Nothing runs until you confirm.
-4
+5
Read the report
-While the scan runs, it reports each stage as it starts, with the detail available under [`/workflows`](</docs/en/workflows>). Results are written to a timestamped directory in your repository, described in Read the scan results.
-
-5
+When the scan starts in a terminal session, the plugin’s live view, on by default, opens with a live map of the code. You can also follow each stage with [`/workflows`](</docs/en/workflows#watch-the-run>) in the terminal. Results are written to a timestamped directory in the folder where you started Claude Code, described in Read the scan results.
+
+6
Turn findings into patches
-Run `/claude-security` again and pick **Suggest patches** , then choose which findings to address. Reviewed patches are written to the report’s `patches/` folder; Fix findings covers how each patch is built and reviewed.
-
-6
+Run `/claude-security` again and pick **Suggest patches** , then choose which findings to address. Reviewed patches are written to the report’s `patches/` folder; Fix findings covers how each patch is built and reviewed, and what to check afterward.
+
+7
Apply the patches you accept
-Apply each patch from your shell with `git apply`, in its own pull request. Patches are never applied automatically.
-
-You don’t have to start from the menu: ask for a job directly, as arguments to the command, such as `/claude-security scan my branch`, or in plain language, such as “scan commit abc1234”. The plugin works best in [auto mode](</docs/en/permission-modes>), which lets the scan’s agents proceed without a permission prompt at each step.
+Read each patch’s note, then apply the patch from your shell at the root of your repository with `git apply`, in its own pull request. Patches aren’t applied automatically.
+
+You can also ask for a job directly, as arguments to the command, such as `/claude-security scan my branch`. Or ask in plain language, such as “scan the whole repo with the Claude Security plugin”. The plugin works best in [auto mode](</docs/en/permission-modes>), which lets the scan proceed without a permission prompt at each step.
+
+### Watch a running scan
+
+When you start a scan in a terminal session, the plugin’s [mod](</docs/en/plugins/mods/overview>) opens a live view of the scan in a pane or a band above the prompt. You need Claude Code v2.1.292 or later.
+
+ * **Close it** : press `Ctrl+X X` to shrink the pane to a band, and again to hide the band
+ * **Reopen it** : enter `/claude-security-view` while the scan runs
+ * **Turn it off** : enter `/plugin configure claude-security` and change **Live scan view**
+
+### Continue a stopped scan
+
+If a scan in your session stops before it writes its report, you can continue it, unless the session says that safeguards stopped one of the scan’s agents. In that case, start a new scan instead. To continue, leave your checkout and the scan’s `CLAUDE-SECURITY-<timestamp>/` directory unchanged, and enter `/claude-security continue the scan` in the session that ran it. If you closed that session, [resume it](</docs/en/sessions#resume-a-session>) first.
### Scan only your changes
-When your branch has commits its base doesn’t, the `/claude-security` menu offers to scan only that diff, so you can check a branch before merging. You can also scan one of your open pull requests, or a single commit by asking for it, such as “scan commit abc1234”. Only committed changes are scanned: commit or stash in-progress edits first, or run a full scan, which reads the working tree. Change scans need a git repository; full scans of an unversioned directory still work. Finding your open pull requests is offered only when your session already has permission to run the GitHub CLI and `gh` is signed in.
+When your branch has commits its base doesn’t, the `/claude-security` menu offers to scan only that diff, so you can check a branch before merging. Before a change scan, commit the edits you want scanned and stash the rest with `git stash -u`, or run a full scan, which reads the working tree. To scan one of your open pull requests or a single commit, check it out from your shell first, then ask at the Claude Code prompt:
+
+ * **Pull request** : run `git checkout feature-auth`, naming the pull request’s branch, then `/claude-security scan my branch`
+ * **Single commit** : run `git checkout abc1234`, then `/claude-security scan commit abc1234`
### Scope large repositories
@@ -93,53 +124,147 @@
Scan effort sets how deep a scan goes. Your findings go through the same independent verification at `low`, `medium`, and `high`.
- * **`low`** : a quick first look. It skips the architecture map and the threat model when you scan your codebase.
+ * **`low`** : a quick first look. It skips the architecture map when you scan your codebase.
* **`medium`** : the default.
* **`high`** : what `medium` does, plus more hunting for vulnerabilities in the same code.
-Name the scan effort in your request at the Claude Code prompt, such as `/claude-security scan my public API code at high` or `/claude-security scan my branch at high`. If a scan of a large repository finds less than you expect, choose `high` scan effort, scan a second time, or do both. Each can report findings that one `medium` scan doesn’t.
+Name the scan effort in your request at the Claude Code prompt, such as for a part of your codebase or for your changes:
+
+ * **Part of your codebase** : `/claude-security scan my public API code at high`
+ * **Your changes** : `/claude-security scan my branch at high`
+
+If a scan of a large repository finds less than you expect, choose `high` scan effort, scan a second time, or do both. Each can report findings that one `medium` scan doesn’t. A codebase scan can cost a lot of tokens, and the cost grows with the size of the repository, the scan effort, and the model. To spend less, scan a smaller area, choose `low`, or change the model before you start.
+
+### Run a more thorough change scan
+
+Replace the scan effort with `--change-scan-effort high`, such as `/claude-security scan my branch --change-scan-effort high`. More agents read the change than at `high` scan effort, so the scan takes longer and costs several times as much. Its report also lists vulnerabilities older than the change.
+
+### Tell a scan about your system
+
+To give a scan facts about your system, name up to 10 files in the folder that you scan or type your own notes. Give them in your request, or when the scan asks:
+
+ /claude-security scan this repository, and read docs/arch.md first
+
+Give only notes and files that are up to date and that you trust, because a wrong statement can hide a vulnerability. Keep your README and `SECURITY.md` up to date too, because the scan weighs what they say about trusted users and intended behavior. To get patches from this scan, commit the files that you name instead of stashing them.
### Read the scan results
-Every scan writes its results into a timestamped `CLAUDE-SECURITY-<timestamp>/` directory in your repository:
+After a scan in your session, find its results in a timestamped `CLAUDE-SECURITY-<timestamp>/` directory in the folder where you started Claude Code:
* **`CLAUDE-SECURITY-RESULTS.md`** : the report, with each finding’s ID, such as `F1`, plus its impact, exploit scenario, severity, confidence, and recommendation
* **`CLAUDE-SECURITY-RESULTS.jsonl`** : the same findings in machine-readable form, one JSON object per line
* **`CLAUDE-SECURITY-RESULTS.sarif`** : the same findings as a [SARIF 2.1.0](<https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html>) log for GitHub code scanning and any other tool that reads the standard. The scan classifies findings under their [CWE](<https://cwe.mitre.org/>) weakness categories
* **`CLAUDE-SECURITY-REVISION-<commit>.json`**: the revision stamp, recording which commit was scanned, at what scan effort, whether uncommitted changes were part of the scanned tree, and how thoroughly the run was verified. A scan outside version control stamps `UNVERSIONED` in place of the commit
-That directory is the only change a scan makes to your checkout, and it carries its own `.gitignore`, so a stray `git add` never sweeps a report into a commit. To keep a report in history for an audit trail, delete that one `.gitignore` file and commit the directory like any other. Findings only appear in the report after independent verifier agents analyze them, which keeps reports short and worth reading. Scans are nondeterministic: two scans of the same code can surface different findings. Run scans regularly.
+That directory is the only change a scan makes to your checkout, and it carries its own `.gitignore`, so a stray `git add` doesn’t sweep a report into a commit. Some packaging and deploy tools don’t read that file, so move report directories out while you package or deploy. To keep a report in history for an audit trail, delete that one `.gitignore` file and commit the directory. Findings only appear in the report after independent verifier agents analyze them, which keeps reports short and worth reading. Scans are nondeterministic: two scans of the same code can surface different findings. Run scans regularly.
## Fix findings
-Start the fix flow by picking **Suggest patches** from the `/claude-security` menu, or ask in plain language, such as “fix finding F3”, then pick which findings from the report to address. Patches are built against committed code, and the report has to still describe the code you have: findings whose code has since changed are skipped with a note, and the plugin offers a fresh scan instead of patching from a stale report. Each patch is drafted in a scratch copy of your repository, so your source files stay untouched until you apply a patch yourself. Before delivery, each patch is reviewed by an agent independent of the one that wrote it, which runs your project’s tests against the change when the code has them and reads the diff on its own terms for anything new it might introduce. A patch is written only when that review can vouch that the change addresses the one finding, introduces no new vulnerability, and leaves behavior otherwise unchanged. When it can’t vouch for all three, you get a short note explaining why instead of a patch.
+Start the fix flow by picking **Suggest patches** from the `/claude-security` menu, or ask in plain language, such as “fix finding F3”, then pick which findings from the report to address. Each patch is drafted in a scratch copy of your repository. An agent can still edit your own files by mistake, so run `git status` when the job ends. Before delivery, an agent independent of the one that wrote the patch reviews it. It runs your project’s tests when it can, and reads the diff on its own terms for anything new it might introduce. That review has to vouch that the patch:
+
+ * Addresses its one finding
+ * Introduces no new vulnerability
+ * Leaves behavior otherwise unchanged
+
+When the review can’t vouch for all three, the plugin writes a short note explaining why instead of a patch.
+
+### Patch from an older report
+
+You can still use a scan’s report after new commits, but only if the scanned commit is in your current history. If it isn’t, take the fresh scan that the plugin offers.
### Patches are never applied automatically
-Applying a patch is always your decision. Patches are written to the report’s `patches/` folder, one `F<n>.patch` per finding with a note beside it explaining the change. Apply one from your shell, or ask Claude to apply it and open a pull request:
-
- git apply CLAUDE-SECURITY-<timestamp>/patches/F1.patch
-
-When the patched code has no tests, the patch’s note says so, so you know its review ran without a test pass. Apply each patch in its own pull request so it can be reviewed and tested on its own.
+Applying a patch is your decision. Patches are written to the report’s `patches/` folder, one `F<n>.patch` per patched finding with a note beside it explaining the change. Ask Claude to apply one and open a pull request, or apply it from your shell at the root of your repository. Read the patch’s note, `F<n>.md`, first, because it has the exact command, such as:
+
+ git -C "$(git rev-parse --show-toplevel)" apply CLAUDE-SECURITY-<timestamp>/patches/F1.patch
+
+Apply each patch in its own pull request so it can be reviewed and tested on its own. If `git apply` refuses a patch, read its note.
+
+## Triage findings you already have
+
+Vulnerability Triage checks whether the findings in a list hold up against your code. The list can be a SARIF 2.1.0 file from another scanner, or the `CLAUDE-SECURITY-<timestamp>/` directory of an earlier scan. Triage only a list from a source that you trust. If you want patches later, leave nothing uncommitted or untracked but the list itself. Start Claude Code in the directory that the findings’ file paths are relative to, usually your repository’s root. Then enter the command with the list’s path:
+
+ /claude-security triage results.sarif
+
+The report is `FINDINGS-TRIAGE.md`, in a new `CLAUDE-SECURITY-<timestamp>/` directory. Findings that the triage rejects are under **Not validated**. Check that section yourself, because the triage is more likely to reject a real finding that your list describes in only a few words. `FINDINGS-TRIAGE.sarif` beside the report is your list with the verdicts added. To turn the report’s valid findings into patches, accept the offer at the end of the triage. If you commit, pull, or switch branches first, start a new triage. See Fix findings for what to check after a patch job.
+
+## Create a threat model
+
+The `/claude-security:threat-model` command drafts a threat model, a file that you can give to later scans. Start Claude Code at the root of your repository and enter:
+
+ /claude-security:threat-model
+
+Claude reads your code and any scan report, then asks about your system and what else it may read: folders, your [connectors](</docs/en/mcp>), or text that you paste.
+
+If you let Claude read your connectors, its search terms leave your machine, and they can include words from that report. Claude can be misled by what it reads there, or by text that you paste.
+
+When Claude shows a draft:
+
+ 1. Check it before you choose **Yes** to save it as `.claude-security/threat-model.md`, because a wrong statement can hide a vulnerability from a later scan.
+ 2. If there’s a scan report, choose whether Claude writes `CLAUDE-SECURITY-PRECONDITIONS.md` in the report’s folder. That file says whether each finding’s preconditions are `met`, `not met`, or `not shown` in the sources that Claude read.
+ 3. When Claude finishes, enter [`/clear`](</docs/en/commands#all-commands>) before you run another command of the plugin.
+
+To be sure that a scan reads the threat model, name it in your request.
+
+## Analyze your attack surface
+
+An attack surface analysis examines the parts of your project that an attacker can reach, and proposes changes to shrink that attack surface. Start Claude Code at the root of your repository, in [auto mode](</docs/en/permission-modes#switch-permission-modes>) where it’s [available](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), and enter:
+
+ /claude-security:attack-surface-analysis
+
+An analysis may take a long time and use a significant number of tokens. Until it ends, leave Claude Code open, and don’t commit, switch branches, or edit files. An analysis doesn’t replace a scan, which looks for vulnerabilities. The analysis looks for:
+
+ * Code that the default configuration reaches but no default feature uses
+ * Sensitive code reachable before login or without any user action
+ * Combinations of options that silently turn off a security feature
+
+The report is `CLAUDE-SECURITY-<timestamp>/CLAUDE-SECURITY-RESULTS.md`, in the folder where you started Claude Code. If the analysis wrote patches, `attack-surface-patches/PATCHES.md` beside it describes them. Treat findings and patches as untested until you check them yourself.
+
+## Scan from your shell
+
+The `claude-security` command scans the folder that you run it in, and writes the same report there. The scan runs inside the [plugin’s sandbox](<https://github.com/anthropics/claude-plugins-official/blob/main/plugins/claude-security/README.md#running-in-a-sandbox>). It signs in with your Claude Code login or your provider’s environment variables. The sandbox runs only on Linux:
+
+ * **Linux** : you need kernel 5.19 or later on x86-64 or arm64, Python 3.10 or later, and a user other than root. On Ubuntu 24.04 or later, add `--sudo`, which sets up the sandbox with `sudo`. If your system doesn’t meet these requirements, scan in a session.
+ * **Windows** : add `--no-sandbox`, or the command stops
+ * **macOS and WSL 2** : the command isn’t supported, so scan in a session
+
+The command doesn’t load your repository’s `.claude/` settings or hooks, so the deny rules there don’t apply. In the sandbox, your organization’s [server-managed settings](</docs/en/server-managed-settings#security-considerations>) don’t apply either. If you add `--no-sandbox`, the scan runs in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) with your user’s access. See the plugin’s [trust model](<https://github.com/anthropics/claude-plugins-official/blob/main/plugins/claude-security/SECURITY.md#trust-model>).
+
+The plugin includes the command. To add it to your `PATH`, enter `/claude-security:install-cli` in Claude Code and follow what it prints. Then run it in your repository, with `--sudo` or `--no-sandbox` if your system needs it:
+
+ * **Scan the codebase** : `claude-security`
+ * **Scan this branch’s changes** : `claude-security --changes`
+ * **Scan with a full-screen view** : `claude-security --tui`, which needs Node.js 18 or later
+ * **List the other options** : `claude-security --help`
+
+The command runs in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), and stops if auto mode isn’t available. If your Claude Code model doesn’t support it, add `--model` with one that does. For any other cause, scan in a session.
+
+## Scan pull requests in GitHub Actions
+
+On a pull request, the plugin’s GitHub Actions job scans the change, posts a review and suggested fixes, and can block the merge. It can also scan the whole repository on a schedule.
+
+Use the job only in a repository where you trust everyone who can push. Anyone who adds text or code to a pull request’s branch can steer the scan, have it run that code, and make it send model requests on the job’s credential. By default, the job fails for a pull request from a fork.In a public repository, the review, the job summary, or the job’s report artifact can disclose a live vulnerability. To keep findings private, scan in your session instead.
+
+The job needs a GitHub-hosted Linux runner on GitHub.com, and [Anthropic API access](<https://platform.claude.com/docs/en/get-api-key>) or a [third-party provider](</docs/en/third-party-integrations>), because it can’t sign in with a paid plan. Follow the plugin’s [GitHub Actions guide](<https://github.com/anthropics/claude-plugins-official/blob/main/plugins/claude-security/CI.md>) to add the workflow and create a credential for this job alone. To move to version 0.13.0, put its commit after the `@` in each workflow: `d0d514288960e7a78e1a76e4a3ec694416458726`. With the guide’s sample workflow, a draft pull request from a branch of your repository passes with no scan until you mark it ready for review. A pull request from Dependabot passes with no scan too, so review its changes yourself.
## How the plugin fits with other security tools
-The Claude Security plugin is the on-demand deep-scan layer in a defense-in-depth stack, alongside the [security guidance plugin](</docs/en/security-guidance>), [`/security-review`](</docs/en/commands#all-commands>), [Code Review](</docs/en/code-review>), the managed [Claude Security](<https://claude.com/product/claude-security>) product, and your existing scanners:
+The Claude Security plugin is the deep-scan layer in a defense-in-depth stack, alongside the [security guidance plugin](</docs/en/security-guidance>), [Code Review](</docs/en/code-review>), the managed [Claude Security](<https://claude.com/product/claude-security>) product, and your existing scanners:
Stage| Tool| What it covers
---|---|---
In session| [Security guidance plugin](</docs/en/security-guidance>)| Common vulnerabilities in code Claude writes, fixed in the same session
-On demand, single pass| [`/security-review`](</docs/en/commands#all-commands>)| One-time security pass on the current branch
On demand, deep scan| Claude Security plugin| Multi-agent scan of a repository or diff, with independently reviewed findings and patches
On pull request| [Code Review](</docs/en/code-review>), Team and Enterprise plans| Multi-agent correctness and security review with full codebase context
+On pull request, deep scan| Claude Security plugin in GitHub Actions| Multi-agent scan of the pull request’s changes
Managed| [Claude Security](<https://claude.com/product/claude-security>), Enterprise plan| Hosted scanning that monitors connected repositories
In CI| Your existing static analysis and dependency scanners| Language-specific rules, supply-chain checks, and policy enforcement
-The plugin doesn’t replace your existing source-code security tools. Run it alongside static analysis, dependency scanning, and code review: it reasons about your code the way a human security researcher would, which complements the deterministic checks those tools provide.
+The plugin doesn’t replace your existing source-code security tools. Run it alongside static analysis, dependency scanning, and code review: it reasons about your code the way a human security researcher would, which complements the deterministic checks those tools provide. If your organization uses the managed Claude Security product, `/claude-security:hosted` shows its findings in your session. Before you use it, read the [requirements](<https://github.com/anthropics/claude-plugins-official/blob/main/plugins/claude-security/README.md#findings-from-hosted-claude-security>) and the [risks](<https://github.com/anthropics/claude-plugins-official/blob/main/plugins/claude-security/SECURITY.md#findings-from-hosted-claude-security>).
## Troubleshooting
-**The`/claude-security` menu opens with a Python warning.** The plugin needs `python3` 3.9 or later on your `PATH`. When it can’t find `python3` at all, the menu warns that Claude Security won’t work until one is installed; when the first `python3` on your `PATH` is older, the warning names the version it found. Install Python 3, or put a newer `python3` first on your `PATH`, then start a new session. **You may see a “safeguards flagged this message” notice when scanning on a Fable model.** The message names the model you’re running. Fable’s cybersecurity safety classifiers flag certain requests, and Claude Code re-runs a flagged request on an Opus model through [automatic model fallback](</docs/en/model-config#automatic-model-fallback>). This is expected. When the request re-runs, the scan should still complete successfully.
+**The`/claude-security` menu opens with a Python warning.** The plugin needs `python3` 3.9 or later on your `PATH`. When it can’t find `python3` at all, the menu warns that Claude Security won’t work until one is installed; when the first `python3` on your `PATH` is older, the warning names the version it found. Install Python 3, or put a newer `python3` first on your `PATH`, then start a new session. **You may see a “safeguards flagged this message” notice when scanning on a Fable model.** The message names the model you’re running. Fable’s cybersecurity safety classifiers flag certain requests, and Claude Code re-runs a flagged request on an Opus model through [automatic model fallback](</docs/en/model-config#automatic-model-fallback>). This is expected. When the request re-runs, the scan should still complete successfully. If the scan stops, see Continue a stopped scan.
## Related resources
--- a/cloud-environments.md
+++ b/cloud-environments.md
@@ -146,7 +146,7 @@
* **Saved CLI default** : if the environment was your saved CLI default, Claude Code starts CLI cloud sessions in the Anthropic-hosted environment when your list has one. Otherwise, it starts them in the first environment in your list that isn’t a Remote Control bridge environment.
* **Configured explicitly** : anything configured with the environment explicitly, such as a [cloud scheduled task](</docs/en/routines#environments-and-network-access>), can’t start new sessions in it. Point it at another environment.
-When you no longer need an Anthropic-hosted environment, archive it. Neither the environment dialog nor the **Cloud environments** admin page has an option to delete an Anthropic-hosted environment. If the environment is [self-hosted](</docs/en/self-hosted-environments>), an Owner can delete it from the **Cloud environments** page in admin settings. If you aren’t an Owner, ask one to delete it.
+When you no longer need an Anthropic-hosted environment, archive it. Neither the environment dialog nor the **Cloud environments** admin page has an option to delete an Anthropic-hosted environment. If the environment is [self-hosted](</docs/en/self-hosted-environments>), an Owner can delete it from the **Cloud environments** page in admin settings.
### Organization-shared environments
--- a/code-mode.md
+++ b/code-mode.md
@@ -109,6 +109,12 @@
Press `Ctrl+O` and expand a **Code** row to see the JavaScript behind the tool calls. Press `Ctrl+O` again to return to the conversation.
To resume a Code Mode session later, keep `CLAUDE_CODE_EXPERIMENTAL_CODE_MODE` set to `1` when you run `claude --continue` or `claude --resume`. With Code Mode off, Claude Code refuses to resume the session. Sessions that you started without Code Mode resume without Code Mode, even with the variable set.
+
+### Use Code Mode in subagents
+
+If your [subagent](</docs/en/sub-agents>) has a `tools` list, add [`REPL`](</docs/en/tools-reference>) to the list so that the subagent uses Code Mode:
+
+ tools: Read, Bash, REPL
### Turn off Code Mode
--- a/code-review.md
+++ b/code-review.md
@@ -6,7 +6,7 @@
## Availability
-Check that your organization qualifies before you set up Code Review:
+Check these requirements before setting up Code Review:
* **Plans** : [Team and Enterprise](</docs/en/feature-availability>)
* **Code hosts** : repositories hosted on GitHub, including [GitHub Enterprise Server](</docs/en/github-enterprise-server>) and GitHub Enterprise Cloud with data residency. For data residency, have an Owner follow the [GitHub Enterprise Server admin setup](</docs/en/github-enterprise-server#admin-setup>) and enter your enterprise’s `ghe.com` hostname.
--- a/code-review-local.md
+++ b/code-review-local.md
@@ -1,6 +1,6 @@
`/code-review` is a command you type at the Claude Code prompt, in the session where you’re working. Claude reviews the changes on your branch, looks for correctness bugs, and reports what it found in your conversation. Depending on your model and effort level, the review also covers reuse, simplification, and efficiency cleanups. The command works on any plan. The review runs in your own session, so it counts toward your plan’s usage or API billing the same way the rest of the session does.
-To have every pull request in a repository reviewed automatically on GitHub, see [Code Review](</docs/en/code-review>), a managed service that an Owner turns on for your organization.
+To have every pull request in a repository reviewed automatically on GitHub, see [Code Review](</docs/en/code-review>), a managed service that an Owner of a Claude organization turns on.
`/review` is an alias of `/code-review`.
--- a/code-review-setup.md
+++ b/code-review-setup.md
@@ -103,7 +103,7 @@
### What developers can change
-Developers come to you to change the review level, the **Review runs** setting, or which repositories get reviews. From GitHub, without the Owner role, they can do these:
+Developers ask an Owner to change the review level, the **Review runs** setting, or which repositories get reviews. From GitHub, without the Owner role, they can do these:
* **Request a review** : comment [`@claude review`](</docs/en/code-review-pull-requests#comment-commands>) on a pull request. This needs write access to the repository, and it works on [drafts and pull requests from forks](</docs/en/code-review-pull-requests#review-drafts-and-pull-requests-from-forks>), which automatic reviews skip.
* **Subscribe one pull request to a review on each push** : comment `@claude review always` on a pull request that isn’t [a draft or from a fork](</docs/en/code-review-pull-requests#review-drafts-and-pull-requests-from-forks>), such as in a repository set to Manual
--- a/commands.md
+++ b/commands.md
@@ -20,13 +20,13 @@
`/add-dir <path>`| Add a working directory for file access. Type a partial path to see matching directory suggestions; press `Tab` to accept one. Most `.claude/` configuration [isn’t discovered](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) from the added directory. You can’t add most [network paths](</docs/en/errors#working-directory-is-a-network-path>), such as `\\server\share`. After a successful add, your [`DirectoryAdded` hooks](</docs/en/hooks#directoryadded>) run. If you run `/add-dir` while Claude is responding, Claude’s next tool call can access the directory once you confirm the add
`/advisor [model|off]`| Enable or disable the [advisor tool](</docs/en/advisor>), which consults a second model for guidance at key moments during a task. Accepts `fable`, `opus`, `sonnet`, or a full model ID. `fable` requires [Fable access](</docs/en/advisor#choose-an-advisor-model>). Without an argument, opens a picker. In a session without an interactive terminal, or over [Remote Control](</docs/en/remote-control#limitations>), pass the model or `off` as an argument; with no argument there, the command prints the current advisor as text. These forms require Claude Code v2.1.260 or later
`/agents`| Print a reminder to ask Claude to create or manage [subagents](</docs/en/sub-agents>), or to edit `.claude/agents/` or `~/.claude/agents/` directly. On v2.1.197 and earlier, opens an interactive interface for creating and managing subagent configurations
-`/artifact-capabilities`| **[Skill](</docs/en/skills#bundled-skills>).** Load the reference for the runtime capabilities a published [artifact](</docs/en/artifacts>) can use, such as [calling your connectors](</docs/en/artifacts#pull-live-data-with-mcp-connectors>) or [offering a file download](</docs/en/artifacts#offer-a-file-download>), including which ones your account has. Claude normally loads it on its own before building a page that uses one. Available where [artifacts](</docs/en/artifacts#availability>) are
+`/artifact-capabilities`| **[Skill](</docs/en/skills#bundled-skills>).** Load the reference for the runtime capabilities a published [artifact](</docs/en/artifacts>) can use, such as [calling your connectors](</docs/en/artifacts#pull-live-data-with-mcp-connectors>) or [offering a file download](</docs/en/artifacts#offer-a-file-download>), including which ones your account has. Requires [artifacts](</docs/en/artifacts#availability>)
`/artifact-diagramming`| **[Skill](</docs/en/skills#bundled-skills>).** Load diagramming guidance for Claude to follow in [artifacts](</docs/en/artifacts>): when a diagram helps, what to draw, and how to write inline SVG that stays legible in light and dark themes. Requires Claude Code v2.1.221 or later
`/artifacts`| List the [artifacts](</docs/en/artifacts#find-an-artifact-again>) you own or that are shared with you, then attach one to the session, open it in your browser, or copy its link. Available where [artifacts](</docs/en/artifacts#availability>) are
`/auto-mode-setup`| [Draft `autoMode.environment` entries](</docs/en/auto-mode-config#generate-environment-entries>) from your project and recent sessions, then review the draft and save it to your user settings. On a Pro, Max, Ultra, or Team plan, requires Claude Code v2.1.228 or later, or v2.1.233 or later on native Windows. On an Enterprise plan or with a Claude Console API key, requires v2.1.283 or later. If the command is missing, see [`/auto-mode-setup` returns “Unknown command”](</docs/en/auto-mode-config#auto-mode-setup-returns-unknown-command>)
`/autocompact [auto|<tokens>]`| Set the auto-compact window: how full the context window gets before Claude Code compacts automatically. Pass a size such as `500k`, or `auto` to return to the window tuned for your model. Claude Code saves the value to user settings and applies it to the current session. See [Set the auto-compact window](</docs/en/model-config#set-the-auto-compact-window>) for accepted values and what overrides it. Without an argument, opens a dialog that shows the current window. Requires Claude Code v2.1.221 or later
`/autofix-pr [prompt]`| Spawn a [cloud session](</docs/en/claude-code-on-the-web#auto-fix-pull-requests>) that watches the current branch’s PR and pushes fixes when CI fails or reviewers leave comments. Detects the open PR from your checked-out branch with `gh pr view`; to watch a different PR, check out its branch first. By default the cloud session is told to fix every CI failure and review comment; pass a prompt to give it different instructions, for example `/autofix-pr only fix lint and type errors`. Requires the `gh` CLI and access to [cloud sessions](</docs/en/claude-code-on-the-web>)
-`/background [prompt]`| Detach the current session to run as a [background agent](</docs/en/agent-view>) and free this terminal. Pass a prompt to send one more instruction before detaching. Monitor the session with `claude agents`. To copy the conversation into a new background session while this one keeps running, use `/fork`. Alias: `/bg`
+`/background [prompt]`| Detach the current session to run as a [background agent](</docs/en/agent-view>) and free this terminal. Pass a prompt to send one more instruction before detaching. Monitor the session with `claude agents`. To copy the conversation into a new background session while this one keeps running, use `/fork`. While a `/ship` or `/steward` watch is on, see [Messages during a watch](</docs/en/ship-command-troubleshooting#messages-during-a-watch>). Alias: `/bg`
`/batch <instruction>`| **[Skill](</docs/en/skills#bundled-skills>).** Orchestrate large-scale changes across a codebase in parallel. Researches the codebase, decomposes the work into 5 to 30 independent units, and presents a plan. Once approved, spawns one [background subagent](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) per unit in an isolated [worktree](</docs/en/worktrees>). Each subagent implements its unit, runs tests, and opens a PR or reports what happened. Requires a git repository or a [`WorktreeCreate` hook](</docs/en/worktrees#non-git-version-control>) that creates the worktrees. Outside a git repository, `/batch` requires Claude Code v2.1.281 or later. Example: `/batch migrate src/ from JavaScript to TypeScript`
`/branch [name]`| Create a branch of the current conversation at this point, so you can try a different direction without losing the conversation as it stands. Switches you into the branch and preserves the original, which you can return to with `/resume`. To run a copy as a separate [background session](</docs/en/agent-view>) instead of switching into it, use `/fork`; to hand a side task to a [subagent](</docs/en/sub-agents>) that reports back into this conversation, use `/subtask`
`/btw [question]`| Ask a [side question](</docs/en/interactive-mode#side-questions-with-%2Fbtw>) about the current session without adding to the conversation. If you run `/btw` without a question, Claude Code shows your most recent side question so you can browse earlier answers; if you haven’t asked one yet, Claude Code prints a usage line
@@ -34,6 +34,7 @@
`/cd <path>`| Move this session to a new working directory, keeping the conversation. Type a partial path to see matching directory suggestions; press `Tab` to accept one. For what Claude Code applies from the new directory as soon as you move, and how `/cd` differs from `/add-dir`, see [Move the session to another directory](</docs/en/permissions#move-the-session-to-another-directory>)
`/chrome`| Configure [Claude in Chrome](</docs/en/chrome>) settings
`/claude-api [migrate|upgrade|api-version|managed-agents-onboard|managed-agents-secure|prompt-audit|cost-optimize|latency-optimize|build-eval|hillclimb|preserved-thinking-migration]`| **[Skill](</docs/en/skills#bundled-skills>).** Load [Claude API](<https://platform.claude.com/docs/en/api/overview>) and [Managed Agents](<https://platform.claude.com/docs/en/managed-agents/overview>) reference material for your project’s language. Also activates automatically when your code imports `anthropic` or `@anthropic-ai/sdk`. For what each subcommand does and the version it requires, see [Work on Claude API projects](</docs/en/skills#work-on-claude-api-projects>)
+`/claude-approvals [what to change or explain]`| **[Skill](</docs/en/skills#bundled-skills>).** Edit, explain, or tune a [Claude Approvals](</docs/en/approvals>) policy file or classifier. Requires Claude Code v2.1.331 or later and [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>)
`/claude-in-chrome [task]`| **[Skill](</docs/en/skills#bundled-skills>).** Have Claude carry out a task in your browser, such as testing a page, filling a form, or reading console logs, through [Claude in Chrome](</docs/en/chrome>). Available when Chrome integration is enabled for the session, for example with `claude --chrome`, or when Claude Code can offer to [install the extension](</docs/en/chrome#install-the-extension-when-claude-asks>)
`/clear [name]`| Start a new conversation with empty context. Pass a name to label the previous conversation in the `/resume` picker. To free up context while continuing the same conversation, use `/compact` instead. Resume the previous conversation with `/resume`, or, in the same Claude Code process, restore it from [the rewind menu’s previous-session entry](</docs/en/checkpointing#rewind-past-a-cleared-conversation>). Aliases: `/reset`, `/new`
`/code-review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [--max-findings n|all|default] [pr#|branch|path]`| **[Skill](</docs/en/skills#bundled-skills>).** Review the current diff, or a PR number, branch, or path you pass, for correctness bugs. Depending on your model and effort level, the review also covers cleanup opportunities. Pass `--fix` to have Claude apply the findings, `--comment` to post them on the GitHub PR or GitLab merge request, or `ultra` to run a deep [cloud review](</docs/en/ultrareview>). Posting to a GitLab merge request requires Claude Code v2.1.257 or later. With `ultra` on a `github.com` PR target, pass `--post` to preselect [posting the finished findings to the PR](</docs/en/ultrareview#post-findings-to-the-pull-request>) in the launch dialog; `--post` requires Claude Code v2.1.227 or later. See [Review locally with `/code-review`](</docs/en/code-review-local>) for the effort levels, targeting, and how it relates to `/simplify`. Alias: `/review`
@@ -89,7 +90,7 @@
`/plugin-authoring`| Load the reference Claude works from to [write a mod](</docs/en/plugins/mods/create#ask-claude-for-a-mod>). Claude can load it on its own when you ask for a mod. This is a skill from a [built-in plugin](</docs/en/plugins/mods/overview#mods-built-into-claude-code>), which you can turn off in `/plugin`. Requires Claude Code v2.1.287 or later
`/powerup`| Discover Claude Code features through quick interactive lessons with animated demos
`/pr-comments [PR]`| Removed in v2.1.91. Ask Claude directly to view pull request comments instead. On earlier versions, fetches and displays comments from a GitHub pull request; automatically detects the PR for the current branch, or pass a PR URL or number. Requires the `gh` CLI
-`/privacy-settings`| View and update your privacy settings. Only available for Pro, Max, and Ultra plan subscribers
+`/privacy-settings`| View and update your privacy settings or get a link to them on claude.ai. Only available for Pro, Max, and Ultra plan subscribers
`/radio`| Open Claude FM lo-fi radio in your browser. Prints the stream URL when no browser is available
`/rate-limit-options`| Show ways to keep working when a claude.ai usage limit blocks a request: wait and [continue automatically when the limit resets](</docs/en/interactive-mode#wait-for-a-usage-limit-to-reset>), add [usage credits](</docs/en/costs#add-usage-credits-to-your-subscription>), or upgrade your plan. Claude Code can also open this menu on its own when you hit a limit at your own terminal. See [Turn automatic continue off](</docs/en/interactive-mode#turn-automatic-continue-off>). Requires a claude.ai subscription. The wait-and-continue rows require Claude Code v2.1.234 or later
`/recap`| Generate a one-line summary of the current session on demand. See [Session recap](</docs/en/interactive-mode#session-recap>) for the automatic recap that appears after you’ve been away
@@ -111,7 +112,7 @@
`/security-review`| Analyze the changes on your current branch for security vulnerabilities. Reviews the diff between your branch and origin’s default branch, identifying risks like injection, auth issues, and data exposure. Needs an `origin` remote; if the review fails with an `ambiguous argument` error, see the [error reference](</docs/en/errors#security-review-fails-without-origin-head>)
`/setup-bedrock`| Configure [Amazon Bedrock](</docs/en/amazon-bedrock>) authentication, region, and model pins through an interactive wizard. Hidden from the command menu until `CLAUDE_CODE_USE_BEDROCK=1` is set; type it in full. First-time Amazon Bedrock users can also access this wizard from the login screen
`/setup-vertex`| Configure [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>) authentication, project, region, and model pins through an interactive wizard. Hidden from the command menu until `CLAUDE_CODE_USE_VERTEX=1` is set; type it in full. First-time Google Cloud’s Agent Platform users can also access this wizard from the login screen
-`/ship [level] [pr] [+bot]`| **[Skill](</docs/en/skills#bundled-skills>).** Commit and push your work and open a GitHub pull request, if your branch has none. Then review the change. Claude then watches the pull request in this session and pushes fixes for review feedback and failing checks. `/ship stop` ends the watch. See [Get a pull request ready with `/ship`](</docs/en/ship-command>). If the command is missing, see [Troubleshooting](</docs/en/ship-command-troubleshooting>)
+`/ship [level] [pr] [+bot]`| **[Skill](</docs/en/skills#bundled-skills>).** Commit and push your work [where `/ship` can](</docs/en/ship-command#what-%2Fship-commits-and-pushes>), open a GitHub pull request for your branch if it has none, then review the change. Claude then watches the pull request in this session and pushes fixes for review feedback and failing checks. `/ship stop` ends the watch. See [Get a pull request ready with `/ship`](</docs/en/ship-command>). If the command is missing, see [Troubleshooting](</docs/en/ship-command-troubleshooting>)
`/ship:review`| Alias for [`/code-review`](</docs/en/code-review-local>)
`/simplify [target]`| **[Skill](</docs/en/skills#bundled-skills>).** Review the changed code for cleanup opportunities and apply the fixes. Four review [agents](</docs/en/sub-agents>) run in parallel, covering reuse of existing helpers, simplification, efficiency, and whether the change is at the right level of abstraction. The review doesn’t look for correctness bugs. Use `/code-review` to find bugs. Pass a path or PR reference to review a specific target
`/skill-doctor`| Show what each of your [skills](</docs/en/skills>) costs in context and how often it gets used, so you can [find skills to turn off](</docs/en/skills#find-unused-skills>). Requires Claude Code v2.1.252 or later and [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>)
--- a/configuration.md
+++ b/configuration.md
@@ -119,7 +119,7 @@
Cap turns and spend with `maxTurns` / `max_turns` and `maxBudgetUsd` / `max_budget_usd`. Both caps are off when unset. When a session hits a cap, the run ends with a result message. The result’s subtype is `error_max_turns` for the turn cap and `error_max_budget_usd` for the spend cap. Single-shot and streaming input handle a cap result differently:
* **Single-shot`query()`**: the SDK yields the cap result and then raises, so wrap the loop in a try block to continue past the error
- * **Streaming input** : the session stays alive past a cap result, and the max-turns count starts over for each queued message. The budget total accumulates across messages, and once spend reaches the cap, later messages in the same conversation end with the same budget result. A [`/clear`](</docs/en/agent-sdk/cost-tracking>) starts the budget over.
+ * **Streaming input** : the session stays alive past a cap result, and the max-turns count starts over. The budget total accumulates across messages, and once spend reaches the cap, later messages in the same conversation end with the same budget result. A [`/clear`](</docs/en/agent-sdk/cost-tracking>) starts the budget over.
* **Streaming input in TypeScript** : the loop throws when the last response ends in an error result, such as `error_max_turns`. Wrap the loop in a try block to continue past it.
The two caps treat `0` differently:
--- a/costs.md
+++ b/costs.md
@@ -244,7 +244,7 @@
* filter-test-output.sh
-Add this to your [settings.json](</docs/en/settings#where-settings-live>) to run the hook before every Bash command:
+Add this to your [settings.json](</docs/en/settings#where-settings-live>) to run the hook before every Bash tool call:
{
"hooks": {
--- a/create.md
+++ b/create.md
@@ -264,15 +264,19 @@
✔ Validation passed
-Check the `hooks:` line for the events your module hooks, each with its filter in braces, and `calls:` for every mods API method it calls. If your module reads or sets environment variables, look for `env reads:` and `env writes:` lines too, and `state reads:` and `state writes:` if it uses [`$.state`](</docs/en/plugins/mods/interface#keep-state>). You also see one line for each hook that can refuse an action, such as `gating hook without .catch: tool.call`, which says whether that hook has a [`.catch` handler](</docs/en/plugins/mods/events#handle-a-hook-that-fails>). If an event you meant to handle is missing from the `hooks:` lines, Claude Code won’t call that hook either. The usual cause is a misspelled event name, which the command reports as an error such as `"tool.calls" is not an event`. Follow these rules so that static analysis can find every hook and call:
-
- * Write each mods API call in full: `$`, the namespace, then the method, as in `$.store.get('notes')`. You can pass `$` to a function declared at the top level of the same file, and for a function of yours named `loadNotes`, the `calls:` line then reads `$.store.get (via loadNotes)`. Passing `$` to a method, a function defined inside the hook, or a function you import from another of your files fails validation. The `read` and `update` functions that [`$.state`](</docs/en/plugins/mods/interface#keep-state>) uses are the imports that can take it. Don’t assign `$` or one of its namespaces to a variable, destructure it, or index it with a computed name. `const ui = $.ui` fails with `$.ui is used as a value`.
+Check the `hooks:` line for the events your module hooks, each with its filter in braces, and `calls:` for every mods API method it calls. If your module reads or sets environment variables, look for `env reads:` and `env writes:` lines too, and `state reads:` and `state writes:` if it uses [`$.state`](</docs/en/plugins/mods/interface#keep-state>). You also see one line for each hook that can refuse an action, such as `gating hook without .catch: tool.call`, which says whether that hook has a [`.catch` handler](</docs/en/plugins/mods/events#handle-a-hook-that-fails>). If an event you meant to handle is missing from the `hooks:` lines, Claude Code won’t call that hook either. Check each event name against the types for your build, because validation doesn’t catch every typo. For example, `tool.calls` fails with `"tool.calls" is not an event`, but `tol.call` passes validation and the mod then doesn’t load. Follow these rules so that static analysis can find every hook and call:
+
+ * Write each mods API call in full: `$`, the namespace, then the method, as in `$.store.get('notes')`. Don’t assign `$` or one of its namespaces to a variable, destructure it, or index it with a computed name. `const ui = $.ui` fails with `$.ui is used as a value`.
* Write the event name in each `on` call as a string literal, such as `'tool.call'`. A variable, or a loop over a list of names, fails with `the event name passed to on() is not a string literal`.
* Inside `register`, don’t declare a second variable or parameter named `on`. Validation fails with `"on" is declared again (shadowed)`.
* Import only from files inside the plugin directory, by relative path. The one bare import allowed is `claude-code`, for types and a few helpers.
* Use `import` declarations at the top of the file, as in `import { name } from './file.js'`. A dynamic `import()` fails with `a dynamic import(); a hooks module imports its own files with an import declaration`.
* Write every file as an ES module, with `import` and not `require`. The [reference](</docs/en/plugins/mods/reference#files>) lists the file extensions Claude Code loads.
+#### Pass `$` to your functions
+
+You can pass `$` to a function declared at the top level of your hook’s file, and to the `read` and `update` functions that [`$.state`](</docs/en/plugins/mods/interface#keep-state>) uses. For a function named `loadNotes` that calls `$.store.get`, the `calls:` line reads `$.store.get (via loadNotes)`. Passing `$` to a method or to a function defined inside the hook fails validation. On Claude Code v2.1.299 or later, you can also pass `$` to a function you import from another of your files. Declare it there with the `function` keyword, as in `export function loadNotes($) { ... }`. An imported arrow function fails with `a name bound to a function expression, outside the hook's own file`.
+
### Test the mod
You can write automated tests for a mod and run them from your shell with `claude plugin test`, with no session, sign-in, or network. A test fires the events your hooks handle and checks what the hooks did. This test fires two tool calls, runs `/tally`, and checks that the reply counts both. Save it as `first-mod/tests/first-mod.test.ts`:
@@ -318,7 +322,7 @@
* **Your whole organization** : an administrator can [install your organization’s mods](</docs/en/plugins/mods/admin#install-your-organizations-mods>) through managed settings
* **Anyone** : make your marketplace’s repository public, or [submit the plugin to Anthropic’s directory](</docs/en/plugins/publish#submit-to-anthropics-directory>)
-Before you do, check the plugin’s `name`: `claude plugin validate` fails a name that [looks like one of Anthropic’s own](</docs/en/plugins/manifest-reference#name>), such as one that starts with `claude-`. The events and methods can change between releases, so your README is the place to say which Claude Code version you tested with. Keep developing against the directory with `--plugin-dir`, not against an installed copy. Claude Code caches an installed plugin by version, so your edits don’t reach the installed copy until you increment the version and install again.
+Before you do, check the plugin’s `name`: `claude plugin validate` fails a name that [looks like one of Anthropic’s own](</docs/en/plugins/manifest-reference#name>), such as one that starts with `claude-`. The events and methods can change between releases, so your README is the place to say which Claude Code version you tested with. Keep developing against the directory with `--plugin-dir`, not against an [installed copy](</docs/en/plugins/loading#in-place-and-copied-plugins>).
## Next steps
--- a/debug-your-config.md
+++ b/debug-your-config.md
@@ -38,7 +38,7 @@
Run `/hooks` to list every hook registered for the current session, grouped by event. If a hook you defined doesn’t appear, Claude Code didn’t load it. Check for these causes:
* The hook is defined in a standalone file. Hooks go under the `"hooks"` key in a [settings file](</docs/en/settings#settings-files>).
- * The `matcher` value is an array instead of a single string. Claude Code lists the entry as an invalid setting when you start an interactive session and in `claude doctor`. If the array is under `PreToolUse` or `PermissionRequest`, none of that file’s other hooks load either.
+ * The `matcher` value is an array instead of a single string. Claude Code lists the entry as an invalid setting when you start an interactive session and in `claude doctor`. If the array is under `PreToolUse`, `PermissionRequest`, or `PreSkillShellCommand`, none of that file’s other hooks load either.
* The hook is in a skill’s frontmatter, and neither you nor Claude has invoked the skill yet in this session. Invoke it or ask Claude to, then run `/hooks` again. If the hook still doesn’t appear, check for other causes, such as [frontmatter that didn’t parse](</docs/en/skills#skill-not-triggering>) or one of the [limits on skill hooks](</docs/en/hooks#limits-on-skill-hooks>).
If the hook appears but doesn’t fire, the matcher is the usual cause. Check it for these mistakes:
--- a/desktop.md
+++ b/desktop.md
@@ -1671,7 +1671,7 @@
* **A broken settings file** : while your own settings file is broken, your administrator’s entries may be gray, with a message that names the file. [Fix the file](</docs/en/settings#fix-a-broken-settings-file>).
* **A new host** : **Create another** is gray for one minute after Desktop saves a host. Select it after that minute. Before Claude Desktop v4.4212.0, **Replace Dev box’s host** is gray for 10 minutes.
* **Hooks are off or restricted** : your own entries work only where your own hooks can run. Remove `disableAllHooks` from your settings, or ask your administrator.
- * **Settings are still loading** : every entry is gray until Desktop has loaded your organization’s [server-managed settings](</docs/en/server-managed-settings>), usually a few seconds after launch. If the entries stay gray, check your connection to claude.ai.
+ * **Settings are still loading** : every entry is gray until Desktop has loaded any [server-managed settings](</docs/en/server-managed-settings>), usually a few seconds after launch. If the entries stay gray, check your connection to claude.ai.
#### Pre-configure SSH connections for your team
@@ -1844,6 +1844,23 @@
* **[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. 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>).
+
+#### Deploy skills for all users
+
+To give every user the same skills in local and SSH sessions, deploy them as [enterprise skills](</docs/en/skills#where-skills-live>), which you install once on a machine for all of its users. Install them on the machine where the session runs:
+
+ * **Local sessions** : each user’s computer
+ * **SSH sessions** : each remote host
+
+Install each skill at the path for that machine’s platform:
+
+Platform| Path
+---|---
+macOS| `/Library/Application Support/ClaudeCode/.claude/skills/<skill-name>/SKILL.md`
+Linux| `/etc/claude-code/.claude/skills/<skill-name>/SKILL.md`
+Windows| `C:\Program Files\ClaudeCode\.claude\skills\<skill-name>\SKILL.md`
+
+To confirm that your skills load, test with a skill whose [frontmatter](</docs/en/skills#frontmatter-reference>) sets only `name` and `description`. Start a new session and send a message, then type `/` and the first letters of the skill’s name in the prompt box. The skill appears in the list.
#### Claude Code settings that behave differently in the Code tab
@@ -2026,6 +2043,7 @@
* **Linux (beta)** : Computer Use isn’t yet available in the Linux desktop app. See [Claude Desktop on Linux](</docs/en/desktop-linux>).
* **Inline code suggestions** : Desktop doesn’t offer autocomplete-style code completions. It works through conversational prompts and explicit code changes, and can suggest your next prompt after Claude replies.
* **Agent teams** : coordinated teams, where Claude as the team lead assigns tasks to teammates from a shared task list, are available in the [CLI](</docs/en/agent-teams>), not in Desktop. For multi-agent work inside one session, use [dynamic workflows](</docs/en/workflows>), which run in Desktop; Claude can also message and manage your other sessions directly.
+ * **Code Mode** : Desktop sessions start without the experimental [Code Mode](</docs/en/code-mode>), even if you turn it on in your settings. To use it, run the CLI in a terminal.
* **Terminal-dialog commands** : built-in commands that open an interactive panel in the terminal behave differently in the Code tab. Edit [settings files](</docs/en/settings>) directly to manage permission rules and configuration, or run the commands from the standalone CLI.
* Commands with no argument form, such as `/permissions`, reply with `isn't available in this environment`.
* `/config` opens **Settings > Code** or **Settings > Claude Code**.
@@ -2059,7 +2077,7 @@
### 403 or authentication errors in the Code tab
-If you see `Error 403: Forbidden` or other authentication failures when using the Code tab:
+For a card that says `For security, Claude Code needs a recent sign-in.`, see [Claude Code needs a recent sign-in](</docs/en/errors#claude-code-needs-a-recent-sign-in>). If you see `Error 403: Forbidden` or other authentication failures when using the Code tab:
1. Sign out and back in from the app menu. This is the most common fix.
2. Verify you have an active paid subscription: Pro, Max, Ultra, Team, or Enterprise.
--- a/desktop-ios-simulator.md
+++ b/desktop-ios-simulator.md
@@ -80,7 +80,7 @@
## Grant Claude access to a device
-Claude asks for your consent before it controls a device, while building or launching the app or opening a URL on it follows your session’s permission mode. You or your organization can also turn Claude’s access off entirely.
+Claude asks for your consent before it controls a device, while building or launching the app or opening a URL on it follows your session’s permission mode. To remove Claude’s access entirely, turn off simulator access.
### Allow a device the first time
--- a/env-vars.md
+++ b/env-vars.md
@@ -168,9 +168,9 @@
`CLAUDE_CODE_ALWAYS_ENABLE_EFFORT`| Set to `1` to send the [effort](</docs/en/model-config#adjust-effort-level>) parameter with every request, even when Claude Code does not recognize the model ID as effort-capable. Use this when routing through an [LLM gateway](</docs/en/llm-gateway>) or third-party provider that serves models under custom identifiers. Models that reject the effort parameter at the API, including Claude Opus 4.1, Claude Sonnet 4.5, Claude Haiku 4.5, and earlier models, are still excluded so requests do not fail
`CLAUDE_CODE_API_KEY_HELPER_TTL_MS`| Interval in milliseconds at which credentials should be refreshed (when using [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>))
`CLAUDE_CODE_ARTIFACT_AUTO_OPEN`| Set to `0` to stop Claude Code from opening the browser automatically when a new [artifact](</docs/en/artifacts#create-an-artifact>) is published
-`CLAUDE_CODE_ARTIFACT_COMMENTS`| Set to `0` to stop Claude reading and replying to [comments on an artifact](</docs/en/artifacts#collect-comments-on-an-artifact>). Has no effect when `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` has [turned artifacts off](</docs/en/artifacts#availability>). Requires Claude Code v2.1.221 or later
+`CLAUDE_CODE_ARTIFACT_COMMENTS`| Set to `0` to stop the [`Artifact` tool](</docs/en/tools-reference>) from reading and replying to [comments on an artifact](</docs/en/artifacts#collect-comments-on-an-artifact>). Has no effect when `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` has [turned artifacts off](</docs/en/artifacts#availability>). Requires Claude Code v2.1.221 or later
`CLAUDE_CODE_ARTIFACT_COMMENTS_AUTOREACT`| Set to `0` to stop Claude [replying on its own to comments sent to it](</docs/en/artifacts#let-claude-reply-to-comments-on-its-own>). Requires Claude Code v2.1.228 or later
-`CLAUDE_CODE_ARTIFACT_PUBLISH_EDITS`| Set to `0` to stop Claude from [applying small changes](</docs/en/artifacts#turn-off-one-step-artifact-updates>) to an artifact’s file as part of publishing it. Claude then edits the file with its file-editing tools and publishes it as a separate step. Requires Claude Code v2.1.300 or later
+`CLAUDE_CODE_ARTIFACT_PUBLISH_EDITS`| Set to `0` to stop Claude from [applying small changes](</docs/en/artifacts#turn-off-one-step-artifact-updates>) to an artifact’s local file as part of publishing it. Requires Claude Code v2.1.300 or later
`CLAUDE_CODE_ATTRIBUTION_HEADER`| Set to `0` to omit the [attribution block](</docs/en/llm-gateway-protocol#system-prompt-attribution-block>), which carries the client version and a prompt fingerprint, from the start of the system prompt. Caching on a direct connection to the Anthropic API is unaffected either way. In some direct-connection setups, Claude Code keeps the block on [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) classifier requests even when you set `0`. In [System prompt attribution block](</docs/en/llm-gateway-protocol#system-prompt-attribution-block>), check which connections and credentials this covers. Before v2.1.181 the block included a per-request token on custom base URLs and Microsoft Foundry connections, so on those versions set it to `0` when your LLM gateway caches on the request body or forwards requests to a third-party provider, or when you connect to Microsoft Foundry directly
`CLAUDE_CODE_AUTO_BACKGROUND_WORKER_CHECKIN_SECONDS`| Removed in v2.1.283. Use `CLAUDE_CODE_WORKER_CHECKIN_SCHEDULE` instead
`CLAUDE_CODE_AUTO_COMPACT_WINDOW`| Set the auto-compact window, which is how full the context gets before compaction, to a token count of `100000` or more. Suffixed values such as `200k` require v2.1.304 or later. For precedence over the other ways to set the window and the effect on the status line’s `used_percentage`, see [Set the auto-compact window](</docs/en/model-config#set-the-auto-compact-window>)
@@ -238,7 +238,9 @@
`CLAUDE_CODE_DISABLE_POWERSHELL_CMD_RM_DENY`| Set to `1` to turn off the [PowerShell tool](</docs/en/tools-reference#powershell-tool>) check that denies the `cmd` built-ins `rd`, `rmdir`, `del`, and `erase` on a [system path](</docs/en/permission-modes#remove-item-in-powershell>), such as a drive root or your home directory. Claude Code ignores this variable in a settings file’s `env` block. Requires Claude Code v2.1.283 or later
`CLAUDE_CODE_DISABLE_PROXY_SCHEME_REPAIR`| Set to `1` to have Claude Code stop at startup on a plain `host:port` in `HTTPS_PROXY` or `https_proxy` even when it starts with no terminal. Claude Code ignores it in project and local settings. Requires Claude Code v2.1.327 or later
`CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK`| Set to `1` to turn off the [automatic model switch when a safety classifier flags a request](</docs/en/model-config#automatic-model-fallback>), the behavior the [`switchModelsOnFlag`](</docs/en/settings-reference#switchmodelsonflag>) setting controls
+`CLAUDE_CODE_DISABLE_RESPONSE_COMPRESSION`| Set to `1` to request uncompressed model responses if your [proxy](</docs/en/network-config#proxy-configuration>) leaves compressed ones unfinished. Not recommended for self-hosted runners or Remote Control. Ignored in project and local settings. Requires Claude Code v2.1.331 or later
`CLAUDE_CODE_DISABLE_SHELL_HEAD_START`| Set to `1` to turn off the head start that can run your shell startup files while Claude writes the session’s first Bash command, before that command’s permission prompt. Requires Claude Code v2.1.327 or later
+`CLAUDE_CODE_DISABLE_SHIP`| Set to `1` to turn off [`/ship` and `/steward`](</docs/en/ship-command#turn-off-%2Fship-and-%2Fsteward-for-your-organization>). Requires Claude Code v2.1.331 or later
`CLAUDE_CODE_DISABLE_STRUCTURED_OUTPUTS`| Set to `1` to stop Claude Code from sending the structured-output `output_config.format` field and the `anthropic-beta` value that pairs with it, for an [LLM gateway](</docs/en/llm-gateway-protocol#feature-pass-through>) whose upstream rejects them. This leaves on the other pre-release capabilities that [`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS`](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) turns off. Requires Claude Code v2.1.288 or later
`CLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPT`| Set to `1` to turn off the [critical-path](</docs/en/permission-modes#critical-paths>) check for a recursive `rm` whose target is entirely the output of a command substitution, such as `rm -rf "$(pwd)"`. The other critical-path checks keep running. Set it in the environment that launches Claude Code, since Claude Code ignores a copy delivered through a settings `env` block. Requires Claude Code v2.1.281 or later
`CLAUDE_CODE_DISABLE_TERMINAL_TITLE`| Set to `1` to disable automatic terminal title updates based on conversation context. This also skips the background small/fast-model request that [generates a session title](</docs/en/sessions#name-your-sessions>), and turns off [status reports to your terminal](</docs/en/terminal-config#see-session-status-in-your-terminal>)
@@ -426,7 +428,7 @@
`DEBUG`| Set to `1` to enable debug mode, equivalent to launching with [`--debug`](</docs/en/cli-reference#cli-flags>). Debug logs are written to `~/.claude/debug/<session-id>.txt`, or to the path set by `CLAUDE_CODE_DEBUG_LOGS_DIR`. Only the truthy values `1`, `true`, `yes`, and `on` enable debug mode, so namespace patterns like `DEBUG=express:*` set for other tools do not trigger it
`DISABLE_AUTOUPDATER`| Set to `1` to disable automatic background updates. Manual `claude update` still works. Use `DISABLE_UPDATES` to block both
`DISABLE_AUTO_COMPACT`| Set to `1` to disable automatic compaction when approaching the context limit, along with [idle compaction](</docs/en/settings-reference#idlecompaction>). The manual `/compact` command remains available. Use when you want explicit control over when compaction occurs. Overrides the [`autoCompactEnabled`](</docs/en/settings-reference#autocompactenabled>) setting
-`DISABLE_COMPACT`| Set to `1` to disable all compaction: both automatic compaction and the manual `/compact` command
+`DISABLE_COMPACT`| Set to `1` to disable all compaction, including `/compact` and the [rewind menu’s summarize options](</docs/en/checkpointing#rewind-and-summarize>)
`DISABLE_COST_WARNINGS`| Set to `1` to disable cost warning messages
`DISABLE_DOCTOR_COMMAND`| Set to `1` to hide the [`/doctor`](</docs/en/commands#all-commands>) setup checkup skill and its `/checkup` alias. Useful for managed deployments where users shouldn’t run setup diagnostics from a session. Doesn’t affect the `claude doctor` terminal command. Before v2.1.205, this variable hid the `/doctor` diagnostics screen command
`DISABLE_ERROR_REPORTING`| Set to any non-empty value, such as `1`, to opt out of error reporting. **Setting it to`0` or `false` still opts out**, unlike most on/off variables; unset the variable to turn error reporting back on
@@ -479,7 +481,7 @@
`OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT`| Standard OpenTelemetry SDK limit on attribute value length. Claude Code caps content-bearing telemetry attributes at the smaller of this and `CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH`, so the truncation marker stays within the SDK limit. Claude Code reads the `OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT` and `OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT` variants the same way, and the smallest set value applies to all signals. Requires Claude Code v2.1.214 or later. See [Monitoring](</docs/en/monitoring-usage#common-configuration-variables>)
`OTEL_LOG_ASSISTANT_RESPONSES`| Set to `1` to include the model’s response text on `assistant_response` OpenTelemetry log events. When unset, Claude Code uses the value of `OTEL_LOG_USER_PROMPTS` instead. Set to `0` to keep responses redacted even when `OTEL_LOG_USER_PROMPTS` is set. Set it in your shell, user settings, or managed settings. Ignored in [project and local settings](</docs/en/settings-reference#variables-claude-code-ignores-in-env>). Requires Claude Code v2.1.193 or later. See [Monitoring](</docs/en/monitoring-usage#assistant-response-event>)
`OTEL_LOG_MANAGED_SETTINGS`| Set to `1` to add the redacted managed settings, and a SHA-256 digest of the settings before redaction, to `managed_settings_resolved` OpenTelemetry log events. Disabled by default. Set it in your shell, user settings, or managed settings; a value in project or local settings doesn’t turn it on. Requires Claude Code v2.1.274 or later. See [Monitoring](</docs/en/monitoring-usage#managed-settings-resolved-event>)
-`OTEL_LOG_RAW_API_BODIES`| Emit Anthropic Messages API request and response JSON as `api_request_body` / `api_response_body` log events. Set to `1` for inline bodies truncated at the content limit, or `file:<dir>` to write untruncated bodies to disk and emit a `body_ref` path instead. `CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH` configures the content limit, 60 KB by default. Disabled by default; bodies include the entire conversation history. Set it in your shell, user settings, or managed settings. Ignored in [project and local settings](</docs/en/settings-reference#variables-claude-code-ignores-in-env>). See [Monitoring](</docs/en/monitoring-usage#api-request-body-event>)
+`OTEL_LOG_RAW_API_BODIES`| Emit Anthropic Messages API request and response JSON as `api_request_body` / `api_response_body` log events. Set to `1` for inline bodies truncated at the [content limit](</docs/en/monitoring-usage#common-configuration-variables>), or `file:<dir>` to write untruncated bodies to disk and emit a `body_ref` path instead. Disabled by default; bodies can include the entire conversation history. Set it in your shell, user settings, or managed settings. Ignored in [project and local settings](</docs/en/settings-reference#variables-claude-code-ignores-in-env>). See [Monitoring](</docs/en/monitoring-usage#api-request-body-event>)
`OTEL_LOG_TOOL_CONTENT`| Set to `1` to include tool content in the `tool.output` OpenTelemetry span event. Span attributes carry tool content under [their own gates](</docs/en/monitoring-usage#new-context-gates>). Requires [tracing](</docs/en/monitoring-usage#traces-beta>). Disabled by default to protect sensitive data. Set it in your shell, user settings, or managed settings. Ignored in [project and local settings](</docs/en/settings-reference#variables-claude-code-ignores-in-env>), apart from the off values that section describes. See [Monitoring](</docs/en/monitoring-usage#tool-output-span-event>)
`OTEL_LOG_TOOL_DETAILS`| Set to `1` to include tool input arguments; MCP server names; user-authored workflow names; raw error strings on tool failures; the refusal `category` on `api_refusal` events; real agent, skill, plugin, and MCP server names on [cost and token metrics](</docs/en/monitoring-usage#cost-counter>); and other tool details in OpenTelemetry metrics, traces, and logs. Disabled by default to protect PII. Set it in your shell, user settings, or managed settings. Ignored in [project and local settings](</docs/en/settings-reference#variables-claude-code-ignores-in-env>), apart from the off values that section describes. See [Monitoring](</docs/en/monitoring-usage>)
`OTEL_LOG_USER_PROMPTS`| Set to `1` to include user prompt text in OpenTelemetry traces and logs. Disabled by default (prompts are redacted). Set it in your shell, user settings, or managed settings. Ignored in [project and local settings](</docs/en/settings-reference#variables-claude-code-ignores-in-env>), apart from the off values that section describes. See [Monitoring](</docs/en/monitoring-usage>)
@@ -550,7 +552,8 @@
* Run [`claude import` or the `/import` command](</docs/en/cli-reference#cli-commands>)
* Run [`/skill-doctor`](</docs/en/skills#find-unused-skills>) or open its report in the `/plugin` **Stats** tab
* Run [`/restart`](</docs/en/commands>) on Pro, Max, and Ultra plans
- * Run [`/ship` or `/steward`](</docs/en/ship-command>)
+ * Run [`/ship` or `/steward`](</docs/en/ship-command>), except with Claude Code v2.1.331 or later on a third-party provider or in a Claude apps gateway session
+ * Run [`/claude-approvals`](</docs/en/commands>)
* 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>)
Show diff (148 lines)
--- a/errors.md
+++ b/errors.md
@@ -48,6 +48,8 @@
`Sign in again to take your previous account or API key off the config file.`| Authentication
`Your account or API key may still be in the config file. Run claude auth logout.`| Authentication
`Authentication required · Sign in again to continue`| Authentication
+`Sign in again to continue` followed by `For security, Claude Code needs a recent sign-in.`| Wrapper and IDE errors
+`Claude Code needs a recent sign-in. Signing in won’t stop sessions.`| Wrapper and IDE errors
`Could not resolve authentication method`| Authentication
`Invalid API key`| Authentication
`Your apiKeyHelper script is failing`| Authentication
@@ -87,19 +89,22 @@
`Your account does not have access to Claude. Please login again or contact your administrator.`| Authentication
`API Error: 401 Invalid authentication credentials`| Authentication
`Login expired · Please run /login`| Authentication
+`Authentication error · This may be a temporary network issue` in a cloud session| Send your message again.
+`login required — run /login` in agent view| If a message listed in this table follows it, use that row. Otherwise run `/login`.
`Warning: this sign-in`| [Check when a stored login ends](</docs/en/authentication#check-when-a-stored-login-ends>)
`The browser can't return the sign-in to Claude Code automatically`| Authentication
`Couldn't start the local listener that receives the browser sign-in. Try again.`| Authentication
`Failed to start OAuth callback server`| Authentication
`Claude login not accepted · Run /login, then try again`| Authentication
`Artifacts need a claude.ai login`| Authentication
+`Your authentication token belongs to organization`| [Restrict login to your organization](</docs/en/authentication#restrict-login-to-your-organization>)
`Not signed in to the Cloud gateway — run /login.`| Authentication
`Administrator policy requires a Cloud gateway sign-in on this machine`| Authentication
`Managed settings on this machine configure a Cloud gateway sign-in; run interactive /login to authenticate.`| [`claude auth login`](</docs/en/cli-reference#cli-commands>)
`You chose an organization that is managed in Anthropic's Enterprise Admin Console`| [Turn on sign-in from Claude Code](<https://claude.com/docs/third-party/claude-desktop/admin-console-claude-code#turn-on-sign-in-from-claude-code>)
`The organization's settings won't apply on this computer`| [Which settings take priority](<https://claude.com/docs/third-party/claude-desktop/admin-console-claude-code#which-settings-take-priority>)
`no usable organization sign-in` / `no readable organization sign-in`| [When a sign-in ends](<https://claude.com/docs/third-party/claude-desktop/admin-console-claude-code#when-a-sign-in-ends>)
-`the session no longer runs under that sign-in` / `This Claude Code process ran under your organization` / `After a sign-in to your organization, only a new session sends requests`| [Log in to Claude Code](</docs/en/authentication#log-in-to-claude-code>)
+`the session no longer runs under that sign-in` / `This Claude Code process ran under your organization` / `After a sign-in to your organization, only a new session sends requests` / `Claude Code needs to restart to use it`| [Log in to Claude Code](</docs/en/authentication#log-in-to-claude-code>)
`This conversation ran under organization` / `This conversation ran under more than one organization`| [Log in to Claude Code](</docs/en/authentication#log-in-to-claude-code>)
`Claude Code could not read the managed settings that apply to this computer, which may require a sign-in to Anthropic`| [`enforceAnthropicSignIn`](</docs/en/settings-reference#enforceanthropicsignin>)
`This computer's managed settings require a sign-in to Anthropic` / `This computer's settings require a sign-in to Anthropic that this app cannot use`| [Require the sign-in](<https://claude.com/docs/third-party/claude-desktop/admin-console-claude-code#require-the-sign-in-with-managed-settings>)
@@ -292,6 +297,7 @@
`Shell command failed for pattern "..."`, from `/security-review` or any skill that injects dynamic context| Command-line errors
`Shell command permission check failed for pattern "..."`, from a skill that injects dynamic context| Command-line errors
`Couldn't run `<command>` for <name>. A file named HEAD or .git in this folder or one above it may not be yours`, from a skill that injects dynamic context| [Permission checks on injected commands](</docs/en/skills#permission-checks-on-injected-commands>)
+`Not run in /<name>` / `Ran anyway in /<name>` / `[not run: blocked by hook`, from `/security-review` or a skill that injects dynamic context| [PreSkillShellCommand decision control](</docs/en/hooks#preskillshellcommand-decision-control>)
`Skill <name> requires bash (`shell: bash` in frontmatter) but Git Bash was not found`| Command-line errors
`No shell command in <name> was run, because the <tool> tool does not accept one of them`| Command-line errors
`This skill, command or hook and the arguments filled into it add up to more than 4,000,000 characters`| Command-line errors
@@ -337,6 +343,7 @@
`/feedback is disabled by your organization's policy`, or the same for `/bug` or `/share`| Command-line errors
``plugin eval` is currently in early access` / ``plugin eval` is currently unavailable`| Plugin errors
`credential store on this machine holds a symbolic link inside it`| [Grant tools](</docs/en/plugin-evals#grant-tools>)
+`cannot be disallowed`, from `claude plugin eval`| Use a built-in tool’s [exact name](</docs/en/plugin-evals#disallow-tools>), and [put the target before `--disallow-tools`](</docs/en/plugin-evals#choose-what-to-evaluate>)
`cannot be evaluated where sessions load it`| [Test plugins with evals](</docs/en/plugin-evals#cannot-be-evaluated-where-sessions-load-it>)
`Marketplace "<name>" is registered from an untrusted source`| Plugin errors
`Claude Code refuses the marketplace name "<name>"`| Plugin errors
@@ -363,6 +370,8 @@
`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
+`Couldn't load hooks from <path>` / `Failed to load hooks from <path>` / `Hook load failed`| [Plugin troubleshooting](</docs/en/plugins/troubleshooting#failed-to-load-hooks-from-and-hooks-that-dont-fire>)
+`hooks.json declares PreToolUse/PermissionRequest`| Put the events under a `hooks` key, as in the [plugin hooks example](</docs/en/plugins/components#hooks>).
`its marketplace entry path does not stay inside the marketplace directory`| Plugin errors
`Plugin source path refused`| Plugin errors
`Failed to load marketplace configuration`| Plugin errors
@@ -376,10 +385,16 @@
`Skipping connection (recent failure cached; retries automatically in 15 min, or edit the plugin config to retry now)`| Plugin errors
`is not added on this machine, so your organization's marketplace policy keeps its plugins off`| [Add a marketplace](</docs/en/plugins/install#add-a-marketplace>)
`A mod's http.fetch hook stopped this request`| [Turn mods on or off](</docs/en/plugins/mods/overview#turn-mods-on-or-off>)
+`hook was skipped. "<mod>" runs first and sent the event on past it.`| If you listed the quoted mod in [`prependPlugins`](</docs/en/settings-reference#prependplugins>) in your user settings, change that mod. Otherwise, ask your administrator.
+`<file>: changed while it was read`| If `claude plugin validate` printed this, rerun it. Otherwise, restart the session.
+`installed mods are off for now`| [Check whether mods can load](</docs/en/plugins/mods/troubleshoot#check-whether-mods-can-load>)
+`the hooks worker was lost with <mod>'s <event> hook in flight`| Fix the named mod. For one cause, see [`it crashed the hooks worker`](</docs/en/plugins/mods/troubleshoot#it-crashed-the-hooks-worker>).
+`dispatches in a row for fills by <mods>`| Change the named mods so they fill the prompt box at most eight times in a row.
`Error: No such tool available: <tool name>`| Tool errors
`MCP server "<name>" connection closed before the tool call was answered`| Tool errors
`MCP server "<name>" is disabled — re-enable it via /mcp to use its tools`| Tool errors
`MCP server "<name>" tool "<tool>" timed out after <N>s. The server asked the user a question, and no answer came before the time limit.`| Tool errors
+`The server's response is not a valid MCP response, so it was not read`| Before retrying, check whether the request ran. Report the error to the MCP server’s author.
`Permission prompt tool returned an invalid result`| Tool errors
`would be spawned with zero tools — refusing`| Tool errors
`File is covered by a Read deny rule in your permission settings`| Tool errors
@@ -425,6 +440,7 @@
`Disk full: this computer's volume holding <dir> (Claude Code's temporary directory) has <n> MB free` / `Nearly out of inodes: this computer's volume holding <dir>`| Tool errors
`Disk full: a test write beside this command's output file` / `Disk quota used up: a test write beside this command's output file`| Tool errors
`The command was not started: this computer's disk is full (ENOSPC)` / `the user's disk quota is used up (EDQUOT)`| Tool errors
+`The sandbox could not create <dir>, a folder it must protect from the command, because the temp disk is full`| Free space on the temp disk or repair it, then have Claude run the command again.
`Your disk quota is full on the filesystem with Claude Code's temp directory <dir> (EDQUOT)` / `The filesystem with Claude Code's temp directory <dir>, or your disk quota on it, is full (ENOSPC)`| Tool errors
`Command output was lost: the temp filesystem at <dir> is full` / `is out of inodes`| Tool errors
`File is not valid UTF-8. It may use a legacy encoding such as Windows-1252, Shift-JIS or GBK, or be binary`| Tool errors
@@ -477,12 +493,19 @@
`Subprocess initialization did not complete within 60000ms`| Wrapper and IDE errors
`Claude Code did not finish starting`| Wrapper and IDE errors
`The connection to Claude Code ended before this message completed`| Wrapper and IDE errors
+`Dictation error: The speech service refused the connection` / `Dictation error: The connection to the speech service was lost` / `Dictation error: Couldn’t connect to the speech service`, in VS Code| Run **Claude Code: Show Logs** from the Command Palette and search for `Speech-to-text`.
+`The last request was refused`, on the VS Code sign-in screen| Select **Cancel** , then look up the conversation’s error in this table.
+`Plan not copied: The new session starts without a plan file.`, in VS Code| If you need the plan, ask Claude to write it again in the new session.
+`A message is still queued` / `A /clear is still queued`, when you rewind code in VS Code| Stop Claude, then follow the rest of the message.
+`Couldn’t load the diff view or code colors`, in VS Code| Click a diff to try again, or reload the window.
+`Settings file is empty, and another program may still be writing it: <path>`, in VS Code| Try again in a minute. If the message repeats, put `{}` in the file.
`Could not locate the Claude CLI on PATH`| Wrapper and IDE errors
`Claude Code could not be started from <command>: it is the <system> build, and this computer needs the <build> build`| If you set [`claudeCode.claudeProcessWrapper`](</docs/en/vs-code#extension-settings>), point it at a program built for `<build>`. Otherwise, install the VS Code extension package for `<build>`.
`The Claude Code program for this computer, the <build> build, could not be found`| Wrapper and IDE errors
`Restored the code, but skipped N files`| Rewind warnings and errors
`No files were restored: N files failed (backup missing, or the file could not be updated)`| Rewind warnings and errors
`Couldn't restore N files: the backup is missing or the file can't be written`| Make the files that failed writable, then restore them from version control.
+`Kept N files created since then, because a restore failed`| If you don’t want the files Claude created after the checkpoint, delete them.
`The file backups are still being copied. Nothing was changed. Try again in a moment.`| Select the same point in [`/rewind`](</docs/en/checkpointing>) again. When you restore code soon after [`/branch`](</docs/en/sessions#branch-a-session>), Claude Code can still be copying the file backups to the new session.
`Transcript writes are failing (...)`| Session saving warnings
`Transcript saving is off — CLAUDE_CODE_SKIP_PROMPT_HISTORY is set`| Session saving warnings
@@ -527,6 +550,7 @@
`headersHelper not run — this workspace has no persisted trust`| Configuration warnings
`Invalid permission rule "..." was skipped: Malformed Tool(content) rule`| Configuration warnings
`matches no tool · check for typos` / `matches no known tool — check for typos`| Configuration warnings
+`lets <tool> run without asking only in the working directories` / `adds nothing to <tool>'s default`| [Allow a file tool outside the working directories](</docs/en/permissions#allow-a-file-tool-outside-the-working-directories>)
`... is not matched by file permission checks`| Configuration warnings
`Write(<path>) never matches · use Edit(<path>)` / `Glob(<path>) never matches · use Read(<path>)`| Configuration warnings
`... has a wildcard before the rest of the command`| Configuration warnings
@@ -4673,6 +4697,25 @@
* Send the message again. The next message starts a fresh `claude` process that resumes the conversation.
* If it repeats, run `claude` in a terminal in the same project. A failure that keeps ending the process usually reproduces there with its real error message.
+### Claude Code needs a recent sign-in
+
+When a local, WSL, or SSH session in the Code tab needs a new saved sign-in and you haven’t signed in recently, the [Claude Desktop app](</docs/en/desktop>) shows this message:
+
+ For security, Claude Code needs a recent sign-in.
+
+For these sessions, being asked up to about once a month for each account and organization on each computer is routine, with or without single sign-on (SSO). **What to do:**
+
+ * Click **Sign in again** on the card, then sign in
+ * If a banner at the top of the Code tab says `Claude Code needs a recent sign-in. Signing in won’t stop sessions.`, click **Sign in again** on the banner
+ * If you’re asked again within three weeks for these sessions, with the same account and organization on the same computer, [check your version](</docs/en/desktop#check-your-version>) of Claude Desktop. If it’s older than v5.11492.0, update it:
+ * **macOS** : select **Claude > Check for Updates…**
+ * **Windows** : select **Help > Check for Updates…**, or update through the Microsoft Store if you installed the app from there
+ * **Linux** : [update through apt](</docs/en/desktop-linux#update>)
+ * **Managed updates** : if your organization [turns off auto-updates](</docs/en/desktop#device-management-policies>), ask your administrator for v5.11492.0 or later
+ * If that continues on v5.11492.0 or later, [contact support](</docs/en/desktop#still-stuck>)
+
+If you see the card in a Remote Control session, see [Trusted Devices](</docs/en/remote-control#trusted-devices>), which can ask for a more recent sign-in. Before Claude Desktop v5.11492.0, the Code tab could lose its saved sign-in when a company proxy or gateway answered its background renewal with a JSON error.
+
## Rewind warnings and errors
These messages come from a [`/rewind`](</docs/en/checkpointing>) code restore. `Restored the code, but skipped N files` is a warning that Claude Code skipped some paths. `No files were restored` is an error that means it restored nothing.
@@ -4697,7 +4740,7 @@
### No files were restored
-Claude Code shows this message when you restore code with [`/rewind`](</docs/en/checkpointing>) and it can’t restore any of the files in that checkpoint. For each file, either the backup Claude Code saved before editing it is missing, or Claude Code couldn’t write to or delete the file.
+You see this message when a [`/rewind`](</docs/en/checkpointing>) code restore fails on at least one file and restores no files.
Failed to restore the code:
No files were restored: 1 file failed (backup missing, or the file could not be updated)
--- a/events.md
+++ b/events.md
@@ -30,14 +30,14 @@
### Rewrite an event
-To change what Claude Code acts on, such as the text of a prompt, call `next` with a modified copy of the event. The event itself is immutable: it’s deeply frozen, and assigning to a field throws. This hook trims each prompt before it’s sent:
+To change what Claude Code acts on, call `next` with a modified copy of the event. This hook trims a prompt before it’s sent:
on('prompt.submit', async ($, e, next) => {
// Pass on a copy of the event with its text changed
return next({ ...e, text: e.text.trim() })
})
-Later handlers and Claude Code receive the trimmed prompt and never see the original. You can also change the result: `await next(e)`, then return a copy of the result with a field replaced.
+For a prompt typed as plain text, later handlers and Claude receive the trimmed prompt.
### Answer an event
@@ -106,7 +106,7 @@
* **Answer the call yourself** : return an object with a `result` field, without calling `next`, and for a built-in tool, give `result` the shape that tool’s own result has in [the types for your build](</docs/en/plugins/mods/create#get-the-types-for-your-build>). No permission prompt appears and the tool doesn’t run, so the result you return is all Claude learns about what happened.
* **Withhold the result from Claude** : return `{ deny: reason }` after `await next(e)`. Claude reads your reason in place of what `next` returned. When the tool ran, the deny keeps its result from Claude and undoes nothing the tool did. When the tool ran and succeeded, the reason follows a note such as `Bash ran, and a plugin withheld its result:`.
-Hooks in your organization’s [managed settings](</docs/en/server-managed-settings>) run before any mod’s `tool.call` hook. When a managed hook blocks the call, no mod’s `tool.call` hook runs for that call.
+Hooks in [managed settings](</docs/en/server-managed-settings>) run before any mod’s `tool.call` hook. When a managed hook blocks the call, no mod’s `tool.call` hook runs for that call.
#### Hold a tool call until the user decides
@@ -198,15 +198,15 @@
### Rewrite or add to a prompt
-A `prompt.submit` hook sees each prompt before the turn starts, so it can rewrite the text or add to it. `e.text` is what was typed.
+To rewrite a prompt or add to it, handle `prompt.submit`, read the prompt from `e.text`, and return a value from this table:
To do this| Return this
---|---
-Rewrite the prompt. The transcript and your [prompt history](</docs/en/interactive-mode#command-history>) show the new text.| `next({ ...e, text: newText })`
+Rewrite a prompt typed as plain text. The transcript and your [prompt history](</docs/en/interactive-mode#command-history>) show the new text.| `next({ ...e, text: newText })`
Add text only Claude reads, after the prompt| `next({ ...e, context: [...(e.context ?? []), extraText] })`
Stop the prompt from being sent| `{ drop: 'the reason' }`
-This hook adds the current branch name for Claude whenever a prompt mentions a pull request:
+This hook adds the current branch name for Claude when a prompt mentions a pull request:
on('prompt.submit', async ($, e, next) => {
// Pass on a prompt that doesn't mention a pull request as it is
@@ -218,10 +218,11 @@
return next({ ...e, context: [...(e.context ?? []), 'Current branch: ' + git.stdout.trim()] })
})
-When you send a prompt such as `open a PR for this change`, your message looks the same in the transcript, and Claude also reads a line such as `Current branch: feature/auth` after it. A prompt that doesn’t mention a pull request goes through unchanged, and `git` doesn’t run. To stop a prompt, return `{ drop: 'the reason' }` without calling `next`. The text goes back into the user’s prompt input, and they see `Prompt dropped by a hook:` followed by your reason, so address the reason to them. The prompt still goes through in these cases:
+When you send a prompt such as `open a PR for this change`, your message looks the same in the transcript, and Claude also reads a line such as `Current branch: feature/auth` after it. A prompt that doesn’t mention a pull request goes through unchanged, and `git` doesn’t run. To stop a prompt, return `{ drop: 'the reason' }` without calling `next`. The text goes back into the user’s prompt input, and they see `Prompt dropped by a hook:` followed by your reason, so address the reason to them. Don’t rely on `drop` to stop every prompt. For example, a prompt goes through in these cases:
* **Your hook returns a`drop` after its `next(e)` call let the prompt through**: the turn still runs, and the hook fails with a message that includes `a drop after its next() was answered`
* **Your hook throws or times out** : Claude Code skips it and sends the prompt. Add a `.catch` handler so that a failure doesn’t send a prompt the hook would have stopped.
+ * **The prompt is the`/command` for a [skill with `context: fork`](</docs/en/skills#run-skills-in-a-subagent>)**: your hook doesn’t run. To stop the command, return `{ text: 'the reason' }` from a [`command.run`](</docs/en/plugins/mods/api#add-a-command>) hook without calling `next`.
[Other events](</docs/en/plugins/mods/reference#prompts-and-what-claude-reads>) cover the rest of what Claude reads: `prompt.section` for each section of the system prompt, `prompt.context` for the context sent with the first message, and `skill.prompt` for a skill’s text. To change a section after a conversation has started, see [Send a changed system prompt section or tool description](</docs/en/plugins/mods/reference#break-prompt-cache>). In a `skill.prompt` hook, you can also read [which plugin or file the skill came from](</docs/en/plugins/mods/reference#skill-prompt-fields>).
@@ -231,9 +232,9 @@
Event| When it fires| What a hook can do
---|---|---
-`turn.start`| A turn begins| Observe. `e.turnId` identifies the turn in the other two events.
+`turn.start`| A turn begins. A subagent’s turn fires it with `e.agentId` set, which requires Claude Code v2.1.299 or later.| Observe. `e.turnId` identifies the turn in the other two events.
`turn.step`| Claude Code is about to send one request to the model. A turn with tool calls has several. `e.agentId` is set for a subagent’s request.| Read each request’s token usage, send it to a different model with `next({ ...e, model })`, or answer without calling the model
-`turn.complete`| The turn ended, including a turn the user interrupted, where `e.isAborted` is `true`. `e.answer` is Claude’s final text, `e.durationMs` how long it took, and `e.usage` the turn’s token totals. A subagent’s turn fires it with `e.agentId` set.| Observe, or return an object with a `text` field, such as `{ text: 'Done in 12 seconds' }`, to show a line under the answer
+`turn.complete`| The turn ended, including a turn the user interrupted, where `e.isAborted` is `true`. `e.answer` is Claude’s final text, `e.durationMs` how long it took, and `e.usage` the turn’s token totals. A subagent’s turn fires it with `e.agentId` set.| Observe. In the main conversation, return an object with a `text` field, such as `{ text: 'Done in 12 seconds' }`, to show a line under the answer.
Write a `turn.step` hook as an async generator, because the event streams. `yield* next(e)` forwards the response as it streams and evaluates to the finished result. This hook logs how much of each request the Claude API served from the [prompt cache](</docs/en/prompt-caching>):
--- a/fast-mode.md
+++ b/fast-mode.md
@@ -197,7 +197,7 @@
* Availability and pricing are subject to change
* The underlying API configuration may evolve
-Report issues or feedback through your usual Anthropic support channels.
+Report issues or feedback through Anthropic support.
## See also
--- a/feature-availability.md
+++ b/feature-availability.md
@@ -37,7 +37,6 @@
These require signing in with a claude.ai account and are not reachable with an Anthropic Console API key or from a third-party provider:
* [Cloud sessions](</docs/en/claude-code-on-the-web>) and Claude Code on mobile
- * [Claude Code in Slack](</docs/en/slack>): Pro, Max, and Ultra plans
* [Claude Code Desktop](</docs/en/desktop>)
* [Cloud scheduled tasks](</docs/en/routines>) (`/schedule`)
* [Ultrareview](</docs/en/ultrareview>)
--- a/features-overview.md
+++ b/features-overview.md
@@ -109,7 +109,7 @@
**Switching**| Always loaded| One active at a time; [switch styles](</docs/en/output-styles#change-your-output-style>) whenever you want
**Best for**| Build commands, conventions, “never do X” rules| Shorter responses, explanations alongside code, a non-engineering role
-**Put it in CLAUDE.md** if it’s true of the project whatever style you’re in: coding conventions, build commands, project structure.**Use an output style** if it’s about the response itself and you might want it off again: length, format, how much Claude explains, or a different role such as a writing assistant. Claude Code includes [built-in styles](</docs/en/output-styles#built-in-output-styles>), and you can write your own.**They combine.** CLAUDE.md stays loaded whichever style you pick. Claude follows both as instructions, so neither is enforced. For anything that has to happen every time, use a [hook](</docs/en/hooks-guide>).
+**Put it in CLAUDE.md** if it’s true of the project whatever style you’re in: coding conventions, build commands, project structure.**Use an output style** if it’s about the response itself and you might want it off again: length, format, how much Claude explains, or a different role such as a writing assistant. Claude Code includes [built-in styles](</docs/en/output-styles#built-in-output-styles>), and you can write your own.**They combine.** Claude follows both as instructions, so neither is enforced. For anything that has to happen every time, use a [hook](</docs/en/hooks-guide>).
All three store instructions, but they load differently:
@@ -210,7 +210,7 @@
Keep CLAUDE.md under 200 lines. Move reference material to skills, which load on demand. To get [trim proposals for a checked-in CLAUDE.md](</docs/en/memory#my-claude-md-is-too-large>), run `/doctor`.
-Skills are extra capabilities in Claude’s toolkit. They can be reference material (like an API style guide) or invocable workflows you trigger with `/<name>` (like `/deploy`). Claude Code includes [bundled skills](</docs/en/commands>) like `/code-review`, `/batch`, and `/debug` that work without setup. You can also create your own.**When:** Depends on the skill’s configuration. By default, descriptions load at session start and full content loads when used. For user-only skills (`disable-model-invocation: true`), nothing loads until you invoke them.**What loads:** For model-invocable skills, Claude sees names and descriptions in every request. When you invoke a skill with `/<name>` or Claude loads it automatically, the full content loads into your conversation.**How Claude chooses skills:** Claude matches your task against skill descriptions to decide which are relevant. If descriptions are vague or overlap, Claude may load the wrong skill or miss one that would help. To tell Claude to use a specific skill, invoke it with `/<name>`.**Context cost:** Low until used. User-only skills have zero cost until invoked.**In subagents:** The full content of skills listed in a subagent’s `skills` field [loads into its context at launch](</docs/en/sub-agents#preload-skills-into-subagents>), rather than on demand. Subagents can still discover and invoke unlisted project, user, and plugin skills through the Skill tool.
+Skills are extra capabilities in Claude’s toolkit. They can be reference material (like an API style guide) or invocable workflows you trigger with `/<name>` (like `/deploy`). Claude Code includes [bundled skills](</docs/en/commands>) like `/code-review`, `/batch`, and `/debug`. You can also create your own.**When:** Depends on the skill’s configuration. By default, descriptions load at session start and full content loads when used. For user-only skills (`disable-model-invocation: true`), nothing loads until you invoke them.**What loads:** For model-invocable skills, Claude sees names and descriptions in every request. When you invoke a skill with `/<name>` or Claude loads it automatically, the full content loads into your conversation.**How Claude chooses skills:** Claude matches your task against skill descriptions to decide which are relevant. If descriptions are vague or overlap, Claude may load the wrong skill or miss one that would help. To tell Claude to use a specific skill, invoke it with `/<name>`.**Context cost:** Low until used. User-only skills have zero cost until invoked.**In subagents:** The full content of skills listed in a subagent’s `skills` field [loads into its context at launch](</docs/en/sub-agents#preload-skills-into-subagents>), rather than on demand. Subagents can still discover and invoke unlisted project, user, and plugin skills through the Skill tool.
Use `disable-model-invocation: true` for skills with side effects. This saves context and ensures they run only when you name them.
--- a/google-vertex-ai.md
+++ b/google-vertex-ai.md
@@ -1,4 +1,11 @@
-This page covers one of the two ways to use Claude through your Google Cloud project: Google Cloud’s Agent Platform, formerly Vertex AI, which Google manages. If you use Claude Models on Google Cloud (Anthropic managed), follow [its Claude Code setup page](</docs/en/claude-models-on-google-cloud-anthropic-managed>) instead. To find out which one you use, see [Which offering are you using?](<https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/overview#which-offering-are-you-using>)
+This page covers one of the two ways to use Claude through your Google Cloud project: Google Cloud’s Agent Platform, formerly Vertex AI, which Google manages.
+
+Use a different page in these cases:
+
+ * **Claude Models on Google Cloud (Anthropic managed)** : follow [its Claude Code setup page](</docs/en/claude-models-on-google-cloud-anthropic-managed>)
+ * **Not sure which Google Cloud offering you use** : see [Which offering are you using?](<https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/overview#which-offering-are-you-using>)
+ * **Code tab, when your organization installed the Claude Desktop app** : ask your administrator to [configure the app for Agent Platform](<https://claude.com/docs/third-party/claude-desktop/vertex>)
+ * **Code tab, when you install the Claude Desktop app yourself** : follow the [single-machine setup steps](<https://claude.com/docs/third-party/claude-desktop/installation#single-machine-setup>) and enter the [connection and model values for Agent Platform](<https://claude.com/docs/third-party/claude-desktop/vertex#configure-the-app>)
## Prerequisites
--- a/hooks-guide.md
+++ b/hooks-guide.md
@@ -389,6 +389,7 @@
`Setup`| When you start Claude Code with `--init-only`, or with `--init` or `--maintenance` in `-p` mode. For one-time preparation in CI or scripts
`UserPromptSubmit`| When a prompt is submitted, before Claude processes it. Also fires on [turns Claude Code starts on its own](</docs/en/hooks#userpromptsubmit>)
`UserPromptExpansion`| When a user-typed command expands into a prompt, before it reaches Claude. Can block the expansion
+`PreSkillShellCommand`| Before a skill’s [injected shell command](</docs/en/skills#inject-dynamic-context>) runs. Can block the command
`PreToolUse`| Before a tool call executes. Can block it
`PermissionRequest`| When a tool call needs a permission decision
`PermissionDenied`| When auto mode denies a tool call, including denials without a classifier verdict. Use JSON `hookSpecificOutput.retry: true` to tell the model it may retry the denied tool call. Claude Code ignores `retry` when the classifier produced no verdict
@@ -576,6 +577,7 @@
`ElicitationResult`| MCP server name| same values as `Elicitation`
`FileChanged`| literal filenames to watch (see [FileChanged](</docs/en/hooks#filechanged>))| `.envrc|.env`
`UserPromptExpansion`| command name| your skill or command names
+`PreSkillShellCommand`| tool that runs the command| `Bash`, `PowerShell`
`UserPromptSubmit`, `PostToolBatch`, `Stop`, `TeammateIdle`, `TaskCreated`, `TaskCompleted`, `WorktreeCreate`, `WorktreeRemove`, `CwdChanged`, `MessageDisplay`| no matcher support| always fires on every occurrence
The tabs below show a few more matchers on different event types.
@@ -671,7 +673,9 @@
`Bash(git *)`| `echo $(date)`| no| no subcommand matches `git *`
`Bash(git push *)`| `echo $(date)`| yes| patterns that specify more than the command name run the hook anyway on `$()`, backticks, or `$VAR`
-When Claude Code can’t split the Bash input into subcommands, it runs your hook regardless of the pattern. The [Bash matching table](</docs/en/hooks#bash-if-matching>) covers the command shapes Claude Code can and can’t narrow by subcommand. Because the filter is best-effort, use the [permission system](</docs/en/permissions>) rather than a hook to enforce a hard allow or deny. The `if` field accepts the same patterns as permission rules: `"Bash(git *)"`, `"Edit(*.ts)"`, and so on. To match multiple tool names, use separate handlers each with its own `if` value, or match at the `matcher` level where pipe alternation is supported. `if` only works on tool events: `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest`, and `PermissionDenied`. Adding it to any other event prevents the hook from running.
+When Claude Code can’t split the Bash input into subcommands, it runs your hook regardless of the pattern. The [Bash matching table](</docs/en/hooks#bash-if-matching>) covers the command shapes Claude Code can and can’t narrow by subcommand. Because the filter is best-effort, use the [permission system](</docs/en/permissions>) rather than a hook to enforce a hard allow or deny. The `if` field accepts the same patterns as permission rules: `"Bash(git *)"`, `"Edit(*.ts)"`, and so on. To match multiple tool names, use separate handlers each with its own `if` value, or match at the `matcher` level where pipe alternation is supported.
+
+`if` only works on `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest`, `PermissionDenied`, and `PreSkillShellCommand`. If you add it on any other event, the hook doesn’t run.
### Configure hook location
--- a/host-marketplace.md
+++ b/host-marketplace.md
@@ -3,7 +3,7 @@
These cases are covered on other pages:
* **You haven’t written the catalog file yet** : start with [Create a marketplace](</docs/en/plugins/create-marketplace>)
- * **You’re an admin requiring, restricting, or pre-installing marketplaces across your organization’s machines** : read [Manage plugins for your organization](</docs/en/plugins/org>)
+ * **You want to require, restrict, or pre-install marketplaces across an organization’s machines** : read [Manage plugins for your organization](</docs/en/plugins/org>)
Start with Host your marketplace to pick a host and the command your users run. Read Keep users up to date before your first release. Read Rename or remove a plugin before you change a plugin’s `name`.
@@ -87,7 +87,7 @@
* **SSH** : the key must work without a passphrase prompt, for example because it’s loaded in `ssh-agent`. The host must already be in `known_hosts`.
* **HTTPS** : Claude Code leaves the user’s git credential helper enabled but forbids it from prompting, and doesn’t run askpass programs such as one set in `GIT_ASKPASS`. A credential the helper already stores works; one it would have to ask for fails. On GitHub, `gh auth login` followed by `gh auth setup-git` stores one.
-For a GitHub Enterprise Server host, users need git access to that host from their machine. See [Plugin marketplaces on GHES](</docs/en/github-enterprise-server#plugin-marketplaces-on-ghes>) for what each Claude Code surface needs to reach a GHES-hosted marketplace. If you distribute through **Organization settings > Plugins & skills** on claude.ai instead, your users’ git credentials aren’t involved. See Distribute through organization settings.
+For a GitHub Enterprise Server host, users need git access to that host from their machine. See [Plugin marketplaces on GHES](</docs/en/github-enterprise-server#plugin-marketplaces-on-ghes>) for what each Claude Code surface needs to reach a GHES-hosted marketplace. If you distribute through [**Organization settings > Plugins & skills**](<https://claude.ai/admin-settings/skills?tab=inventory>) on claude.ai instead, your users’ git credentials aren’t involved. See Distribute through organization settings.
### Serve users who have no git-host account
--- a/how-claude-code-works.md
+++ b/how-claude-code-works.md
@@ -2,7 +2,7 @@
## The agentic loop
-When you give Claude a task, it works through three phases: **gather context** , **take action** , and **verify results**. These phases blend together. Claude uses tools throughout, whether searching files to understand your code, editing to make changes, or running tests to check its work. The loop adapts to what you ask. A question about your codebase might only need context gathering. A bug fix cycles through all three phases repeatedly. A refactor might involve extensive verification. Claude decides what each step requires based on what it learned from the previous step, chaining dozens of actions together and course-correcting along the way. You’re part of this loop too. You can interrupt at any point to steer Claude in a different direction, provide additional context, or ask it to try a different approach. Claude works autonomously but stays responsive to your input. The agentic loop is powered by two components: models that reason and tools that act. Claude Code is the layer around the model that provides the tools and manages the context the model sees. This surrounding layer is what the term agentic harness refers to.
+When you give Claude a task, it works through three phases: **gather context** , **take action** , and **verify results**. These phases blend together. Claude uses tools throughout, whether searching files to understand your code, editing to make changes, or running tests to check its work. The loop adapts to what you ask. A question about your codebase might only need context gathering. A bug fix cycles through all three phases repeatedly. A refactor might involve extensive verification. Claude decides what each step requires based on what it learned from the previous step, chaining dozens of actions together and course-correcting along the way. You’re part of this loop too. You can interrupt at any point to steer Claude in a different direction, provide additional context, or ask it to try a different approach. The agentic loop is powered by two components: models that reason and tools that act. Claude Code is the layer around the model that provides the tools and manages the context the model sees. This surrounding layer is what the term agentic harness refers to.
### Models
@@ -60,7 +60,7 @@
### Interfaces
-You can access Claude Code through the terminal, the [desktop app](</docs/en/desktop>), [IDE extensions](</docs/en/vs-code>), [claude.ai/code](<https://claude.ai/code>), [Remote Control](</docs/en/remote-control>), [Slack](</docs/en/slack>), and [CI/CD pipelines](</docs/en/github-actions>). The interface determines how you see and interact with Claude, but the underlying agentic loop is identical. See [Use Claude Code everywhere](</docs/en/overview#use-claude-code-everywhere>) for the full list.
+You can access Claude Code through the terminal, the [desktop app](</docs/en/desktop>), [IDE extensions](</docs/en/vs-code>), [claude.ai/code](<https://claude.ai/code>), [Remote Control](</docs/en/remote-control>), and [CI/CD pipelines](</docs/en/github-actions>). The interface determines how you see and interact with Claude, but the underlying agentic loop is identical. See [Use Claude Code everywhere](</docs/en/overview#use-claude-code-everywhere>) for the list.
## Work with sessions
@@ -91,7 +91,7 @@
#### When context fills up
-Claude Code manages context automatically as you approach the limit. It compacts the conversation into a summary. The summary keeps your requests and key code snippets, but detailed instructions from early in the conversation may be lost. Put persistent rules in CLAUDE.md rather than relying on conversation history. To control what’s preserved during compaction, add a “Compact Instructions” section to CLAUDE.md or run `/compact` with a focus (like `/compact focus on the API changes`). If a single file or tool output is so large that context refills immediately after each summary, Claude Code stops auto-compacting after a few attempts and shows an error instead of looping. See [Auto-compaction stops with a thrashing error](</docs/en/troubleshooting#auto-compaction-stops-with-a-thrashing-error>) for recovery steps. Run `/context` to see what’s using space. MCP tool definitions are deferred by default and loaded on demand via [tool search](</docs/en/mcp#scale-with-mcp-tool-search>), so only tool names and server instructions consume context until Claude uses a specific tool.
+Claude Code manages context automatically as you approach the limit. It compacts the conversation into a summary. The summary keeps your requests and key code snippets, but detailed instructions from early in the conversation may be lost. Put persistent rules in CLAUDE.md. To control what’s preserved during compaction, add a “Compact Instructions” section to CLAUDE.md or run `/compact` with a focus (like `/compact focus on the API changes`). If a single file or tool output is so large that context refills immediately after each summary, Claude Code stops auto-compacting after a few attempts and shows an error instead of looping. See [Auto-compaction stops with a thrashing error](</docs/en/troubleshooting#auto-compaction-stops-with-a-thrashing-error>) for recovery steps. Run `/context` to see what’s using space. MCP tool definitions are deferred by default and loaded on demand via [tool search](</docs/en/mcp#scale-with-mcp-tool-search>), so only tool names and server instructions consume context until Claude uses a specific tool.
#### Manage context with skills and subagents
Show diff (358 lines)
--- a/interface.md
+++ b/interface.md
@@ -171,19 +171,19 @@
### Change what Claude Code already draws
-Claude Code draws most of its interface itself: messages, tool call rows, the spinner, and more. Each of those parts is a render site too, so a mod can restyle or replace it. To change one, filter your `ui.render` hook on its name from this table:
+To change a part Claude Code draws, filter your `ui.render` hook on a render site from this table:
Site| What it is
---|---
`UserMessage`, `AssistantMessage`| A message in the transcript
`ToolUse`, `ToolResult`, `ToolGroup`| A tool call’s row, its result, and a collapsed group of calls
`CommandOutput`| The row a command printed
-`AskUserQuestion`| The dialog Claude opens to ask you a question
+`AskUserQuestion`| The dialog Claude opens to ask you a question. A `ui.render` hook can’t replace it.
`Spinner`, `ToolProgress`, `TurnDuration`| Status lines for a turn: the line that animates while Claude works, a running tool’s live progress line, and the line that closes a turn
`InfoNotice`, `SessionMode`, `PromptHint`| Status lines under the logo, the mode labels in the footer, and the hint line under the prompt
`AgentRow`| A subagent’s or teammate’s row in the agent panel
-`Pane`, `AskUserQuestion`, `Spinner`, `UserMessage`, `AssistantMessage`, and the tool call sites work in the terminal, the Desktop app, and the VS Code extension. The [render sites table](</docs/en/plugins/mods/reference#render-sites>) lists where each of the others is raised. At a site Claude Code already draws, your hook can change a detail, replace the drawing, or leave it alone. Select a tab to see each one applied to the spinner. The examples read a `calls` variable that another hook counts, as in the [tutorial mod](</docs/en/plugins/mods/create#write-a-mod-yourself>).
+`Pane`, `AbovePrompt`, `AskUserQuestion`, `Spinner`, `UserMessage`, `AssistantMessage`, and the tool call sites work in the terminal, the Desktop app, and the VS Code extension. The [render sites table](</docs/en/plugins/mods/reference#render-sites>) lists where each of the others is raised. To change the bubbles and font of messages in the Desktop app without a `ui.render` hook, style the messages with a theme. Select a tab to see a hook change a spinner detail, replace the spinner, or leave it alone. The examples read a `calls` variable that another hook counts, as in the [tutorial mod](</docs/en/plugins/mods/create#write-a-mod-yourself>).
* Change a detail
@@ -367,7 +367,128 @@
* **The`backdrop` fields**: `scene` is a [name](</docs/en/plugins/mods/reference#limits>) you choose for a backdrop your hook draws. For the other fields and `overrideColorScheme`, see [the types for your build](</docs/en/plugins/mods/create#get-the-types-for-your-build>).
* **Whether the backdrop is drawn** : `$.theme.set` resolves with `isDrawn: true` when a Desktop or mobile app connected to the session says it draws backdrops. Otherwise `isDrawn` is `false` and `reason` says why.
- * **One theme for each session** : a mod that calls `$.theme.set` replaces the session’s backdrop and colors, and a mod that calls `$.theme.clear()` removes them, whichever mod set them. Call `$.theme.clear()` only when the user asks for it.
+ * **One theme for each session** : a mod that calls `$.theme.set` replaces the session’s backdrop, colors, message style, and sound, and a mod that calls `$.theme.clear()` removes them, whichever mod set them. Call `$.theme.clear()` only when the user asks for it.
+
+### Animate a backdrop with a shader
+
+To make a backdrop that moves and follows the user’s pointer in the Desktop app’s Code tab, wrap an `Svg` in a [`Shader`](</docs/en/plugins/mods/reference#elements>) element. The element names a shader file, which is code that computes each pixel’s color on the GPU. The app draws the result over the `Svg`. `Shader` requires Claude Code v2.1.326 or later in the Code tab, so [check the version there](</docs/en/desktop#claude-code-version-in-the-code-tab>) first. These steps create a mod named `glow`. It draws a light under the pointer, and a click on the backdrop changes the color of the light.
+
+1
+
+Save the manifest and hooks.json
+
+From [Write a mod yourself](</docs/en/plugins/mods/create#write-a-mod-yourself>), save `.claude-plugin/plugin.json` and `hooks/hooks.json` in `~/.claude/skills/glow/`, and change `first-mod` to `glow` in both files. A mod [under `~/.claude/skills/`](</docs/en/plugins/create#scaffold-a-plugin-that-loads-every-session>) loads when you start a session.
+
+2
+
+Write the shader
+
+Save this file as `~/.claude/skills/glow/hooks/glow.ts`. Claude Code provides the `claude-code/shader` module it imports.The shader draws a light around the pointer, blue when `warm` is `0` and orange when it’s `1`:
+
+glow/hooks/glow.ts
+
+ import {
+ length, max, min, mix, picture, pointers, shader, smoothstep, values, vec2, vec3, vec4,
+ } from 'claude-code/shader'
+
+ // Declare each number the mod sets through the Shader's values, with its range
+ const { warm } = values({ warm: [0, 1] })
+
+ // This function runs once for every pixel and returns that pixel's color
+ const glow = picture(pixel => {
+ let light = 0
+ // The loop sees the mouse, each finger, and for one second each pointer that lifted
+ // A mouse that rests for half a second counts as lifted
+ for (const pointer of pointers) {
+ // Subtracting two positions subtracts their x and their y, in points
+ // The result is typed as a plain number, so vec2() marks it as a position again
+ const near = smoothstep(200, 0, length(vec2(pixel.point - pointer.at)))
+ // A pointer fades in over a quarter second, then out as gone counts from 0 to 1
+ const fade = min(pointer.age * 4, 1) * (1 - pointer.gone)
+ light = max(light, near * near * fade)
+ }
+ const color = mix(vec3(0.25, 0.55, 1), vec3(1, 0.45, 0), warm)
+ const alpha = 0.7 * light
+ // The color is premultiplied: red, green and blue are multiplied by alpha
+ return vec4(color * alpha, alpha)
+ })
+
+ // A shader runs its passes in order, and this one has a single pass
+ export default shader({ passes: [glow] })
+
+3
+
+Draw the backdrop
+
+Save this file as `~/.claude/skills/glow/hooks/register.js`. The mod sets the theme when a session starts, and draws a `Shader` with one `Svg` child.The mod’s [`ui.pointer`](</docs/en/plugins/mods/reference#interface>) hook runs after a click, flips `warm`, and asks for a redraw:
+
+glow/hooks/register.js
+
+ const STILL =
+ '<svg xmlns="http://www.w3.org/2000/svg"' +
+ ' viewBox="0 0 1 1" preserveAspectRatio="none">' +
+ '<rect width="1" height="1" fill="#1a3a9c"/>' +
+ '</svg>'
+
+ let warm = 0
+
+ export function register(on) {
+ on('session.start', async ($, e, next) => {
+ // The scene is a name you choose for the backdrop your hook draws
+ await $.theme.set({ backdrop: { scene: 'glow' }, overrideColorScheme: 'dark' })
+ return next(e)
+ })
+
+ on('ui.render', { component: 'Backdrop' }, async ($, e, next) => {
+ // This hook runs for every mod's backdrop, so pass on the others
+ if (e.props.plugin !== $.plugin.name || e.props.scene !== 'glow') return next(e)
+ const { Shader, Svg } = $.ui.resolve(e)
+ // module must be a string literal, relative to this file
+ return Shader({
+ module: './glow.ts',
+ values: { warm },
+ children: [Svg({ source: STILL, alt: 'A dark blue background' })],
+ })
+ })
+
+ on('ui.pointer', async ($, e, next) => {
+ warm = 1 - warm
+ $.ui.invalidate('ui.render')
+ return next(e)
+ })
+ }
+
+4
+
+Check the shader
+
+This step is optional and needs [the CLI](</docs/en/quickstart>), which has its own version number. Go to `~/.claude/skills/` in your shell, run `claude plugin validate ./glow`, and look for `shader hooks/glow.ts: runs on any GPU` in the output. If the output names a line in `glow.ts` as an error, fix that line.A CLI older than v2.1.326 reports `"ui.pointer" is not an event`. If yours does, [update it](</docs/en/setup#update-claude-code>) and run the command again.
+
+5
+
+Try the backdrop
+
+Start a new local session in the Code tab by sending a message. The background turns dark blue. If it doesn’t, turn off any other mod that sets a theme and start a new session, because a session has one theme. If the background still doesn’t change, [find out why the mod does nothing](</docs/en/plugins/mods/troubleshoot#find-out-why-a-mod-does-nothing>).Move the pointer. A blue light follows it, and fades when you stop. If no light appears, see Fix a backdrop that shows only the `Svg`. Click the empty space beside the conversation, then move the pointer again. The light is now orange. If it’s still blue, answer any permission prompt or question from Claude, then click again quickly without dragging, away from messages and buttons.
+
+To try a change, save `glow.ts` or `register.js`, and the mod reloads in the running session. If the change doesn’t show within a few seconds, send a message to load it. To turn the mod off, move `glow` out of `~/.claude/skills/` and start a new session. Follow these rules for pointer input, the shader, and the `Svg` when you build on the example:
+
+ * **Clicks** : your mod gets `ui.pointer` when it has set the theme and the user clicks a part of the backdrop that the app doesn’t cover. The app sends two clicks a second at most and drops the rest. To draw a press effect without changing your mod’s state, use `pointer.down * (1 - pointer.gone)` in the shader, which is `1` during a press and then fades.
+ * **Click position** : `e.x` and `e.y` run from `0` to `1`, starting at the backdrop’s top left. In the shader, `pixel.uv` has the same scale and starts at the bottom left. To draw at the click, send `e.x` and `1 - e.y` through `values`.
+ * **Movement** : read pointer movement from `pointers` in the shader, because moving the pointer doesn’t fire `ui.pointer`. For motion over time, import `time`, the seconds since the shader started.
+ * **Presses** : to time an effect from a press, check every pointer in the loop for `down` at `1` and read its `age`, the seconds since the press. A press arrives as a new pointer, so it isn’t always first in `pointers`.
+ * **`values`** : declare up to eight numbers in the shader file, and set them with the `values` prop. When your mod’s state changes, call `$.ui.invalidate('ui.render')` to send the new numbers.
+ * **The shader file** : write a subset of TypeScript without `while` loops, recursion, or imports from other files. For the full rules and the functions you can call, [get the type definitions with the CLI](</docs/en/plugins/mods/create#get-the-types-for-your-build>) and search them for `claude-code/shader`.
+ * **The`Svg`**: draw it as a finished picture, because users see it alone when the shader can’t run.
+
+#### Fix a backdrop that shows only the `Svg`
+
+Check reduced motion first, because it keeps any shader from running, then these other causes:
+
+ * **Reduced motion is on** : if you don’t need reduced motion, turn it off in your system settings and set **Motion** to **System** in the Desktop app’s **Settings > General**.
+ * **The shader file breaks a rule** : in your shell, run `claude plugin validate` on the mod’s directory and fix the line the output names.
+ * **The shader is too heavy for the GPU** : if `claude plugin validate` prints `needs a fast GPU`, simplify the shader until the output says `runs on any GPU`. Start with the lines the output ranks as costing the most.
+ * **The`Svg` holds content that blocks shaders**: replace the `Svg` source with `STILL` from the `glow` example. If the shader then runs, restore your source without the content that blocks it, such as a lighting filter or `feTile`.
+ * **A shader from any mod ran and then stopped** : after the app stops a shader for flashing or running too slowly, it starts no shader for up to five minutes. Keep large changes in brightness or color under three a second, or simplify a slow shader. Then wait five minutes and start a new session.
### Change the colors of the Desktop app
@@ -450,7 +571,7 @@
* **Old version** : [update the Desktop app](</docs/en/desktop#claude-code-version-in-the-code-tab>), restart it, and start a new local session in the Code tab. If Claude wrote the mod, ask for it again there.
* **Mod not loaded** : if Claude wrote the mod, see when it loads in [Ask Claude for a mod](</docs/en/plugins/mods/create#ask-claude-for-a-mod>). If you wrote it, compare your files and their paths with Write a colors mod yourself.
* **Refused theme** : ask Claude to run the mod’s `makeColors` call. If the call throws an error, or its `problems` list has an entry that starts `Desktop won't paint this theme`, have Claude fix the theme. If you installed the mod, send what Claude finds to its author.
- * **Another`$.theme` call**: when any mod in the session calls `$.theme.set` or `$.theme.clear()`, the colors and backdrop from an earlier call disappear. In your own mod, pass `colors` and `backdrop` in the same `$.theme.set` call. Use one mod at a time that sets a theme.
+ * **Another`$.theme` call**: when any mod in the session calls `$.theme.set` or `$.theme.clear()`, the colors, backdrop, message style, and sound from an earlier call disappear. In your own mod, pass every part of the theme in the same `$.theme.set` call. Use one mod at a time that sets a theme.
### Remove mod colors from the Desktop app
@@ -475,6 +596,185 @@
Remove colors that stay
If the colors are still there, open **Settings** from the Code tab, and search there for `code appearance`. Open the result, and select **Remove colors**.
+
+### Style messages in the Desktop app
+
+To give messages in the Desktop app’s Code tab their own bubbles, font, and text size, write a mod that calls `$.theme.set` with a `style` object. This requires Claude Code v2.1.329 or later in the Code tab, so [check the version there](</docs/en/desktop#claude-code-version-in-the-code-tab>) first. The terminal, the VS Code extension, and the mobile app show messages without the style. This mod sets a serif font for messages and puts each message in a rounded bubble. If `$.theme.set` rejects the style, the mod writes the error to the transcript:
+
+ const style = {
+ Text: { fontFamily: ['serif'], fontSize: 15, lineHeight: 22 },
+ // The corners run top left, top right, bottom right, bottom left
+ UserMessage: { backgroundColor: '#1d5fd1', color: '#ffffff', radius: [18, 18, 4, 18], padding: 12 },
+ AssistantMessage: { backgroundColor: '#e9e9ec', color: '#1c1c1f', radius: [18, 18, 18, 4], padding: 12 },
+ }
+
+ export function register(on) {
+ on('session.start', async ($, e, next) => {
+ try {
+ await $.theme.set({ style })
+ } catch (error) {
+ $.ui.log(error.message)
+ }
+ return next(e)
+ })
+ }
+
+To try the example:
+
+1
+
+Save the mod
+
+Save the code as `~/.claude/skills/bubbles/hooks/register.js`. From [Write a mod yourself](</docs/en/plugins/mods/create#write-a-mod-yourself>), save `.claude-plugin/plugin.json` and `hooks/hooks.json` in `~/.claude/skills/bubbles/`, and change `first-mod` to `bubbles` in both files.
+
+2
+
+Turn off other theme mods
+
+Turn off any other mod that calls `$.theme.set`, because each call replaces the whole theme. To use a style and colors together, see Combine a style with colors or a backdrop.
+
+3
+
+Check the style
+
+Start a new local session in the Code tab and send a message. Your message appears in a blue bubble and Claude’s reply in a light gray one, both in a serif font. If nothing changes, see Fix a missing message style.
+
+To take the style off, move `~/.claude/skills/bubbles/` out of `~/.claude/skills/` and start a new session.
+
+#### Combine a style with colors or a backdrop
+
+To use a message style with colors or a backdrop, pass them all in one call from one mod, as in `$.theme.set({ colors: theme, style })`. Claude Code versions before v2.1.329 reject a call that includes `style` or `sound`. To keep your colors and backdrop on those versions, catch the error, log it, and repeat the call without `style` and `sound`.
+
+#### Choose which parts of the conversation to style
+
+Each key in the `style` object you pass to `$.theme.set` names a part of the conversation.
+
+Key| What it styles| What you can set
+---|---|---
+`Text`| The words of your messages and Claude’s replies, where `UserMessage` or `AssistantMessage` doesn’t set the same property| Text properties
+`Heading`| Headings in Claude’s replies, which otherwise use the reply’s font| Text properties
+`UserMessage`| Your messages| Text properties, box properties, and `rotate`
+`AssistantMessage`| Each block of text in Claude’s replies| Text properties, box properties, and `rotate`
+`ToolUse`| A tool call’s row| `color`, `fontFamily`, and box properties
+
+Other parts keep the app’s look, such as permission prompts, the questions Claude asks in a dialog, code blocks, and the prompt box. Write sizes as numbers of points, such as `lineHeight: 22`. For the format and range of every value, see `ThemeStyle` in [the types for your build](</docs/en/plugins/mods/create#get-the-types-for-your-build>).
+
+ * **Text properties** : `color`, `fontFamily`, `fontSize`, `fontWeight`, `italic`, `letterSpacing`, and `lineHeight`. Write `fontFamily` as a one-item list, such as `['serif']`. The item must be `sans`, `serif`, `mono`, `cursive`, or `code`, and `$.theme.set` rejects any other value. Use `code` for the app’s code font.
+ * **Box properties** : `backgroundColor`, `radius`, `borderColor`, `borderWidth`, `shadow`, `fill`, and padding such as `padding` or `paddingTop`. Write a shadow as `{ x: 0, y: 2, blur: 8, color: 'rgba(0, 0, 0, 0.15)' }`. Use `fill` to draw a gradient or a vector drawing behind the text, as in `{ gradient: { stops: ['#dbe8ff', '#c4d6f5'] } }`.
+ * **`rotate`** : the number of degrees to tilt a message, from `-3` to `3`
+
+To vary the bubbles, set `UserMessage` or `AssistantMessage` to a list of up to four objects. Each message gets one of the objects, in no set order, and keeps it.
+
+#### Set message colors for light mode and dark mode
+
+To give messages different colors in light mode and dark mode, add these message colors to `inputs.light` and `inputs.dark` in the theme that `makeColors` returns:
+
+ * **Your messages** : `bg-user-message` for the bubble and `text-user-message` for the text
+ * **Claude’s replies** : `bg-assistant-message` for the bubble and `text-assistant-message` for the text
+
+Before you add them to a mod that passes `style`, remove `color` and `backgroundColor` from the matching `UserMessage` or `AssistantMessage`, because those properties take precedence over message colors. This example colors your messages in the `paper` mod from Write a colors mod yourself. In that mod’s `register.js`, add these lines between the `makeColors` call and the `register` function:
+
+ Object.assign(theme.inputs.light, { 'bg-user-message': '#d9c4a0', 'text-user-message': '#2a241d' })
+ Object.assign(theme.inputs.dark, { 'bg-user-message': '#4a3a2b', 'text-user-message': '#f0e7d7' })
+
+Put `paper` under `~/.claude/skills/`, and move other theme mods, such as `bubbles`, out of that directory. Start a new local session and send a message. Your bubble is tan in light mode and brown in dark mode. If it isn’t, see Fix missing mod colors and Fix a missing message style.
+
+#### Fix a missing message style in the Desktop app
+
+If all or part of a message style doesn’t appear in the Code tab, check for these causes:
+
+ * **Mod not loaded** : [find out why the mod does nothing](</docs/en/plugins/mods/troubleshoot#find-out-why-a-mod-does-nothing>)
+ * **Rejected call** : catch the error from `$.theme.set` and write it to the transcript, as the example does. If the error includes `theme.set does not know the attribute "style"`, [update Claude Code](</docs/en/plugins/mods/overview#turn-mods-on-or-off>) in the app that shows the error. If it names a property, as in `style.Text.fontSize is a number of points, 11 to 28`, change that property’s value.
+ * **Another`$.theme` call**: if any mod in the session calls `$.theme.clear()`, or calls `$.theme.set` without your `style`, the style disappears. In your own mod, pass the whole theme in one call. Turn off any other mod that sets a theme.
+ * **Low contrast** : when text has less than 3:1 contrast with its background, that message, heading, or tool row shows in the app’s own colors. `$.theme.set` reports no error. Pick colors that are further apart, and check both light mode and dark mode.
+ * **Backdrop** : over a backdrop, a text color shows only on a background that’s solid or nearly solid. Set a solid `backgroundColor` on `UserMessage`, `AssistantMessage`, and `ToolUse` wherever you color their text, including through `Text` or `Heading`.
+ * **Accessibility settings** : with higher contrast turned on in the app or the operating system, messages show without the style. With an accessibility font such as OpenDyslexic, messages keep that font. To see the whole style, turn these settings off.
+ * **Open prompt** : a new style waits while a permission prompt or a question from Claude is on screen. Answer it to see the style.
+
+### Add sound to a theme
+
+To give your theme background sound and short sounds for events in the Desktop app’s Code tab, pass `sound` to [`$.theme.set`](</docs/en/plugins/mods/reference#mods-api-methods>). `sound` requires Claude Code v2.1.329 or later in the Code tab, so [check the version there](</docs/en/desktop#claude-code-version-in-the-code-tab>) first. The terminal, the VS Code extension, and the mobile app play no theme sound. You describe each sound as layers of tones and noise, with no audio file, and the Desktop app makes the audio. This mod sets dark mode, plays soft noise in the background, and plays three bell notes when Claude finishes a turn:
+
+ // The rest of the theme, which still works without sound
+ const look = { overrideColorScheme: 'dark' }
+
+ const sound = {
+ ambience: {
+ // A layer with drone: true plays without a break
+ // A layer with scatter plays now and then
+ // gain is how loud a layer is, from 0 to 1
+ layers: [{ wave: 'brown', drone: true, gain: 0.2 }],
+ },
+ cues: {
+ done: {
+ // step is the seconds from one note to the next
+ layers: [{ wave: 'bell', notes: ['C5', 'E5', 'G5'], step: 0.15, gain: 0.3 }],
+ },
+ },
+ }
+
+ export function register(on) {
+ on('session.start', async ($, e, next) => {
+ try {
+ await $.theme.set({ ...look, sound })
+ } catch (error) {
+ // A refused call sets nothing, so set the theme again without sound
+ $.ui.log(error.message)
+ await $.theme.set(look)
+ }
+ return next(e)
+ })
+ }
+
+For the other waves, fields, and ranges, see `ThemeSound` in [the types for your build](</docs/en/plugins/mods/create#get-the-types-for-your-build>). To hear the example:
+
+1
+
+Start a session
+
+Put the code in a [mod](</docs/en/plugins/mods/create#write-a-mod-yourself>), and save the mod’s directory [under `~/.claude/skills/`](</docs/en/plugins/create#scaffold-a-plugin-that-loads-every-session>) so that it loads when you start a session. In the Code tab, send a first message to [start a local session](</docs/en/desktop#start-a-session>). If no speaker button appears in the session’s title bar, see Fix a missing speaker button.
+
+2
+
+Turn on theme sound
+
+If the speaker button is crossed out, select it. The three notes play once to confirm that sound is on, and the noise fades in. To change the volume or turn off the noise, open the menu beside the button.
+
+3
+
+Hear the cue
+
+Send another message. The three notes play when Claude finishes.
+
+#### When each theme sound plays
+
+Theme sound is off until the user turns it on with the speaker button. It then stays on for other sessions and themes on that device until the user turns it off, signs out, or switches accounts. Choose a `gain` that suits a user who hears your theme as soon as it loads. The Desktop app plays each sound by itself at these moments, and a mod can’t trigger one:
+
+Sound| When it plays
+---|---
+`ambience`| While the session’s window has focus. It pauses after 10 minutes with no input and resumes at the next input.
+`cues.send`| The user sends a message
+`cues.tool`| Claude starts a tool call
+`cues.compact`| The conversation is compacted
+`cues.done`| Claude finishes a turn, unless the user stopped it or queued another message
+`cues.ask`| A permission prompt or a question appears
+`cues.error`| A turn ends in an error
+`cues.click`| The user clicks the background where no message, control, or panel covers it
+
+When the user turns on sound or picks a volume, they also hear one cue, the first the theme has in this order: `send`, `done`, `tool`, `compact`, `ask`, `error`. Expect fewer of the table’s sounds during an unanswered prompt, during speech, and in a window without focus. To hear all of them again:
+
+ * **A permission prompt or a question is waiting** : answer it. Until then, only `cues.ask` can play.
+ * **Dictation, a voice call, or a reply read aloud is in progress** : end it. Until then, the ambience and cues stay silent.
+ * **The window doesn’t have focus** : click in the window. Until then, only `cues.done` can play.
+
+#### Fix a missing speaker button
+
+If the session’s title bar shows no speaker button, check your version, whether the mod loaded, and the `$.theme` calls in the session:
+
+ * **Old version** : if `/status` in the Code tab shows a version before v2.1.329, [update the Desktop app](</docs/en/desktop#claude-code-version-in-the-code-tab>) and start a new local session. On those versions, the call fails with an error such as `theme.set does not know the attribute "sound"`.
+ * **Mod not loaded** : follow [Find out why a mod does nothing](</docs/en/plugins/mods/troubleshoot#find-out-why-a-mod-does-nothing>).
+ * **Value out of range** : the call fails, so with the example’s `catch` block the theme loads without sound. Find the error that the example logs in the transcript, and fix the field it names, as in `sound.cues.done.layers[0].gain is a number, 0 to 1`.
+ * **Another`$.theme` call**: when any mod makes a later `$.theme.set` call without `sound`, or calls `$.theme.clear()`, the sound and the button disappear. In your own mod, pass `sound` in the same call as the rest of the theme. Turn off any other mod that sets a theme.
## Build a tree from elements
@@ -539,6 +839,7 @@
`Button`| A control that calls `onPress`| Everywhere
`Link`, `Code`, `Markdown`| A link with `href` and an optional `label`, a code block, and text formatted the way Claude’s replies are. `Markdown` takes its content in a `text` prop, not in `children`, and needs a `key` when you pass `onLinkPress`.| Everywhere
`Input`, `Select`| A text field and a dropdown| Terminal, Desktop, VS Code
+`Shader`| A backdrop drawn on the GPU over an `Svg`| Desktop
`Svg`| An SVG document| Desktop, VS Code
`Client`| A region drawn by a second file of yours, for animation and pointer input. That file gets no mods API. It reaches your hooks by posting data, which arrives as a `ui.message` event. If it fails to load, draw, or run, your hooks receive a [`ui.fault`](</docs/en/plugins/mods/reference#interface>) event.| Terminal, Desktop
`Raster`, `Image`| A grid of colored cells, and a picture| Terminal
--- a/large-codebases.md
+++ b/large-codebases.md
@@ -23,7 +23,7 @@
### The example monorepo
-The examples throughout this page refer to a monorepo with three packages. The same patterns work in a large single-tree codebase: where an example uses `packages/api/`, substitute your own subsystem directory such as `src/backend/` or `lib/core/`.
+The examples throughout this page refer to a monorepo with three packages. Where an example uses `packages/api/`, substitute your own subsystem directory such as `src/backend/` or `lib/core/`.
monorepo/
CLAUDE.md # root instructions
--- a/llm-gateway-connect.md
+++ b/llm-gateway-connect.md
@@ -132,7 +132,7 @@
## Configure each surface
-The CLI reads the environment variables and settings files above. The other surfaces are the VS Code extension, the desktop app, GitHub Actions, the Agent SDK, and the cloud surfaces such as Slack and the web; the sections below cover whether those settings reach each one.
+The CLI reads the environment variables and settings files above. The other surfaces are the VS Code extension, the desktop app, GitHub Actions, the Agent SDK, and the cloud surfaces such as Claude Tag and the web. The sections below cover whether those settings reach each one.
### VS Code extension
@@ -213,9 +213,9 @@
}
)
-### Slack, cloud sessions, and Remote Control
-
-[Claude Code in Slack](</docs/en/slack>) and [cloud sessions](</docs/en/claude-code-on-the-web>) aren’t part of a gateway deployment. Gateway variables set in a cloud session’s environment configuration are not applied. If your traffic must stay on the gateway, don’t enable these surfaces for those users. [Remote Control](</docs/en/remote-control>) and [voice dictation](</docs/en/voice-dictation>) both rely on a claude.ai identity: Remote Control to pair a live session with your account, and voice dictation to reach the claude.ai transcription endpoint. They are unavailable while `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, or an `apiKeyHelper` is active. Remote Control is also disabled while `ANTHROPIC_BASE_URL` points at a non-Anthropic host, so signing in with claude.ai isn’t enough on its own. To restore either feature, log in with claude.ai and unset the gateway variables that feature checks. The Remote Control section of `claude doctor` names what is currently blocking Remote Control.
+### Cloud sessions, Claude Tag, and Remote Control
+
+[Cloud sessions](</docs/en/claude-code-on-the-web>) and [Claude Tag](<https://claude.com/docs/claude-tag/overview>) aren’t part of a gateway deployment. If your traffic must stay on the gateway, turn these surfaces off. [Remote Control](</docs/en/remote-control>) and [voice dictation](</docs/en/voice-dictation>) both rely on a claude.ai identity: Remote Control to pair a live session with your account, and voice dictation to reach the claude.ai transcription endpoint. They are unavailable while `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, or an `apiKeyHelper` is active. Remote Control is also disabled while `ANTHROPIC_BASE_URL` points at a non-Anthropic host, so signing in with claude.ai isn’t enough on its own. To restore either feature, log in with claude.ai and unset the gateway variables that feature checks. The Remote Control section of `claude doctor` names what is currently blocking Remote Control.
* Voice dictation: unset the gateway credential
* Remote Control: unset the gateway credential and `ANTHROPIC_BASE_URL`
--- a/loading.md
+++ b/loading.md
@@ -164,7 +164,7 @@
By default, a plugin enabled only in your project’s `.claude/settings.json` doesn’t load at session start until you install it on your machine. With the marketplace on your machine when the session starts, the `/plugin` **Errors** tab shows a line ending in [`isn't installed here`](</docs/en/plugins/troubleshooting#plugin-is-enabled-in-project-settings-but-isnt-installed-here>).
-If the marketplace isn’t on your machine yet, [add it](</docs/en/plugins/install#add-a-marketplace>) before you install. Find its source in the `extraKnownMarketplaces` setting of `.claude/settings.json`, or ask your maintainer.
+If the marketplace isn’t on your machine yet, [add it](</docs/en/plugins/install#add-a-marketplace>) before you install. Find its source in the `extraKnownMarketplaces` setting of `.claude/settings.json`, or ask the project’s maintainer.
To install, run this in a shell from the project, using the plugin’s key in `enabledPlugins`:
--- a/managed-settings.md
+++ b/managed-settings.md
@@ -101,7 +101,7 @@
## How Claude Code combines managed sources
-If you set your provider or gateway at claude.ai under **Organization settings > Desktop 3P**, first read [which settings take priority](<https://claude.com/docs/third-party/claude-desktop/admin-console-claude-code#which-settings-take-priority>) in the Enterprise Admin Console guide. When your organization delivers more than one managed source to the same machine, the [`managedSourcesBehavior`](</docs/en/settings-reference#managedsourcesbehavior>) key decides what Claude Code does with the others:
+If you set your provider or gateway at claude.ai under [**Organization settings > Desktop 3P**](<https://claude.ai/admin-settings/desktop-deployment>), first read [which settings take priority](<https://claude.com/docs/third-party/claude-desktop/admin-console-claude-code#which-settings-take-priority>) in the Enterprise Admin Console guide. When your organization delivers more than one managed source to the same machine, the [`managedSourcesBehavior`](</docs/en/settings-reference#managedsourcesbehavior>) key decides what Claude Code does with the others:
* **`"first-wins"`, the default**: Claude Code uses the highest-ranked source that delivers at least one policy key and ignores the rest rather than merging them, apart from the keys in Keys read from every admin source. Claude Code shows no warning for the sources it skips; `/status` names the source it used and the ones it skipped.
* **`"merge"`** : Claude Code applies every admin source that delivers a policy key and combines them by kind of key: on most keys the higher-ranked source’s value applies, lists union, and locks take the strictest value. Compose every managed source says where to set the key and how each kind of key combines. Requires Claude Code v2.1.242 or later.
@@ -113,7 +113,7 @@
Claude Code checks the sources in this order, highest priority first:
- 1. Remote settings, delivered from claude.ai as [server-managed settings](</docs/en/server-managed-settings>) or by a [Claude apps gateway](</docs/en/claude-apps-gateway>). Claude Code fetches this source only when the session meets one of these conditions:
+ 1. Remote settings, delivered from claude.ai as [server-managed settings](</docs/en/server-managed-settings>) or by a [Claude apps gateway](</docs/en/claude-apps-gateway>). Claude Code can fetch this source when the session meets one of these conditions:
* It has an [eligible credential](</docs/en/server-managed-settings#platform-availability>)
* It signs in to a gateway with `/login`
* It runs in Claude Desktop’s Code tab behind a gateway that [serves that session settings](</docs/en/claude-apps-gateway-config#apply-code-settings-in-the-code-tab>)
@@ -263,7 +263,7 @@
* An empty managed settings file counts as `{}`.
* A malformed value in the user-writable HKCU registry key never blocks launch. Claude Code reports it as a notice in `/status` and `claude doctor` instead.
-When a managed settings file, drop-in file, `managed-settings.d/` directory, MDM profile, or HKLM registry value exists but can’t be read, and no admin source supplies a policy, what happens depends on why the read failed:
+If a managed settings file, drop-in file, `managed-settings.d/` directory, or MDM profile exists but can’t be read and no admin source supplies a policy, sessions exit unless access was denied:
* If the operating system denied the read, for example on a root-only file, every session starts without that source’s policies. `/status` and `claude doctor` record the failure, and a run with `-p` also prints it to stderr.
* For any other read failure, such as an I/O error, every session exits at startup with [a message to contact an administrator](</docs/en/errors#unable-to-read-managed-policy-settings>).
--- a/memory.md
+++ b/memory.md
@@ -57,7 +57,7 @@
### Set up a project CLAUDE.md
-A project CLAUDE.md can be stored in either `./CLAUDE.md` or `./.claude/CLAUDE.md`. Create this file and add instructions that apply to anyone working on the project: build and test commands, coding standards, architectural decisions, naming conventions, and common workflows. These instructions are shared with your team through version control, so focus on project-level standards rather than personal preferences. To confirm the file loaded, run [`/context all`](</docs/en/commands#all-commands>) in a session and check the list under **Memory files**. In [fullscreen mode](</docs/en/fullscreen>), `/context` alone collapses that list.
+A project CLAUDE.md can be stored in either `./CLAUDE.md` or `./.claude/CLAUDE.md`. Create this file and add instructions that apply to anyone working on the project: build and test commands, coding standards, architectural decisions, naming conventions, and common workflows. These instructions are shared through version control, so focus on project-level standards rather than personal preferences. To confirm the file loaded, run [`/context all`](</docs/en/commands#all-commands>) in a session and check the list under **Memory files**. In [fullscreen mode](</docs/en/fullscreen>), `/context` alone collapses that list.
Run `/init` to generate a starting CLAUDE.md automatically. Claude analyzes your codebase and creates a file with build commands, test instructions, and project conventions it discovers. If a CLAUDE.md already exists, `/init` suggests improvements rather than overwriting it. Refine from there with instructions Claude wouldn’t discover on its own.For an interactive multi-phase flow instead, set the `CLAUDE_CODE_NEW_INIT` environment variable to `1` before you run `/init`. Set it in your shell or in the `env` block of a settings file, as shown in [Set environment variables](</docs/en/env-vars#set-environment-variables>). With it set, `/init` asks which artifacts to set up: CLAUDE.md files, skills, and hooks. It then explores your codebase with a subagent, fills in gaps via follow-up questions, and presents a reviewable proposal before writing any files. The variable only changes how `/init` runs, so you can leave it set.
@@ -295,7 +295,7 @@
`claude-md-or-agents-md`| Your `CLAUDE.md` files, or your `AGENTS.md` files when you have no `CLAUDE.md` or `CLAUDE.local.md` in your working directory or above it. This is the default
`claude-md-and-agents-md`| Your `CLAUDE.md` and `AGENTS.md` files together, each directory’s `CLAUDE.md` files first and its `AGENTS.md` after them. Claude Code skips an `AGENTS.md` it has already loaded, so one that your `CLAUDE.md` imports or symlinks to isn’t read twice
`claude-md`| Your `CLAUDE.md` files only
-`managed-only`| Only your organization’s managed `CLAUDE.md` and auto memory at launch. Your project, local, and user `CLAUDE.md` files, your `.claude/rules/` files, and every `AGENTS.md` are left out. A subdirectory’s `CLAUDE.md` and `.claude/rules/` files, and path-scoped rules, still load on demand
+`managed-only`| Only the managed `CLAUDE.md` and auto memory at launch. Your project, local, and user `CLAUDE.md` files, your `.claude/rules/` files, and every `AGENTS.md` are excluded. A subdirectory’s `CLAUDE.md` and `.claude/rules/` files, and path-scoped rules, still load on demand
You can also set the value in a settings file instead of `/config`. Add it to [`pluginConfigs`](</docs/en/settings-reference#pluginconfigs>) under `cc-plugin-agents-md@builtin`, the ID of the built-in plugin that reads `AGENTS.md`. Claude Code reads the entry from `~/.claude/settings.json`, a `--settings` file, or [managed settings](</docs/en/managed-settings>), and ignores it in project and local settings files. This example has Claude read both files:
--- a/microsoft-foundry.md
+++ b/microsoft-foundry.md
@@ -1,3 +1,10 @@
+This page covers setting up Microsoft Foundry for the Claude Code CLI.
+
+To use Microsoft Foundry in the **Code** tab of the Claude Desktop app, you or your administrator configures the app:
+
+ * **Your organization installed the app** : ask your administrator to [configure it for Microsoft Foundry](<https://claude.com/docs/third-party/claude-desktop/foundry>)
+ * **You install the app yourself** : follow the [single-machine setup steps](<https://claude.com/docs/third-party/claude-desktop/installation#single-machine-setup>) and enter the [connection and model values for Microsoft Foundry](<https://claude.com/docs/third-party/claude-desktop/foundry#configure-the-app>)
+
## Prerequisites
Before configuring Claude Code with Microsoft Foundry, ensure you have:
--- a/mobile.md
+++ b/mobile.md
@@ -16,7 +16,7 @@
Sign in
-Sign in with the same claude.ai account and organization you use for Claude Code. Cloud sessions and Remote Control require a claude.ai account, so they aren’t reachable with an Anthropic Console API key or from a third-party provider such as Amazon Bedrock.
+Sign in with the same claude.ai account you use for Claude Code, and the same organization if you belong to one. Cloud sessions and Remote Control require a claude.ai account, so they aren’t reachable with an Anthropic Console API key or from a third-party provider such as Amazon Bedrock.
3
@@ -70,4 +70,3 @@
* [Remote Control](</docs/en/remote-control>): continue a local session from any device
* [Sessions from Dispatch](</docs/en/desktop#sessions-from-dispatch>): how Dispatch tasks become Code sessions in the Desktop app
* [Channels](</docs/en/channels>): ask Claude something from your phone via Telegram, Discord, or iMessage while the work runs on your machine
- * [Claude Code in Slack](</docs/en/slack>): delegate coding tasks from your Slack workspace by mentioning `@Claude`
--- a/model-config.md
+++ b/model-config.md
@@ -174,7 +174,7 @@
When you pick a model with `/model` and your next session starts on something else, these are the usual causes:
* **You chose it for one session.** Pressing `s` in the picker, launching with `--model`, and running `/model` in non-interactive mode all apply to the current session and leave your saved default alone.
- * **Something with higher priority sets the model.** A `model` value in project or managed settings, `ANTHROPIC_MODEL` in your shell, or an organization default your admin set to override user choices applies again at every new-session launch. Your `/model` choice is still saved; it’s outranked. When project or managed settings set the model, the startup header names the file.
+ * **Something with higher priority sets the model.** A `model` value in project or managed settings, `ANTHROPIC_MODEL` in your shell, or an organization default set to override user choices applies again at every new-session launch. Your `/model` choice is still saved; it’s outranked. When project or managed settings set the model, the startup header names the file.
* **Claude Code couldn’t save your choice.** `/model` writes `model` to `~/.claude/settings.json`. If you can’t write to that file, for example because another tool generates it or links it to a read-only copy, the model you chose lasts for the session and the next launch reads the old value. Set `model` in the tool that generates the file, or make the file writable. See [A change you made in Claude Code is lost in new sessions](</docs/en/settings#a-change-you-made-in-claude-code-is-lost-in-new-sessions>).
* **You resumed a session.** A session you resume with `claude --resume` or `--continue` usually keeps the model it was using rather than your current default.
@@ -526,7 +526,7 @@
If the word isn’t rainbow when you start a new turn, try one of these:
* Retype it outside anything such as quotes, brackets, a path, or a command, in a prompt that doesn’t start with `/`
- * Unset `CLAUDE_CODE_EFFORT_LEVEL` if it’s set below `xhigh`, raise your own [`maxEffortLevel`](</docs/en/settings-reference#maxeffortlevel>) to `xhigh` or above, or ask an organization admin to raise your organization’s limit
+ * Unset `CLAUDE_CODE_EFFORT_LEVEL` if it’s set below `xhigh`, or raise your own [`maxEffortLevel`](</docs/en/settings-reference#maxeffortlevel>) to `xhigh` or above. If you’re in an organization with an effort limit, ask an organization admin to raise it
* Run `/model` in your session to switch to an Opus 5.5, Sonnet 5.5, Haiku 5.5, Fable 5.2, or Fable 5.1 model. Where the word can’t raise a turn, such as on Amazon Bedrock, Google Cloud’s Agent Platform, or a [Claude apps gateway](</docs/en/claude-apps-gateway>), set the effort level instead
To turn the keyword off, including its in-context instruction, set `CLAUDE_CODE_DISABLE_ULTRATHINK` to `1` in your shell or in a [settings file](</docs/en/env-vars#in-settings-files>). Requires Claude Code v2.1.316 or later.
--- a/monitoring-usage.md
+++ b/monitoring-usage.md
@@ -90,7 +90,7 @@
`OTEL_LOG_TOOL_DETAILS`| Enable logging of tool parameters and input arguments in tool events and trace span attributes: Bash commands, MCP server and tool names, skill names, user-authored workflow names, and tool input. Also enables custom, plugin, and MCP command names on `user_prompt` events, and real agent, skill, plugin, and MCP server and tool names on the cost and token counters (default: disabled). For Claude Desktop’s built-in servers, in sessions Claude Desktop owns, `mcp_server_name`/`mcp_tool_name` emit on `tool_decision`/`tool_result` even with the flag off. The exception requires Claude Code v2.1.214 or later| `1` to enable
`OTEL_LOG_TOOL_CONTENT`| Enable logging of tool content in the `tool.output` span event (default: disabled). Span attributes carry tool content under their own gates. Requires tracing. Content is truncated at the content limit (60 KB by default)| `1` to enable
`OTEL_LOG_MANAGED_SETTINGS`| Add the redacted managed settings, and a SHA-256 digest of the settings before redaction, to managed settings resolved events (default: disabled). A value in project or local settings doesn’t turn it on. Requires Claude Code v2.1.274 or later| `1` to enable
-`OTEL_LOG_RAW_API_BODIES`| Emit the full Anthropic Messages API request and response JSON as `api_request_body` / `api_response_body` log events (default: disabled). Bodies include the entire conversation history. Enabling this implies consent to everything `OTEL_LOG_USER_PROMPTS`, `OTEL_LOG_TOOL_DETAILS`, and `OTEL_LOG_TOOL_CONTENT` would reveal| `1` for inline bodies truncated at the content limit (60 KB by default), or `file:<dir>` for untruncated bodies on disk with a `body_ref` pointer in the event
+`OTEL_LOG_RAW_API_BODIES`| Emit the full Anthropic Messages API request and response JSON as `api_request_body` / `api_response_body` log events (default: disabled). Bodies can include the entire conversation history. Enabling this implies consent to everything `OTEL_LOG_USER_PROMPTS`, `OTEL_LOG_TOOL_DETAILS`, and `OTEL_LOG_TOOL_CONTENT` would reveal| `1` for inline bodies truncated at the content limit (60 KB by default), or `file:<dir>` for untruncated bodies on disk with a `body_ref` pointer in the event
`CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH`| Content limit: the maximum length of content-bearing attributes such as model responses, tool content, system prompts, and raw API bodies, truncation marker included, in UTF-16 code units (default: 61440, i.e. 60 KB). The default is sized for backends that cap attribute values at 64 KB; raise it only if your backend accepts larger values, or lower it to cut telemetry volume. When an OpenTelemetry SDK attribute limit, `OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT` or one of its logrecord and span variants, is set lower, Claude Code truncates at that smaller value so the `[TRUNCATED ...]` marker stays within the SDK limit| `262144`
`OTEL_RESOURCE_INCLUDE_HOST`| Add the machine’s name and ID to the resource attributes of metrics, events, and traces (default: disabled). See Identify the machine a session ran on. Requires Claude Code v2.1.326 or later| `1` to enable
`OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE`| Metrics temporality preference (default: `delta`). Set to `cumulative` if your backend expects cumulative temporality| `delta`, `cumulative`
@@ -641,7 +641,7 @@
---|---
`prompt.id`| UUID v4 identifier linking all events produced while processing a single user prompt
`event.sequence`| 0-based counter for ordering events, counted per Claude Code process rather than per session
-`message.uuid`| UUID of the message as persisted in the session transcript, the `~/.claude/projects/*/*.jsonl` files. Present on `assistant_response`, on `api_response_body`, and on `user_prompt` except for command dispatches, which can produce zero or many messages. On `assistant_response` and `api_response_body`, this is the response’s final transcript entry, which the next turn’s `parentUuid` chains from. Requires Claude Code v2.1.274 or later on `api_response_body`
+`message.uuid`| UUID of the message as persisted in the session transcript, the `~/.claude/projects/*/*.jsonl` files. Present on `assistant_response`, on `api_response_body`, and on `user_prompt` except for command dispatches, which can produce zero or many messages. On `api_response_body`, and on an `assistant_response` event without a `tool_use_id`, this is the response’s final transcript entry, which the next turn’s `parentUuid` chains from. Requires Claude Code v2.1.274 or later on `api_response_body`
`request_id`| Server-assigned ID of the API request, read from the `request-id` response header, such as `req_011...`. On a response with no `request-id` header, as on [Amazon Bedrock](</docs/en/amazon-bedrock>), the value comes from the `x-amzn-requestid` header instead. Present on `api_request`, `api_error`, `api_refusal`, `assistant_response`, `api_response_body`, `tool_result`, and `tool_decision` when the response carries either header. Matches the same attribute on the `llm_request` trace span. The `x-amzn-requestid` source requires Claude Code v2.1.282 or later
`client_request_id`| Client-generated UUID sent as the `x-client-request-id` request header. Present on `api_request` and `api_error` on first-party API connections; absent on third-party provider backends and when the request was retried through the non-streaming fallback. Pairs a request with its response and remains available for failures such as timeouts that never produced a server `request_id`. Matches the same attribute on the `llm_request` trace span
@@ -649,7 +649,7 @@
* `message.uuid` on `user_prompt`, `assistant_response`, and `api_response_body`
* `request_id` on the API events, persisted as `requestId` on the transcript’s assistant entries
- * `tool_use_id` on `tool_result` and `tool_decision` events, and on `safety_event` events except those for the end of a turn
+ * `tool_use_id` on `tool_result` and `tool_decision` events, on `assistant_response` events for messages sent with a tool, and on `safety_event` events except those for the end of a turn
#### User prompt event
@@ -668,7 +668,12 @@
#### Assistant response event
-Logged after each API request that returns text content from the model. Only the response’s text blocks are included; thinking blocks and tool-use blocks are excluded. **Event Name** : `claude_code.assistant_response` **Attributes** :
+An `assistant_response` event holds either the text of an API response or a message that Claude wrote to the user by calling a tool. The `tool_use_id` attribute tells you which:
+
+ * **Text reply, no`tool_use_id`**: logged after each API request that returns text content from the model. Only the response’s text blocks are included; thinking blocks and tool-use blocks are excluded.
+ * **Message sent with a tool, has`tool_use_id`**: `response` holds the message text from a successful call to `SendUserMessage` or Cowork’s `mcp__cowork__send_user_message`. Claude Code logs the event before [`PostToolUse`](</docs/en/hooks#posttooluse>) hooks run. Requires Claude Code v2.1.332 or later.
+
+You receive `assistant_response` events with `tool_use_id` only while you include response text, as described under `response`. **Event Name** : `claude_code.assistant_response` **Attributes** :
* All standard attributes
* `event.name`: `"assistant_response"`
@@ -677,8 +682,9 @@
* `response_length`: Length of the response text in characters
* `response`: Response text, truncated at the content limit (60 KB by default). Redacted to `<REDACTED>` by default. Set `OTEL_LOG_ASSISTANT_RESPONSES=1` to include it. When `OTEL_LOG_ASSISTANT_RESPONSES` is unset, `OTEL_LOG_USER_PROMPTS` controls it instead, so set `OTEL_LOG_ASSISTANT_RESPONSES=0` to keep responses redacted while prompt logging is on
* `model`: Model identifier (for example, “claude-sonnet-5”)
- * `request_id`: API request ID, described under Event correlation attributes
- * `message.uuid`: UUID of the response’s final transcript entry. An API response is persisted as one transcript entry per content block; this is the last one, which the next turn’s `parentUuid` chains from.
+ * `request_id`: API request ID, described under Event correlation attributes. On an event with `tool_use_id`, this is the ID of the API response that held the call. When that response also has text, both kinds of event share one `request_id`
+ * `tool_use_id`: Present only on an event for a message sent with a tool. Same value as on the call’s tool result event
+ * `message.uuid`: UUID of a transcript entry. An API response is persisted as one transcript entry per content block. For a text reply, this is the last one, which the next turn’s `parentUuid` chains from. For an event with `tool_use_id`, this is the entry that holds the tool call.
* `query_source`: Subsystem that issued the request, such as `"repl_main_thread"`, `"compact"`, or a subagent name
#### Tool result event
@@ -1267,7 +1273,7 @@
* `"force_refresh_failed"`: the settings fetch that [`forceRemoteSettingsRefresh`](</docs/en/settings-reference#forceremotesettingsrefresh>) requires failed
* `"gateway_rejected"`: a [Claude apps gateway](</docs/en/claude-apps-gateway>) answered the managed settings load with HTTP 403
* `"version_below_minimum"`: this version of Claude Code is below [`requiredMinimumVersion`](</docs/en/settings-reference#requiredminimumversion>) or above [`requiredMaximumVersion`](</docs/en/settings-reference#requiredmaximumversion>)
- * `"_OTHER"`: the Claude apps gateway managed settings load failed for another reason
+ * `"_OTHER"`: a cause that has no dedicated value, such as a gateway settings load that failed for another reason
* `managed_settings.sources`: every managed source that delivers at least one [policy key](</docs/en/managed-settings#how-claude-code-combines-managed-sources>), highest priority first, including sources whose keys don’t take effect under `first-wins`. Values are `"remote"`, `"plist"` or `"hklm"` for the MDM or OS-level policy, `"file"` for managed settings files and drop-ins, `"parent"` when an [embedding host](</docs/en/managed-settings#let-an-embedding-host-add-policy>) supplies settings, and `"hkcu"` for the [Windows HKCU registry value](</docs/en/managed-settings#where-each-mechanism-stores-the-policy>) when Claude Code [reads it](</docs/en/managed-settings#how-claude-code-combines-managed-sources>). A source that carries only control keys, or that Claude Code couldn’t read, isn’t listed. Emitted as an array of strings, empty when no managed source delivers a policy key
* `managed_settings.source_behavior`: the [`managedSourcesBehavior`](</docs/en/settings-reference#managedsourcesbehavior>) value Claude Code read, `"first-wins"` or `"merge"`. `"first-wins"` when no source sets the key
* `managed_settings.helper.state`: state of the policy helper that the selected MDM or file source configures:
@@ -1536,7 +1542,7 @@
* The cost and token counters and the `api_request`, `api_error`, and `api_refusal` events carry real agent, skill, plugin, and MCP server and tool names in their attribution attributes
* The `claude_code.tool` span carries input-derived attributes such as `file_path`. Under detailed beta tracing it also carries a `tool_input` attribute
* Tool content is not logged in trace spans by default. To include it, set `OTEL_LOG_TOOL_CONTENT=1`. The `claude_code.tool` span then carries a `tool.output` span event with raw file contents, Bash command output, and what MCP tools, WebFetch, and WebSearch return, truncated at the content limit (60 KB by default) per attribute. Results from MCP tools, WebFetch, and WebSearch require Claude Code v2.1.283 or later. Tool content also reaches spans through `new_context`, whose gate differs per span. Configure your telemetry backend to filter or redact these attributes as needed
- * Raw Anthropic Messages API request and response bodies are not logged by default. To include them, set `OTEL_LOG_RAW_API_BODIES` in your shell, user settings, or managed settings. It’s ignored in [project and local settings](</docs/en/settings-reference#variables-claude-code-ignores-in-env>). The bodies contain the full conversation history, including the system prompt, every prior user and assistant turn, and tool results, so enabling this implies consent to everything the other `OTEL_LOG_*` content flags would reveal. Claude Code always redacts Claude’s extended-thinking content from these bodies, regardless of other settings. The value you set determines how Claude Code delivers the bodies:
+ * Raw Anthropic Messages API request and response bodies aren’t logged by default. To include them, set `OTEL_LOG_RAW_API_BODIES` in your shell, user settings, or managed settings. It’s ignored in [project and local settings](</docs/en/settings-reference#variables-claude-code-ignores-in-env>). The bodies can contain the full conversation history, including the system prompt, every prior user and assistant turn, and tool results. Enabling this implies consent to everything the other `OTEL_LOG_*` content flags would reveal. Claude Code always redacts Claude’s extended-thinking content from these bodies, regardless of other settings. The value you set determines how Claude Code delivers the bodies:
* With `=1`, Claude Code emits `api_request_body` and `api_response_body` log events for each API call. The events’ `body` attribute carries the JSON-serialized payload, truncated at the content limit (60 KB by default)
* With `=file:<dir>`, Claude Code writes untruncated bodies to `.request.json` and `.response.json` files under that directory, and the events carry a `body_ref` path instead of the inline body. Ship the directory with a log collector or sidecar rather than through the telemetry stream. For each successful response, Claude Code also appends one line to `index.jsonl` in that directory, linking the response file to the request file that produced it and to the transcript message it became. Each line holds no message content, and the API response body event section lists its fields. The index file requires Claude Code v2.1.274 or later
* The machine’s name and ID aren’t included by default. To include them as `host.name` and `host.id`, set `OTEL_RESOURCE_INCLUDE_HOST=1`. A host name often contains a person’s name, and `host.id` is a lasting identifier for the machine. If you set the variable in managed settings, tell the people who use those machines, because Claude Code shows them no notice.
--- a/network-config.md
+++ b/network-config.md
@@ -51,7 +51,7 @@
## Custom CA certificates
-If your enterprise environment uses a custom CA, configure Claude Code to trust it directly:
+If your environment uses a custom CA, configure Claude Code to trust it directly:
export NODE_EXTRA_CA_CERTS=/path/to/ca-cert.pem
@@ -168,7 +168,7 @@
`storage.googleapis.com`| Native installer and native auto-updater on versions prior to 2.1.116
`registry.npmjs.org`| Plugin installs (fetching npm-source plugin packages and installing plugins’ Node.js package dependencies), `npx`-launched MCP servers, and the package registry for npm and bun installs of Claude Code itself
`bridge.claudeusercontent.com`| [Claude in Chrome](</docs/en/chrome>) extension WebSocket bridge
-`*.frame.claudeusercontent.com`| [Artifact](</docs/en/artifacts>) content reads. The CLI fetches an artifact’s files from this host when Claude opens one, and only when the Artifact tool is [available](</docs/en/artifacts#availability>) for your account. To turn the tool off and drop this requirement, set [`"enableArtifact": false`](</docs/en/settings-reference#enableartifact>) or [`CLAUDE_CODE_DISABLE_ARTIFACT=1`](</docs/en/env-vars>)
+`*.frame.claudeusercontent.com`| [Artifact](</docs/en/artifacts>) content reads. The CLI fetches an artifact’s files from this host when Claude opens one. You need it only when the Artifact tool is [available](</docs/en/artifacts#availability>) for your account. To turn the tool off and drop this requirement, set [`"enableArtifact": false`](</docs/en/settings-reference#enableartifact>) or [`CLAUDE_CODE_DISABLE_ARTIFACT=1`](</docs/en/env-vars>)
`github.com`| Cloning GitHub-hosted [plugin marketplaces](</docs/en/plugins/overview>) and plugins, including the official Anthropic marketplace, over HTTPS or SSH. To clone GitHub `owner/repo` sources over HTTPS only, set [`CLAUDE_CODE_PLUGIN_PREFER_HTTPS=1`](</docs/en/env-vars>)
`raw.githubusercontent.com`| Changelog feed for [`/release-notes`](</docs/en/commands>). In interactive sessions, Claude Code also fetches it in the background at startup when its cached changelog doesn’t yet cover the running version, such as the first start after an update; non-interactive and cloud sessions never fetch it
`*-review.googlesource.com`| Gerrit change lookup on `googlesource.com` checkouts. When a Claude Desktop Code tab session starts or resumes on a [trusted](</docs/en/permissions#project-allow-rules-and-workspace-trust>) checkout whose `origin` is a `googlesource.com` host, Claude Code asks that host’s `-review` server anonymously for the open change matching HEAD’s `Change-Id`, once per start or resume. Other session types skip the lookup, and no other Gerrit host is contacted. Optional: disable with [`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`](</docs/en/env-vars>)
--- a/observability.md
+++ b/observability.md
@@ -198,7 +198,7 @@
`OTEL_LOG_USER_PROMPTS=1`| Prompt text on `claude_code.user_prompt` events and on the `claude_code.interaction` span
`OTEL_LOG_TOOL_DETAILS=1`| Tool input arguments such as file paths, shell commands, and search patterns on `claude_code.tool_result` events, and real agent, skill, plugin, and MCP server names on the [cost and token metrics](</docs/en/monitoring-usage#cost-counter>). The built-in rule the auto mode classifier named when it blocked a call, as [`classifier_category`](</docs/en/monitoring-usage#tool-decision-event>) on `claude_code.tool_decision` events
`OTEL_LOG_TOOL_CONTENT=1`| A [`tool.output` span event](</docs/en/monitoring-usage#tool-output-span-event>) on `claude_code.tool` with file contents, Bash output, and what MCP tools, WebFetch, and WebSearch return, truncated at 60 KB by default, configurable via `CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH`, which requires Claude Code v2.1.214 or later. Results from MCP tools, WebFetch, and WebSearch require Claude Code v2.1.283 or later. Requires tracing to be enabled. Span attributes carry tool content under [their own gates](</docs/en/monitoring-usage#new-context-gates>)
-`OTEL_LOG_RAW_API_BODIES`| Full Anthropic Messages API request and response JSON as `claude_code.api_request_body` and `claude_code.api_response_body` log events. Set to `1` for inline bodies truncated at 60 KB by default, or `file:<dir>` for untruncated bodies on disk with a `body_ref` path in the event. `CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH` configures the inline truncation limit, and requires Claude Code v2.1.214 or later. Bodies include the entire conversation history and have extended-thinking content redacted. Enabling this implies consent to everything the three variables above would reveal
+`OTEL_LOG_RAW_API_BODIES`| Full Anthropic Messages API request and response JSON as `claude_code.api_request_body` and `claude_code.api_response_body` log events. Set to `1` for inline bodies truncated at [60 KB by default](</docs/en/monitoring-usage#common-configuration-variables>), or `file:<dir>` for untruncated bodies on disk with a `body_ref` path in the event. Bodies can include the entire conversation history, with extended-thinking content redacted. Enabling this implies consent to everything the three variables above would reveal
Leave these unset unless your observability pipeline is approved to store the data your agent handles. See [Security and privacy](</docs/en/monitoring-usage#security-and-privacy>) in the Monitoring reference for the full list of attributes and redaction behavior.
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -222,7 +222,7 @@
When the plan is ready, Claude presents it and asks how to proceed. From that prompt you can choose:
- * **Yes, and use auto mode** : approve and start in auto mode. If auto mode isn’t available to your session, for example because your organization turned it off, this option reads **Yes, auto-accept edits**. If you started the session with bypass permissions enabled, the option reads **Yes, and switch to BYPASS PERMISSIONS (no further prompts) for this session** instead.
+ * **Yes, and use auto mode** : approve and start in auto mode. If auto mode isn’t available to your session, this option reads **Yes, auto-accept edits**. If you started the session with bypass permissions enabled, the option reads **Yes, and switch to BYPASS PERMISSIONS (no further prompts) for this session** instead.
* **Yes, manually approve edits** : approve and review each edit individually.
* **No, keep planning** : stay in plan mode and tell Claude what to change.
@@ -288,7 +288,7 @@
Runs on Claude Sonnet 4.6| Sonnet 4.6
Has [`ANTHROPIC_DEFAULT_SONNET_MODEL`](</docs/en/model-config#environment-variables>) set| Its value, or Sonnet 5 if its value is Claude Sonnet 5.5 or Claude Opus 5.5
-If Sonnet 5 or the model in `ANTHROPIC_DEFAULT_SONNET_MODEL` is unavailable from your provider or excluded by your organization’s [model policy](</docs/en/model-config#restrict-model-selection>), Claude Code uses a fallback model. That’s your session’s model, or an Opus model in a [Fable session](</docs/en/model-config#work-with-fable>).
+If Sonnet 5 or the model in `ANTHROPIC_DEFAULT_SONNET_MODEL` is unavailable from your provider or excluded by a [model policy](</docs/en/model-config#restrict-model-selection>), Claude Code uses a fallback model. That’s your session’s model, or an Opus model in a [Fable session](</docs/en/model-config#work-with-fable>).
### Choose the classifier model
@@ -305,7 +305,7 @@
Situation| What happens| What to do
---|---|---
The debug log reports an Anthropic-configured classifier model| That model reviews| None needed
-You set Claude Opus 5, Sonnet 5.5, Opus 5.5 or one your organization’s [model policy](</docs/en/model-config#restrict-model-selection>) excludes| The default classifier model reviews| Set another model
+You set Claude Opus 5, Sonnet 5.5, Opus 5.5, or one that a [model policy](</docs/en/model-config#restrict-model-selection>) excludes| The default classifier model reviews| Set another model
Your provider can’t serve the model| Classifier checks fail, so Claude Code [denies each action it checks](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>)| Set a model it serves, or remove the variable
In a session, `/status` shows `Auto mode server` as `Enabled`| The server reviews without your model| None needed
@@ -505,7 +505,7 @@
## Skip all checks with bypassPermissions mode
-`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. Even in `bypassPermissions` mode, each of the actions no mode auto-approves gets a prompt or a denial, though you can turn off the prompt for dangerous `rm` commands. Reading [another organization’s public artifact](</docs/en/artifacts#read-an-artifact-shared-with-you>) needs your approval, and this mode doesn’t ask for it, so Claude can’t read one. The Remove-Item in PowerShell denies also apply in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in interactive terminal plan-mode sessions where bypass permissions are available:
+`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. Even in `bypassPermissions` mode, each of the actions no mode auto-approves ends in a prompt or a denial, though you can turn off the prompt for dangerous `rm` commands. The Artifact tool can’t read [another organization’s public artifact](</docs/en/artifacts#read-an-artifact-shared-with-you>) that you haven’t approved in this conversation. The Remove-Item in PowerShell denies also apply in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in interactive terminal plan-mode sessions where bypass permissions are available:
* The [`isolatePeerMachines`](</docs/en/settings-reference#isolatepeermachines>) approval prompt for messages to your sessions beyond this machine still appears.
* When no [`crossSessionInbound`](</docs/en/cross-session-messaging#control-inbound-messages>) value applies, Claude Code holds an inbound message from another of your sessions for your approval, and delivers without asking only when the sending session identifies itself as also bypassing permission prompts. If you leave the permission mode while messages are held, Claude Code re-applies the inbound rules and delivers any held message they now accept.
@@ -520,7 +520,7 @@
The `--dangerously-skip-permissions` flag is equivalent. The first time you start an interactive session with this mode enabled, Claude Code shows a warning dialog asking you to accept responsibility for actions taken without permission checks:
- * **If you accept** : Claude Code sets `skipDangerousModePermissionPrompt` to `true` in `~/.claude/settings.json`, so later sessions skip the dialog. To see the dialog again, remove the key from that file or set it to `false`. The [`skipDangerousModePermissionPrompt` reference](</docs/en/settings-reference#skipdangerousmodepermissionprompt>) lists the other settings files where you or your organization can set it.
+ * **If you accept** : Claude Code sets `skipDangerousModePermissionPrompt` to `true` in `~/.claude/settings.json`, so later sessions skip the dialog. To see the dialog again, remove the key from that file or set it to `false`. If the dialog still doesn’t appear, check the other settings files that the [`skipDangerousModePermissionPrompt` reference](</docs/en/settings-reference#skipdangerousmodepermissionprompt>) lists.
* **If you decline** : Claude Code exits.
If you pass [`--setting-sources`](</docs/en/cli-reference#cli-flags>) without `user`, the dialog can appear again although you accepted it earlier. To skip it, add `user`, as in `--setting-sources user,project`. In [non-interactive mode](</docs/en/headless>) no dialog is shown. A [background session](</docs/en/agent-view>) honors your acceptance when it’s recorded in user or managed settings:
--- a/platforms.md
+++ b/platforms.md
@@ -25,8 +25,7 @@
[GitHub Actions](</docs/en/github-actions>)| Runs Claude in your CI pipeline| Automated PR reviews, issue triage, scheduled maintenance
[GitLab CI/CD](</docs/en/gitlab-ci-cd>)| Same as GitHub Actions for GitLab| CI-driven automation on GitLab
[Code Review](</docs/en/code-review>)| Reviews every PR automatically| Catching bugs before human review
-[Slack](</docs/en/slack>)| Responds to `@Claude` mentions in your channels, under your own account| Turning bug reports into pull requests from team chat on Pro, Max, and Ultra plans
-[Claude Tag](<https://claude.com/docs/claude-tag>)| Runs `@Claude` as your organization’s shared identity with admin-configured access| Shared team access on Team and Enterprise plans, instead of per-user Slack sessions
+[Claude Tag](<https://claude.com/docs/claude-tag>)| Runs `@Claude` as your organization’s shared identity with admin-configured access| Shared team access on Team and Enterprise plans
For integrations not listed here, [MCP servers](</docs/en/mcp>) and [connectors](</docs/en/desktop#connect-external-tools>) let you connect almost anything: Linear, Notion, Google Drive, or your own internal APIs.
@@ -39,7 +38,6 @@
[Dispatch](</docs/en/desktop#sessions-from-dispatch>)| Message a task from the Claude mobile app| Your machine (Desktop)| [Pair the mobile app with Desktop](<https://support.claude.com/en/articles/13947068>)| Delegating work while you’re away, minimal setup
[Remote Control](</docs/en/remote-control>)| Drive a running session from [claude.ai/code](<https://claude.ai/code>) or the Claude mobile app| Your machine (CLI, Desktop, or VS Code)| Run [`claude remote-control` or `/remote-control`](</docs/en/remote-control#start-a-remote-control-session>)| Steering in-progress work from another device
[Channels](</docs/en/channels>)| Push events from a chat app like Telegram or Discord, or your own server| Your machine (CLI)| [Install a channel plugin](</docs/en/channels#quickstart>) or [build your own](</docs/en/channels-reference>)| Reacting to external events like CI failures or chat messages
-[Slack](</docs/en/slack>)| Mention `@Claude` in a team channel| Anthropic cloud| [Install the Slack app](</docs/en/slack#setting-up-claude-code-in-slack>) with [Claude Code on the web](</docs/en/claude-code-on-the-web>) enabled, on Pro, Max, and Ultra plans| PRs and reviews from team chat
[Self-hosted environments](</docs/en/self-hosted-environments>)| Start a [cloud session](</docs/en/claude-code-on-the-web>) and pick your organization’s environment| Your organization’s infrastructure| [Deploy runners](</docs/en/self-hosted-environments-quickstart>), on Team and Enterprise plans| Cloud sessions that must run inside your network
[Scheduled tasks](</docs/en/scheduled-tasks>)| Set a schedule| [CLI](</docs/en/scheduled-tasks>), [Desktop](</docs/en/desktop-scheduled-tasks>), or [cloud](</docs/en/routines>)| Pick a frequency| Recurring automation like daily reviews
@@ -64,7 +62,6 @@
* [GitHub Actions](</docs/en/github-actions>): run Claude in your CI pipeline
* [GitLab CI/CD](</docs/en/gitlab-ci-cd>): the same for GitLab
* [Code Review](</docs/en/code-review>): automatic review on every pull request
- * [Slack](</docs/en/slack>): send tasks from team chat and get PRs back, on Pro, Max, and Ultra plans
* [Claude Tag](<https://claude.com/docs/claude-tag>): run `@Claude` as your organization’s shared identity on Team and Enterprise plans
### Remote access
--- a/plugin-evals.md
+++ b/plugin-evals.md
@@ -145,7 +145,7 @@
### Set run limits and tools in prompt.md
-Set a case’s `max_turns`, `timeout_seconds`, `model`, `tags`, and the `allowed_tools` it may use in `prompt.md` frontmatter; the prompt.md frontmatter reference lists every field and its default. Claude receives the body exactly as you wrote it. `@path` mentions in it aren’t expanded into file attachments, so if Claude needs to read a file, grant a tool for it in `allowed_tools`.
+Set a case’s `max_turns`, `timeout_seconds`, `model`, `tags`, and `allowed_tools` in `prompt.md` frontmatter. For the other fields and the defaults, see the prompt.md frontmatter reference. Claude receives the body exactly as you wrote it. `@path` mentions in it aren’t expanded into file attachments, so if Claude needs to read a file, grant a tool for it in `allowed_tools`.
### Choose and weight graders
@@ -256,15 +256,19 @@
`name@skills-dir`| The same, for a [skills-directory plugin](</docs/en/plugins/loading#plugins-shared-through-a-repository>)
Omitted| The current directory as a path
-Add `--case <glob>` to filter by case name and `--tag <tag>` to keep cases with any of the given tags. Put the target before `--tag`, `--allow-tools`, and `--json`. The first two take a list and `--json` takes an optional path, so each of them reads a target that follows as its own value.
+Add `--case <glob>` to filter by case name and `--tag <tag>` to keep cases with any of the given tags. Put the target before `--tag`, `--allow-tools`, `--disallow-tools`, and `--json`. The first three take a list and `--json` takes an optional path, so each of them reads a target that follows as its own value.
### Grant tools
-Runs never stop to ask for permission. Built-in tools that need a grant you didn’t give, such as `Bash`, `Write`, `Edit`, `WebFetch`, and `WebSearch`, are removed from the session, so Claude can’t call them at all. A run allows only the read-only tools the case lists in `allowed_tools`, from `Read`, `Glob`, `Grep`, `NotebookRead`, `Skill`, `AskUserQuestion`, `Agent`, `TodoWrite`, and the task tools `TaskCreate`, `TaskGet`, `TaskList`, `TaskUpdate`, and `TaskStop`, plus whatever you grant with `--allow-tools`. That grant applies to every case in the run. To let cases use `Bash`, `Write`, `Edit`, `WebFetch`, or `WebSearch`, grant them yourself:
+Runs never stop to ask for permission. Built-in tools that need a grant you didn’t give, such as `Bash`, `Write`, `Edit`, `WebFetch`, and `WebSearch`, are removed from the session, so Claude can’t call them at all. A run pre-approves the read-only tools the case lists in `allowed_tools`, from `Read`, `Glob`, `Grep`, `NotebookRead`, `Skill`, `AskUserQuestion`, `Agent`, `TodoWrite`, and the task tools `TaskCreate`, `TaskGet`, `TaskList`, `TaskUpdate`, and `TaskStop`, plus whatever you grant with `--allow-tools`. That grant applies to every case in the run. To let cases use `Bash`, `Write`, `Edit`, `WebFetch`, or `WebSearch`, grant them with `--allow-tools`:
claude plugin eval . --allow-tools Write Edit "Bash(npm test *)"
When a case asked for a tool you didn’t grant, the progress output lists it as `not granted`. Tools on a mocked MCP server need no grant. Tools on a real plugin MCP server need both the server started, with `--allow-real-servers` or `--mocks off`, and a grant by name, such as `--allow-tools "mcp__plugin_my-plugin_github__*"`; a plugin’s MCP tools are named `mcp__plugin_<plugin>_<server>__<tool>`.
+
+#### Pre-approve reads from another path
+
+To pre-approve reads under a folder such as `/data`, grant a [`Read` rule](</docs/en/permissions#read-and-edit>) with a leading `//`, as in `--allow-tools "Read(//data/**)"`. On native Windows, the same grant for `C:\data` is `Read(//c/data/**)`. Listing `Read`, `Glob`, or `Grep` alone doesn’t pre-approve every path on your machine.
#### Shell grants need a sandbox
@@ -278,6 +282,14 @@
* **Under`--json`**: read it from the JSON result, in the run’s `error` field
Ask your administrator whether that setting can change for your machine, or drop the shell grant from that run.
+
+### Remove a built-in tool from runs
+
+To remove a built-in tool from every case, pass its [exact name](</docs/en/tools-reference>) to `--disallow-tools`. For one case, list the name in that case’s `disallowed_tools` field. Requires Claude Code v2.1.299 or later. If you only omit `Agent` from `allowed_tools`, Claude can still call it. To remove `Agent` and `TaskStop` from every case, run this in your shell:
+
+ claude plugin eval . --disallow-tools Agent TaskStop
+
+The output lists both tools after `Removed from Claude's tools in every case`.
### Command options
@@ -293,6 +305,7 @@
`--threshold <0..1>`| `1.0`| A case passes when its with-arm score is at least this. Any case below it makes the command exit 1
`--max-cost-usd <usd>`| No ceiling| A ceiling on the run’s list-price cost estimate, not on plan usage. Checked before each run starts. Once spent, nothing further starts; runs that already started finish, so spend can pass the ceiling by those runs. If any run is left unstarted, the command exits 2 with partial results
`--allow-tools <tools...>`| None| Grant tools beyond the read-only set. See Grant tools
+`--disallow-tools <tools...>`| None| Remove built-in tools from every case. See Remove a built-in tool from runs
`--scaffold`| Off| Run each case’s `scaffold_script`
`--trust-plugin`| Off| Skip the first-run trust prompt for a plugin whose code and suite you’d run yourself. Pass it in CI so the job is never refused by or left waiting at the prompt. See What a run can access
`--mocks <mode>`| `record`| `record` answers MCP tool calls from mocks, doesn’t start the plugin’s real servers, and saves agent-mock answers for replay. `off` ignores mocks and starts the plugin’s real MCP servers
@@ -431,13 +444,14 @@
`model`| The child session’s default| Model for the agent under test. `--model` overrides it
`max_turns`| `10`| Turn cap, up to 200. Hitting it is recorded as a run error and usually lowers the score, so set it generously
`timeout_seconds`| `300`| Wall-clock cap per run, up to 3600
-`allowed_tools`| `[]`| Tools the case wants, such as `[Read, Glob, Grep, Skill]`. Read-only tools are granted when listed here; for anything else, see Grant tools
+`allowed_tools`| `[]`| Tools the case wants, such as `[Read, Glob, Grep, Skill]`. See Grant tools
+`disallowed_tools`| | Exact built-in tool names to remove from this case, such as `[Agent, TaskStop]`
`append_system_prompt`| | Text appended to the child session’s system prompt
`env`| `{}`| Extra environment variables for the child session. Keys must match `EVAL_[A-Z0-9_]*`; any other key fails the run. The run inherits only an allowlist from your shell: basics such as `PATH` and locale, proxy and certificate settings, the variables that select and authenticate your model provider, most `ANTHROPIC_*` and `CLAUDE_CODE_*` configuration, and `EVAL_*`. To pass the plugin anything else, such as a toolchain setting, export it as an `EVAL_*` variable
### case.yaml fields
-`case.yaml` is an alternative or companion to `prompt.md`: it describes a case in YAML and adds the fields that point at other files. It requires `schema_version: "1.1"` and `name`. The `prompt.md` fields `description`, `tags`, `plugins`, `runs`, and `expected_outcome` go at the top level; `model`, `max_turns`, `timeout_seconds`, `allowed_tools`, `append_system_prompt`, and `env` go under `execution:`. When both files exist, `prompt.md` frontmatter overrides the matching `case.yaml` fields, the `prompt.md` body is the prompt, and `graders/*.md` are added after any graders listed in `case.yaml`. These fields exist only in `case.yaml`:
+`case.yaml` is an alternative or companion to `prompt.md`: it describes a case in YAML and adds the fields that point at other files. It requires `schema_version: "1.1"` and `name`. The `prompt.md` fields `description`, `tags`, `plugins`, `runs`, and `expected_outcome` go at the top level; `model`, `max_turns`, `timeout_seconds`, `allowed_tools`, `disallowed_tools`, `append_system_prompt`, and `env` go under `execution:`. When both files exist, `prompt.md` frontmatter overrides the matching `case.yaml` fields other than `disallowed_tools`, where the two lists combine. The `prompt.md` body is the prompt, and `graders/*.md` are added after any graders listed in `case.yaml`. These fields exist only in `case.yaml`:
Field| Purpose
---|---
@@ -553,7 +567,9 @@
### ”Agent type ’…’ not found” for one of your plugin’s agents
-By default each case runs both with your plugin and without it, and the runs without it are the no-plugin baseline. When Claude dispatches one of your plugin’s agents in a baseline run, the Agent tool call fails with `Agent type '<plugin>:<agent-name>' not found. Available agents: ...`. The list names only agents that exist without the plugin, such as the [built-in subagents](</docs/en/sub-agents#built-in-subagents>). The error is expected, since `Δ` compares your plugin’s runs against the baseline. In the JSON result, the baseline runs are under `cases[].arms.without`. In runs with your plugin loaded, a case that lists `Agent` in `allowed_tools` can dispatch one of your plugin’s agents by its namespaced name, such as `my-plugin:code-reviewer` for the `code-reviewer` agent in a plugin named `my-plugin`. To skip the baseline runs, pass `--ablation none`.
+By default each case runs both with your plugin and without it, and the runs without it are the no-plugin baseline. When Claude dispatches one of your plugin’s agents in a baseline run, the Agent tool call fails with `Agent type '<plugin>:<agent-name>' not found. Available agents: ...`. The list names only agents that exist without the plugin, such as the [built-in subagents](</docs/en/sub-agents#built-in-subagents>). The error is expected, since `Δ` compares your plugin’s runs against the baseline. In the JSON result, the baseline runs are under `cases[].arms.without`.
+
+In runs with your plugin loaded, Claude can dispatch one of your plugin’s agents by its namespaced name, such as `my-plugin:code-reviewer` for the `code-reviewer` agent in a plugin named `my-plugin`. To skip the baseline runs, pass `--ablation none`.
### Everything scores zero although the right files were produced
--- a/pr-steward-setup.md
+++ b/pr-steward-setup.md
@@ -139,11 +139,11 @@
### Choose the environment PR Steward runs in
-To add a setup script, environment variables, or different network access, use an [organization-shared environment](</docs/en/cloud-environments#organization-shared-environments>). On the **Claude Ship** page, select a **Default environment** under **Where it runs**. To override it for one repository, click **Change** beside **Environment** in the **Edit** dialog. With neither set, PR Steward can use your organization’s [default environment](</docs/en/cloud-environments#the-default-environment>). Without one, it runs in an Anthropic-hosted environment with no setup script and no environment variables.
+To add a setup script, environment variables, or different network access, use an [organization-shared environment](</docs/en/cloud-environments#organization-shared-environments>). On the **Claude Ship** page, select a **Default environment** under **Where it runs**. To override it for one repository, click **Change** beside **Environment** in the **Edit** dialog. With neither set, PR Steward can use your organization’s [default environment](</docs/en/cloud-environments#the-default-environment>). If that default is self-hosted, select it or another environment for PR Steward under **Where it runs**. Until you do, pull requests can get a [comment that PR Steward hasn’t started](</docs/en/pr-steward-troubleshooting#pr-steward-posted-a-comment-that-says-why>). If your organization has no default, PR Steward runs in an Anthropic-hosted environment with no setup script and no environment variables.
### Run PR Steward in a self-hosted environment
-For the environment that PR Steward runs in, you can select a [self-hosted environment](</docs/en/self-hosted-environments>). The [limits on approvals and merges](</docs/en/pr-steward-security#limits-on-approvals-and-merges>) are described for Anthropic-hosted sessions only. On a runner without [Anthropic-managed git](</docs/en/self-hosted-environments-deploy#use-the-anthropic-git-proxy>), PR Steward pushes with the runner’s own git credentials.
+For the environment that PR Steward runs in, you can select a [self-hosted environment](</docs/en/self-hosted-environments>). Its runners need Claude Code v2.1.317 or later. The [limits on approvals and merges](</docs/en/pr-steward-security#limits-on-approvals-and-merges>) are described for Anthropic-hosted sessions only. On a runner without [Anthropic-managed git](</docs/en/self-hosted-environments-deploy#use-the-anthropic-git-proxy>), PR Steward pushes with the runner’s own git credentials.
In a self-hosted environment, Claude can reach GitHub directly with [any GitHub credential that a session can read](</docs/en/self-hosted-environments-deploy#harden-your-deployment>). Anthropic’s service can’t refuse an approval that’s made that way. GitHub can count it toward the approvals that you require.
--- a/pr-steward-troubleshooting.md
+++ b/pr-steward-troubleshooting.md
@@ -53,6 +53,9 @@
`PR Steward didn't start: only someone with write access`| Have a person with write access add the `claude-pr-steward-watching` label or comment `@claude steward`
`PR Steward hasn't started: your organization has no extra usage available`| Ask an Owner to add usage credits or raise the spend limit in [**Organization settings > Usage**](<https://claude.ai/admin-settings/usage>). If you asked PR Steward to start, it then starts when you ask again. Otherwise, it starts at the next push
`PR Steward hasn't started: billing for PR Steward isn't set up`| Ask an Owner to pick a repository where PR Steward is on and [change its **Steward** setting](</docs/en/pr-steward-setup#choose-when-pr-steward-starts-in-each-repository>) to another option than **Off**. They can change it back straight away
+`PR Steward hasn't started: your Claude organization hasn't picked where it runs yet`| Ask an Owner to [select an environment for PR Steward](</docs/en/pr-steward-setup#choose-the-environment-pr-steward-runs-in>), then comment `@claude steward`
+`PR Steward hasn't started: it can't use the environment that your Claude organization picked for it`| Ask an Owner to [select another environment for PR Steward](</docs/en/pr-steward-setup#choose-the-environment-pr-steward-runs-in>), then comment `@claude steward`
+`PR Steward hasn't started: the self-hosted runners it would run on need Claude Code 2.1.317 or newer`| Ask whoever runs your [self-hosted environment](</docs/en/pr-steward-setup#run-pr-steward-in-a-self-hosted-environment>) to [update its runners](</docs/en/self-hosted-environments-deploy#pin-the-version>), then comment `@claude steward`
`Claude PR Steward couldn't start, so it isn't watching this pull request`| Add the label or comment `@claude steward` to try again
`Claude PR Steward couldn't start on this pull request because the setup script`| Ask someone who can edit the [environment that PR Steward runs in](</docs/en/pr-steward-setup#choose-the-environment-pr-steward-runs-in>) to fix its setup script, then start PR Steward again
`this repository has PR Steward enabled in more than one Claude workspace`| Ask the Owners to keep the repository in one Claude organization and remove it from the others
--- a/prompt-caching.md
+++ b/prompt-caching.md
@@ -50,7 +50,11 @@
### Switching models
-Each model has its own cache. Switching with [`/model`](</docs/en/model-config#setting-your-model>) means the next request reads the entire conversation history with no cache hits, even though the content is identical. When you run `/model` at the terminal, Claude Code asks you to confirm the switch only while the cache is still warm and the new model isn’t the one that produced the last response. The cache stays warm for one cache TTL after Claude Code last sent a request in this conversation or Claude last responded. Once that time passes, the cache has expired, so Claude Code switches without asking. Before v2.1.238, Claude Code didn’t check the cache TTL and asked even after the cache had expired. You can also require this confirmation or skip it with a [PreModelSwitch hook](</docs/en/hooks#premodelswitch-decision-control>). The [`opusplan` model setting](</docs/en/model-config#opusplan-model-setting>) resolves to Opus during plan mode and Sonnet during execution, so each plan-mode toggle is a model switch and starts a fresh cache. [Automatic model fallback](</docs/en/model-config#automatic-model-fallback>) on Fable models, Opus 5.5, Sonnet 5.5, and Opus 5 is also a model switch. When a safety classifier flags a request in a category that has a fallback model and Claude Code re-runs the request on that model, the session continues there. When a skill or command’s frontmatter names a [`model`](</docs/en/skills#frontmatter-reference>) other than the session’s current model, that turn is also a model switch: the next request reads the entire conversation history with no cache hits. The session model resumes on your next prompt. A `context: fork` skill sets the [forked subagent’s model](</docs/en/skills#run-skills-in-a-subagent>) instead.
+Each model has its own cache. Switching with [`/model`](</docs/en/model-config#setting-your-model>) means the next request reads the entire conversation history with no cache hits, even though the content is identical. When you run `/model` at the terminal, Claude Code asks you to confirm the switch only while the cache is still warm and the new model isn’t the one that produced the last response. The cache stays warm for one cache TTL after Claude Code last sent a request in this conversation or Claude last responded. Once that time passes, the cache has expired, so Claude Code switches without asking. Before v2.1.238, Claude Code didn’t check the cache TTL and asked even after the cache had expired. You can also require this confirmation or skip it with a [PreModelSwitch hook](</docs/en/hooks#premodelswitch-decision-control>). The [`opusplan` model setting](</docs/en/model-config#opusplan-model-setting>) resolves to Opus during plan mode and Sonnet during execution, so each plan-mode toggle is a model switch and starts a fresh cache. [Automatic model fallback](</docs/en/model-config#automatic-model-fallback>) on Fable models, Opus 5.5, Sonnet 5.5, and Opus 5 is also a model switch. When a safety classifier flags a request in a category that has a fallback model and Claude Code re-runs the request on that model, the session continues there.
+
+#### Skills and commands that set a model
+
+When a skill or command’s [`model` value applies](</docs/en/skills#frontmatter-reference>) and differs from the session’s current model, that turn is a model switch. The next request reads the entire conversation history with no cache hits. The session model resumes on your next prompt. With `context: fork`, the value goes to a [subagent](</docs/en/skills#run-skills-in-a-subagent>) with its own cache instead.
### Changing effort level
@@ -174,7 +178,7 @@
### Invoking skills and commands
-[Skills](</docs/en/skills>) and [commands](</docs/en/commands>) inject their instructions as user messages at the point of invocation. Nothing earlier in the conversation changes. A skill or command whose frontmatter names a `model` can be a model switch for that turn.
+[Skills](</docs/en/skills>) and [commands](</docs/en/commands>) inject their instructions as user messages at the point of invocation. Nothing earlier in the conversation changes. A skill or command whose [`model` value applies](</docs/en/skills#frontmatter-reference>) can be a model switch for that turn.
### Running `/recap`
--- a/publish.md
+++ b/publish.md
@@ -128,7 +128,7 @@
Confirm you can submit
-Submitting requires a paid claude.ai plan. On Pro, Max, and Ultra you submit from your own account. On Team and Enterprise, an Owner can submit, and on Enterprise an Owner can also grant the **Directory** permission to other members through a custom role under **Organization settings > Roles**. See [Confirm you can submit to the directory](<https://claude.com/docs/directory/publish#confirm-you-can-submit-to-the-directory>).
+Submitting requires a paid claude.ai plan. On Pro, Max, and Ultra you submit from your own account. On Team and Enterprise, an Owner can submit, and on Enterprise an Owner can also grant the **Directory** permission to other members through a custom role under [**Organization settings > Roles**](<https://claude.ai/admin-settings/roles>). See [Confirm you can submit to the directory](<https://claude.com/docs/directory/publish#confirm-you-can-submit-to-the-directory>).
2
--- a/python.md
+++ b/python.md
@@ -2432,6 +2432,7 @@
"taskId": str, # ID of the background monitor task
"timeoutMs": int, # The watch's effective deadline in milliseconds
"persistent": bool | None, # False: every watch has a deadline
+ "keptInSandboxByCheck": bool | None,
}
### Edit
Show diff (131 lines)
--- a/reference.md
+++ b/reference.md
@@ -23,7 +23,7 @@
Argument| What it is
---|---
[`$`](</docs/en/plugins/mods/events#how-a-hook-handles-an-event>)| The mods API: every method in mods API methods. Write each call in full, namespace then method, as in `$.fs.read('notes.md')`.
-[`e`](</docs/en/plugins/mods/events#how-a-hook-handles-an-event>)| The event’s input, as deeply frozen plain data. To change it, pass a copy to `next`.
+[`e`](</docs/en/plugins/mods/events#how-a-hook-handles-an-event>)| The event’s input. To change it, pass a copy to `next`.
[`next(e)`](</docs/en/plugins/mods/events#how-a-hook-handles-an-event>)| The next handler, as in middleware. Runs the hooks after this one, then Claude Code’s behavior. Resolves to the event’s result.
[`next.signal`](</docs/en/plugins/mods/api#stop-background-work>)| An `AbortSignal` that aborts when the event is abandoned
`next.origin`| `{ plugin, tier }` of whoever fired the event. Claude Code itself is `{ plugin: 'engine', tier: 'core' }`. A mod’s `tier` is its priority group in the [order mods run in](</docs/en/plugins/mods/events#the-order-mods-run-in>): `prepend`, `user`, `append`, or `builtin`.
@@ -47,6 +47,7 @@
`tool.judge`| [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) is about to ask its classifier about a call. Requires Claude Code v2.1.326 or later.| `next(e)` or `{ decision }`
`tool.run`| An allowed call is about to run. Requires Claude Code v2.1.326 or later.| `next(e)`, `{ deny: reason }`, or `{ result }`
`tool.describe`| Once for each tool, when its description is first sent to Claude. A second time for an MCP tool when Claude loads it through [tool search](</docs/en/mcp#scale-with-mcp-tool-search>), with `e.description` set to the text Claude reads for the loaded tool.| `{ description }`, optionally with `isDeferred` set to `true` to put the tool behind tool search or `false` to load it upfront. Add `breakPromptCache: true` to send a changed description on the next turn.
+`tool.offer`| Claude Code builds Claude’s tool list, and again when Claude calls a tool. Requires Claude Code v2.1.328 or later.| `next(e)`, or `{ isOffered: false }` to withhold the tool from Claude. See Send a changed tool list.
#### Agent and organization fields on `tool.check`
@@ -97,6 +98,10 @@
To change a section or a tool description in a running conversation, call `$.ui.invalidate('prompt.section')` or `$.ui.invalidate('tool.describe')` so your hook runs again. Return `{ text, breakPromptCache: true }` or `{ description, breakPromptCache: true }` from it. Without the field, Claude keeps reading the text [saved with the conversation](</docs/en/cli-reference#system-prompt-flags-in-resumed-conversations>) for a section or a tool loaded upfront until a new conversation or a [compaction](</docs/en/prompt-caching#compacting-the-conversation>). The changed text reaches Claude on the next turn, and the [prompt cache](</docs/en/prompt-caching>) starts over, so that turn is slower and more expensive. The field requires Claude Code v2.1.321 or later. From v2.1.299 until v2.1.321, a running conversation got the changed text on the next turn.
+#### Send a changed tool list
+
+To change the main conversation’s tool list, call `$.ui.invalidate('tool.offer')` and return `{ isOffered, breakPromptCache: true }` from your `tool.offer` hook. The [prompt cache](</docs/en/prompt-caching>) then starts over. Requires Claude Code v2.1.331 or later.
+
### Commands and configuration
Event| Fires when| A hook can return
@@ -120,7 +125,7 @@
---|---|---
[`turn.start`](</docs/en/plugins/mods/events#follow-a-turn>)| A turn begins| `next(e)`
[`turn.step`](</docs/en/plugins/mods/events#follow-a-turn>)| One request is about to go to the model| `yield* next(e)`, or `next({ ...e, model })`, `next({ ...e, effort })`
-[`turn.complete`](</docs/en/plugins/mods/events#follow-a-turn>)| A turn ended| `next(e)`, or `{ text }` to show a line under the answer
+[`turn.complete`](</docs/en/plugins/mods/events#follow-a-turn>)| A turn ended| `next(e)`, or `{ text }` to show a line under the main conversation’s answer
### Session
@@ -159,6 +164,7 @@
[`ui.render`](</docs/en/plugins/mods/interface#pick-where-to-draw>)| A render site is about to be drawn
`ui.resolve`| Mods load, once for each app, render site, and mod. The result is the element table that `$.ui.resolve(e)` reads.
[`ui.press`](</docs/en/plugins/mods/interface#respond-to-presses-and-typing>), [`ui.input`](</docs/en/plugins/mods/interface#respond-to-presses-and-typing>), [`ui.select`](</docs/en/plugins/mods/interface#respond-to-presses-and-typing>)| A `Button`, `Input`, or `Select` a mod drew is used
+[`ui.pointer`](</docs/en/plugins/mods/interface#animate-a-backdrop-with-a-shader>)| The user clicks a part of your mod’s backdrop that the app doesn’t cover. Requires Claude Code v2.1.326 or later.
`ui.focus`, `ui.scroll`| The focused control or the scroll position of a pane or the band is about to change
`ui.close`| A pane is about to close. `e.id` is the pane and `e.origin.kind` is `plugin`, `person`, or `unload`.
[`ui.message`](</docs/en/plugins/mods/interface#build-a-tree-from-elements>)| A `Client` element posts data to its mod
@@ -210,17 +216,17 @@
---|---
`$.plugin`| `name`, `root`: this plugin’s name and directory
[`$.ui`](</docs/en/plugins/mods/interface#pick-where-to-draw>)| `resolve`, `invalidate`, `open`, `close`, `panes`, [`place`](</docs/en/plugins/mods/interface#place-a-row-in-the-transcript>), `focus`, `scroll`, `toast`, `notify`, `status`, `log`, `notice`, `ask`, `copy`, `selection`, `blit`, `view`. `view` requires Claude Code v2.1.300 or later and `place` v2.1.314 or later.
-[`$.theme`](</docs/en/plugins/mods/interface#put-a-backdrop-behind-the-conversation>)| `set`, `clear`: set a backdrop for the Desktop or mobile app to draw, and take the backdrop off. Requires Claude Code v2.1.319 or later.
+[`$.theme`](</docs/en/plugins/mods/interface#put-a-backdrop-behind-the-conversation>)| `set`, `clear`: set a backdrop for the Desktop or mobile app to draw, and take the backdrop off. Requires Claude Code v2.1.319 or later. [Message styles](</docs/en/plugins/mods/interface#style-messages-in-the-desktop-app>) and [sound](</docs/en/plugins/mods/interface#add-sound-to-a-theme>) require v2.1.329 or later.
[`$.command`](</docs/en/plugins/mods/api#add-a-command>)| `register`, `run`, `list`
[`$.tool`](</docs/en/plugins/mods/api#add-a-tool>)| `register`, `call`, `check`, `list`
`$.agent`| `register`, `spawn`, `call`, `list`, `limits`. `call` and `limits` require Claude Code v2.1.326 or later. `list()` returns this session’s subagents and teammates, each with a `status` of `pending`, `running`, `waiting`, `idle`, `completed`, `failed`, or `killed`, where `idle` and `waiting` require Claude Code v2.1.289 or later.
[`$.model`](</docs/en/plugins/mods/api#call-a-model>)| `complete`, `fork`, `classify`
[`$.prompt`](</docs/en/plugins/mods/api#start-a-turn-from-a-background-job>)| `submit`, `read`, `fill`, `suggest`, `compose`. Claude reads text from `submit({ text })` after a sentence that names your mod as the sender. `submit({ text, asUser: true })` sends the text as the user’s own words, without that sentence.
`$.turn`| `abort`
-[`$.session`](</docs/en/plugins/mods/api#send-and-receive-messages-between-sessions>)| `messages`, `cwd`, `root`, `model`, `turns`, `id`, `repo`, `surfaces`, `usage`, `version`, `info`, `compact`, `send`, `append`, `authorize`. `info` requires Claude Code v2.1.326 or later. `usage()` returns `{ startedAt, context, rateLimits, cost }`: `context` has `tokens`, `window`, and `percent`, and `rateLimits` is a list of `{ kind, percentUsed, resetsAt }`.
+[`$.session`](</docs/en/plugins/mods/api#send-and-receive-messages-between-sessions>)| `messages`, `cwd`, `root`, `model`, `turns`, `id`, `repo`, `surfaces`, `usage`, `version`, `info`, `compact`, `send`, `append`, `authorize`, `redact`. `info` requires Claude Code v2.1.326 or later. `redact`, a best-effort mask for credentials only, requires v2.1.331 or later. `usage()` returns `{ startedAt, context, rateLimits, cost }`: `context` has `tokens`, `window`, and `percent`, and `rateLimits` is a list of `{ kind, percentUsed, resetsAt }`.
`$.config`| `list`, `set`
[`$.settings`](</docs/en/plugins/mods/api#reach-files-processes-and-the-network>)| `read`
-[`$.env`](</docs/en/plugins/mods/api#reach-files-processes-and-the-network>)| `get`, `set`
+[`$.env`](</docs/en/plugins/mods/api#reach-files-processes-and-the-network>)| `get`, `set`. A refused `set` either rejects or resolves to `{ deny }`. The `{ deny }` result requires Claude Code v2.1.301 or later.
[`$.fs`](</docs/en/plugins/mods/api#reach-files-processes-and-the-network>)| `read`, `write`, `list`, `exists`, `stat`, `ancestors`. `write` isn’t atomic: it replaces the file’s content in place, so another process can read a partly written file. Keep data that several sessions change in `$.store`.
[`$.store`](</docs/en/plugins/mods/interface#keep-state>)| `get`, `set`, `delete`, `keys`. A key-value store that every session on the machine shares. See [Save from more than one session](</docs/en/plugins/mods/interface#save-from-more-than-one-session>).
[`$.state`](</docs/en/plugins/mods/interface#keep-a-value-in-$-state>)| Reactive state: `get`, `set`, with the helpers `atom`, `read`, `update`, `derive`, and `memberOf` imported from `claude-code`
@@ -232,6 +238,8 @@
`$.audio`| `play`, `speak`
`$.telemetry`| `log`, `mark`. A record is sent only when Claude Code or a built-in mod makes the call.
+In the terminal, `$.ui.view({ agentId })` shows an agent’s transcript and `$.ui.view({})` switches back. Call either from a command or button. A timer’s call resolves to `{ deny: 'not person-initiated' }`.
+
## Render sites
A render site is an extension point in Claude Code’s interface. Each row is a value of `e.component` in a `ui.render` hook, with the fields of `e.props` and the apps that render it. `e.surface` names the app that’s drawing, such as `terminal`, `desktop`, or `vscode`. [Change what Claude Code already draws](</docs/en/plugins/mods/interface#change-what-claude-code-already-draws>) shows what a hook can do at a site, with an example of each choice. Rendering in the VS Code extension requires extension version 2.1.299 or later. A session that [doesn’t fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>) needs 2.1.304 or later. [Draw in the VS Code extension](</docs/en/plugins/mods/interface#draw-in-the-vs-code-extension>) lists what the extension draws differently.
@@ -239,8 +247,11 @@
Site| `e.props`| `e.requestId`| Rendered on
---|---|---|---
[`Pane`](</docs/en/plugins/mods/interface#pick-where-to-draw>)| `title`, `isFocused`, `bodyColumns`, `placement`, `scroll`, `view`| The pane’s `id`| Terminal, Desktop, VS Code
-[`AbovePrompt`](</docs/en/plugins/mods/interface#pick-where-to-draw>)| `hasSurvey`, [`isCollapsed`](</docs/en/plugins/mods/interface#when-the-user-collapses-the-band>), `isWorking`, `maxRows`, `bodyColumns`, `scroll`, `view`| One instance| Terminal, Desktop
-`AbovePromptList`, the stack of `AbovePrompt` rows| `rows`, a list with one `{ plugin, tree }` for each mod’s row, plus the `AbovePrompt` props| One instance| Terminal, Desktop. Requires Claude Code v2.1.323 or later.
+[`AbovePrompt`](</docs/en/plugins/mods/interface#pick-where-to-draw>)| `hasSurvey`, [`isCollapsed`](</docs/en/plugins/mods/interface#when-the-user-collapses-the-band>), `isWorking`, `maxRows`, `bodyColumns`, `scroll`, `view`| One instance| Terminal, Desktop, VS Code
+`AbovePromptList`, the stack of `AbovePrompt` rows| `rows`, a list with one `{ plugin, tree }` for each mod’s row, plus the `AbovePrompt` props| One instance| Terminal, Desktop, VS Code. Requires Claude Code v2.1.323 or later.
+`BesidePrompt`, a cell to the right of the prompt| `maxColumns`, `floatRows`, `floatColumns`, `isWorking`, `view`| One instance| Terminal in [fullscreen rendering](</docs/en/fullscreen>), Desktop. Requires Claude Code v2.1.331 or later.
+`Underlay`, a layer visible only where the interface is blank| `columns`, `rows`, `isWorking`, `view`| `site:underlay`| Terminal in fullscreen rendering. Requires Claude Code v2.1.331 or later.
+`BesidePromptList` and `UnderlayList`, the order of the `BesidePrompt` cells and `Underlay` layers| `plugins`| One instance| The same apps as the site it orders. Requires Claude Code v2.1.331 or later.
[`Placed`](</docs/en/plugins/mods/interface#place-a-row-in-the-transcript>)| `id`, `plugin`, `onScreen`| The `requestId` that `$.ui.place` returned| Terminal
[`Backdrop`](</docs/en/plugins/mods/interface#put-a-backdrop-behind-the-conversation>)| `scene`, `plugin`, `glass`, `overrideColorScheme`. Before v2.1.323, `scene` was `id` and `overrideColorScheme` was `colorScheme`.| `backdrop`| `desktop` and `mobile` surfaces. Your hook runs when the Desktop or mobile app asks to draw a backdrop.
`UserMessage`| `text`, `origin`, `isExpanded`, and `task` or `from` by origin| The drawn row’s id| Terminal, Desktop, VS Code
@@ -279,6 +290,7 @@
[`Input`](</docs/en/plugins/mods/interface#take-typed-input-and-draw-a-row-for-each-item>)| `key`, `label`, `placeholder`, `value`, `submitLabel`, [`rows`](</docs/en/plugins/mods/gallery#input>), `onSubmit`, `onInput`, `autoFocus`| ✓| ✓| ✓
`Select`| `key`, `label`, `options`, `value`, `onSelect`, `autoFocus`| ✓| ✓| ✓
`Svg`| a `source` of SVG markup up to 131,072 characters, `alt` text, `width`, `height`, and `isInteractive`| | ✓| ✓
+[`Shader`](</docs/en/plugins/mods/interface#animate-a-backdrop-with-a-shader>)| `module`, `values`, and one `Svg` child. Draws in a `Backdrop` only. Requires Claude Code v2.1.326 or later.| | ✓|
[`Client`](</docs/en/plugins/mods/interface#build-a-tree-from-elements>)| `module`, `key`, `props`, `width`, `height`, `flexGrow`| ✓| ✓|
[`Raster`](</docs/en/plugins/mods/interface#draw-a-grid-of-colored-cells>)| `key`, `columns` up to 512, `rows` up to 256, `cells`. See [Draw a grid of colored cells](</docs/en/plugins/mods/interface#draw-a-grid-of-colored-cells>).| ✓| |
`Image`| `key`, a `source` such as PNG or RGBA bytes up to 2 MiB, or a file path, `columns` and `rows` up to 255, and `alt` text. See [which terminals draw it](</docs/en/plugins/mods/gallery#image-and-client>).| ✓| |
@@ -375,10 +387,12 @@
`$.model.complete` `maxTokens`| 1024 by default, up to 64,000 or the model’s output limit
`$.fs.read` and `$.fs.write`| 4 MiB for one file. On v2.1.326 or later, read a larger file in parts with `$.fs.read(path, { offset, length })`, both in bytes.
A `$.http.fetch` request body| 4 MiB, counted in characters. A call with a larger body rejects.
-A `$.http.fetch` response body| 4 MiB. `text` holds the first 4 MiB and the rest isn’t read. When the `Content-Length` header declares more, the call rejects instead, with a reason that ends `is over the 4194304-byte limit`, except when the last request after any redirects uses the `HEAD` method. The `HEAD` exemption requires Claude Code v2.1.296 or later.
+A `$.http.fetch` response body| 4 MiB. `text` holds the first 4 MiB and the rest isn’t read. When the `Content-Length` header declares more, the call rejects instead, with a reason that ends `is over the 4194304-byte limit`. The call ignores that header on a 204, 205, or 304 response, and when its last request after any redirects uses `HEAD`. The `HEAD` case requires Claude Code v2.1.296 or later, and the others v2.1.299 or later.
One `$.http.fetch` call, redirects and body included| 30 seconds
Redirects one `$.http.fetch` call follows| 5
A hook’s `drop` reason or `config.set` `deny` reason| 4,096 characters. The end of a longer reason is cut, and the drop or deny still applies. The cut requires Claude Code v2.1.292 or later, and on earlier versions the hook [fails](</docs/en/plugins/mods/events#handle-a-hook-that-fails>) instead.
+All mods’ elements [above the question dialog](</docs/en/plugins/mods/interface#change-what-claude-code-already-draws>)| 12 rows in the terminal and 48 in the Desktop app or the VS Code extension, counted at a 40-column width. Over the limit, the dialog appears without your elements.
+A call to a method another mod added in `engine.create`| 10 seconds. After that, the call rejects with a reason that ends `did not answer within 10000ms`.
Text in one tree| The first 100,000 characters are drawn
A `Code`’s `language` or `path`, a `Select` option’s `value`, or a `Client`’s `module`| 10,000 characters. If one is longer, the `ui.render` hook that returned it [fails](</docs/en/plugins/mods/events#handle-a-hook-that-fails>).
A `Link`’s `href`| 2,048 characters. If it’s longer, the `ui.render` hook that returned it [fails](</docs/en/plugins/mods/events#handle-a-hook-that-fails>).
@@ -390,7 +404,10 @@
PNG or RGBA bytes of all the `Image`s in one tree| 2 MiB
`$.store`| 4 MiB of JSON in total
`$.session.messages()`| The newest 4,096 entries
+Text passed to `$.session.redact`| 100,000 characters. A call with longer text rejects.
`$.ui.invalidate('ui.render')` redraws| Throttled to 10 a second, or 30 in the terminal for the visible pane, the expanded band, and the hint line under the prompt. Calls that come sooner are coalesced.
+[`ui.pointer`](</docs/en/plugins/mods/interface#animate-a-backdrop-with-a-shader>) clicks| Two a second. The app drops the rest.
+A [`Shader`](</docs/en/plugins/mods/interface#animate-a-backdrop-with-a-shader>)’s `values`| Eight numbers
`$.ui.toast`| Shown for 4 seconds unless you pass `{ timeoutMs }`. In the [classic renderer](</docs/en/fullscreen#enable-fullscreen-rendering>), a mod’s newer toast can [take the place of its older one](</docs/en/plugins/mods/troubleshoot#a-toast-doesn%E2%80%99t-appear>) that’s showing or waiting to show.
A pane opened without the user asking| Placed from 144 terminal columns, 110 after they’ve opened it once
Rows from `$.ui.place` that one mod has in a conversation at one time| 500\. At the limit, a call with a new `id` resolves to `{ isPlaced: false, reason: 'a plugin holds at most 500 placed rows' }`.
@@ -428,5 +445,5 @@
[`/plugin`](</docs/en/plugins/mods/overview#see-which-mods-a-session-loaded>)| Shows a line such as `1 mod active · first-mod` under its tabs when a mod that isn’t built in has loaded
[`claude plugin validate <directory>`](</docs/en/plugins/mods/create#check-what-claude-code-reads-from-your-mod>)| Reads a plugin’s manifest and hooks module and reports errors, the events it handles, and the mods API calls it makes. `--strict` treats warnings as errors and `--json` prints a machine-readable report.
[`claude plugin test [directory]`](</docs/en/plugins/mods/test#write-a-test>)| Runs every file under the directory, or the current directory when you give none, whose name ends in `.test.ts` or `.test.tsx`. Exits with status 1 when a test fails.
-[`claude --plugin-dir <directory>`](</docs/en/plugins/mods/create#write-a-mod-yourself>)| Loads a plugin directory for one session and reloads its hooks module when you save. Repeat the flag to load several.
+[`claude --plugin-dir <directory>`](</docs/en/plugins/mods/create#write-a-mod-yourself>)| Loads a plugin directory for one session. In an interactive terminal session, reloads the hooks module when you save. Repeat the flag to load several.
`/reload-plugins`| Reloads plugins when you run it
--- a/remote-control.md
+++ b/remote-control.md
@@ -247,7 +247,6 @@
[Dispatch](</docs/en/desktop#sessions-from-dispatch>)| Message a task from the Claude mobile app| Your machine (Desktop)| [Pair the mobile app with Desktop](<https://support.claude.com/en/articles/13947068>)| Delegating work while you’re away, minimal setup
[Remote Control](</docs/en/remote-control>)| Drive a running session from [claude.ai/code](<https://claude.ai/code>) or the Claude mobile app| Your machine (CLI, Desktop, or VS Code)| Run [`claude remote-control` or `/remote-control`](</docs/en/remote-control#start-a-remote-control-session>)| Steering in-progress work from another device
[Channels](</docs/en/channels>)| Push events from a chat app like Telegram or Discord, or your own server| Your machine (CLI)| [Install a channel plugin](</docs/en/channels#quickstart>) or [build your own](</docs/en/channels-reference>)| Reacting to external events like CI failures or chat messages
-[Slack](</docs/en/slack>)| Mention `@Claude` in a team channel| Anthropic cloud| [Install the Slack app](</docs/en/slack#setting-up-claude-code-in-slack>) with [Claude Code on the web](</docs/en/claude-code-on-the-web>) enabled, on Pro, Max, and Ultra plans| PRs and reviews from team chat
[Self-hosted environments](</docs/en/self-hosted-environments>)| Start a [cloud session](</docs/en/claude-code-on-the-web>) and pick your organization’s environment| Your organization’s infrastructure| [Deploy runners](</docs/en/self-hosted-environments-quickstart>), on Team and Enterprise plans| Cloud sessions that must run inside your network
[Scheduled tasks](</docs/en/scheduled-tasks>)| Set a schedule| [CLI](</docs/en/scheduled-tasks>), [Desktop](</docs/en/desktop-scheduled-tasks>), or [cloud](</docs/en/routines>)| Pick a frequency| Recurring automation like daily reviews
--- a/routines.md
+++ b/routines.md
@@ -23,7 +23,7 @@
* **Backlog maintenance** : a schedule trigger runs every weeknight in your repository, with your issue tracker added as a connector. The scheduled task reads issues opened since the last run, applies labels, and assigns owners based on the area of code referenced. It then posts a summary to Slack so the team starts the day with a groomed queue.
* **Alert triage** : your monitoring tool calls the scheduled task’s API endpoint when an error threshold is crossed, passing the alert body as `text`. The task’s prompt tells Claude to investigate the alert in the fire payload, so it pulls the stack trace and correlates it with recent commits in the repository. It then opens a draft pull request with a proposed fix and a link back to the alert. On-call reviews the PR instead of starting from a blank terminal.
- * **Bespoke code review** : a GitHub trigger runs on `pull_request.opened`. The scheduled task applies your team’s own review checklist and leaves inline comments for security, performance, and style issues. It also adds a summary comment so human reviewers can focus on design instead of mechanical checks.
+ * **Bespoke code review** : a GitHub trigger runs on `pull_request.opened`. The scheduled task applies your own review checklist and leaves inline comments for security, performance, and style issues. It also adds a summary comment so human reviewers can focus on design instead of mechanical checks.
* **Deploy verification** : your CD pipeline calls the scheduled task’s API endpoint after each production deploy. The task runs smoke checks against the new build, scans error logs for regressions, and posts a go or no-go to the release channel before the deploy window closes.
* **Docs drift** : a schedule trigger runs weekly. The scheduled task scans merged PRs since the last run, flags documentation that references changed APIs, and opens update PRs against the docs repository for an editor to review.
* **Library port** : a GitHub trigger runs on `pull_request.closed` filtered to merged PRs in one SDK repository. The scheduled task ports the change to a parallel SDK in another language and opens a matching PR, keeping the two libraries in step without a human re-implementing each change.
@@ -300,7 +300,7 @@
* **Failed** : the session didn’t finish normally. For example, it stopped unexpectedly, ended on an error, or was archived before the run started
* **Cancelled** : the run didn’t fail, and its session was archived. If you archive the session of a run that succeeded, the run changes to **Cancelled**. Nothing in the task needs to change
-If a warning appears under **History** , see “The last run” warnings.
+If a warning appears under **History** , see Warnings under History.
### Edit and control scheduled tasks
@@ -440,14 +440,14 @@
Cloud scheduled tasks are off for your organization, and you can’t change that from your local configuration. Ask your Team or Enterprise Owner whether they can turn on the **Scheduled tasks (Was Routines)** or **Routines** toggle at [**Organization settings > Capabilities > Remote sessions**](<https://claude.ai/admin-settings/capabilities>).
-### “The last run” warnings
-
-When a warning under **History** begins with “The last run”, find it in the first column and do what its row says. The warning clears once a later run starts.
+### Warnings under History
+
+When a warning under **History** begins with “The last run” or “This didn’t run”, find it in the first column and do what its row says. The warning clears once a later run starts.
Warning| What to do
---|---
-”The last run didn’t start because your organization had reached its limit on cloud sessions running at once.”| The task needs no change. Click **Run now** later, or wait for the next run
-”The last run didn’t start because its cloud environment couldn’t be found or used.”| On the task’s detail page, open the menu next to its name, select **Edit** , and find the cloud environment selector. If it reads **Unavailable environment** , that environment was archived or is no longer available to your account, so choose another one there and save your changes. Otherwise, retry with **Run now** on the detail page, or pick another environment in the selector and save your changes
+”This didn’t run” followed by the run’s time, then “You were at the limit for tasks Claude can work on at the same time.” or “Your organization was at its limit for tasks Claude can work on at the same time.”| The task needs no change. Click **Run now** later, or wait for the next run
+”The last run didn’t start because its environment couldn’t be found or used.”| On the task’s detail page, open the menu next to its name, select **Edit** , and find the cloud environment selector. If it reads **Unavailable environment** , that environment was archived or is no longer available to your account, so choose another one there and save your changes. Otherwise, retry with **Run now** on the detail page, or pick another environment in the selector and save your changes
”The last run was blocked because it couldn’t access something it needs, or your organization’s policy doesn’t allow it.”| Check that your GitHub access covers the task’s repositories. If it does, ask an [Owner](</docs/en/server-managed-settings#access-control>) of your Claude organization whether a policy blocks the task
”The last run didn’t start because of a problem that’s usually temporary.”| Click **Run now** to try again, or wait for the next run
”The last run didn’t start because its repository or branch wasn’t available.”| Check on GitHub that each repository in the task has the branch the run starts from. Also check that your GitHub access covers each repository, and reconnect GitHub if your connection expired
--- a/scheduled-tasks.md
+++ b/scheduled-tasks.md
@@ -56,7 +56,7 @@
/loop check whether CI passed and address any review comments
-In a session where the [Monitor tool is available](</docs/en/tools-reference#monitor-tool>), Claude may use it directly when you ask for a dynamic `/loop` schedule. Monitor runs a background script and streams each output line back, which avoids polling altogether and is often more token-efficient and responsive than re-running a prompt on an interval. A dynamically scheduled loop appears in your scheduled task list like any other task, so you can list or cancel it the same way. The list shows its pending wakeup as a one-shot task, so a wakeup scheduled for `:00` or `:30` can run a little early. The seven-day expiry applies to the loop too.
+In a session where the [Monitor tool is available](</docs/en/tools-reference#monitor-tool>), Claude may use it directly when you ask for a dynamic `/loop` schedule. Monitor runs a background script and streams each output line back, which avoids polling altogether and is often more token-efficient and responsive than re-running a prompt on an interval. A dynamically scheduled loop appears in your scheduled task list, so you can ask Claude to list or cancel it. The list shows its pending wakeup as a one-shot task, so a wakeup scheduled for `:00` or `:30` can run a little early. The loop expires 30 days after it starts.
Dynamically chosen intervals and the built-in maintenance prompt work on every provider, and with [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) turned off. On Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, and Microsoft Foundry, or with fetching turned off, both require Claude Code v2.1.248 or later.
@@ -97,7 +97,7 @@
### Stop a loop
* **Self-paced loop** : while the loop is waiting for its next iteration, press `Esc` on an empty prompt to stop it. You can also stop it with `Ctrl+C` while Claude is idle, except in a background session you’ve attached to. A `Pending wakeup cancelled` notice confirms that the loop won’t fire again.
- * **Fixed-interval loop** : to stop a loop such as `/loop 5m`, ask Claude to cancel it, for example `cancel the deploy check loop`. `Esc` and `Ctrl+C` don’t stop it, or any task you scheduled by asking Claude directly. A loop you don’t cancel ends when seven days elapse.
+ * **Fixed-interval loop** : to stop a loop such as `/loop 5m`, ask Claude to cancel it, for example `cancel the deploy check loop`. `Esc` and `Ctrl+C` don’t stop it, or any task you scheduled by asking Claude directly. A loop you don’t cancel ends 30 days after you start it.
In self-paced mode, Claude can also end the loop on its own once the task is complete. Claude calls the [`ScheduleWakeup` tool](</docs/en/tools-reference>) with `stop: true`, which cancels the pending wakeup immediately. A self-paced loop can also stop when an iteration ends without Claude scheduling the next one. For one extra iteration about 20 minutes later, see [`CLAUDE_CODE_LOOP_KEEPALIVE`](</docs/en/env-vars#variables>).
@@ -164,9 +164,9 @@
A one-shot task scheduled for `:00` or `:30` runs up to 90 seconds early. Claude Code doesn’t shift a one-shot task scheduled for any other minute, so when the timing matters, schedule it off the hour and half hour: `3 9 * * *` instead of `0 9 * * *`.
-### Seven-day expiry
-
-Recurring tasks automatically expire 7 days after creation. The task fires one final time, then deletes itself. This bounds how long a forgotten loop can run. If you need a recurring task to last longer, cancel and recreate it before it expires, or use [cloud scheduled tasks](</docs/en/routines>) or [Desktop scheduled tasks](</docs/en/desktop-scheduled-tasks>) for durable scheduling.
+### Recurring task expiry
+
+Recurring tasks automatically expire 30 days after creation. The task fires one final time, then deletes itself. This bounds how long a forgotten loop can run. Before v2.1.330, the limit was 7 days, and recurring tasks created with `CronCreate` on those versions keep it. If you need a recurring task to last longer, cancel and recreate it before it expires, or use [cloud scheduled tasks](</docs/en/routines>) or [Desktop scheduled tasks](</docs/en/desktop-scheduled-tasks>) for durable scheduling.
## Cron expression reference
--- a/self-hosted-environments-configuration.md
+++ b/self-hosted-environments-configuration.md
@@ -641,19 +641,14 @@
# shellcheck disable=SC2086 # $base is either "" or "FETCH_HEAD", intentional word-split
unpushed=$(git -C "$d" rev-list HEAD --not $base --remotes=origin --count 2>/dev/null) || unpushed=0
if [ "$unpushed" -gt 0 ]; then
- branch=$(git -C "$d" symbolic-ref --short -q HEAD)
- if [ -n "$branch" ]; then
- # $branch is attacker-influenced — git-check-ref-format(1) allows `"`
- # in ref names. `\` is forbidden (rule 10) but escaped anyway as cheap
- # defense-in-depth.
- # Escape JSON metacharacters before interpolating into the hand-built
- # payload so a branch like x","continue":false can't inject keys into
- # the hook-output JSON the harness parses. $unpushed is safe — the
- # -gt guard above rejects anything that isn't a plain integer.
- branch_esc=$(printf '%s' "$branch" | sed 's/\\/\\\\/g; s/"/\\"/g')
- printf '{"decision":"block","reason":"There are %s unpushed commit(s) on branch '\''%s'\''. Please push these changes to the remote repository."}' "$unpushed" "$branch_esc"
+ # The branch name is not trusted text, so the message leaves it out.
+ # $unpushed is a count from git rev-list, or 0.
+ # With -q, symbolic-ref exits 1 on a detached HEAD.
+ git -C "$d" symbolic-ref -q HEAD >/dev/null 2>&1
+ if [ $? -eq 1 ]; then
+ printf '{"decision":"block","reason":"There are %s unpushed commit(s) on a detached HEAD. Please create a branch and push it to the remote repository."}' "$unpushed"
else
- printf '{"decision":"block","reason":"There are %s unpushed commit(s) on a detached HEAD. Please create a branch and push it to the remote repository."}' "$unpushed"
+ printf '{"decision":"block","reason":"There are %s unpushed commit(s) on the branch checked out in the project directory. Please push these changes to the remote repository."}' "$unpushed"
fi
exit 0
fi
@@ -678,12 +673,9 @@
### Replace an earlier copy of the Stop hook script
-Search your copy of `stop-hook-nudge.sh` for `GIT_OPTIONAL_LOCKS`. If it’s missing, you have an earlier copy. Replace it with the current script wherever you installed it, then restart the runners. Keep your Stop hook settings, except to raise `timeout` on a large checkout.
-
- * **When** : if your sessions run with the [Bash sandbox](</docs/en/sandboxing>) on, replace it now. Otherwise, replace it at your next image build or runner restart.
- * **What changes** : uncommitted files in a submodule no longer prompt Claude. A new commit in a submodule that `.gitmodules` marks `ignore = all` now does.
-
-Hooks run outside the Bash sandbox, so the current script’s git calls skip some git features that can start a program named in the checkout’s git settings. They don’t skip them all. Don’t count on the sandbox alone, and isolate sessions as [Harden your deployment](</docs/en/self-hosted-environments-deploy#harden-your-deployment>) describes.
+Search your copy of `stop-hook-nudge.sh` for the text `checked out in the project directory`. If it’s missing, you have an earlier copy. Replace it now with the current script wherever you installed it, then restart the runners. Keep your Stop hook settings, except to raise `timeout` on a large checkout. After you replace the script, the prompt about unpushed commits no longer includes the branch name. If your earlier copy prompted Claude about uncommitted files in a submodule, that prompt stops. For how the current script treats submodules, see Submodules and the Stop hook.
+
+Hooks run outside the [Bash sandbox](</docs/en/sandboxing>), so the current script’s git calls skip some git features that can start a program named in the checkout’s git settings. They don’t skip them all. Don’t count on the sandbox alone, and isolate sessions as [Harden your deployment](</docs/en/self-hosted-environments-deploy#harden-your-deployment>) describes.
## Permissions and tool approval
--- a/server-managed-settings.md
+++ b/server-managed-settings.md
@@ -1,6 +1,6 @@
Server-managed settings let organization Owners centrally configure Claude Code from [**Organization settings > Claude Code > Managed settings**](<https://claude.ai/admin-settings/claude-code>) in the claude.ai console. Claude Code clients fetch these settings automatically when users authenticate with an eligible credential on a platform where server-managed delivery is supported. See Platform availability for the credentials and platforms that qualify.
-Server-managed settings are available for [Claude for Teams](<https://claude.com/pricing?utm_source=claude_code&utm_medium=docs&utm_content=server_settings_teams#team-&-enterprise>) and [Claude for Enterprise](<https://anthropic.com/contact-sales?utm_source=claude_code&utm_medium=docs&utm_content=server_settings_enterprise>) customers.If you set your provider or gateway at claude.ai under **Organization settings > Desktop 3P**, follow the [Enterprise Admin Console guide](<https://claude.com/docs/third-party/claude-desktop/admin-console-claude-code>) instead.
+Server-managed settings are available for [Claude for Teams](<https://claude.com/pricing?utm_source=claude_code&utm_medium=docs&utm_content=server_settings_teams#team-&-enterprise>) and [Claude for Enterprise](<https://anthropic.com/contact-sales?utm_source=claude_code&utm_medium=docs&utm_content=server_settings_enterprise>) customers.If you set your provider or gateway at claude.ai under [**Organization settings > Desktop 3P**](<https://claude.ai/admin-settings/desktop-deployment>), follow the [Enterprise Admin Console guide](<https://claude.com/docs/third-party/claude-desktop/admin-console-claude-code>) instead.
## Requirements
--- a/settings.md
+++ b/settings.md
@@ -46,7 +46,7 @@
### Keep personal settings out of a repository
-To change a setting for yourself in one project without changing it for your teammates, save it in `.claude/settings.local.json` inside the project. Claude Code applies that file over the committed `.claude/settings.json`, so if your team’s file sets `"model": "claude-sonnet-5"` and you want Opus, put `"model": "claude-opus-5-5"` in your local file and only your sessions change. Claude Code also writes to this file, keeps it out of your commits, and applies its allow rules without the trust step:
+To change a setting for yourself in one project, save it in `.claude/settings.local.json` inside the project. Claude Code applies that file over the committed `.claude/settings.json`, so if the committed file sets `"model": "claude-sonnet-5"` and you want Opus, put `"model": "claude-opus-5-5"` in your local file and only your sessions change. Claude Code also writes to this file, keeps it out of your commits, and applies its allow rules without the trust step:
* **Claude Code writes it too.** When Claude asks permission to run a Bash command and you choose “Yes, and don’t ask again”, Claude Code saves that [permission approval](</docs/en/permissions#permission-system>) here as an `allow` rule.
* **You don’t need to gitignore it yourself, unless you created it by hand.** The first time Claude Code writes the file in a git repository that doesn’t already ignore it, it adds `**/.claude/settings.local.json` to your global git excludes file, so the file stays out of your commits in every repository. That file is `core.excludesFile` when your global git config sets it to an absolute or `~`-prefixed path; otherwise it’s `$XDG_CONFIG_HOME/git/ignore`, or `~/.config/git/ignore` when `XDG_CONFIG_HOME` is unset. If you created the file by hand and Claude Code hasn’t written to it yet, add it to `.gitignore` yourself.
@@ -164,7 +164,7 @@
1. **Managed settings** : settings your organization deploys, by a `managed-settings.json` file, an MDM policy, or [server-managed settings](</docs/en/server-managed-settings>) from the claude.ai console. Nothing in your own settings files or `--settings` overrides a managed key, and a flag such as `--model` picks only from the models your organization allows. A managed [`model`](</docs/en/settings-reference#model>) is a starting default, not a lock; the locks are [`availableModels`](</docs/en/settings-reference#availablemodels>) and [`deniedModels`](</docs/en/settings-reference#deniedmodels>). When your organization delivers more than one managed source, the rules for [precedence within the managed tier](</docs/en/managed-settings#precedence-within-the-managed-tier>) say what Claude Code reads from each.
2. **Command line** : JSON you pass with `--settings <file-or-json>` when you start `claude`, for that session only; see Change a setting for one session. A key you set there overrides the same key in your project and user settings files, and a key you leave out keeps its value from those files. Other flags, such as `--model`, set one thing for the session and aren’t part of this stack; a key’s entry on the [settings reference](</docs/en/settings-reference>) says which flags override it.
3. **Project local settings** (`.claude/settings.local.json`): your personal settings for this project.
- 4. **Shared project settings** (`.claude/settings.json`): settings your team checks into source control.
+ 4. **Shared project settings** (`.claude/settings.json`): settings checked into source control.
5. **User settings** (`~/.claude/settings.json`): your personal settings for every project.
Environment variables aren’t a level in this stack. When a behavior has both a shell variable and a settings key, which one applies is decided per pair, not by level: `ANTHROPIC_MODEL` exported in your shell applies over the `model` key from any file, while `ANTHROPIC_DEFAULT_MODEL` applies only when no file sets `model`. The [environment variables reference](</docs/en/env-vars#precedence>) says which keys have a pair and which one Claude Code reads first. An `env` block inside a settings file is an ordinary key and follows the levels above. For a few security-sensitive keys, Claude Code honors a stricter value from a lower level over a managed value; Exceptions to managed settings precedence lists them.
--- a/settings-example.md
+++ b/settings-example.md
@@ -174,7 +174,7 @@
"Read(./secrets/**)"
]
},
- // Before every Bash command, run a script in the repo that can block it
+ // Before every Bash tool call, run a script in the repo that can block it
"hooks": {
"PreToolUse": [
{
--- a/settings-reference.md
+++ b/settings-reference.md
@@ -7,7 +7,7 @@
Key| Description| Topic| Scope
---|---|---|---
`advisorModel`| Pick which model answers when Claude asks the [advisor tool](</docs/en/advisor>)| Model and responses| Any file
-`agent`| Start every session as a named [subagent](</docs/en/sub-agents>) with its prompt, tools, and model| Agents, sessions, and worktrees| Any file
+`agent`| Start sessions as a named [subagent](</docs/en/sub-agents>) with its prompt, tools, and model| Agents, sessions, and worktrees| Any file
`agentPushNotifEnabled`| Let Claude send a [push notification to your phone](</docs/en/remote-control#mobile-push-notifications>) when it decides to| Remote, desktop, and notifications| Any file
`allowAllClaudeAiMcps`| Load the [claude.ai connectors](</docs/en/mcp>) Claude Code fetches itself alongside a deployed [`managed-mcp.json`](</docs/en/managed-mcp#exclusive-control-with-managed-mcp-json>)| MCP| Managed
`allowClaudeInChromeWithManagedMcp`| Let the built-in [Claude in Chrome](</docs/en/chrome>) server run alongside a deployed [`managed-mcp.json`](</docs/en/managed-mcp#exclusive-control-with-managed-mcp-json>)| MCP| Managed
@@ -2387,7 +2387,7 @@
"fileCheckpointingEnabled": false
}
-In a `-p` run or an Agent SDK session, Claude Code ignores this key. The SDK turns checkpointing on with its `enableFileCheckpointing` option, and a bare `-p` run needs `CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING=true`. See [File checkpointing in the Agent SDK](</docs/en/agent-sdk/file-checkpointing>).
+In a `-p` run or an Agent SDK session, Claude Code ignores this key unless your organization’s [managed settings](</docs/en/managed-settings>) set it to `false`, and then checkpointing stays off. That exception requires Claude Code v2.1.331 or later. Without that `false`, turn checkpointing on with the SDK’s `enableFileCheckpointing` option, or with `CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING=true` in a bare `-p` run. See [File checkpointing in the Agent SDK](</docs/en/agent-sdk/file-checkpointing>).
### `idleCompaction`
--- a/share-sessions.md
+++ b/share-sessions.md
@@ -74,12 +74,12 @@
If recipients can’t open a link, check for these causes:
* **Visibility** : the session is **Private** , or the recipient isn’t signed in to claude.ai or is outside your organization on a **Team** link. Check who can open the link.
- * **Free plan** : the recipient is signed in on a Free account and lands on the upgrade page. Ask them to sign in with an account that has [cloud sessions](</docs/en/claude-code-on-the-web>).
* **Repository access** : the link requires repository access, and the recipient’s GitHub account can’t read the repository. Ask them to [connect an account](</docs/en/web-quickstart#connect-github>) that can.
* **Uploaded or non-GitHub code** : the link requires repository access, and the code was [uploaded](</docs/en/claude-code-on-the-web#send-local-repositories-without-github>) or is on a Git host such as GitLab or Bitbucket. Share from a session whose repository is on github.com and wasn’t uploaded.
* **Invalid link** : the share link may not match the address in your browser, and a **Public** link changes when you stop sharing and share again. Copy the current link from **Share** and send it.
* **Organization setting** : **Share cloud sessions** is off for the organization. Ask an Owner to turn it back on.
* **Upgraded plan** : you shared a **Public** link, then upgraded your plan to Team or Enterprise. The link follows the rules for Enterprise and Team accounts.
+ * **Downgraded plan** : you shared a **Public** link, then moved to the Free plan. [Upgrade](<https://claude.ai/upgrade>) to a Max, Ultra, or Pro plan, and the same link opens with no further step.
You can’t restore the link in these cases:
Show diff (157 lines)
--- a/ship-command.md
+++ b/ship-command.md
@@ -31,18 +31,18 @@
Install or update these tools:
* Claude Code v2.1.330 or later. If `/ship` is missing, see [/ship isn’t available in your session](</docs/en/ship-command-troubleshooting#%2Fship-isn%E2%80%99t-available-in-your-session>)
- * The [GitHub CLI](<https://cli.github.com>) 2.63 or later, signed in with `gh auth login`. With an older version, Claude can’t push fixes
- * git 2.38 or later, to merge new commits into your branch. With an older git, Claude leaves those merges to you
+ * For a repository on GitHub, the [GitHub CLI](<https://cli.github.com>) 2.63 or later, signed in with `gh auth login`. With an older version, no watch starts. Before v2.1.331, a watch starts and Claude can’t push fixes
+ * git 2.38 or later, to merge new commits into your branch. With an older git, Claude leaves those merges to you, and no watch starts on another host
Then get your change and your session ready:
- * **A finished change, for`/ship`**: have it in your local clone of a repository on GitHub. It can be uncommitted, committed on a branch other than the default branch, or already in an open pull request of yours. If the repository is hosted somewhere other than GitHub, `/ship` opens no pull request, and Claude reviews your change
+ * **A finished change, for`/ship`**: have it in your local clone of a repository on GitHub. It can be uncommitted, committed on a branch other than the default branch, or already in an open pull request of yours. If the repository is hosted somewhere other than GitHub, `/ship` opens no pull request. Claude reviews your change, and can then watch your branch. Before v2.1.331, no watch starts there
* **Only the files that you want in the pull request, for`/ship`**: `/ship` can commit all your uncommitted changes, new files included. In your shell, run `git status`. Delete each new file that you don’t want in the pull request, or stash the file with `git stash push -u -- <file>`
* **No secrets in those files, for`/ship`**: `/ship` looks for secrets by file name, such as `.env`, so look inside your files yourself. A deny rule such as `Read(./notes.txt)` doesn’t keep a file out of the commit
- * **An open pull request on GitHub, for`/steward`**: it has to be your own, with its branch checked out in your local clone
- * **Permission mode** : choose [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) if you want Claude to work on the pull request unattended. In most other permission modes, Claude waits at each prompt. In `bypassPermissions` mode, no watch starts
-
-On native Windows, [no watch starts](</docs/en/ship-command-troubleshooting#cases-where-no-watch-can-start>).
+ * **An open pull request on GitHub, for`/steward`**: it has to be your own, with its branch checked out in your local clone. On a host other than GitHub, see Watch a branch on another host
+ * **Permission mode** : choose [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) if you want Claude to work on the pull request unattended. In [Manual mode and `acceptEdits` mode](</docs/en/permission-modes#available-modes>), Claude waits at each prompt. In `bypassPermissions` mode, no watch starts. With v2.1.331 or later, `/ship` doesn’t start in plan mode
+
+On native Windows, [no watch starts](</docs/en/ship-command-troubleshooting#cases-where-no-watch-can-start>). In a [background session](</docs/en/agent-view>), [no watch starts](</docs/en/ship-command-troubleshooting#a-session-setting-blocks-a-watch>) either. Before v2.1.331, one can start there.
Run a watch only where you trust everyone who can merge to the base branch or push to your branch. Any of them can run programs on your computer with your credentials.
@@ -60,11 +60,13 @@
### What /ship commits and pushes
-In a repository on github.com that isn’t a fork, `/ship` can commit your uncommitted changes, push the branch, and open the pull request before the review. On the default branch, it commits on a new branch and switches your checkout to that branch. If your work is already committed on another branch, `/ship` pushes that branch and opens the pull request. `/ship` doesn’t commit your uncommitted changes in these cases. Take the first one that fits:
-
- * **A pull request is already open for the branch** : commit and push anything that you want in the pull request
- * **The repository is public** : if you’re on a branch other than the default branch and it has commits of its own, `/ship` pushes those and opens a pull request without your uncommitted changes. Otherwise, commit your work on a branch other than the default branch, then run `/ship` again
+In a repository on github.com that isn’t a fork, `/ship` can commit your uncommitted changes, push the branch, and open the pull request before the review. On the default branch, it commits on a new branch and switches your checkout to that branch. If your work is already committed on another branch, `/ship` pushes that branch and opens the pull request. `/ship` does something else in these cases. Take the first one that fits:
+
+ * **Someone else’s pull request is open for the branch** : `/ship` doesn’t commit or push your work, and no watch starts
* **An uncommitted file’s name suggests a secret, such as`.env`**: in a repository that isn’t public, `/ship` doesn’t commit or push anything. See [/ship committed or pushed nothing](</docs/en/ship-command-troubleshooting#%2Fship-committed-or-pushed-nothing>)
+ * **Your own pull request is already open for the branch** : `/ship` can commit your uncommitted changes, then push them and your unpushed commits onto it. [In some cases](</docs/en/ship-command-troubleshooting#your-pull-request-is-already-open>), such as a public repository or auto-merge turned on, it doesn’t commit your changes. If a watch then starts, your unpushed commits can go up with Claude’s next push. Before v2.1.331, `/ship` doesn’t commit or push here
+ * **The repository is public** : `/ship` doesn’t commit your uncommitted changes. If you’re on a branch other than the default branch and it has commits of its own, `/ship` pushes those and opens a pull request without your uncommitted changes. Otherwise, commit your work on a branch other than the default branch, then run `/ship` again
+ * **Your commits are on the default branch, with nothing uncommitted** : in a repository that isn’t public, `/ship` makes a new branch for them, pushes that branch, opens a pull request, and switches your checkout to the new branch. Before v2.1.331, `/ship` pushes nothing, so put the commits on a branch other than the default branch, then run `/ship` again
Open the pull request yourself, then run `/ship`, if you want any of these:
@@ -81,7 +83,7 @@
## What Claude does during a watch
-A watch is Claude’s ongoing work on your pull request, which starts after `/ship`’s review or when you type `/steward`. Claude uses your `gh` and `git` sign-ins, so its work on GitHub appears under your name. In auto mode, Claude takes these actions without asking:
+A watch is Claude’s ongoing work on your pull request, which starts after `/ship`’s review or when you type `/steward`. On a host other than GitHub, see Watch a branch on another host. Claude uses your `gh` and `git` sign-ins, so its work on GitHub appears under your name. In auto mode, on a GitHub pull request, Claude takes these actions without asking:
* Works on the review findings that it judges to be problems
* Can post one comment that sums up its review
@@ -90,11 +92,38 @@
* Works on failing checks, and re-runs failed ones
* Answers review comments, resolves threads, and re-requests reviews
-Claude reads comments from you and from people with write access. On github.com, it also reads comments from Claude’s bot. To have Claude read another bot’s comments, type `/steward +` and the bot’s name, as in `/steward +my-lint-bot`. When checks pass and comments are answered, Claude says so in the session. Merge the pull request yourself. What can merge depends on your permissions and your repository’s branch rules. See When a watch can lead to a merge.
+On GitHub, Claude reads comments from you and from people with write access. On github.com, it also reads comments from Claude’s bot. To have Claude read another bot’s comments, type `/steward +` and the bot’s name, as in `/steward +my-lint-bot`. When checks pass and comments are answered, Claude says so in the session. Merge the pull request yourself. What can merge depends on your permissions and your repository’s branch rules. See When a watch can lead to a merge.
+
+### Watch a branch on another host
+
+On a host other than GitHub, such as GitLab, Bitbucket, or Azure DevOps, Claude can watch your branch for up to seven days. The watch needs git 2.38 or later, and works without the GitHub CLI. `/ship` and `/steward` don’t commit, push, or open anything when they start. Before v2.1.331, `/ship` reviews your change there, and no watch starts. Commit your change first, then push your branch with an upstream from your shell:
+
+ git push -u origin <branch>
+
+On gitlab.com, bitbucket.org, or dev.azure.com, open your merge request or pull request next. Claude Code can then read its checks and comments with your git sign-in. Then type `/ship` at the Claude Code prompt, or `/steward` for a watch with no review first. With your git sign-in, Claude can take actions such as these, in auto mode without asking:
+
+ * Merge the base branch into yours to resolve a conflict
+ * Merge in other people’s pushes to your branch
+ * Push commits to your branch
+
+The watch gives Claude no command to reply to comments, re-run a check, or read CI logs there. To see what Claude may do there, type `/ship terms` at the prompt while the watch runs.
+
+#### Checks and comments on GitLab, Bitbucket, and Azure DevOps
+
+In a terminal session, Claude Code can read details such as your open merge request or pull request, its checks, and its comments. To do so, it asks git for the sign-in that git keeps for the remote that your branch pushes to. That sign-in goes to the API of gitlab.com, bitbucket.org, or dev.azure.com in `GET` requests. You aren’t asked first. A line such as this one appears before the first read, which can go out as soon as you run `/ship` or `/steward`:
+
+ Claude Code is about to read gitlab.com's web API with the sign-in that git keeps for it. It only reads.
+
+A watch that reads the host repeats these reads until it ends. To see whether they apply to your checkout, run `git remote -v` in your shell. They can happen only when the `(fetch)` line of the remote that your branch pushes to shows an `https` address on one of those hosts. To prevent them, switch the remote to SSH or deny the host in your settings before you run `/ship` or `/steward`. If a watch is running, type `/ship stop` first:
+
+ * Have the remote that your branch pushes to fetch over SSH, as in `git remote set-url origin git@gitlab.com:<group>/<project>.git` in your shell, with that remote’s name in place of `origin`. Then check that `git remote -v` shows no `https` address on its `(fetch)` line
+ * Add the host to [`sandbox.network.deniedDomains`](</docs/en/settings-reference#sandbox-network-denieddomains>). The `about to read` notice still appears, but Claude Code doesn’t ask git for the sign-in or call the web API. The watch’s own git commands, which Claude Code runs outside the [sandbox](</docs/en/sandboxing>), still contact the host with git’s sign-in. With the sandbox on, Claude also can’t fetch from or push to that host
+
+At the watch’s start, the host can refuse the sign-in, or show no open merge request or pull request of yours for the branch. The watch can then go on with git alone, and the lines at its start include `Claude can't see checks or comments on gitlab.com, so watch those yourself`. If you close yours without merging it, that watch continues, so type `/ship stop`.
### Keep working while a watch runs
-While a watch runs, keep the session open and [in the foreground](</docs/en/agent-view#send-the-session-to-the-background>), the computer awake, and your pull request’s branch checked out. Claude edits files in the same checkout as you.
+While a watch runs, keep the session open, the computer awake, and your pull request’s branch checked out. Before v2.1.331, also keep the session [in the foreground](</docs/en/agent-view#send-the-session-to-the-background>). Claude edits files in the same checkout as you.
* **To start your next change** : work in another folder, such as a second clone of the repository, and open another Claude Code session there
* **To push your own commits** : name the remote and branch, as in `git push origin <branch>`. If you change git’s settings, for example with `git push -u` or `git branch -u`, the watch ends
@@ -127,19 +156,20 @@
### What ends a watch
-After a watch ends, look for a line that starts `Stopped watching pull request`. [A watch stopped](</docs/en/ship-command-troubleshooting#a-watch-stopped>) lists reasons that it gives. The watch ends in cases such as these:
+After a watch ends, look for a line that starts `Stopped watching`. [A watch stopped](</docs/en/ship-command-troubleshooting#a-watch-stopped>) lists reasons that it gives. The watch ends in cases such as these:
Where| What ends the watch
---|---
-On the pull request| It’s merged or closed, [PR Steward](</docs/en/pr-steward>) labels it, or seven days pass
+On a GitHub pull request| It’s merged or closed, [PR Steward](</docs/en/pr-steward>) labels it, or seven days pass
+On another host| Your branch is gone from its remote or adds nothing to its base any more, or seven days pass. Where Claude Code reads your merge request or pull request, the watch also ends when it’s merged or closed. Otherwise, if you close it without merging it, the watch can go on
At the keyboard| You press `Esc` or `Ctrl+C` at the prompt or while Claude is working. One press can end the watch, with no confirmation
In your checkout| You check out another branch, or change git’s settings
-In the session| The session ends, you send it to the background, you start another watch or a `/loop` with a task, or you run `/clear`, `/resume`, or `/branch`
+In the session| The session ends, you start another watch or a `/loop` with a task, you run `/clear`, `/resume`, or `/branch`, or the session is in plan mode when Claude next checks the pull request. Before v2.1.331, a watch goes on in plan mode, and ends when you send the session to the background
After a failure| An error, a declined prompt, or a usage limit can end it early
### Stop or restart a watch
-To end a watch, type `/ship stop` at the Claude Code prompt in the session that runs it. If Claude is working when you type it, the watch ends when the current turn does, so what Claude pushes or posts in that turn still reaches the pull request. To stop the turn as well, press `Esc`. To start a watch again, type `/steward`.
+To end a watch, type `/ship stop` at the Claude Code prompt in the session that runs it. If Claude is working when you type it, the watch ends when the current turn does, so what Claude pushes or posts in that turn still reaches the pull request. To stop the turn as well, press `Esc`. To start a watch again, type `/steward`. On a host other than GitHub, add any base that you named, as in `/steward origin/main`.
## Decide where to run a watch
@@ -171,9 +201,9 @@
Case| What happens
---|---
-Auto-merge is on for the pull request| GitHub merges once the checks and reviews allow. What Claude does during the watch, such as pushing a fix, can bring that about. To turn it off, run `gh pr merge --disable-auto <number>` in your shell
+Auto-merge is on for the pull request| The host merges once the checks and reviews allow. What Claude does during the watch, such as pushing a fix, can bring that about. To turn it off on GitHub, run `gh pr merge --disable-auto <number>` in your shell
In a terminal session, you type a message while Claude is idle| Claude Code’s limits are off while Claude answers your message. They’re also off while Claude handles a background task’s result that arrives during that time. In auto mode, Claude may then be allowed to merge
-You send a session that you started in your terminal to the background during the review or the watch, for example by pressing `←`| The watch ends. Work under way can go on there without these limits. To end that work, [stop that session](</docs/en/agent-view#manage-sessions-from-the-shell>)
+Before v2.1.331, you send a session that you started in your terminal to the background during the review or the watch, for example by pressing `←`| The watch ends. Work under way can go on there without these limits. To end that work, [stop that session](</docs/en/agent-view#manage-sessions-from-the-shell>)
### Permission rules and hooks that apply to /ship and /steward
@@ -198,7 +228,7 @@
}
}
-To stop `/ship`’s own pushes, put a [deny rule](</docs/en/permissions#manage-permissions>) such as `Bash(git push *)` in managed settings. With that rule, no watch starts.
+You can also set [`CLAUDE_CODE_DISABLE_SHIP`](</docs/en/env-vars#variables>) to `1`, for example under `env` in managed settings. Requires Claude Code v2.1.331 or later. To stop `/ship`’s own pushes, put a [deny rule](</docs/en/permissions#manage-permissions>) such as `Bash(git push *)` in managed settings. With that rule, no watch starts.
## Arguments for /ship and /steward
@@ -207,10 +237,11 @@
You type| Commands| What it does
---|---|---
`low`, `medium`, `high`, `xhigh`, or `max`| `/ship`| Asks for a review at that effort level. The default is `high`
-`41`, or a pull request’s URL| `/ship`, `/steward`| Works on that pull request. For a watch, it has to be your own, with its branch checked out
-`+botname`| `/ship`, `/steward`| Also reads that bot’s comments. Repeat it when you start a watch again
+`41`, or a pull request’s URL| `/ship`, `/steward`| On GitHub, works on that pull request. For a watch, it has to be your own, with its branch checked out
+`+botname`| `/ship`, `/steward`| On GitHub, also reads that bot’s comments. Repeat it when you start a watch again
+`origin/main`, or another remote and branch| `/ship`, `/steward`| On a host other than GitHub, names the branch that your change goes into. Requires Claude Code v2.1.331 or later
`stop`| `/ship`, `/steward`| Ends the watch
-`terms`| `/ship`, `/steward`| Shows what Claude may do during a watch and what limits it
+`terms`| `/ship`, `/steward`| Shows what Claude may do during a watch and what limits it. On another host, type it while the watch runs
## Related resources
Show diff (209 lines)
--- a/ship-command-troubleshooting.md
+++ b/ship-command-troubleshooting.md
@@ -22,7 +22,8 @@
1. Run `claude update` in your shell, then quit and start `claude` again.
2. If `/ship` is still missing, quit and start `claude` once more, because a new feature [can take a second start](</docs/en/env-vars#first-session-after-an-install-or-upgrade>) to show.
3. Run `/status` at the Claude Code prompt. Its `Setting sources` line lists the settings that loaded. In each one that’s your own [settings file](</docs/en/settings#find-or-create-your-settings-files>), remove [`disableBundledSkills`](</docs/en/settings-reference#disablebundledskills>) and any `ship-local` entry under [`skillOverrides`](</docs/en/skills#override-skill-visibility-from-settings>). To change managed settings, ask your administrator.
- 4. Check whether your session [skips feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>), for example because `DISABLE_TELEMETRY` is set or you use a third-party provider. `/ship` isn’t available in those sessions.
+ 4. Check whether your session [skips feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>). On a third-party provider or in a Claude apps gateway session, `/ship` requires Claude Code v2.1.331 or later. In any other session, unset any variable that turns fetching off, such as `DISABLE_TELEMETRY`.
+ 5. Check whether [`CLAUDE_CODE_DISABLE_SHIP`](</docs/en/env-vars#variables>) is set, in your shell or under `env` in a settings file. Unset it, then quit and start `claude` again. The variable requires Claude Code v2.1.331 or later.
### A skillOverrides entry turns off /ship or /steward
@@ -37,8 +38,12 @@
`This session was started by another session`| Run it in a session that you started yourself
`Usage: /ship` or `Usage: /steward`| Check what you typed against [the arguments](</docs/en/ship-command#arguments-for-%2Fship-and-%2Fsteward>)
`Nothing started. /ship starts only from a line that you type`, or the same for `/steward`| Type the command yourself at the Claude Code prompt. It doesn’t start from `claude -p` or from a program
-`/ship didn't start:` or `/steward didn't start:`| The rest of the message says what to check
-`/ship is turned off right now`, or the same for `/steward`| Run `/login` at the Claude Code prompt, as the message says, then run the command again
+`Nothing started. This line counts only if you type it yourself`| You accepted a [prompt suggestion](</docs/en/interactive-mode#prompt-suggestions>). Type the command yourself at the Claude Code prompt
+`Nothing started. Claude Code's built-in /ship is turned off while`, or the same for `/steward`| Unset the variable that the message names, such as `CLAUDE_CODE_DISABLE_SHIP`, then start Claude Code again
+`Nothing started. Claude Code's built-in /ship doesn't start in this kind of session`, or the same for `/steward`| You typed it somewhere such as `claude -p`. Run `claude` in a terminal and type the command there
+`Nothing started. /ship is a command built into Claude Code`, or the same for `/steward`| Another command, such as a plugin’s, has the same name. To run the built-in command, type the same line again. To run the other one, follow the message, which gives its name or says where to find it
+`/ship didn't start:` or `/steward didn't start:`| The rest of the message says what to check. In plan mode, for example, press `Shift+Tab` to leave plan mode, then run the command again
+`/ship is turned off right now`, or the same for `/steward`| If the message says to run `/login`, do that at the Claude Code prompt, then run the command again. Otherwise, one cause is that `CLAUDE_CODE_DISABLE_SHIP` was set after the session started, for example under `env` in a settings file. Unset it, quit and start `claude` again, then run the command
`/ship can't start from a queued message` or `/steward can't start from a queued message`| Wait until Claude has finished, then run it again
### The GitHub CLI isn’t ready
@@ -49,10 +54,11 @@
---|---
`GitHub CLI (gh) isn't installed` or `GitHub CLI (gh) isn't signed in`| Install it, run `gh auth login` in your shell, then run the command again
`gh couldn't tell me about a pull request here`| The words in parentheses say what failed. To see `gh`’s own error, run `gh pr view` in your shell. One cause is that none of your checkout’s remotes is on a GitHub host that `gh` is signed in to. For GitHub Enterprise, run `gh auth login --hostname HOST` in your shell
+`I can't watch the branch with git alone`| None of your checkout’s remotes is on a GitHub host that `gh` is signed in to. For GitHub Enterprise, run `gh auth login --hostname HOST` in your shell, then run the command again. On another host, the words after the colon say what to fix, such as pushing the branch first. See [Watch a branch on another host](</docs/en/ship-command#watch-a-branch-on-another-host>)
## /ship committed or pushed nothing
-In some cases, `/ship` leaves the commit or the push to you and says why. Its message can start with `Nothing committed or pushed`, `Nothing pushed`, `I didn't push anything`, `There is no pull request to watch`, or `This branch has no open pull request`. Find your case, take the step in its row, then run `/ship` again. In these cases, if nothing is pushed and the branch has no pull request, Claude reviews your change and no watch starts.
+In some cases, `/ship` leaves the commit or the push to you and says why. Its message can start with `Nothing committed or pushed`, `Nothing pushed`, `I didn't push anything`, `There is no pull request to watch`, or `This branch has no open pull request`. On a host other than GitHub, `/ship` doesn’t commit or push when it starts, so see [Watch a branch on another host](</docs/en/ship-command#watch-a-branch-on-another-host>). Find your case, take the step in its row, then run `/ship` again. In these cases, if nothing is pushed and the branch has no pull request, Claude reviews your change and no watch starts.
### Public repositories and files that /ship doesn’t commit
@@ -71,21 +77,32 @@
Case| What to do
---|---
-`there is nothing here to open one for`: you have no uncommitted changes, and every commit on the branch is already on the default branch| Make a change, or check out the branch that holds your work
-The default branch holds your commits, and nothing is uncommitted| Move the commits to a new branch, for example with `git switch -c <branch>` in your shell
+`there is nothing here to open one for`: you have no uncommitted changes, and every commit on the branch is already on the default branch, or merging them would change nothing there| Make a change, or check out the branch that holds your work
+`you're on the default branch, which /ship never pushes`| Move your commits to a new branch, for example with `git switch -c <branch>` in your shell
You’re in detached HEAD state, or in the middle of a rebase| Check out a branch, or finish the rebase
### Deny rules that forbid a commit or push
A [deny rule](</docs/en/permissions#manage-permissions>), such as `Bash(git push *)`, can forbid the commit, the push, or opening the pull request. If whoever set the rule agrees, take those steps yourself. A watch needs `git commit` and `git push` as well. If the rule forbids one of them, have it removed before you run `/ship` again.
+### Your pull request is already open
+
+Messages such as these mean that `/ship` left newer work off your open pull request:
+
+Message| What it means| What to do
+---|---|---
+`/ship didn't commit your uncommitted work`| Causes include a public repository, auto-merge turned on, and a merge or cherry-pick in progress. If no watch can start, the review covers your uncommitted work. Otherwise, a review doesn’t cover it, and your unpushed commits [can go up with Claude’s next push](</docs/en/ship-command#keep-working-while-a-watch-runs>)| If the message gives a `git push` line, commit the work yourself, then run that line. Otherwise, run `/ship` again when the message says to
+`Nothing pushed` or `Nothing committed or pushed`, with a sentence about your unpushed commits| `/ship` held those commits back. No review or watch starts, and a running watch on that pull request ends. One cause is a file in them with a name such as `password.txt`| If the commits should go up, run the `git push` line in the message. If not, take the file out of every unpushed commit. Then run `/ship` again
+
+Before v2.1.331, `/ship` prints neither message. It doesn’t commit your uncommitted work once a pull request is open, so commit it, then push it, as in `git push origin <branch>` in your shell. It doesn’t hold back your unpushed commits, which [can go up with Claude’s next push](</docs/en/ship-command#keep-working-while-a-watch-runs>).
+
### GitHub Enterprise and forks
`/ship` doesn’t open a pull request on GitHub Enterprise or from a fork. Push the branch and open the pull request yourself, then run `/ship`. From a fork, the checkout also needs a remote for the repository that the pull request goes to, or no watch starts.
## No watch started
-A watch is Claude’s ongoing work on your pull request, which starts after `/ship`’s review or when you type `/steward`. In some cases, no watch starts and Claude says why. Its message can contain `/steward didn't start.`, `I can't watch`, or `is running on pull request`. Fix the cause, then type `/steward` to start the watch with no second review, or `/ship` if the branch still has no pull request.
+A watch is Claude’s ongoing work on your pull request, which starts after `/ship`’s review or when you type `/steward`. In some cases, no watch starts and Claude says why. Its message can contain `/steward didn't start.`, `I can't watch`, or `is running on pull request`. Fix the cause, then type `/steward` to start the watch with no second review. On a host other than GitHub, add any base that you named, as in `/steward origin/main`. If a branch on GitHub still has no pull request, type `/ship`.
### Your pull request or branch isn’t ready for a watch
@@ -93,7 +110,7 @@
Cause| What to do
---|---
-The branch has no pull request, and `/steward` doesn’t open one| See /ship committed or pushed nothing
+On GitHub, the branch has no pull request, and `/steward` doesn’t open one| See /ship committed or pushed nothing
The pull request’s branch isn’t checked out in this session| Check it out
The pull request carries one of [PR Steward](</docs/en/pr-steward>)’s labels, such as `claude-pr-steward-watching`| To take over, remove the label and pull the branch, as Claude’s message says
@@ -105,16 +122,19 @@
---|---
The session is in `bypassPermissions` mode| Press `Shift+Tab` to switch to a permission mode other than plan mode
[Remote Control](</docs/en/remote-control>) is on| Run `/rc`, then select **Disconnect this session**
-`your PATH has a relative or empty entry`| `/ship` with no pull request number reviews your change, and doesn’t commit, push, or look for a pull request. Take the empty or relative entry out of `PATH`, such as a trailing `:`, or `;` on Windows. Start `claude` again, then run `/ship`
+`this session runs in the background`| Open a new terminal in the checkout that holds the branch, run `claude`, and type `/steward` there
+A message about an entry `on your PATH`, such as `entry 2 of 9 on your PATH is empty (a stray colon)`| Take the entry out of `PATH`, or write it as a full path, in your shell’s profile and in any `env` block of your Claude Code settings that sets `PATH`. Quit Claude Code, start it again from a new terminal, then type `/steward`
+`your PATH has a relative or empty entry`| Before v2.1.331, `/ship` with no pull request number reviews your change, and doesn’t commit, push, or look for a pull request. Take the empty or relative entry out of `PATH`, such as a trailing `:`, or `;` on Windows. Start `claude` again, then run `/ship`
Your `PATH` holds a folder inside the checkout. This happens, for example, when you activate a Python virtual environment that’s in the checkout, or start `claude` through `npx` or a package script| To start a session without that folder, run `deactivate` in your shell if you use a virtual environment, then start `claude` directly
### A tool, rule, or hook blocks a watch
-A watch needs `gh`, `git commit`, and `git push`, and it doesn’t start where a project’s hook could approve commands:
+A watch on a GitHub pull request needs `gh`, `git commit`, and `git push`, and it doesn’t start where a project’s hook could approve commands:
Cause| What to do
---|---
`gh` isn’t installed or signed in| See The GitHub CLI isn’t ready
+`this gh is too old for a watch`| Update the GitHub CLI to 2.63 or later, then type `/steward`
A deny rule forbids a command that the watch needs, such as `git push`| Claude’s message names the command and the settings that hold the rule. If whoever set it agrees, remove it there. To change a rule in managed settings, ask your administrator
The project sets a hook that could approve commands, for example a `PreToolUse` or `PermissionRequest` [hook](</docs/en/hooks>) on shell commands in the checkout’s `.claude/settings.json`| The message names the file and says what to change
@@ -123,27 +143,31 @@
In these cases, `/ship` can still review your change:
* You’re on native Windows
- * Someone else opened the pull request
- * You can’t push to the repository that the pull request goes to, and another person has commented or reviewed. If this happens while a watch is running, the watch ends
+ * On GitHub, someone else opened the pull request
+ * On GitHub, you can’t push to the repository that the pull request goes to, and another person has commented or reviewed. If this happens while a watch is running, the watch ends
## A watch stopped
-A watch is Claude’s ongoing work on your pull request, which starts after `/ship`’s review or when you type `/steward`. After one ends, look for a line that starts `Stopped watching pull request`, which gives the reason. To start the watch again, type the command that the line gives, if it gives one. To check whether a watch is still running, type [`/tasks`](</docs/en/ship-command#check-whether-a-watch-is-running>) at the Claude Code prompt while Claude is idle. Find the words that follow “because” in that line:
+A watch is Claude’s ongoing work on your pull request, which starts after `/ship`’s review or when you type `/steward`. After one ends, look for a line that starts `Stopped watching`, which gives the reason. To start the watch again, type the command that the line gives, if it gives one. To check whether a watch is still running, type [`/tasks`](</docs/en/ship-command#check-whether-a-watch-is-running>) at the Claude Code prompt while Claude is idle. Find the words that follow “because” in that line:
Reason| What happened
---|---
-`its check-in was cancelled`| You pressed `Esc` or `Ctrl+C` at the prompt or while Claude was working, or stopped the task in `/tasks`. Claude’s messages call its work on the pull request a check-in. An `Esc` that closes the `/tasks` list leaves a watch running
-`the watch couldn't go on`| Claude’s reply may give the cause. One cause is that the pull request’s branch is no longer checked out. Check it out in the folder where you started, then type `/steward`
+`the watch was cancelled`, or `its check-in was cancelled`| You pressed `Esc` or `Ctrl+C` at the prompt or while Claude was working, or stopped the task in `/tasks`. Claude’s messages call its work on the pull request a check-in. An `Esc` that closes the `/tasks` list leaves a watch running
+`the watch couldn't go on`| Claude’s reply may give the cause. One cause is that the pull request’s branch is no longer checked out. Check it out in the folder where you started, then start the watch again
`a watch doesn't carry over when a session is resumed`| The process that ran the watch has ended, for example because you closed the terminal. Running `claude --continue` in your shell brings back the conversation without the watch
`you moved to another session`| `/clear`, `/resume`, or `/branch` can do that
-`its check-ins were replaced`| You started a `/loop`
+`another loop took its place`, or `its check-ins were replaced`| You started a `/loop`
`your new command took over this session`| You ran `/ship` or `/steward` again
-`a deny rule now forbids a command that the watch runs`| Type `/permissions` at the Claude Code prompt to see the rule. See A tool, rule, or hook blocks a watch
+`a deny rule now blocks a command that the watch runs`, or `a deny rule now forbids a command that the watch runs`| Type `/permissions` at the Claude Code prompt to see the rule. See A tool, rule, or hook blocks a watch
`the watch reached its time limit`| About seven days passed
-`no next check-in was set`| A declined permission prompt, an error, or a usage limit can do that
+`the watch stalled`, or `no next check-in was set`| A declined permission prompt, an error, or a usage limit can do that
+`this session is in plan mode`| Press `Shift+Tab` to leave plan mode, then type the command that the line gives
+`this session runs in the background`| Open a new terminal in the checkout that holds the branch, run `claude`, and type the command that the line gives
+`you asked`| You typed `/ship stop` or `/steward stop`
`a file that gh, git, or /steward relies on changed`| See A file that the watch relies on changed
-
-`No pull request is being watched in this session` means that you typed `/ship stop` or `/steward stop` and no watch was running. Scroll up for a `Stopped watching pull request` line.
+`a file that git or /steward relies on changed`| The same message, for a [watch on another host](</docs/en/ship-command#watch-a-branch-on-another-host>). See A file that the watch relies on changed
+
+Where a row gives two wordings, the second is the one from before v2.1.331. `Nothing to stop. This session isn't watching a pull request`, or `No pull request is being watched in this session`, means that you typed `/ship stop` or `/steward stop` and no watch was running. Scroll up for a `Stopped watching` line.
### A file that the watch relies on changed
@@ -152,7 +176,7 @@
* **Git’s settings** : `git push -u`, `git branch -u`, and `git remote add` change them. An editor such as VS Code can also add a setting to `.git/config` when it opens the repository or you switch back to it
* **`.claude/settings.local.json`** : Claude Code writes it when you answer a permission prompt with “Yes, and don’t ask again”
-Review the change, then type `/steward` to start the watch again. If you changed none, one cause on Linux and WSL2 is a [sandboxed](</docs/en/sandboxing>) command that starts or ends during the watch. Stop the command or wait for it to end.
+Review the change, then type the command that the `Stopped watching` line gives to start the watch again. If you changed none, one cause on Linux and WSL2 is a [sandboxed](</docs/en/sandboxing>) command that starts or ends during the watch. Stop the command or wait for it to end.
## Messages during a watch
@@ -161,9 +185,10 @@
Message, or what you see| What to do
---|---
`Claude Code did not run this`, or `Not run · permission denied`| Claude tried a step, and a [limit on the watch](</docs/en/ship-command#what-claude-code-blocks-during-a-watch>) or one of your rules or hooks refused it. The message also appears when the watch had already ended. Claude’s messages call those limits “the fence”
-`In this session there's a way around my limits`| A setting in your session, such as a rule, a hook, a plugin, or the sandbox, lets some commands past the [limits on the watch](</docs/en/ship-command#what-claude-code-blocks-during-a-watch>). The text after the message names it. To see your rules, type `/permissions` at the Claude Code prompt. To end the watch while you decide, type `/steward stop`
-A line such as `1 comment not read (no write access, or a bot that you haven't named)`| Claude [skipped a comment](</docs/en/ship-command#what-claude-does-during-a-watch>). Open the link in the message to read it. For a bot that you want Claude to read, type `/steward +botname`. For a person’s comment that you agree with, tell Claude what to change
-`gh couldn't say where the pull request's head and base stand`| One cause is a GitHub CLI older than 2.63. Run `gh --version` in your shell to check. Update it, then type `/steward` to start the watch again
+`In this session there's a way around`, followed by `the watch's limits`, `these limits`, or `my limits`| A setting in your session, such as a rule, a hook, a plugin, or the sandbox, lets some commands past the [limits on the watch](</docs/en/ship-command#what-claude-code-blocks-during-a-watch>). The text after the message names it. To see your rules, type `/permissions` at the Claude Code prompt. To end the watch while you decide, type `/steward stop`
+A line such as `1 comment not read (no write access, or a bot that you haven't named)`| Claude [skipped a comment](</docs/en/ship-command#what-claude-does-during-a-watch>). Open the link in the message to read it. For a bot on GitHub that you want Claude to read, type `/steward +botname`. For a person’s comment that you agree with, tell Claude what to change
+`gh couldn't say where the pull request's head and base stand`| Claude Code refused one of Claude’s pushes. To see `gh`’s own error, run `gh pr view` in your shell. Before v2.1.331, one cause is a GitHub CLI older than 2.63. Run `gh --version` in your shell to check. Update it, then type `/steward` to start the watch again
+`A watch is on`, `The watch's limits still hold`, or `/ship is still starting` or the same for `/steward`, after you press `←` or type `/background`| Claude Code doesn’t move a session to the background while a watch is on. To move it, first take the step that the message names, such as typing `/steward stop`, which ends the watch. Before v2.1.331, the session moves, and [the watch ends](</docs/en/ship-command#when-a-watch-can-lead-to-a-merge>)
`Claude resuming /loop wakeup` or `/steward --tend` in the session| Claude Code enters them when Claude checks the pull request during a watch. You can keep working as you are
## Pull request results that you didn’t expect
@@ -172,14 +197,33 @@
What you see| Why, and what to do
---|---
-The pull request’s title is a line such as `Update greet.py and 1 more`| `/ship` falls back to that title when Claude can’t write one from the session’s conversation, for example in a session where you didn’t discuss the change. Edit the title and description on GitHub. Next time, run `/ship` in the session where you made the change, or commit your work yourself first, on a branch other than the default branch
+The pull request’s title, or the commit message, is a line such as `Update greet.py and 1 more`| `/ship` falls back to that line when Claude can’t write one from the session’s conversation, for example in a session where you didn’t discuss the change. Edit the title and description on GitHub. Next time, run `/ship` in the session where you made the change, or commit your work yourself first, on a branch other than the default branch
Claude pushed commits or answered a reviewer before you saw them| In auto mode, or where your rules or the sandbox allow a command, a watch works that way. See [Ask Claude to check with you first](</docs/en/ship-command#ask-claude-to-check-with-you-first>)
-New uncommitted changes didn’t reach the open pull request| Once a pull request is open, `/ship` doesn’t commit your work. Commit it, then push it, as in `git push origin <branch>` in your shell
+New uncommitted changes didn’t reach the open pull request| See Your pull request is already open
`git pull` or `git push` asks for an upstream branch| `/ship` sets no upstream. Name the remote and branch, as in `git push origin <branch>`. Setting an upstream changes git’s settings, which [ends a running watch](</docs/en/ship-command#keep-working-while-a-watch-runs>)
## A custom /ship or /steward command stopped loading
-A `Not loaded: a custom /ship` or `Not loaded: custom /ship, /steward` notice is about a custom skill or command. Its name is one that the built-in commands reserve, such as `ship`, `ship-local`, or `steward`. Rename it, then restart Claude Code. Leave a repository’s `.claude/skills/steward/SKILL.md` as it is, because PR Steward and the watch read it as instructions. The notice doesn’t count that file, so a notice that names `/steward` is about another skill or command.
+These messages are about a custom skill or command. Its name is one that the built-in commands reserve, such as `ship`, `ship-local`, or `steward`:
+
+Message| What to do
+---|---
+`Not loaded: a custom /ship` or `Not loaded: custom /ship, /steward`| Rename it, then restart Claude Code
+`Nothing started. A custom /ship isn't loaded`, or the same for `/steward`| To run the built-in command, type the same line again. To run the custom one, rename it, then restart Claude Code
+
+Leave a repository’s `.claude/skills/steward/SKILL.md` as it is, because PR Steward and the watch read it as instructions. Neither message counts that file, so one that names `/steward` is about another skill or command.
+
+### Keep a custom /ship or /steward without renaming
+
+If you’ve already created your own skill or command called `/ship` or `/steward` and don’t want the built-in versions to override it, you can turn them off. To do that, use the `CLAUDE_CODE_DISABLE_SHIP` environment variable, which turns off both together and requires Claude Code v2.1.331 or later. Before you set it, remove any `"off"` entry for your command under `skillOverrides`. Add this [`env`](</docs/en/settings-reference#env>) entry to your [user settings file](</docs/en/settings#settings-files-and-who-they-affect>), or to a project’s `.claude/settings.json` for everyone who starts sessions in its top folder, then restart Claude Code:
+
+ {
+ "env": {
+ "CLAUDE_CODE_DISABLE_SHIP": "1"
+ }
+ }
+
+To check that your command loaded, type `/` at the Claude Code prompt and look for its description or first line. If your command is named `steward` and the repository has a `.claude/skills/steward/SKILL.md` file, check [which one runs](</docs/en/skills#resolve-skills-that-share-a-name>).
## Related resources
Show diff (235 lines)
--- a/slack.md
+++ b/slack.md
@@ -1,229 +1,4 @@
-This earlier Claude Code in Slack answers channel @mentions only from Pro, Max, and Ultra accounts, and only in a Slack workspace that no organization has connected to [Claude Tag](<https://claude.com/product/tag>). Each session runs under an individual user’s account. Claude Tag runs @Claude as your organization’s shared identity with admin-configured access.
+The earlier Claude Code in Slack is retired. In a workspace that isn’t connected to Claude Tag, `@Claude` replies that the workspace isn’t set up for Claude Tag.
- * **Pro, Max, and Ultra plans:** Claude Tag isn’t available on individual plans, so set up this version in a workspace that isn’t connected to Claude Tag.
- * **Team and Enterprise plans:** your existing Slack app and @Claude handle stay. [Set up Claude Tag](<https://claude.com/docs/claude-tag/overview>) for a new workspace; to move one that already uses this version, see [Migrate from the earlier Claude in Slack](<https://claude.com/docs/claude-tag/admins/migrate-from-earlier>).
- * **Notice instead of an answer:** look up the setup notice or the retirement notice that @Claude replied with.
-
-Claude Code in Slack brings the power of Claude Code directly into your Slack workspace. When you mention `@Claude` with a coding task, Claude automatically detects the intent and creates a Claude Code cloud session, allowing you to delegate development work without leaving your team conversations. This integration is built on the existing Claude for Slack app but adds intelligent routing to Claude Code cloud sessions for coding-related requests. Each session runs under your own Claude account, using your connected repositories and your plan limits.
-
-## Use cases
-
- * **Bug investigation and fixes** : Describe a bug and ask Claude to investigate and fix it.
- * **Quick code reviews and modifications** : Have Claude implement small features or refactor code.
- * **Parallel task execution** : Kick off coding tasks in Slack while you continue other work, receiving notifications when complete.
-
-## Prerequisites
-
-Before using Claude Code in Slack, ensure you have the following:
-
-Requirement| Details
----|---
-Claude Plan| Pro, Max, or Ultra
-Slack workspace| Not connected to [Claude Tag](<https://claude.com/docs/claude-tag/overview>) by any organization. If @Claude replies with the retirement notice, the workspace is connected
-Cloud sessions| [Cloud sessions](</docs/en/claude-code-on-the-web>) are enabled for your account
-GitHub Account| Connected at [claude.ai/code](<https://claude.ai/code>) with at least one repository authenticated
-Slack Authentication| Your Slack account linked to your Claude account via the Claude app
-
-## Setting up Claude Code in Slack
-
-1
-
-Install the Claude App in Slack
-
-A workspace administrator must install the Claude app from the Slack App Marketplace. Visit the [Slack App Marketplace](<https://slack.com/marketplace/A08SF47R6P4>) and click “Add to Slack” to begin the installation process.
-
-2
-
-Connect your Claude account
-
-After the app is installed, authenticate your individual Claude account:
-
- 1. Open the Claude app in Slack by clicking on “Claude” in your Apps section
- 2. Open the App Home tab
- 3. Click **Connect Claude account** to link your Slack account with your Claude account
- 4. Complete the authentication flow in your browser
-
-3
-
-Configure cloud sessions
-
-Ensure cloud sessions are properly configured for your account:
-
- * Visit [claude.ai/code](<https://claude.ai/code>) and sign in with the same account you connected to Slack
- * Connect your GitHub account if not already connected
- * Authenticate at least one repository that you want Claude to work with
-
-4
-
-Choose your routing mode
-
-After connecting your accounts, configure how Claude handles your messages in Slack. Open the Claude App Home in Slack to find the **Routing Mode** setting.
-
-Mode| Behavior
----|---
-**Code only**| Claude routes all @mentions to Claude Code sessions. Best for teams using Claude in Slack exclusively for development tasks.
-**Code + Chat**| Claude analyzes each message and intelligently routes between Claude Code (for coding tasks) and Claude Chat (for writing, analysis, and general questions). Best for teams who want a single @Claude entry point for all types of work.
-
-In Code + Chat mode, if Claude answers in Chat but you wanted a coding session, click **Switch to code repo…** on the reply and select a repository. Claude then starts a Claude Code session with your message instead.
-
-5
-
-Add Claude to channels
-
-Claude is not automatically added to any channels after installation. To use Claude in a channel, invite it by typing `/invite @Claude` in that channel. Claude can only respond to @mentions in channels where it has been added.
-
-## How it works
-
-### Automatic detection
-
-In Code + Chat routing mode, when you mention @Claude in a Slack channel or thread, Claude automatically detects whether your message is a coding task. Coding tasks go to a Claude Code cloud session. Anything else gets a regular chat reply. In Code only mode, every @mention goes to Claude Code. You can also explicitly tell Claude to handle a request as a coding task, even if it doesn’t automatically detect it.
-
-Claude Code in Slack only works in channels (public or private). It does not work in direct messages (DMs).
-
-### Context gathering
-
- * **From threads** : when you first @mention Claude in a thread, it gathers context from your messages and its own in that thread.
- * **From channels** : when you @mention Claude directly in a channel, it looks at your recent messages and its own in that channel, and at the channel’s name, topic, and description.
-
-This context helps Claude understand the problem, select the appropriate repository, and inform its approach to the task. To give Claude something a teammate wrote, such as an error report, paste its text into the message where you @mention Claude.
-
-When @Claude is invoked in Slack, Claude is given access to the conversation context to better understand your request. Claude may follow directions from other messages in the context, so users should make sure to only use Claude in trusted Slack conversations.
-
-### Session flow
-
- 1. **Initiation** : You @mention Claude with a coding request
- 2. **Detection** : Claude analyzes your message and detects coding intent
- 3. **Session creation** : A new Claude Code session is created on claude.ai/code
- 4. **Progress updates** : Claude posts status updates to your Slack thread as work progresses
- 5. **Completion** : When finished, Claude updates its message in the thread with its final response and action buttons, and sends you a direct message linking to it
- 6. **Review** : Click **View session** to see the full transcript, or **Create PR** to open a pull request
-
-## User interface elements
-
-### Message actions
-
- * **View session** : Opens the full Claude Code session in your browser where you can see all work performed, continue the session, or make additional requests.
- * **Create PR** : Opens GitHub’s compare page for the session’s branch, where you create the pull request. It appears on the status message Claude posted when the session started, once the session finishes.
- * **Switch to code repo…** : If Claude responds in Chat but you wanted a coding session, click this button and select a repository, and Claude starts a Claude Code session with your original request.
-
-### Repository selection
-
-Claude automatically selects a repository based on context from your Slack conversation. If Claude can’t tell which repository you mean, it asks you to choose: click **Select repository** and select one from the list.
-
-## Access and permissions
-
-### User-level access
-
-Access Type| Requirement
----|---
-Claude Code Sessions| Each user runs sessions under their own Claude account
-Usage & Rate Limits| Sessions count against the individual user’s plan limits
-Repository Access| Users can only access repositories they’ve personally connected
-Session History| Sessions appear in your Claude Code history on claude.ai/code
-
-### Workspace-level access
-
-Slack workspace administrators control whether the Claude app is available in their workspace:
-
-Control| Description
----|---
-App installation| Workspace admins decide whether to install the Claude app from the Slack App Marketplace
-Enterprise Grid distribution| For Enterprise Grid organizations, organization admins can control which workspaces have access to the Claude app
-App removal| Removing the app from a workspace immediately revokes access for all users in that workspace
-
-### Channel-based access control
-
-Installing the app doesn’t add Claude to any channels. Claude responds to @mentions only in channels where it has been added; invite it with `/invite @Claude`. It works in both public and private channels. Admins can control who uses Claude Code by managing which channels Claude is invited to and who has access to those channels. This adds a layer of access control beyond workspace-level permissions.
-
-## What’s accessible where
-
-**In Slack** : You’ll see status updates, completion summaries, and action buttons. The full transcript is preserved and always accessible. **At claude.ai/code** : The complete Claude Code session with full conversation history, all code changes, and file operations. Sessions stay in your Claude Code history at [claude.ai/code](<https://claude.ai/code>), where you can continue past sessions, reference them, or create pull requests. For Enterprise and Team accounts, sessions created from Claude in Slack are automatically visible to the organization. See [cloud session sharing](</docs/en/claude-code-on-the-web#share-sessions>) for more details.
-
-## Best practices
-
-### Writing effective requests
-
- * **Be specific** : Include file names, function names, or error messages when relevant.
- * **Provide context** : Mention the repository or project.
- * **Define success** : Explain what “done” looks like. Should Claude write tests? Update documentation? Create a PR?
-
-### When to use Slack vs. web
-
-**Use Slack when** : You want to start a task asynchronously, or you’re collaborating with teammates who need visibility. **Use the web directly when** : You need to upload files, want real-time interaction during development, or are working on longer, more complex tasks.
-
-## Troubleshooting
-
-### “This workspace isn’t set up for Claude Tag yet”
-
-@Claude replies in the thread with this notice instead of an answer when both of these are true:
-
- * No organization has connected your Slack workspace to [Claude Tag](<https://claude.com/docs/claude-tag/overview>).
- * The Claude account you linked in Slack isn’t on a Pro, Max, or Ultra plan.
-
-Claude Tag is available on Team and Enterprise plans. To connect the workspace, start with the `@Claude connect` command the notice names, then follow [Set up Claude Tag](<https://claude.com/docs/claude-tag/overview>).
-
-### “The legacy Claude in Slack bot is retired”
-
-The notice opens with `The legacy Claude in Slack bot is retired effective October 5, 2026 and no longer responds in channels.` Your Slack workspace is connected to a Claude organization. The earlier version is still selected for the channel, the workspace, or the organization default in that organization’s Claude Tag settings. The notice doesn’t depend on your own plan, so Pro, Max, and Ultra accounts get it too. If you’re an Owner of that organization, open [Claude admin settings](<https://claude.ai/admin-settings/claude-tag>) and turn on Claude Tag for the channel. To fix every channel that inherits the setting, change it on the workspace or the organization default instead. For the full move, see [Migrate from the earlier Claude in Slack](<https://claude.com/docs/claude-tag/admins/migrate-from-earlier>). If you’re not an Owner, send this entry to one.
-
-### ”Claude Code is not enabled for your account”
-
-This error means your Claude account has no cloud environment yet. Sign in at [claude.ai/code](<https://claude.ai/code>) once with the same account you connected to Slack and finish [web onboarding](</docs/en/web-quickstart#connect-github>), which creates your default cloud environment or asks you to create it. The error clears on your next mention. Each user must do this individually.
-
-### Sessions not starting
-
- 1. Verify your Claude account is connected in the Claude App Home
- 2. Check that cloud sessions are enabled for your account
- 3. Ensure you have at least one GitHub repository connected to Claude Code
-
-### Sessions from a Claude Tag channel fail to start
-
-This entry applies to workspaces using [Claude Tag](<https://claude.com/docs/claude-tag/overview>). If you created the channel’s cloud environment at [claude.ai/code](<https://claude.ai/code>), it belongs to your personal account, and Claude can’t start channel sessions in a personal environment. Claude Code fails the session immediately, and retrying doesn’t help. If you’re an Owner and the environment is your own, [share it with the organization](</docs/en/cloud-environments#organization-shared-environments>) from the environment selector. Otherwise, an Owner recreates it as an organization-shared environment from the **Cloud environments** page in [admin settings](<https://claude.ai/admin-settings>). You can apply it in two ways:
-
- * Set it as the organization default at [claude.ai/admin-settings/claude-code](<https://claude.ai/admin-settings/claude-code>).
- * [Set it on the channel](<https://claude.com/docs/claude-tag/admins/troubleshooting#channel-sessions-use-the-wrong-environment-or-can%E2%80%99t-find-one>) in the Claude Tag admin settings.
-
-If you’re not an Owner, send this entry to one.
-
-### Repository not showing
-
- 1. Connect the repository at [claude.ai/code](<https://claude.ai/code>)
- 2. Verify your GitHub permissions for that repository
- 3. Try disconnecting and reconnecting your GitHub account
-
-### Wrong repository selected
-
-Include the repository name in your request for more accurate selection.
-
-### Authentication errors
-
- 1. Disconnect and reconnect your Claude account in the App Home
- 2. Ensure you’re signed into the correct Claude account in your browser
-
-## Current limitations
-
- * **GitHub only** : repositories must be on GitHub.
- * **One PR at a time** : each session can create one pull request.
- * **Cloud session access required** : users need access to [cloud sessions](</docs/en/claude-code-on-the-web>).
-
-## Related resources
-
-## Claude Code in the cloud
-
-Learn more about cloud sessions
-
-## Claude for Slack
-
-General Claude for Slack documentation
-
-## Claude Tag
-
-Organization-managed @Claude in Slack with admin-configured access
-
-## Slack App Marketplace
-
-Install the Claude app from the Slack Marketplace
-
-## Claude Help Center
-
-Get additional support
+ * **Team and Enterprise plans:** use [Claude Tag](<https://claude.com/docs/claude-tag/overview>) if it’s in your channel. If it isn’t, see [how to set it up](<https://claude.com/docs/claude-tag/admins/setup-overview>). To move a workspace from the earlier version, see [the migration guide](<https://claude.com/docs/claude-tag/admins/migrate-from-earlier>).
+ * **Pro, Max, and Ultra plans:** Claude Tag isn’t available on individual plans. Start tasks in [Projects](</docs/en/claude-projects>) if your account has them, or in [cloud sessions](</docs/en/claude-code-on-the-web>).
--- a/sub-agents.md
+++ b/sub-agents.md
@@ -235,7 +235,7 @@
`background`| No| Set to `true` to keep this subagent in the background even when Claude asks to wait for it. By default, custom subagents Claude spawns from the main conversation already start in the background
`omitClaudeMd`| No| Set to `true` to start this subagent without the user, project, and local CLAUDE.md files in its initial context; [managed policy files](</docs/en/memory#how-claude-md-files-load>) still load, except for managed subagents. Use it for subagents that take everything they need from the delegation prompt. Ignored when the agent runs as the main session agent via `--agent` or the `agent` setting. Requires Claude Code v2.1.271 or later
`effort`| No| Effort level when this subagent is active. Overrides the session effort level, but not the [`CLAUDE_CODE_EFFORT_LEVEL`](</docs/en/env-vars#variables>) environment variable. Options: `low`, `medium`, `high`, `xhigh`, `max`; available levels depend on the model. See Choose an effort level
-`isolation`| No| Set to `worktree` to run the subagent in a temporary [git worktree](</docs/en/worktrees>), giving it an isolated copy of the repository branched by default from your [default branch](</docs/en/worktrees#choose-the-base-branch>) rather than the parent session’s `HEAD`. The worktree is automatically cleaned up if the subagent makes no changes
+`isolation`| No| Set to `worktree` to run the subagent in a temporary [git worktree](</docs/en/worktrees>), giving it an isolated copy of the repository. By default, the copy branches from your [default branch](</docs/en/worktrees#choose-the-base-branch>) rather than the parent session’s `HEAD`. Claude Code [can remove the worktree](</docs/en/worktrees#isolate-subagents-with-worktrees>) if the subagent makes no changes
`color`| No| Display color for the subagent in the task list and transcript. Accepts `red`, `blue`, `green`, `yellow`, `purple`, `orange`, `pink`, or `cyan`
`initialPrompt`| No| Auto-submitted as the first user turn when this agent runs as the main session agent (via `--agent` or the `agent` setting). [Commands](</docs/en/commands>) and [skills](</docs/en/skills>) are processed. Prepended to any user-provided prompt. Ignored for plugin subagents
`experimental`| No| Map of experimental options. Set its `cacheTtl` key to `5m` or `1h` to choose the [prompt cache lifetime](</docs/en/prompt-caching#choose-the-ttl-yourself>) for this subagent’s requests, at the frontmatter’s place in the [cache lifetime precedence](</docs/en/prompt-caching#choose-the-ttl-yourself>). Claude Code ignores any other value, ignores `1h` while your Claude subscription is using usage credits, and reads the field only from subagent files. Requires Claude Code v2.1.248 or later
@@ -321,7 +321,7 @@
#### When an allowlist blocks a subagent model
-If your organization’s [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist blocks the model set for a subagent other than [`web-fetch`](</docs/en/tools-reference#which-model-the-web-fetch-subagent-runs-on>), the subagent runs on the first of these that applies:
+If an [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist in your settings blocks the model set for a subagent other than [`web-fetch`](</docs/en/tools-reference#which-model-the-web-fetch-subagent-runs-on>), the subagent runs on the first of these that applies:
1. For a blocked family alias, the newest permitted version in that family, on [providers that support this substitution](</docs/en/model-config#restrict-model-selection>)
2. The model in `CLAUDE_CODE_SUBAGENT_MODEL`, if you set it, under these same rules
@@ -365,7 +365,7 @@
* `WaitForMcpServers`
* `Workflow`
-The second filter applies to subagents running in the background. `Agent` and `ExitPlanMode` follow the first filter’s conditions wherever the subagent runs. A background subagent keeps every MCP tool, and [`SubagentHandback`](</docs/en/tools-reference>) if it reports through that tool. It also keeps `Read`, `Grep`, `Glob`, `LSP`, `Bash`, `PowerShell`, `Edit`, `Write`, `NotebookEdit`, `WebFetch`, `WebSearch`, `TodoWrite`, `Skill`, `ToolSearch`, `EnterWorktree`, `ExitWorktree`, `Monitor`, `TaskStop`, `SendMessage`, `Artifact`, `ListPlugins`, `ListSkills`, `SearchPlugins`, and `SearchSkills`. Don’t rely on other built-in tools in a background subagent: Claude Code removes most of them, whether inherited or listed in the `tools` field. The removal reports no error unless it leaves the `tools` list [resolving to nothing](</docs/en/errors#agent-would-be-spawned-with-zero-tools>). Before v2.1.280, background subagents couldn’t use `LSP`. [`ListAgents`](</docs/en/cross-session-messaging>) follows these filters like any built-in tool: a foreground subagent inherits it in sessions where cross-session messaging is enabled, and a background subagent doesn’t keep it. Teammates in [agent teams](</docs/en/agent-teams>) additionally keep the task tools and cron tools: `TaskCreate`, `TaskGet`, `TaskList`, `TaskUpdate`, `CronCreate`, `CronDelete`, and `CronList`. In a [session without the Task tools](</docs/en/tools-reference#task-tool-availability>), Claude Code doesn’t provide the task tools to subagents either, even when the subagent runs a different model. An in-process teammate follows your session the same way. To find out whether a split-pane teammate has the task tools, see [Task tool availability](</docs/en/tools-reference#task-tool-availability>).
+The second filter applies to subagents running in the background. `Agent` and `ExitPlanMode` follow the first filter’s conditions wherever the subagent runs. A background subagent keeps every MCP tool, and [`SubagentHandback`](</docs/en/tools-reference>) if it reports through that tool. It also keeps `Read`, `Grep`, `Glob`, `LSP`, `Bash`, `PowerShell`, `Edit`, `Write`, `NotebookEdit`, `WebFetch`, `WebSearch`, `TodoWrite`, `Skill`, `ToolSearch`, `EnterWorktree`, `ExitWorktree`, `Monitor`, `TaskStop`, `SendMessage`, `Artifact`, `ListPlugins`, `ListSkills`, `SearchPlugins`, `SearchSkills`, and `REPL`. Don’t rely on other built-in tools in a background subagent: Claude Code removes most of them, whether inherited or listed in the `tools` field. The removal reports no error unless it leaves the `tools` list [resolving to nothing](</docs/en/errors#agent-would-be-spawned-with-zero-tools>). Before v2.1.280, background subagents couldn’t use `LSP`. [`ListAgents`](</docs/en/cross-session-messaging>) follows these filters like any built-in tool: a foreground subagent inherits it in sessions where cross-session messaging is enabled, and a background subagent doesn’t keep it. Teammates in [agent teams](</docs/en/agent-teams>) additionally keep the task tools and cron tools: `TaskCreate`, `TaskGet`, `TaskList`, `TaskUpdate`, `CronCreate`, `CronDelete`, and `CronList`. In a [session without the Task tools](</docs/en/tools-reference#task-tool-availability>), Claude Code doesn’t provide the task tools to subagents either, even when the subagent runs a different model. An in-process teammate follows your session the same way. To find out whether a split-pane teammate has the task tools, see [Task tool availability](</docs/en/tools-reference#task-tool-availability>).
In a session where Claude reads web pages through the built-in [`web-fetch` subagent](</docs/en/tools-reference#web-fetch-subagent>), the main conversation has no `WebFetch` tool of its own, and neither do forks or [teammates](</docs/en/agent-teams>). Other subagents that Claude starts with the Agent tool can still call `WebFetch` themselves.
@@ -432,7 +432,7 @@
#### Scope MCP servers to a subagent
-Use the `mcpServers` field to give a subagent access to [MCP](</docs/en/mcp>) servers that aren’t available in the main conversation. Inline servers defined here are connected when the subagent starts, subject to the trust rule for the agent file’s folder, and disconnected when it finishes. String references share the parent session’s connection.
+Use the `mcpServers` field to give a subagent access to [MCP](</docs/en/mcp>) servers that aren’t available in the main conversation. Inline servers defined here are connected when the subagent starts, subject to the trust rule for the agent file’s folder, and disconnected when the last agent using them finishes. String references share the parent session’s connection.
The `mcpServers` field applies in both contexts where an agent file can run:
@@ -559,7 +559,7 @@
#### Conditional rules with hooks
-For more dynamic control over tool usage, use `PreToolUse` hooks to validate operations before they execute. This is useful when you need to allow some operations of a tool while blocking others. This example creates a subagent that only allows read-only database queries. The `PreToolUse` hook runs the script specified in `command` before each Bash command executes:
+For more dynamic control over tool usage, use `PreToolUse` hooks to validate operations before they execute. This is useful when you need to allow some operations of a tool while blocking others. This example creates a subagent that only allows read-only database queries. The `PreToolUse` hook runs the script specified in `command` before each Bash tool call executes:
---
name: db-reader
@@ -720,7 +720,7 @@
claude --agent my-plugin:security-reviewer
-If the plugin places the agent in a subfolder of its `agents/` directory, include the subfolder in the scoped name, for example `claude --agent my-plugin:review:security`. To make it the default for every session in a project, set `agent` in `.claude/settings.json`:
+If the plugin places the agent in a subfolder of its `agents/` directory, include the subfolder in the scoped name, for example `claude --agent my-plugin:review:security`. To make a subagent the default for sessions in a project, set `agent` in `.claude/settings.json`:
{
"agent": "code-reviewer"
--- a/test.md
+++ b/test.md
@@ -133,7 +133,7 @@
### Look up what a stub returns
-Every mods API call your mod makes in a test needs a stub that answers in Claude Code’s place, except the few the kit answers itself: [`$.ui.invalidate`](</docs/en/plugins/mods/interface#redraw-when-something-changes>), [`$.state`](</docs/en/plugins/mods/interface#keep-state>), and `$.session.append` calls. For `$.clock` calls, use `mock.clock(on)`, or your mod’s `$.clock.now()` fails with `no implementation for clock.now`. This table lists the ones mods use most. The first column is the call your mod makes or the event it passes on with `next(e)`. The second is the function to pass to `on` under that name, so the `$.store.get` row becomes `on('store.get', ($, e) => ({ value: saved.get(e.key) }))`. A `'...'` in a stub marks text for you to fill in:
+[`$.ui.invalidate`](</docs/en/plugins/mods/interface#redraw-when-something-changes>), [`$.state`](</docs/en/plugins/mods/interface#keep-state>), and `$.session.append` calls need no stub. For `$.clock` calls, use `mock.clock(on)`, or your mod’s `$.clock.now()` fails with `no implementation for clock.now`. A passing test can hide a `no implementation for` error, and each call that fails with it needs a stub. This table lists the ones mods use most. The first column is the call your mod makes or the event it passes on with `next(e)`. The second is the function to pass to `on` under that name, so the `$.store.get` row becomes `on('store.get', ($, e) => ({ value: saved.get(e.key) }))`. A `'...'` in a stub marks text for you to fill in:
Your mod calls or passes on| Stub
---|---
@@ -144,7 +144,7 @@
`$.ui.ask`| A `tool.call` stub, because the question reaches it as a call to the `AskUserQuestion` tool: `($, e) => ({ result: { answers: { [e.questions[0].question]: 'Run it' } } })`. Check `e.tool` first if your mod passes on other tool calls.
`$.model.complete`| `() => ({ value: { isAnswered: true, text: '...', usage } })`
`$.process.run`| `($, e) => ({ value: { exitCode: 0, stdout: '...', stderr: '' } })`. `e.argv` is the argument list and `e.init` holds `cwd` and `timeoutMs`.
-Any mods API call that should fail| `() => ({ deny: 'the reason' })`, which makes the call reject in your mod. A stub that throws is skipped instead.
+To fail a call whose stub returns `{ value }`| `() => ({ deny: 'the reason' })`, which makes the call reject in your mod. `ui.toast`, `ui.log`, and `ui.status` don’t reject. A stub that throws is skipped.
`session.start`| `() => ({ cwd: '/work' })`
`turn.start`| `($, e) => ({ turnId: e.turnId })`
`tool.call`| `() => ({ result: '...' })`
@@ -280,6 +280,7 @@
`select({ key: 'size', value: 'large' })`| Picks the option with that value in the `Select` with that key
`keepsBeneath()`| In a test with no `ui.render` stub, it resolves to `true` when the drawing includes what `next(e)` returned, and `false` when your hook left it out. In a test that registers one, use `find` to look for what the stub drew. Requires Claude Code v2.1.321 or later.
`find({ key: 'more' })` or `find({ type: 'Text', text: 'Count: 2' })`| Returns the first matching element as `{ type, props, children }`, or `undefined`. `text` can be a string or a regular expression.
+`drawn()`| Returns the whole tree as last drawn
`unmount()`| Removes the drawing
Each method resolves after your handler has finished, so you can check the result on the next line. Set `props` to what Claude Code would pass for that site. The [render sites table](</docs/en/plugins/mods/reference#render-sites>) lists each site’s props, and [the types for your build](</docs/en/plugins/mods/create#get-the-types-for-your-build>) have their types. To catch an [element tree](</docs/en/plugins/mods/interface#build-a-tree-from-elements>) that isn’t valid for the app you named in `surface`, check with `find` for an element your hook adds. The test doesn’t check how the app paints a tree, so look at a new layout in a real session too.
Show diff (121 lines)
--- a/tools-reference.md
+++ b/tools-reference.md
@@ -32,6 +32,7 @@
`Read`| Reads the contents of files. See Read tool behavior| No
`ReadMcpResourceTool`| Reads a specific MCP resource by URI| No
`RemoteTrigger`| Creates, updates, runs, and lists [cloud scheduled tasks](</docs/en/routines>), formerly routines, on claude.ai. Backs the `/schedule` command. The [`RemoteTrigger` input reference](</docs/en/agent-sdk/typescript#remotetrigger>) documents every action and the organization policies that remove the tool. Cloud scheduled tasks live on claude.ai and require a Pro, Max, Ultra, Team, or Enterprise plan. This tool is therefore not accessible from Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, or Microsoft Foundry| No
+`REPL`| Runs the JavaScript that Claude writes in [Code Mode](</docs/en/code-mode>). Available only when Code Mode is on. For how Claude Code checks the tool calls in that code, see [Permission checks](</docs/en/code-mode#permission-checks>)| No
`ReportFindings`| Reports code-review findings as a structured list, with a file, summary, and failure scenario per finding, so Claude Code can render them instead of printing them as text. Claude calls it when active code-review instructions tell it to. A finding can also carry an optional `category` slug, such as `correctness` or `test-coverage`, shown next to the file location in the rendered list| No
`ScheduleWakeup`| Reschedules the next iteration of a [self-paced `/loop`](</docs/en/scheduled-tasks#let-claude-choose-the-interval>). Claude calls this at the end of each iteration to pick when the next one runs, between one minute and one hour out; you don’t call it directly. To end the loop instead, Claude calls it with `stop: true`, which cancels the pending wakeup. The pending wakeup appears in `session_crons` in [Stop hook input](</docs/en/hooks#stop-input>)| No
`SearchPlugins`| Searches your claude.ai plugin catalog. Available in the same sessions as `ListPlugins`| No
@@ -118,10 +119,10 @@
### What persists between commands
- * When Claude runs `cd` in the main session, the new working directory carries over to later Bash commands as long as it stays inside the project directory or an [additional working directory](</docs/en/permissions#working-directories>) you added with `--add-dir`, `/add-dir`, or `additionalDirectories` in settings. This includes commands Claude runs in response to your later messages.
+ * In the main session, Claude’s `cd` carries over to later Bash commands only from a foreground command that exits 0. The command must also end inside the project directory or an [additional working directory](</docs/en/permissions#working-directories>), such as one you added with `--add-dir`, `/add-dir`, or `additionalDirectories` in settings.
+ * By default, if that command ends outside those directories, Claude Code resets to the project directory and appends `Shell cwd was reset to <dir>` to the tool result.
+ * To disable this carry-over, set `CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR=1`.
* Subagent sessions never carry over working directory changes.
- * If `cd` lands outside those directories, Claude Code resets to the project directory and appends `Shell cwd was reset to <dir>` to the tool result.
- * To disable this carry-over so every Bash command starts in the project directory, set `CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR=1`.
* Environment variables don’t persist. An `export` in one command won’t be available in the next.
* Claude Code starts a non-interactive shell, sources `~/.zshrc` for Zsh or `~/.bashrc` for Bash, and applies the aliases, functions, and shell options it captures to Bash commands.
@@ -391,7 +392,9 @@
* `"shell": "powershell"` on individual [command hooks](</docs/en/hooks#command-hook-fields>): runs that hook in PowerShell. Hooks spawn PowerShell directly, so this works regardless of `CLAUDE_CODE_USE_POWERSHELL_TOOL`.
* `shell: powershell` in [skill frontmatter](</docs/en/skills#frontmatter-reference>): runs `!`command`` blocks in PowerShell. Requires the PowerShell tool to be enabled.
-PowerShell commands follow the same main-session working-directory reset behavior as Bash commands, including the `CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR` environment variable. PowerShell commands also receive the variables hooks persist through `CLAUDE_ENV_FILE`, under the conditions in [Persisted variables in PowerShell commands](</docs/en/hooks#persisted-variables-in-powershell-commands>). Requires Claude Code v2.1.296 or later.
+### Working directory and variables in PowerShell commands
+
+By default, when a foreground PowerShell command in the main session ends outside your [working directories](</docs/en/permissions#working-directories>), Claude Code resets to the project directory. To reset after each command, set `CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR=1`. PowerShell commands receive the variables hooks persist through `CLAUDE_ENV_FILE`, under the conditions in [Persisted variables in PowerShell commands](</docs/en/hooks#persisted-variables-in-powershell-commands>). Requires Claude Code v2.1.296 or later.
### Exit code 1 from searches and `git diff` in PowerShell
@@ -532,36 +535,57 @@
### Block a site or turn WebFetch off
-To| Do this
+Goal| What to do
---|---
Block a domain| Add a `WebFetch(domain:...)` rule for it to `deny`
Require a prompt for a domain| Add a `WebFetch(domain:...)` rule for it to `ask`
Turn WebFetch off| Add `WebFetch` to `deny`, or set [`CLAUDE_CODE_DISABLE_WEB_FETCH`](</docs/en/env-vars#variables>) to `1`
-Do any of these for your organization| Put the rule in [managed settings](</docs/en/managed-settings>)
-
-Outside the sandbox, if Bash is allowed, Claude can still use `curl`, `wget`, or other tools to reach any URL. See [Tool-specific permission rules](</docs/en/permissions#tool-specific-permission-rules>).
-
-### When a fetch prompts, fails, or WebFetch is missing
+
+Outside the sandbox, if Bash is allowed, Claude can still use `curl`, `wget`, or other tools to reach any URL. See [Tool-specific permission rules](</docs/en/permissions#tool-specific-permission-rules>). To apply a `WebFetch` rule to your organization, put it in [managed settings](</docs/en/managed-settings>).
+
+### Fix unexpected WebFetch prompts and denials
+
+If a fetch is blocked or denied, or you see a permission prompt you didn’t expect or none at all, find what you see in the first column.
+
+Symptom| Fix
+---|---
+A fetch fails for a domain you allowed| The URL also has to pass the [WebFetch domain safety check](</docs/en/data-usage#webfetch-domain-safety-check>), unless you turn the check off with [`skipWebFetchPreflight`](</docs/en/settings-reference#skipwebfetchpreflight>). See [WebFetch domain safety check failed](</docs/en/errors#webfetch-domain-safety-check-failed>).
+In auto mode, a fetch is blocked and you see no prompt| Add an allow rule for the domain. If the classifier blocked the fetch, you can also open `/permissions` in the terminal and [approve the fetch](</docs/en/auto-mode-config#review-denials>) under the **Recently blocked** tab so Claude can retry.
+In `claude -p` or the Agent SDK, a fetch is denied| These runs [start in Manual mode](</docs/en/permission-modes#which-mode-a-non-interactive-run-starts-in>), and a call that needs approval is denied. Add an allow rule or start in auto mode.
+A rule in your own settings file has no effect| If your organization sets [`allowManagedPermissionRulesOnly`](</docs/en/settings-reference#allowmanagedpermissionrulesonly>), Claude Code ignores the rule. Ask your administrator to add it to managed settings.
+Prompts continue after you add the domain to the sandbox’s [`allowedDomains`](</docs/en/settings-reference#sandbox-network-alloweddomains>)| WebFetch doesn’t read that list, so add a WebFetch allow rule
+No prompt for a domain you didn’t allow| Claude Code skips the prompt for a built-in set of preapproved documentation domains, and in `auto` and `bypassPermissions` modes. To require the prompt anyway, add an `ask` rule for the domain. Sandboxed Bash commands don’t inherit the preapproved set.
+A claude.ai artifact link brings another prompt| See [Read an artifact shared with you](</docs/en/artifacts#read-an-artifact-shared-with-you>)
+
+### Fix a failed WebFetch request
+
+If Claude says it couldn’t fetch a page, find what happened in the first column.
+
+Symptom| Fix
+---|---
+In a cloud session, Claude says the network blocks the domain| An allow rule isn’t enough there. Also [add the domain](</docs/en/cloud-environments#allow-specific-domains>) to the cloud environment’s network access.
+Claude can’t fetch a local or intranet server| WebFetch [refuses `localhost`](</docs/en/errors#webfetch-cannot-fetch-localhost>) and any other hostname without a dot. Ask Claude to reach the server with `curl` through the Bash tool.
+Claude reports a redirect and stops there| Ask Claude to fetch the new URL. When a redirect changes the host by more than adding or dropping `www.`, WebFetch returns the new URL and no page content.
+Claude says the download ran out of time| A download fails after five minutes. To change the limit, set [`CLAUDE_CODE_WEBFETCH_DEADLINE_MS`](</docs/en/env-vars#variables>).
+
+### Fix missing or outdated page content
Claude’s reply can leave out anything on the page that Claude didn’t ask about. In the terminal, press `Ctrl+O` to see what Claude asked and the answer it received.
-What you notice| What to do
+Symptom| Fix
---|---
Claude says a page doesn’t cover something you know is there| Ask Claude to fetch the page again and tell it what to look for. For the raw page, ask it to run `curl` on the URL through the Bash tool.
Claude leaves out the end of a long page, or says part of it wasn’t read| Ask Claude to fetch the next part of the page. This requires Claude Code v2.1.290 or later. The `web-fetch` subagent reads pages of up to about 48,000 characters in full, and WebFetch reads the first 100,000 when Claude calls it.
Claude describes a page as it was before a recent change| WebFetch reuses its copy of a page for 15 minutes. To change how long, set [`CLAUDE_CODE_WEBFETCH_CACHE_TTL_MS`](</docs/en/env-vars#variables>).
-Claude says the download ran out of time| A download fails after five minutes. To change the limit, set [`CLAUDE_CODE_WEBFETCH_DEADLINE_MS`](</docs/en/env-vars#variables>).
-Claude reports a redirect and stops there| Ask Claude to fetch the new URL. When a redirect changes the host by more than adding or dropping `www.`, WebFetch returns the new URL and no page content.
-Claude can’t fetch a local or intranet server| WebFetch [refuses `localhost`](</docs/en/errors#webfetch-cannot-fetch-localhost>) and any other hostname without a dot. Ask Claude to reach the server with `curl` through the Bash tool.
-In a cloud session, Claude says the network blocks the domain| An allow rule isn’t enough there. Also [add the domain](</docs/en/cloud-environments#allow-specific-domains>) to the cloud environment’s network access.
-In auto mode, a fetch is blocked and you see no prompt| Add an allow rule for the domain. If the classifier blocked the fetch, you can also open `/permissions` in the terminal and [approve the fetch](</docs/en/auto-mode-config#review-denials>) under the **Recently blocked** tab so Claude can retry.
-In `claude -p` or the Agent SDK, a fetch is denied| These runs [start in Manual mode](</docs/en/permission-modes#which-mode-a-non-interactive-run-starts-in>), and a call that needs approval is denied. Add an allow rule or start in auto mode.
-A fetch fails for a domain you allowed| The URL also has to pass the [WebFetch domain safety check](</docs/en/data-usage#webfetch-domain-safety-check>), unless you turn the check off with [`skipWebFetchPreflight`](</docs/en/settings-reference#skipwebfetchpreflight>). See [WebFetch domain safety check failed](</docs/en/errors#webfetch-domain-safety-check-failed>).
-A rule in your own settings file has no effect| If your organization sets [`allowManagedPermissionRulesOnly`](</docs/en/settings-reference#allowmanagedpermissionrulesonly>), Claude Code ignores the rule. Ask your administrator to add it to managed settings.
-Prompts continue after you add the domain to the sandbox’s [`allowedDomains`](</docs/en/settings-reference#sandbox-network-alloweddomains>)| WebFetch doesn’t read that list, so add a WebFetch allow rule
-No prompt for a domain you didn’t allow| Claude Code skips the prompt for a built-in set of preapproved documentation domains, and in `auto` and `bypassPermissions` modes. To require the prompt anyway, add an `ask` rule for the domain. Sandboxed Bash commands don’t inherit the preapproved set.
-A claude.ai artifact link brings another prompt| See [Read an artifact shared with you](</docs/en/artifacts#read-an-artifact-shared-with-you>)
-Claude can’t fetch any page| Run `/status` in the session. If the `Organization configuration` line lists `HIPAA`, WebFetch is off: see [What developers see in Claude Code](</docs/en/hipaa-setup#what-developers-see-in-claude-code>). If the `Organization policy` line reports that the policy didn’t load and names web fetch, follow any fix the line names. WebFetch becomes available again without a restart once a policy that allows it loads.
+
+### Find out why WebFetch is unavailable
+
+If Claude can’t fetch any page, run `/status` in the session and check the `Organization configuration` and `Organization policy` lines:
+
+ * **`Organization configuration` lists `HIPAA`**: WebFetch is off. See [What developers see in Claude Code](</docs/en/hipaa-setup#what-developers-see-in-claude-code>).
+ * **`Organization policy` reports that the policy didn’t load and names web fetch**: follow any fix the line names. WebFetch becomes available again without a restart once a policy that allows it loads.
+
+If `/status` shows neither, look for `WebFetch` under `deny` in a [settings file](</docs/en/settings#find-or-create-your-settings-files>), or for `CLAUDE_CODE_DISABLE_WEB_FETCH` set to `1`. To turn WebFetch back on, remove the rule, or unset the variable and start a new session. Ask your administrator to remove a rule that’s in [managed settings](</docs/en/settings#check-what-your-organization-enforces>).
### The web-fetch subagent
@@ -586,7 +610,7 @@
Your `WebFetch` [permission rules](</docs/en/permissions#webfetch>) apply to the pages the `web-fetch` subagent fetches, and so do the `PreToolUse` and `PostToolUse` [hooks](</docs/en/hooks>) that match `WebFetch`.
-If you rely on| With the subagent| What to do
+Your configuration| What changes with the subagent| What to do
---|---|---
CLAUDE.md instructions about which pages to fetch| The subagent starts without your CLAUDE.md files, including your organization’s managed one| Restrict fetches with `WebFetch` permission rules
`SubagentStart` or `SubagentStop` hooks| Only the hooks defined in [managed settings](</docs/en/managed-settings>) run for this subagent| In any other settings file, use a `PreToolUse` or `PostToolUse` hook that matches `WebFetch`
--- a/troubleshoot.md
+++ b/troubleshoot.md
@@ -2,7 +2,7 @@
## Find out why a mod does nothing
-When a mod does nothing, check what Claude Code reads from the mod’s files, and the line it writes when it skips something. For the first, in your shell run [`claude plugin validate`](</docs/en/plugins/mods/create#check-what-claude-code-reads-from-your-mod>) with the mod’s directory, as in `claude plugin validate ./first-mod`. It catches a misspelled event, a bad manifest, and a module Claude Code can’t read, without starting a session. When a module doesn’t load, a hook is skipped, or another mod refuses yours, Claude Code writes one line that names your mod. Where you read that line depends on the session:
+When a mod does nothing, check what Claude Code reads from the mod’s files, and the line it writes when it skips something. To check the files, in your shell run [`claude plugin validate`](</docs/en/plugins/mods/create#check-what-claude-code-reads-from-your-mod>) with the mod’s directory, as in `claude plugin validate ./first-mod`. It catches a bad manifest and a module Claude Code can’t read, without starting a session. Claude Code writes one line naming your mod in cases such as a code error that stops it from loading, a skipped hook, or a refusal by another mod. Look for that line in the transcript, the debug log, or stderr, by session type:
* **A session that hot-reloads a plugin directory** : a dim line in the transcript. That’s an interactive session you started with `--plugin-dir`, or one where [hot reloading is on](</docs/en/plugins/mods/create#ask-claude-for-a-mod>) for mods Claude wrote.
* **Any other interactive session, such as one that runs a mod you installed from a marketplace** : the debug log. To get one, start the session with `claude --debug`.
@@ -45,6 +45,7 @@
---|---
`hooks modules are turned off for installed plugins in this process: the rollout switch served off`| Anthropic has turned installed mods off remotely.
`hooks modules are turned off for installed plugins in this process: the rollout switch was saved off by an earlier session`| The session used a value an earlier session saved, which may be out of date. Start Claude Code again to refresh it.
+`hooks modules a person installed wait for the rollout switch in this process`| In a [cloud session](</docs/en/claude-code-on-the-web>), your mods are waiting to load, so send another message. If the line includes `could not be read`, or you see `Mods you installed aren't running in this session`, start a new session instead.
`disableAllHooks in managed settings`| Your organization turned off hooks from installed plugins
`only managed plugins and built-in plugins run`| `allowManagedHooksOnly` is set, or `disableAllHooks` is set in a settings file other than managed settings
`installed plugins that are not managed load no hooks module in this mode (--bare)`| You started Claude Code with `--bare`
@@ -109,6 +110,15 @@
The line names the mod and the event, then says `hook skipped:` and a reason, as in `first-mod: tool.call hook skipped: threw Error: boom`. A hook threw, exceeded its [time limit](</docs/en/plugins/mods/reference#limits>), or returned a result of the wrong shape. The line appears once for each event and kind of failure until the mod reloads. Fix the error. The debug log has a line for every occurrence.
+### `call refused` or `result withheld`
+
+Either line means Claude Code couldn’t copy a value to or from a hook that checks an action, such as a `tool.call` hook. Match the transcript or debug log line to see whether the action ran:
+
+ * `call refused`: Claude Code refused the action in your hook’s place
+ * `result withheld`: what the tool did stays done, and Claude reads a note in place of its result
+
+What Claude gets back can include `could not be given to a hook that checks it` or `a hook that checks this result could not hand back its answer`. If the line includes `could not be given its argument`, your hook didn’t run, so leave it as it is. If it includes `is not plain data: nesting deeper than 28000 levels`, reduce the nesting in the values your hook returns or passes on.
+
### `no command.run hook answered it`
You run a command your mod added, and the reply names the mod and the command, as in `first-mod registered /tally but no command.run hook answered it`, then tells you to add a hook. Claude Code prints that reply when the command reaches the end of the chain with no answer, which happens in two cases:
@@ -224,7 +234,10 @@
### `$.ui.open` runs and no pane appears
-The call didn’t come from something the user did, and the terminal is narrower than [the width that pane needs](</docs/en/plugins/mods/interface#when-a-pane-waits-for-a-wider-terminal>). Open the pane from a command or a button, or check the call’s `isPlaced` result. See [Open a pane at the right time](</docs/en/plugins/mods/interface#open-a-pane-at-the-right-time>).
+Check the call’s result. When `isPlaced` is `false`, the start of `reason` says why, as in these cases:
+
+ * **`unasked below`** : open the pane from a command or a button, or use [a wider terminal](</docs/en/plugins/mods/interface#when-a-pane-waits-for-a-wider-terminal>).
+ * **`no-surface`** : nothing is attached to draw on, as in a `claude -p` or Agent SDK run. From a `command.run` hook, return `{ text }` instead.
### A toast doesn’t appear
@@ -265,7 +278,7 @@
### Your edits don’t take effect
-You’re editing a plugin you installed. Claude Code runs the cached copy for the installed version. Develop with `--plugin-dir` pointed at your working copy, as in `claude --plugin-dir ./first-mod`, which reloads when you save.
+If your plugin was [copied at install](</docs/en/plugins/loading#in-place-and-copied-plugins>), Claude Code runs that copy. Develop with `--plugin-dir` pointed at your working copy, as in `claude --plugin-dir ./first-mod`, which reloads when you save.
### A value resets when the module reloads
@@ -285,10 +298,10 @@
`settings.read bypassed by cc-plugin-sec-default`, on a line that names your mod ahead of it| The [built-in guard](</docs/en/plugins/mods/admin#know-what-happens-by-default>) skipped your hook. Ask your organization’s administrator to [install the mod as one of the organization’s mods](</docs/en/plugins/mods/admin#install-your-organizations-mods>).
`settings.read: the answer for <key> is no value the key can hold`| Claude Code refused the value a hook returned for that key. The hook may be yours or another mod’s. Follow the step for your case.
`settings.read: the merge never settles for <key>`| The keys the line names keep the settings sources’ values. Set them in a settings file.
-`answered settings.read without next()`, after a mod’s name| Your hook is affected if the named mod [runs before yours](</docs/en/plugins/mods/events#the-order-mods-run-in>). Then your hook didn’t run on that read. [Turn that mod off](</docs/en/plugins/mods/overview#turn-mods-on-or-off>), or if your organization deployed it, ask its administrator to.
+`answered settings.read without next()`, after a mod’s name| Your hook is affected if the named mod [runs before yours](</docs/en/plugins/mods/events#the-order-mods-run-in>). Then your hook didn’t run on that read. [Turn that mod off](</docs/en/plugins/mods/overview#turn-mods-on-or-off>), or if you’re in an organization that deployed it, ask your administrator to.
`settings.read: refused to the engine`| Your value didn’t apply because Claude Code’s own read was refused. Find what refused it.
-If no line explains the key, check the mods that run before yours for a `settings.read` hook that [changes the key](</docs/en/plugins/mods/events#settings-read-example>). Turn that mod off, or ask your organization’s administrator to. If no hook does, set the key in a settings file.
+If no line explains the key, check the mods that run before yours for a `settings.read` hook that [changes the key](</docs/en/plugins/mods/events#settings-read-example>). Turn that mod off, or if you’re in an organization that deployed it, ask your administrator to. If no hook does, set the key in a settings file.
### `the answer for <key> is no value the key can hold`
@@ -312,7 +325,7 @@
Search your code for the reason in the parentheses:
* **Your code has it** : your hook refused the read. Make it return `{ value }` when [`next.origin`](</docs/en/plugins/mods/events#settings-read-origin>) shows Claude Code’s own read.
- * **Your code doesn’t have it** : [turn off](</docs/en/plugins/mods/overview#turn-mods-on-or-off>) your other mods one at a time. If your organization deployed a mod, ask its administrator to turn it off. After each:
+ * **Your code doesn’t have it** : [turn off](</docs/en/plugins/mods/overview#turn-mods-on-or-off>) your other mods one at a time, or if you’re in an organization that deployed one, ask your administrator to. After each:
1. Start the session from your shell with `claude --debug-file ./settings-read-2.log`, followed by the flags it started with. Use a new path each time.
2. Search that file for `refused to the engine`. If the line is there, turn off the next mod. If not, the last mod you turned off refused the read, so keep it off.
--- a/troubleshoot-install.md
+++ b/troubleshoot-install.md
@@ -50,6 +50,7 @@
`unable to get local issuer certificate`| Configure corporate CA certificates
`OAuth error`, `That doesn't look like the full code`, or `403 Forbidden`| Fix authentication
`Claude Code access has not been granted for this account`| Get a role that includes Claude Code
+`That code wasn't accepted`| Sign in again and paste the new code
`Unable to connect to Anthropic services` during setup| See [Unable to connect to Anthropic services](</docs/en/errors#unable-to-connect-to-anthropic-services>) in the Error reference
`Could not load the default credentials` or `Could not load credentials from any providers`| Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry credentials
`ChainedTokenCredential authentication failed` or `CredentialUnavailableError`| Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry credentials
@@ -893,7 +894,11 @@
Check Keychain access
-Run `claude doctor` to check Keychain access. When the Keychain rejects writes, the report lists a warning that starts with `macOS Keychain is not writable`, followed by a suggested fix. When the report lists no Keychain warning, the Keychain is writable and you can skip to the last step.
+In the shell you run Claude Code from, run `claude doctor` and look for a warning that starts with `macOS Keychain is not writable`. What the report shows decides your next step:
+
+ * **No such warning** : skip to the last step
+ * **A warning whose fix says`Unlocking the Keychain won't help`**: follow that fix. If that shell is sandboxed, restart these steps outside the sandbox to move your login back
+ * **A warning with another fix** : go on to the next step
2
--- a/typescript.md
+++ b/typescript.md
@@ -1807,7 +1807,8 @@
| "org_config_required_unavailable"
| "org_config_refused"
| "sandbox_required_unavailable"
- | "config_file_invalid";
+ | "config_file_invalid"
+ | "sideload_flags_disabled";
Each value names one refusal:
@@ -1834,6 +1835,7 @@
`org_config_refused`| Anthropic refused to provide the organization’s policies and managed settings for this sign-in, for example because the sign-in expired or was revoked, or the organization doesn’t allow Claude Code for this account. Requires Agent SDK v0.3.293 or later
`sandbox_required_unavailable`| `failIfUnavailable` is on and the sandbox can’t start. The text in `errors` ends with `Set sandbox.failIfUnavailable=false to allow unsandboxed execution.` Requires Agent SDK v0.3.314 or later
`config_file_invalid`| `~/.claude.json` isn’t valid JSON. Claude Code leaves the file unchanged, so a retry fails the same way until someone repairs it. `errors` names the file and says how to restore or repair it. See [Configuration error in ~/.claude.json](</docs/en/errors#configuration-error-in-claude-json>). Requires TypeScript Agent SDK v0.3.318 or later and Claude Code v2.1.318 or later
+`sideload_flags_disabled`| A flag or launch option violates managed [`disableSideloadFlags`](</docs/en/settings-reference#disablesideloadflags>). Requires TypeScript Agent SDK v0.3.331 or later and Claude Code v2.1.331 or later
### `SDKSystemMessage`
--- a/voice-dictation.md
+++ b/voice-dictation.md
@@ -49,15 +49,42 @@
# hold space, speak "use the new token validation helper"
> refactor the auth middleware to use the new token validation helper▮
-By default, when you release the key, Claude Code inserts the transcript and waits for you to press `Enter`. Set `"autoSubmit": true` in the `voice` settings object to send the prompt automatically when you release the key, as long as the transcript is at least three words long. Holding or tapping `Space` starts dictation only where the keypress would otherwise type into the prompt. In the [transcript viewer](</docs/en/interactive-mode#transcript-viewer>), `Space` pages through the conversation, and in [vim mode](</docs/en/interactive-mode#vim-editor-mode>) outside INSERT it is a command. To dictate from either place, rebind to a modifier combination like `meta+k`.
+By default, when you release the key, Claude Code inserts the transcript and waits for you to press `Enter`. Set `"autoSubmit": true` in the `voice` settings object to send the prompt automatically when you release the key, as long as the transcript is at least three words long. Holding or tapping `Space` starts dictation only where the keypress would otherwise type into the prompt. In the [transcript viewer](</docs/en/interactive-mode#transcript-viewer>), `Space` pages through the conversation, and in [vim mode](</docs/en/interactive-mode#vim-editor-mode>) outside INSERT it is a command. To dictate outside INSERT, or in hold mode from the transcript viewer, rebind to a modifier combination like `meta+k`.
## Tap to record and send
-Tap mode toggles recording with a single keypress: tap once to start, speak, then tap again to send the prompt. There is no warmup, and you don’t need to keep the key held. Enable tap mode with `/voice tap`. With the prompt input empty, tap `Space` to start recording. The footer shows `● REC · tap to send` while recording. Tap `Space` again to stop. Claude Code inserts the transcript and submits the prompt automatically when the transcript is at least three words long. Shorter transcripts are inserted but not submitted, so an accidental tap does not send a stray word. The three-word threshold counts words for languages written without spaces. Japanese, Chinese, and Thai transcripts count individual words, so they auto-submit in tap mode and in hold mode with `autoSubmit`. The first tap only starts recording when the prompt input is empty, so you can still type spaces normally while composing a message. The second tap stops recording regardless of input contents. Recording also stops automatically after 15 seconds of silence or two minutes total.
+Tap mode toggles recording with a single keypress: tap once to start, speak, then tap again to send the prompt. There is no warmup, and you don’t need to keep the key held. Enable tap mode with `/voice tap`. With the prompt input empty, tap `Space` to start recording. The footer shows `● REC · tap to send` while recording. Tap `Space` again to stop. After the second tap, Claude Code inserts the transcript and submits the prompt if the transcript is long enough:
+
+ * **Three words or more** : Claude Code submits the prompt automatically.
+ * **Fewer words** : the transcript is inserted but not submitted, so an accidental tap does not send a stray word.
+
+The three-word threshold counts words for languages written without spaces. Japanese, Chinese, and Thai transcripts count individual words, so they auto-submit in tap mode and in hold mode with `autoSubmit`. You tap once to start or resume a recording, and it can stop without a second tap:
+
+ * **Start** : the first tap starts recording when the prompt input is empty, so you can still type spaces normally while composing a message. To add to a recording that stopped by itself, resume it.
+ * **Stop** : recording also stops when you send or edit the prompt. It stops by itself after 60 seconds with no recognized words or after 10 minutes total.
+
+### Resume a recording that stopped by itself
+
+When a tap-mode recording stops by itself, your words stay in the prompt unsent and the footer says why. You can send the words, or add to them if you haven’t edited them:
+
+ * **Send the words** : press `Enter`.
+ * **Add to the words** : put the cursor at the end of the words and tap `Space` to record again. When you tap again to stop, Claude Code sends all of the text if you added at least three words.
+
+To see what stopped the recording, find the part of the footer message that starts with `dictation stopped`:
+
+Message| What stopped the recording
+---|---
+`dictation stopped after 1m with no new words`| No words were recognized for 60 seconds. If you were speaking, try the fixes for `No speech detected`
+`dictation stopped at its 10m limit`| The recording reached 10 minutes
+`dictation stopped: lost the connection`| The connection to the transcription service closed, or couldn’t be opened again after it failed
+`dictation stopped: lost the microphone`| The program recording your microphone, such as SoX or `arecord`, exited or couldn’t start
+`dictation stopped: the prompt lost focus`| A panel such as the model picker opened, or you opened the [transcript viewer](</docs/en/interactive-mode#transcript-viewer>)
+`dictation stopped: the terminal detached`| The last remaining terminal detached from a [background session](</docs/en/agent-view>)
+`dictation stopped: the prompt changed`| The prompt’s text changed, for example because you typed in it. To dictate again, send or clear the prompt first
## Cancel a recording
-Press `Esc` or `Ctrl+C` to cancel a dictation instead of finalizing it. Claude Code stops the microphone, discards the transcript, and restores the prompt to what it held before the recording started. Both keys also cancel while a finished recording’s transcript is still processing. A prompt you edited or submitted during processing stays as you left it. Neither key does anything else in the press that cancels: `Esc` doesn’t interrupt Claude’s response, and `Ctrl+C` doesn’t clear the prompt or count as the first of the [two presses that exit Claude Code](</docs/en/interactive-mode#general-controls>).
+With no panel, question, or permission prompt open, press `Esc` or `Ctrl+C` to cancel a dictation instead of finalizing it. Claude Code stops the microphone, discards the transcript, and restores the prompt to what it held before the recording started. At the prompt, both keys also cancel while a finished recording’s transcript is still processing. A prompt you edited or submitted during processing stays as you left it. Neither key does anything else in the press that cancels: `Esc` doesn’t interrupt Claude’s response, and `Ctrl+C` doesn’t clear the prompt or count as the first of the [two presses that exit Claude Code](</docs/en/interactive-mode#general-controls>).
## Change the dictation language
@@ -127,13 +154,18 @@
* **`Voice mode could not find a working audio recorder in WSL`** : WSLg routes audio through PulseAudio rather than an ALSA device, so SoX needs its PulseAudio backend installed explicitly. Run `sudo apt install sox libsox-fmt-pulse`. Installing `sox` alone pulls in the ALSA backend, which cannot record on WSL because there is no `/dev/snd` device.
* **`Voice input is failing repeatedly and has been paused`** : voice dictation hit three failures within 10 seconds. Claude Code pauses dictation until 10 seconds have passed since the first of those failures. This usually means the microphone or audio stack on this host can’t capture audio, for example a headless server, a remote shell with no audio passthrough, or a denied microphone permission. Confirm a working input device, fix the underlying cause from the entries above, then trigger voice again. Before v2.1.202, only start-up failures counted toward the pause.
* **Nothing happens when holding`Space` in hold mode**: watch the prompt input while you hold. If spaces keep accumulating, voice dictation is likely off; run `/voice hold` to enable it. If only one or two spaces appear and then nothing, voice dictation is on but hold detection is not triggering. Hold detection requires your terminal to send key-repeat events, so it can’t detect a held key if key-repeat is disabled at the OS level. Switch to tap mode with `/voice tap` to avoid the key-repeat requirement.
- * **Tapping`Space` types a space instead of recording in tap mode**: the first tap only starts recording when the prompt input is empty. Clear the input first, or check that you are in tap mode by running `/voice tap`.
+ * **Tapping`Space` types a space instead of recording in tap mode**: when the prompt has text and you aren’t resuming a recording, `Space` types a space. To record, send or clear the prompt first. If the prompt is already empty, run `/voice tap` to turn on tap mode.
* **`No audio detected from microphone`** : recording started but captured silence. Confirm the correct input device is set as the system default and that its input level is not muted or near zero. On Windows, open Settings → System → Sound → Input and select your microphone. On macOS, open System Settings → Sound → Input.
* **`Voice connection failed`** : your recording never reached the transcription service because the connection failed. Check your network and try again. A recording that captures no audio reports `No audio detected from microphone` instead of this message. Before v2.1.200, a silent microphone could report a connection failure, which suggested a network problem when the actual issue was the input device.
* **`Dictation error: WebSocket error:` followed by a certificate error such as `unable to get local issuer certificate`**: see [Dictation or the Web tab fails behind a TLS-inspecting proxy](</docs/en/vs-code#dictation-or-the-web-tab-fails-behind-a-tls-inspecting-proxy>) on the VS Code page.
* **`Voice stream error: WebSocket upgrade rejected with HTTP<status>`**: a server refused your connection with the HTTP status shown, so this isn’t a network outage. A status in the 400 range usually means a stale sign-in, or a proxy or bot-protection service answering in place of the transcription service. Run `/login` to refresh your sign-in, and check for a VPN or proxy on your network path if the status persists. If you’re still recording when the rejection arrives, Claude Code retries a status outside the 400 range once before showing this message; it doesn’t retry a status in the 400 range. In v2.1.229 through v2.1.231, native builds didn’t show this message: Claude Code kept recording, the hold-mode footer still showed `listening…`, and it reported `Voice connection failed` after you stopped recording.
* **`No speech detected`** : audio reached the transcription service but no words were recognized. Speak closer to the microphone, reduce background noise, and confirm your dictation language matches the language you are speaking.
- * **`Dictation stopped: no speech recognized for 15 seconds` or `Dictation stopped at its 2-minute limit`**: in the VS Code extension, a recording ends after 15 seconds with no recognized words, or two minutes after it starts. If you were speaking during those 15 seconds, try the fixes for `No speech detected`. Words already recognized stay in the prompt box and aren’t sent. To add more, click the microphone button again.
+ * **`text kept, Enter to send` or `dictation stopped` in the terminal’s footer**: your tap-mode recording stopped without a second tap. Words still in the prompt haven’t been sent. Press `Enter` to send them, or add to them. Before v2.1.332, recordings stopped after 15 seconds with no recognized words or after two minutes, and Claude Code then sent a transcript of three or more words.
+ * **`Dictation stopped: no speech recognized for 60 seconds`, `Dictation stopped at its 10-minute limit`, or `Dictation stopped: this panel was hidden`**: the VS Code extension stopped your recording. Words already recognized stay in the prompt box and aren’t sent. To add more, click the microphone button again. The limits are shorter while the panel is hidden:
+ * **Visible panel** : with a working connection and microphone, the recording ends after 60 seconds with no recognized words, or 10 minutes after it starts. If you were speaking during those 60 seconds, try the fixes for `No speech detected`.
+ * **Hidden panel** : after you hide the panel, the recording ends after 15 seconds with no recognized words, or two minutes after you hid it. Keep the panel visible while you dictate.
+Before v2.1.332, the first two messages were `Dictation stopped: no speech recognized for 15 seconds` and `Dictation stopped at its 2-minute limit`.
+ * **`Dictation error: The microphone stopped sending audio`** : words already recognized stay in the VS Code extension’s prompt box and aren’t sent. To try again, click the microphone button.
* **Transcription is garbled or in the wrong language** : dictation defaults to English. If you are dictating in another language, set it in `/config` first. See Change the dictation language.
### Terminal not listed in macOS Microphone settings
--- a/vs-code.md
+++ b/vs-code.md
@@ -46,7 +46,7 @@
* **Activity Bar** : click the Spark icon in the left sidebar to open the sessions list. Click any session to open it in your preferred location, or start a new one. This icon is always visible in the Activity Bar.
* **Command Palette** : `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux), type “Claude Code”, and select an option like “Open in New Tab”
- * **Status Bar** : click **✻ Claude Code** in the bottom-right corner of the window. This works even when no file is open.
+ * **Status Bar** : click **✻ Claude Code** in the bottom-right corner of the window. This works without an open file.
You can drag the Claude panel to reposition it anywhere in VS Code. See Customize your workflow for details.
@@ -534,6 +534,8 @@
New Conversation| `Cmd+N` (Mac) / `Ctrl+N` (Windows/Linux)| Start a new conversation. Requires Claude to be focused and `enableNewConversationShortcut` set to `true`
Reopen Closed Session| `Cmd+Shift+T` (Mac) / `Ctrl+Shift+T` (Windows/Linux)| Reopen the most recently closed Claude session tab. Falls through to VS Code’s normal reopen-closed-editor when the last closed tab wasn’t a Claude session. Disable with `enableReopenClosedSessionShortcut`
Insert @-Mention Reference| `Option+K` (Mac) / `Alt+K` (Windows/Linux)| Insert a reference to the current file and selection (requires editor to be focused)
+Add Cell to Chat| -| Add a notebook cell, its text output or error, and an @-mention of the notebook to the prompt box. Requires Claude Code v2.1.331 or later
+Resolve Merge Conflicts| -| Put a conflict-resolution request in the prompt box. Click this command’s button in a conflicted file’s **Editor Toolbar** or on Source Control’s **Merge Changes**. Requires Claude Code v2.1.331 or later
Accept Change at Cursor| -| Accept the change at the cursor while reviewing a proposed edit one change at a time. Requires Claude Code v2.1.275 or later
Reject Change at Cursor| -| Revert the change at the cursor while reviewing a proposed edit one change at a time. Requires Claude Code v2.1.275 or later
Toggle Focus view| `Ctrl+Option+F` (Mac) / `Ctrl+Alt+F` (Windows/Linux)| Hide or show tool activity in the conversation. Works while a Claude panel or sidebar is visible. On Windows/Linux, `Ctrl+Alt+F` opens VS Code’s Find instead while focus is in the Debug Console or a searchable list such as the Explorer. Focus an editor or the Claude panel and press it again. Requires Claude Code v2.1.221 or later
@@ -603,6 +605,7 @@
`autosave`| `true`| Auto-save files before the Read, Edit, and Write tools run
`attachOpenFile`| `true`| Add the file that is open in the editor to your messages and show it in the prompt box. When off, the file is added only along with text you select. Requires Claude Code v2.1.271 or later
`attachSelection`| `true`| Add the text you select in the editor to your messages and show it in the prompt box. When off, you can still add a selection as an @-mention. Requires Claude Code v2.1.300 or later
+`showFixActions`| `true`| Show **Fix with Claude Code** on editor errors, warnings, and failed tests. Selecting it puts a fix request in the prompt box. Requires Claude Code v2.1.331 or later
`useCtrlEnterToSend`| `false`| Use Ctrl/Cmd+Enter instead of Enter to send prompts
`scrollToBottomOnSend`| `true`| Scroll the conversation to the bottom when you send a message. When off, the conversation stays where you left it. Requires Claude Code v2.1.275 or later
`pinPrompt`| `true`| Keep your message pinned at the top while you scroll through Claude’s reply. Requires Claude Code v2.1.330 or later
@@ -625,7 +628,7 @@
## Use third-party providers
-By default, Claude Code connects directly to Anthropic’s API. If your organization uses Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry to access Claude, configure the extension to use your provider instead:
+By default, Claude Code connects directly to Anthropic’s API. If you use Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry to access Claude, configure the extension to use your provider instead:
1
@@ -794,6 +797,7 @@
`Could not locate the Claude CLI on PATH`| [Could not locate the Claude CLI on PATH](</docs/en/errors#could-not-locate-the-claude-cli-on-path>)
`The connection to Claude Code ended before this message completed`| [The connection to Claude Code ended before this message completed](</docs/en/errors#the-connection-to-claude-code-ended-before-this-message-completed>)
`The Claude Code program for this computer, the <build> build, could not be found`| [The Claude Code program for this computer could not be found](</docs/en/errors#the-claude-code-program-for-this-computer-could-not-be-found>)
+`Failed to set model: Settings file is not valid JSON`| [Fix a broken settings file](</docs/en/settings#fix-a-broken-settings-file>)
`claude` isn’t found in VS Code’s integrated terminal| Run CLI in VS Code
### Extension won’t install
@@ -806,13 +810,13 @@
The Spark icon appears in the **Editor Toolbar** (top-right of editor) when you have a file open. If you don’t see it:
- 1. **Open a file** : The icon requires a file to be open. Having only a folder open isn’t enough.
+ 1. **Open a file** : The icon requires a file to be open.
2. **Check VS Code version** : Requires 1.94.0 or later. Check under **Help > About**
3. **Restart VS Code** : Run “Developer: Reload Window” from the Command Palette
4. **Disable conflicting extensions** : Temporarily disable other AI extensions (Cline, Continue, etc.)
5. **Check workspace trust** : The extension doesn’t work in Restricted Mode
-Alternatively, click **✻ Claude Code** in the **Status Bar** at the bottom-right corner of the window. This works even without a file open. You can also use the **Command Palette** (`Cmd+Shift+P` / `Ctrl+Shift+P`) and type “Claude Code”.
+Alternatively, click **✻ Claude Code** in the **Status Bar** at the bottom-right corner of the window. This works without a file open. You can also use the **Command Palette** (`Cmd+Shift+P` / `Ctrl+Shift+P`) and type “Claude Code”.
### Cmd+Esc does nothing on macOS
--- a/web-quickstart.md
+++ b/web-quickstart.md
@@ -18,7 +18,7 @@
3. **Work** : Claude analyzes code, makes changes, runs tests, and checks its work. You can watch and steer throughout, or step away and come back when it’s done.
4. **Push the branch** : when Claude reaches a stopping point, it pushes its branch to GitHub. You review the diff, leave inline comments, create a PR, or send another message to keep going.
-The session doesn’t close when the branch is pushed. PR creation and further edits all happen within the same conversation.
+PR creation and further edits all happen within the same conversation.
## Compare ways to run Claude Code
--- a/workflows.md
+++ b/workflows.md
@@ -355,7 +355,7 @@
* Check `/model` before a large run if you usually switch to a smaller model for routine work
* Ask Claude to use a smaller model for stages that don’t need the strongest one when you describe the task
-When your organization’s [`availableModels` allowlist](</docs/en/model-config#restrict-model-selection>) blocks a model the script requests for an agent, that agent runs on a substituted model instead, following the same [substitution rules as subagents](</docs/en/sub-agents#when-an-allowlist-blocks-a-subagent-model>).
+When an [`availableModels` allowlist](</docs/en/model-config#restrict-model-selection>) blocks a model the script requests for an agent, that agent runs on a substituted model instead, following the same [substitution rules as subagents](</docs/en/sub-agents#when-an-allowlist-blocks-a-subagent-model>).
### Set a size guideline
--- a/worktrees.md
+++ b/worktrees.md
@@ -97,7 +97,7 @@
Apply the requested refactor across every affected file, then run the tests
and report the results.
-Each subagent gets a temporary worktree that Claude Code removes automatically when the subagent finishes without changes; a worktree with changes stays on disk until the periodic sweep below can remove it without losing work. For a worktree your [WorktreeCreate hook](</docs/en/hooks#worktreecreate>) created, see [WorktreeRemove](</docs/en/hooks#worktreeremove>) instead. Subagent worktrees use the same base branch as `--worktree`, so they branch from your repository’s default branch unless `worktree.baseRef` is set to `"head"`. A subagent in its own worktree takes the instruction files it [starts with](</docs/en/sub-agents#what-loads-at-startup>) from your main conversation, not from its worktree. When that worktree is in the default location under `.claude/worktrees/`, the subagent also doesn’t load the `CLAUDE.md` file or `.claude/rules/` directory at the worktree’s root as it reads files there, even if those differ on the worktree’s branch.
+When a subagent finishes, Claude Code keeps the worktree if git shows changed files, untracked files, or new commits there. Otherwise, Claude Code can remove the worktree right away. A kept worktree stays on disk until the periodic sweep can remove it without losing work. For a worktree your [WorktreeCreate hook](</docs/en/hooks#worktreecreate>) created, see [WorktreeRemove](</docs/en/hooks#worktreeremove>) instead. Subagent worktrees use the same base branch as `--worktree`, so they branch from your repository’s default branch unless `worktree.baseRef` is set to `"head"`. A subagent in its own worktree takes the instruction files it [starts with](</docs/en/sub-agents#what-loads-at-startup>) from your main conversation, not from its worktree. When that worktree is in the default location under `.claude/worktrees/`, the subagent also doesn’t load the `CLAUDE.md` file or `.claude/rules/` directory at the worktree’s root as it reads files there, even if those differ on the worktree’s branch.
### Clean up subagent and background-session worktrees
@@ -111,7 +111,7 @@
#### Worktree locks and manual removal
-While an agent is running, Claude Code holds a `git worktree lock` on its worktree so that concurrent cleanup can’t remove it, and releases the lock when the agent finishes. Claude Code holds the same lock on the worktree it created for a backgrounded session while the session runs, so the sweep leaves the worktree in place and `git worktree remove` refuses to remove it. The sweep also releases a lock Claude Code set for a session whose process has exited, so a killed background session doesn’t leave its worktree permanently locked. The sweep never releases a lock you set yourself with `git worktree lock`. To clean up a worktree that the sweep keeps, run `git worktree remove`, adding `--force` if the worktree has uncommitted changes or untracked files. If git refuses because the worktree is locked, run `git worktree unlock` on it first.
+Claude Code takes a `git worktree lock` on the worktree it creates for an agent, so that concurrent cleanup can’t remove it during the agent’s first run, before any [resume](</docs/en/sub-agents#resume-subagents>). The worktree Claude Code created for a backgrounded session has the same lock while the session runs, so the sweep keeps the worktree and `git worktree remove` refuses it. The sweep also releases a lock Claude Code set for a session whose process has exited, so a killed background session doesn’t leave its worktree permanently locked. The sweep never releases a lock you set yourself with `git worktree lock`. To clean up a worktree that the sweep keeps, run `git worktree remove`, adding `--force` if the worktree has uncommitted changes or untracked files. If git refuses because the worktree is locked, run `git worktree unlock` on it first.
## Customize worktree creation