Changes on
37 changes detected
--- a/admin-setup.md
+++ b/admin-setup.md
@@ -116,9 +116,9 @@
Connected GitHub accounts
-On Team and Enterprise plans, the GitHub section of [**Organization settings > Git providers**](<https://claude.ai/admin-settings/source-control>) lists the GitHub organizations and personal accounts linked to your Claude organization through the [Claude GitHub App](<https://github.com/apps/claude>). Claude Code, [Claude Tag](<https://claude.com/docs/claude-tag/admins/configure-github>), and Claude Security share the list. Opening the page requires an admin role in your Claude organization. An admin or a member can link an account:
+On Team and Enterprise plans, the GitHub section of [**Organization settings > Git providers**](<https://claude.ai/admin-settings/source-control>) lists the GitHub organizations and personal accounts linked to your Claude organization through the [Claude GitHub App](<https://github.com/apps/claude>). Claude Code, [Claude Tag](<https://claude.com/docs/claude-tag/admins/configure-github>), and Claude Security share the list. Opening the page requires an [Owner role](</docs/en/server-managed-settings#access-control>) in your Claude organization. The Admin role can’t open it. Someone can link an account from the Git providers page or by connecting GitHub to Claude:
- * **Admin connection** : an admin clicks **Connect** in that section, or **Add organization** once an account is connected, and installs the Claude GitHub App on a GitHub organization. Linking an organization this way requires someone who is both an owner of the GitHub organization and an admin of your Claude organization.
+ * **Owner connection** : an Owner clicks **Connect** in that section, or **Add organization** once an account is connected, and installs the Claude GitHub App on a GitHub organization. Linking an organization this way requires an Owner of your Claude organization who also owns the GitHub organization.
* **Member connection** : when a member connects their GitHub account to Claude, for example while [setting up cloud sessions](</docs/en/web-quickstart#connect-github>), Claude links the GitHub accounts that member owns where the Claude GitHub App is already installed. That can include their personal account and GitHub organizations they own.
A row marked **Not linked** comes from your own GitHub sign-in. It’s an account you can see on GitHub where the Claude GitHub App is installed. To unlink an account from your Claude organization, open its row’s menu and select **Unlink from this workspace**. Unlinking leaves the Claude GitHub App installed on GitHub, and the account is linked again the next time one of its owners connects GitHub to Claude. To keep it from being linked again, uninstall the Claude GitHub App from that account on GitHub. On Enterprise plans, the [Compliance API](<https://platform.claude.com/docs/en/api/compliance/activities/list>) activity types for linking and unlinking are `github_app_installation_linked` and `github_app_installation_unlinked`.
--- a/agent-loop.md
+++ b/agent-loop.md
@@ -232,7 +232,7 @@
`effort` trades latency and token cost for reasoning depth within each response. [Extended thinking](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking>) is a separate feature that produces `thinking` blocks in the output, and the `display` field on `ThinkingConfig` for [Python](</docs/en/agent-sdk/python#thinkingconfig>) or [TypeScript](</docs/en/agent-sdk/typescript#thinkingconfig>) controls whether you receive their text. They are independent: you can set `effort: "low"` with extended thinking enabled, or `effort: "max"` without it.
-Use lower effort for agents doing simple, well-scoped tasks (like listing files or running a single grep) to reduce cost and latency. Set `effort` in the top-level `query()` options for the whole session, or per subagent with the `effort` field on [`AgentDefinition`](</docs/en/agent-sdk/subagents#agentdefinition-configuration>) to override the session level.
+Use lower effort for agents doing simple, well-scoped tasks, such as listing files or running a single grep, to reduce cost and latency. Set `effort` in the top-level `query()` options for the [session](</docs/en/sub-agents#choose-an-effort-level>), or per subagent with the `effort` field on [`AgentDefinition`](</docs/en/agent-sdk/subagents#agentdefinition-configuration>) to override the session level.
###
--- a/agent-teams.md
+++ b/agent-teams.md
@@ -138,7 +138,7 @@
* **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
-By default, teammates inherit the lead’s [effort level](</docs/en/model-config#adjust-effort-level>). In split-pane mode this applies from v2.1.186; earlier versions did not pass the lead’s session effort to split-pane teammates.
+By default, a teammate on the lead’s model inherits the lead’s [effort level](</docs/en/model-config#adjust-effort-level>). In split-pane mode this applies from v2.1.186; earlier versions did not pass the lead’s session effort to split-pane teammates. For a teammate on another model, see [Effort level of subagents and teammates](</docs/en/model-config#effort-level-of-subagents-and-teammates>).
###
@@ -146,11 +146,11 @@
Have teammates plan before implementing
-For complex or risky tasks, you can have teammates plan before implementing. A teammate that Claude spawns while the lead is in [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>) works in read-only plan mode until its plan is ready. Switch the lead into plan mode first, then ask for the teammate:
+For complex or risky tasks, you can have teammates plan before implementing. A teammate that Claude spawns while the lead is in [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>) also works in plan mode until its plan is ready. Switch the lead into plan mode first, then ask for the teammate:
Spawn an architect teammate to refactor the authentication module.
-When that teammate finishes planning, it sends a plan approval request to the lead. If you haven’t changed that teammate’s permission mode since it was spawned, Claude Code approves the plan as soon as the request arrives, without the lead reviewing it. The teammate’s edits and commands still go through the permission prompts described in Permissions. Once approved, the teammate exits plan mode and begins implementation. If you put a running in-process teammate in plan mode by pressing [`Shift+Tab`](</docs/en/permission-modes#switch-permission-modes>) while viewing its session, the lead reviews that run’s plan instead of Claude Code approving it. You aren’t asked to approve it; the lead approves it or sends it back for revision.
+When that teammate finishes planning, it sends a plan approval request to the lead. If you haven’t changed that teammate’s permission mode since it was spawned, Claude Code approves the plan as soon as the request arrives, without the lead reviewing it. Once approved, the teammate exits plan mode and begins implementation. Claude Code passes it the lead’s current permission mode, or Manual if that’s plan mode. If you put a running in-process teammate in plan mode by pressing [`Shift+Tab`](</docs/en/permission-modes#switch-permission-modes>) while viewing its session, the lead reviews that run’s plan instead of Claude Code approving it. You aren’t asked to approve it; the lead approves it or sends it back for revision.
###
@@ -274,7 +274,11 @@
Permissions
-Teammates start with the lead’s permission mode, except [`dontAsk` mode](</docs/en/permission-modes#allow-only-pre-approved-tools-with-dontask-mode>), which they don’t inherit. If the lead runs with `--dangerously-skip-permissions`, all teammates do too. After spawning, you can change an individual teammate’s permission mode, but you can’t set per-teammate permission modes at spawn time. An in-process teammate runs under the lead’s live allow and deny rules, so [`--disallowedTools`](</docs/en/cli-reference#cli-flags>), `--tools`, and `--allowedTools` all apply to it. For a split-pane teammate, check each flag:
+To cycle a running teammate’s permission mode, press [`Shift+Tab`](</docs/en/permission-modes#switch-permission-modes>), though an in-process teammate can run in the lead’s mode instead. For a split-pane teammate, press it in its pane. For an in-process teammate, press it while viewing its session, and the teammate checks its mode when it starts its next turn.
+
+An in-process teammate that isn’t in plan mode runs in the lead’s mode while the lead is in [`acceptEdits`](</docs/en/permission-modes#auto-approve-file-edits-with-acceptedits-mode>), [`auto`](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), or [`bypassPermissions`](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>) mode. Switching the teammate to Manual doesn’t change that, even if its status bar shows Manual.To have it ask before it edits, press Enter on the `main` row in the agent panel and switch the lead to Manual mode too. The lead then asks too, as does any other teammate in Manual mode.
+
+You can’t set per-teammate permission modes at spawn time. A new teammate starts with the lead’s mode, including `bypassPermissions` mode, which `--dangerously-skip-permissions` turns on. If the lead is in [`dontAsk` mode](</docs/en/permission-modes#allow-only-pre-approved-tools-with-dontask-mode>), the teammate starts in [Manual mode](</docs/en/permission-modes#available-modes>) instead. An in-process teammate runs under the lead’s live allow and deny rules, so [`--disallowedTools`](</docs/en/cli-reference#cli-flags>), `--tools`, and `--allowedTools` all apply to it. For a split-pane teammate, check each flag:
* **`--disallowedTools` and `--tools`**: the teammate starts with the lead’s command-line deny rules and tool list. Requires Claude Code v2.1.309 or later.
* **`--allowedTools`** : Claude Code doesn’t pass this flag to a split-pane teammate, so an action you allowed with it alone isn’t pre-approved there. To approve those actions ahead of time, put the rules under `permissions.allow` in [`--settings`](</docs/en/settings#change-a-setting-for-one-session>) when you start the lead. For example, run `claude --settings '{"permissions":{"allow":["Bash(npm *)"]}}'` in your shell. The rules apply to the lead and each split-pane teammate for that session.
@@ -526,7 +530,7 @@
* **No nested teams** : teammates cannot spawn their own teammates. Only the lead can manage the team.
* **No background subagents from in-process teammates** : an in-process teammate’s own subagents run in the foreground, because a teammate’s background work can’t outlive the lead’s process. Claude Code returns an error when a teammate spawns a subagent whose definition sets `background: true`. A teammate’s `run_in_background: true` request also fails, either with an error or by running silently in the foreground. Subagents launched from the main conversation follow the [background default](</docs/en/sub-agents#run-subagents-in-foreground-or-background>).
* **Lead is fixed** : the main session is the lead for its lifetime. You can’t promote a teammate to lead or transfer leadership.
- * **Permissions set at spawn** : teammates start with the permission mode described under Permissions. You can change an individual teammate’s permission mode after spawning, but you can’t set per-teammate permission modes at spawn time.
+ * **No per-teammate permission modes at spawn** : teammates start with the permission mode described under Permissions.
* **Split panes require tmux or iTerm2** : the default in-process mode works in any terminal. Split-pane mode isn’t supported in VS Code’s integrated terminal, Windows Terminal, or Ghostty.
##
--- a/agent-view.md
+++ b/agent-view.md
@@ -396,7 +396,7 @@
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. Exiting a session that still has background work running, such as subagents, background shell commands, workflows, or [monitors](</docs/en/tools-reference#monitor-tool>), shows a `Background work is running` dialog instead of quitting immediately. 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. 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`.
####
--- a/amazon-bedrock.md
+++ b/amazon-bedrock.md
@@ -458,7 +458,7 @@
AWS Guardrails
-[Amazon Bedrock Guardrails](<https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html>) let you implement content filtering for Claude Code. Create a Guardrail in the [Amazon Bedrock console](<https://console.aws.amazon.com/bedrock/>), publish a version, then add the Guardrail headers to your [settings file](</docs/en/settings>). Enable Cross-Region inference on your Guardrail if you’re using cross-region inference profiles. Example configuration:
+[Amazon Bedrock Guardrails](<https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html>) let you implement content filtering for Claude Code. Create a Guardrail in the [Amazon Bedrock console](<https://console.aws.amazon.com/bedrock/>) and publish a version. Enable Cross-Region inference on your Guardrail if you’re using cross-region inference profiles. To apply the Guardrail through a [Claude apps gateway](</docs/en/claude-apps-gateway>), follow [Apply an Amazon Bedrock guardrail](</docs/en/claude-apps-gateway-config#apply-an-amazon-bedrock-guardrail>). Without a Claude apps gateway, add the Guardrail headers to your [settings file](</docs/en/settings>). Example settings file configuration:
{
"env": {
@@ -466,7 +466,7 @@
}
}
-If your organization delivers the guardrail headers through a [Claude apps gateway](</docs/en/claude-apps-gateway>) policy instead, they count as [settings that need approval](</docs/en/server-managed-settings#environment-variables-and-the-approval-dialog>). When the guardrail blocks a response partway through, the text streamed so far stays and the reply ends with the message configured on the guardrail for blocked responses.
+When the guardrail blocks a response partway through, the text streamed so far stays and the reply ends with the message configured on the guardrail for blocked responses.
##
--- a/best-practices.md
+++ b/best-practices.md
@@ -139,7 +139,7 @@
# Gotchas
- Integration tests need DATABASE_URL set, see .env.example
-In a session, run `/context` to confirm that Claude loaded the file. Notice that the typecheck line is only the command. Claude needs to know the command so it can check its own work as it goes. If you also want Claude Code to _enforce_ a passing typecheck before Claude finishes, that’s a job for a `Stop` hook. A line like `Always typecheck before you finish` in this file works most of the time, not every time. You don’t have to write the file from scratch:
+In a session, run [`/context all`](</docs/en/commands#all-commands>) to confirm that Claude loaded the file. Notice that the typecheck line is only the command. Claude needs to know the command so it can check its own work as it goes. If you also want Claude Code to _enforce_ a passing typecheck before Claude finishes, that’s a job for a `Stop` hook. A line like `Always typecheck before you finish` in this file works most of the time, not every time. You don’t have to write the file from scratch:
* `/init` generates a starting version from your codebase. From there the work is mostly removing lines. The [memory guide](</docs/en/memory#write-effective-instructions>) recommends staying under 200.
* `/doctor` suggests cuts for anything Claude can [already work out from the code](</docs/en/memory#my-claude-md-is-too-large>).
@@ -579,7 +579,7 @@
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.
-For one big mechanical change across many files, [`/batch migrate every handler to the v2 response helpers`](</docs/en/commands>) splits the work into 5 to 30 units and shows you the plan. Then it runs each unit in its own worktree and opens a PR for it. From your shell, [`claude agents`](</docs/en/agent-view>) (still a research preview) gives you one screen for everything running in the background on your machine. A second session is also the easiest independent reviewer you can get. One session writes the rate limiter, another reviews `@src/middleware/rateLimiter.ts` without having watched it being written, and you paste the findings back into the first. Same idea as `/code-review`, with you carrying the messages.
+For one big mechanical change across many files, [`/batch migrate every handler to the v2 response helpers`](</docs/en/commands>) splits the work into 5 to 30 units and shows you the plan. Once you approve it, each unit gets its own worktree and opens a PR or reports what happened. From your shell, [`claude agents`](</docs/en/agent-view>) (still a research preview) gives you one screen for everything running in the background on your machine. A second session is also the easiest independent reviewer you can get. One session writes the rate limiter, another reviews `@src/middleware/rateLimiter.ts` without having watched it being written, and you paste the findings back into the first. Same idea as `/code-review`, with you carrying the messages.
##
Show diff (109 lines)
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,106 @@
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.318
+
+November 4, 2026
+
+**Added**
+
+ * Added a record of your answer when Claude Code asks to turn on the mods it writes in a session
+ * Added `assume_role` on `mantle` upstreams of the Claude apps gateway, for a role in another AWS account and for per-developer AWS cost attribution
+ * Added an `effort` option to a mod’s `$.model.fork`, so a quick side job can run at `low` whatever effort the session uses; the result reports the effort sent
+ * Added the date a stored claude.ai sign-in ends to `claude auth status` (`loginExpiresAt`) and to `claude -p` JSON results (`credential_expires_at`)
+ * Added a one-line stderr warning to `claude -p` text output, starting 10 days before a stored claude.ai sign-in ends
+ * Gateway: Added a log warning when the Google access token from a federation (`external_account`) credentials file is about to expire
+ * Self-hosted runner: Added `CLAUDE_RUNNER_SPAWN_REASON` to the orchestrator’s spawn-runner hook environment: why Anthropic sent the request (e.g. `runner_lost`, `resumed`); unset when none was sent
+ * Self-hosted runner: Added a startup warning when `--release-idle-session-min` is the last argument with no value (still ignored) or has a value of only spaces (still read as `0`)
+ * [Cloud sessions] Added a No repository option: a cloud session on an Anthropic-hosted environment can now start without picking a repository
+ * [Cloud sessions] Added the usual Chrome names to cloud sessions, so tools other than Playwright can find the built-in Chromium through google-chrome and CHROME_PATH
+ * [Cloud sessions] Added a New session button to the card shown when a cloud session’s environment was deleted, where the message box is hidden
+
+**Changed**
+
+ * Changed Claude Code to no longer install or update the IDE extension when started in an IDE terminal; use `/ide` from an outside terminal or your editor’s extensions view
+ * Changed subagents to stop instead of switching models when “Switch models when a message is flagged” is set to “Ask each time”
+ * Changed background subagents to move a shell command to the background after 3 minutes on all providers, so the prompt cache doesn’t expire while it runs
+ * Changed subagent progress summaries on Bedrock, Vertex, Foundry, or with telemetry off: on a cold prompt cache, one can now wait up to 5 minutes for the subagent’s pending response
+ * Changed what a mod attaches at `prompt.submit` to stay in the user’s turn rather than go out as a system message
+ * Changed `deniedMcpServers` URL entries to also block Anthropic-provided servers whose upstream URL matches, and connectors in cloud sessions and on self-hosted runners, where the session is given the connector’s own URL; otherwise deny a connector by name
+ * Changed the `/permissions` rule details, built-in rules and delete confirmation views to use the standard dialog; pressing Ctrl+C twice there now goes back or cancels instead of quitting
+ * Changed `/claude-api managed-agents-onboard` to give a new agent’s built-in tools, and a quickstart template’s MCP tools, the `auto` permission policy (“Judge risky actions”) by default, matching the Claude Console; say “run without asking” to opt out
+ * Removed the 2.1.288 fix that kept the model’s earlier thinking when resuming a conversation started on 2.1.286 or earlier; that thinking can now be dropped
+ * Self-hosted runner: Changed the orchestrator’s log lines: `ok session=…` now prints at every log level on stdout (was debug only, stderr) with `reason=…` after `jti=…`, and `nack session=…` ends its fields with `reason=…` after `retryable=…`; update scripts that match `retryable=true:` or `retryable=false:`
+ * [Cloud sessions] Changed connector search results to tell Claude that the search covers only part of the connector directory
+
+Show 15 improvements
+
+ * Improved how `~/.claude.json`, settings files and the stored login survive saves on shared network home directories: they are less often deleted, briefly emptied or replaced by a near-empty or older copy
+ * Improved sessions on network file systems to look again when the configuration file is wrongly reported as missing, so fewer start without your MCP servers and trusted folders
+ * Improved MCP tool errors: a call made before the tool is loaded now returns its input schema
+ * Improved the reliability of git commits and pull request creation when the Bash tool runs macOS’s built-in `/bin/bash`
+ * Improved “Ask your admin for more usage” in the usage limit menu to send the request in one step
+ * Improved how fast remote sessions reconnect after a pause or sleep
+ * Improved You should know toasts to say “try again” instead of “press 2”, which only works in the terminal
+ * Improved auto-update reliability: a brief network failure while verifying a release is now retried right away instead of waiting for the next check
+ * Improved unattended runs (`claude -p`, SDK apps) to stop rewriting `~/.claude.json` on every run when nothing in it changed
+ * Gateway: Improved the log hints about `listen.trusted_proxies`: they now say to list only a proxy that adds the connecting address to `X-Forwarded-For` itself
+ * Gateway: Improved the warning when AWS CountTokens fails on Amazon Bedrock: it says Claude Code, not the gateway, counts after the 501, and points at IAM only when AWS denies access
+ * Remote Control: Improved the title a fork of a terminal fork is created with when the app doesn’t set one: “Name (fork 2)”
+ * [VSCode] Improved the sign-in screen to show what Claude Code printed when its sign-in status check fails
+ * [Cloud sessions] Improved most Create PR failure messages in cloud and Remote Control sessions: they now give the reason or a link to GitHub instead of saying Try again
+ * [Code Review] Improved the Code Review analytics page to retry once after a server or network failure, then show a Try again banner instead of empty cards
+
+Show 47 bug fixes
+
+ * Fixed `--continue` sometimes losing the earlier conversation after a malformed tool call’s retries ran out (regression in 2.1.314)
+ * Fixed macOS sessions with many running Bash commands stalling while memory grew
+ * Fixed permission prompts being answered by keys typed just after sending a message, or before a slow prompt appeared
+ * Fixed `/logout`, `claude auth logout` and `claude mcp remove` reporting success, and changes to trust, consent or MCP settings being dropped with no word, when the config file could not be updated on a shared network home directory
+ * Fixed jobs exiting with `Not logged in` when another terminal or host signs in again to the same account and organization on the same home
+ * Fixed `claude mcp add` and `remove` writing the config without its lock: they now wait for it or exit 1, though another job’s save can still replace a saved server
+ * Fixed `claude plugin` commands exiting before a slow token refresh was saved, which could sign you out on the next run
+ * Fixed `claude plugin validate` passing a custom-named marketplace file that `claude plugin marketplace add` rejects
+ * Fixed stdio MCP servers that exit on the version probe being re-probed on every start; a server that dies in under 3s for its own reason is also pinned to the legacy handshake for 7 days
+ * Fixed sessions being refused at startup by an `allowedProviders` list that another login on the same machine had stored
+ * Fixed idle compaction replacing a conversation with a reply that was not a summary
+ * Fixed the “Now using usage credits” notice reappearing about every 30 seconds while a background subagent is running
+ * Fixed custom slash commands that fail, or that only Claude can invoke, printing nothing in `claude -p` and SDK sessions
+ * Fixed `claude -p` and Agent SDK sessions reporting success when an API error cut off a reply while a mod hooked `turn.step`
+ * Fixed a message sent right after a model change still running after Stop in headless sessions: Stop now cancels or stops it as it would a queued message
+ * Fixed a deleted session transcript being re-created with its last prompt when an idle non-interactive session exited
+ * Fixed `claude remote-control` hosts, the background daemon and self-hosted runners failing to start new sessions (`spawn ENOENT`) after an update or version cleanup removed the binary of a still-running process
+ * Fixed a running Claude Code process owned by another user (for example one left by `sudo claude`) being treated as dead by version cleanup, which could delete its binary
+ * Fixed `/remote-control` showing a session as available after a failed connection
+ * Fixed `/design revoke` reporting success when the request failed with a 404
+ * Fixed a shell command approved after a self-hosted runner or cloud session restart running in the session’s start folder, not the folder it was asked in; if that folder can’t be entered, it is not run
+ * Fixed Claude not being told when an approved connector tool was unavailable after a cloud session restart
+ * Fixed cloud sessions being stopped in the middle of a turn when the service refuses uploads for several minutes
+ * Fixed variables a `Setup` hook writes to `CLAUDE_ENV_FILE` not reaching the Bash tool in some cloud sessions
+ * Fixed the iPhone app showing a cloud session’s turn as finished while it kept running, after a response was cut off at a tool call or a refused image or document was removed
+ * Fixed a restarted session re-sending a message that failed with an API error, ahead of the newer message waiting behind it
+ * Fixed a restarted session dropping its interrupted turn when the restart came right after Claude read a large image or retried a tool call
+ * Fixed every connection failing when the `NODE_EXTRA_CA_CERTS` file is empty, not PEM, or starts with a damaged certificate: readable certificates are now used, with a warning on stderr
+ * Fixed workflows re-running finished agents when resumed after a usage limit
+ * Fixed `/mcp` in cloud sessions counting tools the model can’t use; a server’s row now shows how many of its tools are available
+ * Fixed a duplicate notification when Claude left the status field out of a PushNotification call
+ * Fixed the error for a too-large image in a request with more than 20 images always saying the limit was 2000px; it now shows the API’s limit
+ * Fixed the runtime in background shell details not updating while the dialog is open
+ * Fixed a mod’s `turn.step` hook making a stopped reply finish as a success in headless runs
+ * Fixed retention cleanup leaving a home that only runs `claude -p` with no `~/.claude.json` backup: it now takes a fresh backup before deleting the last good one
+ * Fixed the stored login being replaced by an empty file when a network home directory has no room left for data but still takes new files
+ * Fixed tokens from `setup-token` being refused at start on machines with `forceLoginOrgUUID`, when the token belongs to a permitted organization
+ * Fixed non-interactive launches replacing a `~/.claude.json` that isn’t valid JSON with defaults; the start now fails, says how to restore the file, and leaves it as is (anthropics/claude-code#87551)
+ * Fixed an empty `~/.claude.json` with no backup being reported as corrupted; Claude Code now starts as it does when the file is missing
+ * Fixed the restore command printed for a damaged or missing `~/.claude.json` naming an empty or cut-off backup, or failing on a read-only file
+ * Fixed the sign-in failure when a stored claude.ai login reaches its time limit: it now says so, and in `claude -p` names `claude auth login` and `claude setup-token`
+ * Remote Control: Fixed a misleading “spawn error: ENOENT” when a session’s working folder is missing; the error now names the folder
+ * [VSCode] Fixed a window whose sign-in the organization’s settings refuse starting a new Claude Code process in the background every minute
+ * [VSCode] Fixed a long word in the chat panel’s error banner pushing its close button out of view
+ * [Cloud sessions] Fixed reading GitHub Actions logs in cloud sessions: `gh run view --log` and `gh api` log requests now get the log in most environments, not an unreachable redirect
+ * [Remote Control] Fixed side-by-side checkouts of one repository looking identical in the environment menu’s Remote Control rows; each now shows its own folder name
+ * [Claude Tag] Fixed keyboard focus and screen reader announcements in Claude Tag admin setup; pressing Escape in the connect form no longer also closes the Add dialog
--- a/claude-apps-gateway-config.md
+++ b/claude-apps-gateway-config.md
@@ -460,7 +460,7 @@
* If STS refuses or is unreachable, the gateway doesn’t send the request with the upstream’s own credentials. It logs the STS error with what to check, then tries the next upstream you listed. Upstream error messages covers what the client receives when no upstream succeeds. A later upstream without `assume_role` would serve the request with its own credentials, so list one only if that is what you want.
* The gateway calls the regional STS endpoint `sts.<region>.amazonaws.com`, which its network must reach. For the FIPS endpoint, set `AWS_USE_FIPS_ENDPOINT=true` in the gateway’s environment rather than `use_fips_endpoint` in an AWS config file.
- * `assume_role` applies to `provider: bedrock` only and needs SigV4 source credentials: the gateway refuses to start when it’s set beside `aws_bearer_token`.
+ * `assume_role` needs SigV4 source credentials: the gateway refuses to start when it’s set beside `aws_bearer_token`.
* Without a `groups` list, every developer the gateway admits can use this upstream. To limit which models a developer can use, set `availableModels` in a `managed` policy.
* To keep a model served through the role from also being served from another account, give it a custom id whose `upstream_model` map has only this upstream’s name. For such an id the gateway skips every other upstream, so neither the request nor the token count for an aborted request can fail over to another account.
* A request for a built-in model name can still reach this upstream, and the gateway signs it with the same role. List this upstream last unless its account should also serve those models.
@@ -510,12 +510,13 @@
`region`| Yes| AWS region. The gateway derives the endpoint from it as `https://bedrock-mantle.<region>.api.aws/anthropic`.
`models`| Yes| The models your AWS account has been granted on Mantle, named as clients send them, such as `claude-haiku-4-5`. Only these go to this upstream, and every other model skips to the next one.
`auth`| No| Takes the same keys as the Amazon Bedrock upstream’s `auth` block, under the same rules.
+`assume_role`| No| The role that this upstream’s requests go through, with the same keys as on a `bedrock` upstream, including `session_name` for per-developer attribution. Give the role Mantle’s IAM actions. Requires a gateway running Claude Code v2.1.318 or later. An earlier gateway exits at startup with `Unrecognized key(s) in object: 'assume_role'`.
`base_url`| No| Override the derived endpoint. Keep the `/anthropic` path at the end.
Grant the upstream’s AWS identity Mantle’s own IAM actions for inference and token counting, which [Use the Mantle endpoint](</docs/en/amazon-bedrock#use-the-mantle-endpoint>) lists. For a Mantle model ID that the gateway doesn’t know, add an entry to the top-level `models:` block whose `upstream_model` maps this upstream’s name to that ID. Then put that entry’s `id` in this upstream’s `models` field too. A `bedrock` upstream’s `guardrail` and `assume_role` settings don’t extend to the requests Mantle serves:
* **`guardrail`** : the gateway applies no Bedrock guardrail to requests it sends to Mantle, so it refuses to start when a `mantle` upstream is listed while any `bedrock` upstream sets `guardrail`.
- * **`assume_role`** : a `mantle` upstream takes no `assume_role`. Requests that Mantle serves are sent with the `mantle` upstream’s own `auth` credentials, and aren’t attributed per developer.
+ * **`assume_role`** : set it on the `mantle` upstream itself. Without it, requests that Mantle serves are sent with the `mantle` upstream’s own `auth` credentials.
For what Mantle’s own error responses mean, see [Mantle endpoint errors](</docs/en/amazon-bedrock#mantle-endpoint-errors>).
--- a/cli-reference.md
+++ b/cli-reference.md
@@ -83,7 +83,7 @@
`--desktop`| Open the [Claude Desktop app](</docs/en/desktop>) on the current directory and exit without starting a session in the terminal. Add `--continue`, or `--resume` with a session ID, to [open that session in Desktop](</docs/en/desktop#coming-from-the-cli>) instead. `--resume` here takes only a session ID, not a name or transcript path. Takes no prompt and no other flags except `--verbose` and the `--debug` flags, since the app starts the session itself. Available on macOS and x64 Windows when you’re signed in with a Claude subscription. Requires Claude Code v2.1.285 or later| `claude --desktop`
`--disable-slash-commands`| Disable all skills and commands for this session| `claude --disable-slash-commands`
`--disallowedTools`, `--disallowed-tools`| Deny rules. A bare tool name removes the matching tools from Claude’s context: `"Edit"` removes Edit, `"*"` removes every tool, and `"mcp__*"` removes every MCP tool. A scoped rule such as `Bash(rm *)` leaves the tool available and denies only calls that match [as written](</docs/en/permissions#bash-rule-limits>). A rule naming [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) can’t remove it while any other tool remains| `"Bash(git log *)" "Bash(git diff *)" "Edit"`
-`--effort`| Set the [effort level](</docs/en/model-config#adjust-effort-level>) for the current session. Options: `low`, `medium`, `high`, `xhigh`, `max`, or `ultracode`. Available levels depend on the model. `ultracode` requests `xhigh` effort with [ultracode](</docs/en/workflows#let-claude-decide-with-ultracode>) turned on, and requires Claude Code v2.1.203 or later. Overrides the [`modelSettings`](</docs/en/settings-reference#modelsettings>) and [`effortLevel`](</docs/en/settings-reference#effortlevel>) settings for this session and does not persist| `claude --effort high`
+`--effort`| Set the [effort level](</docs/en/model-config#adjust-effort-level>) for the current session. Options: `low`, `medium`, `high`, `xhigh`, `max`, or `ultracode`. Available levels depend on the model. `ultracode` requests `xhigh` effort with [ultracode](</docs/en/workflows#let-claude-decide-with-ultracode>) turned on, and requires Claude Code v2.1.203 or later. On the main conversation’s model, overrides the [`modelSettings`](</docs/en/settings-reference#modelsettings>) and [`effortLevel`](</docs/en/settings-reference#effortlevel>) settings for this session and doesn’t persist| `claude --effort high`
`--enable-auto-mode`| Removed in v2.1.111. Auto mode is now in the `Shift+Tab` cycle by default; use `--permission-mode auto` to start in it| `claude --permission-mode auto`
`--environment <environment-id>`| Create a new cloud session that runs on the [self-hosted environment](</docs/en/self-hosted-environments>) with the given ID. Environment IDs start with `ccpool_`. See [`--environment` dispatch behavior](</docs/en/self-hosted-environments-testing#environment-dispatch-behavior>) for dispatch behavior and the flag combinations it rejects. Requires Claude Code v2.1.224 or later| `claude -p "Fix the login bug" --environment ccpool_abc123`
`--exclude-dynamic-system-prompt-sections`| Move per-user context, such as the auto memory location, out of the system prompt and into the first user message. Improves prompt-cache reuse across different users and machines running the same task. Only applies with the default system prompt; ignored when `--system-prompt` or `--system-prompt-file` is set. Use with `-p` for scripted, multi-user workloads| `claude -p --exclude-dynamic-system-prompt-sections "query"`
--- a/code-review-local.md
+++ b/code-review-local.md
@@ -21,7 +21,7 @@
Keep working
-The review runs as a background [subagent](</docs/en/sub-agents>) with its own context window, so it doesn’t fill your conversation. The findings arrive in your conversation when the review completes.
+In a terminal session, the review runs as a background [subagent](</docs/en/sub-agents>) with its own context window, so it doesn’t fill your conversation. The findings arrive in your conversation when the review completes.
3
--- a/commands.md
+++ b/commands.md
@@ -37,7 +37,7 @@
`/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`
-`/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 publishes its change. 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`
+`/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
`/bug [report]`| Report a bug or share your conversation. You choose how much session history to include and confirm on a consent screen before anything is sent. When you’re signed in to Anthropic on a first-party connection, the report goes to Anthropic; on a third-party provider, or without Anthropic credentials, Claude Code writes the report to a [local archive under `~/.claude/feedback-bundles/`](</docs/en/data-usage#telemetry-services>) that you forward yourself. In the [VS Code extension](</docs/en/vs-code#use-the-prompt-box>), `/bug` opens the extension’s own feedback dialog instead; requires Claude Code v2.1.229 or later. When you run it while Claude is responding, Claude Code opens the dialog immediately. Before v2.1.232, Claude Code queued the command until the turn finished. Alias: `/share`. Before v2.1.212, `/bug` and `/share` were aliases of `/feedback`
--- a/debug-your-config.md
+++ b/debug-your-config.md
@@ -6,7 +6,7 @@
See what loaded into context
-The `/context` command shows everything occupying the context window for the current session, broken down by category: system prompt, system tools, MCP tools, custom subagents with the source each loaded from, memory files, skills, and conversation messages. Run it first to confirm whether your `CLAUDE.md`, rules, or skill descriptions are present at all. The skills section in `/context` also includes [bundled skills](</docs/en/skills#bundled-skills>), which `/skills` doesn’t list. For detail on a specific category, follow up with the dedicated command:
+The `/context` command shows everything occupying the context window for the current session. It breaks this down by category: system prompt, system tools, MCP tools, custom subagents with the source each loaded from, memory files, skills, and conversation messages. Run it first to confirm whether your `CLAUDE.md`, rules, or skill descriptions are present at all. The skills section in `/context` also includes [bundled skills](</docs/en/skills#bundled-skills>), which `/skills` doesn’t list. In [fullscreen mode](</docs/en/fullscreen>), `/context` collapses the per-item breakdown, so run `/context all` to expand it. For detail on a specific category, follow up with the dedicated command:
Command| Shows
---|---
Show diff (134 lines)
--- a/desktop.md
+++ b/desktop.md
@@ -1746,7 +1746,7 @@
If a command-line tool makes your remote machines on demand, add its command to `sshHostCommands` in [`~/.claude/settings.json`](</docs/en/settings#settings-files>). The environment selector then lists an item named after your entry, such as **Create Dev box**. When you select it, Desktop runs the command on your computer, saves the host that the command prints as an SSH connection, and connects.
-Connections from a command require Claude Desktop v3.6556.0 or later on macOS or Linux, signed in with a Claude account. Administrators can distribute commands to a team.
+Connections from a command require Claude Desktop v3.6556.0 or later on macOS or Linux, or v4.16336.0 or later on Windows, signed in with a Claude account. On Windows, Desktop also has to connect through the OpenSSH client. Administrators can distribute commands to a team.
Desktop runs the command only when you create the connection or create another machine, not each time you connect. Each entry is one connection, which points at the host that Desktop last saved from the entry’s command.
@@ -1774,7 +1774,7 @@
]
}
-Each entry takes these fields, and `id`, `name`, and `command` are required:
+On Windows, a bare name such as `acme-dev` doesn’t work, so start the command with the program’s full path. Each entry takes these fields, and `id`, `name`, and `command` are required:
Field| Value
---|---
@@ -1788,11 +1788,12 @@
##### Write the command
-Desktop starts the program directly, with no shell and no terminal:
-
- * **Program** : write its name, or its full path from `/`, without spaces. Desktop looks for a bare name on the `PATH` that your login shell exports. Relative paths such as `./acme-dev`, paths that start with `~`, and shell aliases and functions don’t work.
- * **Arguments** : separate plain arguments with spaces. The command can hold only spaces, ASCII letters, digits, and the characters `+,-./:=@_~`, and no word can start with `~`.
- * **Scripts** : if the command needs anything else, such as quotes, pipes, variables, or a URL with `?` or `&`, put it in a script. Make the script executable, start it with a `#!` line, and set `command` to its full path, such as `/Users/you/bin/make-devbox`. On macOS, keep the script out of the Documents, Desktop, and Downloads folders, where macOS can block it.
+On Windows, start with Write the command on Windows, which says which of these rules apply there. On macOS and Linux, Desktop starts the program directly, with no shell and no terminal:
+
+ * **Program** : write its name, or its full path from `/`. Desktop looks for a bare name on the `PATH` that your login shell exports. Relative paths such as `./acme-dev`, paths that start with `~`, and shell aliases and functions don’t work.
+ * **Spaces in the path** : put the program’s full path in single quotes, such as `'/Users/you/My Tools/make-devbox' create`. Quotes, single or double, require Claude Desktop v4.16336.0 or later, and work only around the program’s path.
+ * **Arguments** : separate arguments with spaces. Outside quotes, the command can hold only spaces, ASCII letters, digits, and the characters `+,-./:=@_~`, and no word can start with `~`. A quoted path can also hold some other characters, such as `(`, `)`, and `&`.
+ * **Scripts** : if the command needs anything else, such as quoted arguments, pipes, variables, or a URL with `?` or `&`, put it in a script. Make the script executable, start it with a `#!` line, and set `command` to its full path, such as `/Users/you/bin/make-devbox`. On macOS, keep the script out of the Documents, Desktop, and Downloads folders, where macOS can block it.
* **Input** : the program gets no input and no terminal, so it can’t prompt you there. If your tool signs you in through a browser or a prompt, sign in from a terminal first, and again whenever that sign-in lapses.
* **Environment** : the program runs in your home directory with the variables that your login shell exports. Desktop reads them when it starts, as it does for a `ProxyCommand`, so quit and reopen Desktop after you change them.
* **Time limit** : Desktop stops a program that is still running after 10 minutes. Desktop’s progress message doesn’t show the program’s output. To stop the program sooner, select **Cancel** next to that message.
@@ -1816,11 +1817,58 @@
If the command fails, **View details** in Desktop’s message shows the last line that the command wrote to standard error, if any.
+##### Write the command on Windows
+
+On Windows, start `command` with the full path of an `.exe`, `.cmd`, or `.bat` file, from the drive letter. Desktop doesn’t look for a bare name on your `PATH`, so an entry whose `command` is `acme-dev create` is gray. The following entry in `%USERPROFILE%\.claude\settings.json` runs `C:\Program Files\Acme\acme-dev.exe` with the argument `create`. In JSON, write each backslash twice, or write `/` instead. The single quotes are there because the path has a space:
+
+settings.json
+
+ {
+ "sshHostCommands": [
+ {
+ "id": "devbox",
+ "name": "Dev box",
+ "command": "'C:\\Program Files\\Acme\\acme-dev.exe' create"
+ }
+ ]
+ }
+
+Follow the rules in Write the command on spaces in the path, input, the time limit, and what the program prints. In place of its other rules, follow these:
+
+ * **Program** : don’t use a network path such as `\\server\share`, a variable such as `%USERPROFILE%`, or a letter outside ASCII. With any of these in the path, the entry is gray. If your user folder’s name has such a letter, keep the program outside that folder.
+ * **Arguments** : follow the Arguments rule in Write the command. The command can also hold `\`, but no word can end with it.
+ * **Scripts** : use a `.cmd` or `.bat` file, which Desktop runs through `cmd.exe`. Even in quotes, the file’s path can’t hold `&`, `^`, or `;`. In a file that you write, read the arguments with `%*`, because `%1` to `%9` split an argument at `,` and `=`.
+ * **Environment** : the program gets the Desktop app’s environment variables, not a shell profile’s. After you change a variable, quit and reopen Desktop.
+ * **Test** : to see the output that Desktop reads, run the command in Command Prompt. Put a path that has a space in double quotes and use `NUL` for no input, as in `"C:\Program Files\Acme\acme-dev.exe" create < NUL > host.txt`. The file has to hold only the host. The test makes a machine too, so delete it with your tool afterward.
+
+##### Wrap a Windows tool that prints other lines
+
+If your tool prints other lines before the host, such as progress messages, wrap it in a batch file that prints only the host. The following file prints the last line of your tool’s output, and exits with your tool’s code if it fails:
+
+make-devbox.cmd
+
+ @echo off
+ setlocal
+ set "host="
+ set "out=%TEMP%\acme-dev-%RANDOM%.txt"
+ call "C:\Program Files\Acme\acme-dev.exe" create > "%out%"
+ set "code=%ERRORLEVEL%"
+ for /f "usebackq delims=" %%L in ("%out%") do set "host=%%L"
+ del "%out%"
+ if not "%code%"=="0" exit /b %code%
+ setlocal EnableDelayedExpansion
+ echo(!host!
+
+Set `command` to the file’s full path, such as `C:\\tools\\make-devbox.cmd` in JSON. Keep its last two lines as they are, because they print the host without running it as a command.
+
##### Connect to a new host
Answer two questions the first time you connect to each new host:
- * **Host key** : with OpenSSH’s default host key checking, check the key’s fingerprint, then choose whether to connect. To skip the question, have your command add the key to `~/.ssh/known_hosts` before it prints the host, using a key that your tool learned when it made the machine. For a port other than 22, that line starts with `[host]:port`. If your tool reuses host names, remove the old key’s line too.
+ * **Host key** : with OpenSSH’s default host key checking, check the key’s fingerprint, then choose whether to connect. To skip the question, have your command add the key to `~/.ssh/known_hosts`, or `%USERPROFILE%\.ssh\known_hosts` on Windows, before it prints the host:
+ * Use a key that your tool learned when it made the machine
+ * For a port other than 22, start the line with `[host]:port`
+ * If your tool reuses host names, remove the old key’s line too
* **Folder** : choose whether you trust the folder that you open there
Keep host key checking on for these hosts, and keep a `known_hosts` file for them. If `StrictHostKeyChecking` is `no` or `accept-new` and `UserKnownHostsFile` is also `/dev/null` or `none`, nothing records the key. When your tool then reuses a name, you can connect to a different machine without a warning. A reused name also matters with nobody at the computer, because Desktop connects to these hosts on its own. For example, it delivers a message that you sent while the host was unreachable, once the host answers. Even with host key checking on, the message can reach the name’s new machine in these cases, so stop using a machine before it’s deleted:
@@ -1876,7 +1924,8 @@
* **Where to put the key** : if your MDM policy for Claude Code already sets a [policy key](</docs/en/managed-settings#how-claude-code-combines-managed-sources>), put it there. Otherwise, put it in the managed settings file. By default, such a policy outranks the file, and Desktop then ignores entries in the file. Set it on the computer even where [server-managed settings](</docs/en/server-managed-settings>) apply: Desktop ignores the key there, and in project and local settings.
* **The`id`**: if a user’s `sshHostCommands` entry has your `id`, only yours works. If any other SSH connection has it, such as one in a user’s `sshConfigs`, your entry is gray. Pick an `id` that users are unlikely to choose.
- * **The program** : give its full path, because Desktop looks up a bare name on each user’s own `PATH`. The program runs as the user, with the variables that their login shell exports.
+ * **The program** : give its full path, because on macOS and Linux Desktop looks up a bare name on each user’s `PATH`, and on Windows an entry with a bare name is gray. The program runs as the user, with that user’s variables.
+ * **Each platform** : deploy one entry to Windows computers and another to macOS and Linux computers. An entry with a Windows path is gray on macOS and Linux, and one with a macOS or Linux path is gray on Windows.
* **Users’ own entries** : Desktop treats a user’s entry like a [hook](</docs/en/hooks>), because both run a program on the computer. To allow only your entries, set [`strictPluginOnlyCustomization`](</docs/en/settings-reference#strictpluginonlycustomization>) to `["hooks"]`, or add `"hooks"` to its list. You also stop Claude Code hooks from user, project, and local settings, with no way to keep them. If you set that key or [`allowManagedHooksOnly`](</docs/en/settings-reference#allowmanagedhooksonly>) to `true` instead, you block more, as each key’s entry lists.
* **Every entry** : to turn off your entries too, set [`disableAllHooks`](</docs/en/settings-reference#disableallhooks>) in managed settings. If you set [`disableDesktopLocalSessions`](</docs/en/settings-reference#disabledesktoplocalsessions>), or an `sshHostAllowlist` that allows no host, the selector lists no **Create** or **Create another** items.
* **Where the locks count** : for these entries, Desktop reads `allowManagedHooksOnly`, `strictPluginOnlyCustomization`, and `disableAllHooks` from server-managed settings and from the computer’s own file or policy, and applies the stricter result. Every entry stays gray until Desktop has checked claude.ai for server-managed settings, even if your organization has none.
@@ -1889,13 +1938,14 @@
The environment selector lists no **Create** or **Create another** item in these cases:
* **The file** : `~/.claude/settings.json` has [invalid JSON or a value that the schema rejects](</docs/en/settings#fix-a-broken-settings-file>), you misspelled the key, or you put it in a project’s settings. Fix the file.
- * **Platform and account** : you use Windows, or a [third-party provider](</docs/en/third-party-integrations>) instead of a Claude account. Add each host as an SSH connection yourself.
+ * **Account** : you use a [third-party provider](</docs/en/third-party-integrations>) instead of a Claude account. Add each host as an SSH connection yourself.
+ * **Windows** : Desktop is older than v4.16336.0, or it doesn’t connect through the OpenSSH client. Update Desktop and meet the requirements for the OpenSSH client, then quit and reopen Desktop.
* **Your organization’s settings** : your administrator turned off local sessions, or turned off SSH sessions. Ask them whether you can use commands.
* **No`ssh` program**: Desktop couldn’t start the OpenSSH client on your computer. Install it, or ask your administrator to allow it, then restart Desktop.
An entry that you can’t select is gray. Hover over it to see the reason:
- * **A mistake in the entry** : fix the field or the command that the message names. If the `id` is in use, give the entry another one.
+ * **A mistake in the entry** : fix the field or the command that the message names. If the `id` is in use, give the entry another one. On Windows, the command has to start with the program’s full path.
* **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.
@@ -2076,7 +2126,7 @@
`disableMobileSimulatorTools`| set to `true` to block Claude’s tools for controlling and capturing devices in the [iOS Simulator pane](</docs/en/desktop-ios-simulator#turn-off-simulator-access>). The pane stays usable for the user’s own taps; only Claude’s access is removed. The value must be the JSON boolean `true`; the string `"true"` is ignored.
`disableBrowserExternalNavigation`| set to `true` to turn off external browsing in the Browser pane entirely. Neither users nor Claude can navigate to external sites, and localhost dev server previews are unaffected. The value must be the JSON boolean `true`; the string `"true"` is ignored.
`sshConfigs`| pre-configure SSH connections that appear in the environment selector. Users can’t delete managed connections or edit anything but their own **Worktree folder**.
-`sshHostCommands`| give users SSH connections whose host comes from a command, alongside their own. Desktop reads it from the managed settings file or MDM policy on the computer, and ignores it in [server-managed settings](</docs/en/server-managed-settings>). Requires Claude Desktop v3.6556.0 or later on macOS or Linux, signed in with a Claude account.
+`sshHostCommands`| give users SSH connections whose host comes from a command, alongside their own. Desktop reads it from the managed settings file or MDM policy on the computer, and ignores it in [server-managed settings](</docs/en/server-managed-settings>). Requires Claude Desktop v3.6556.0 or later on macOS or Linux, or v4.16336.0 or later on Windows, signed in with a Claude account. On Windows, Desktop also has to connect through the OpenSSH client.
`sshHostAllowlist`| restrict SSH sessions to hosts whose resolved hostname matches one of these patterns. Read from managed settings only.
`disableDesktopLocalSessions`| set to `true` to turn off Code sessions that run on the device, leaving SSH sessions to other hosts and cloud sessions available. The value must be the JSON boolean `true`. Read from managed settings only. Requires Claude Desktop v1.37937.0 or later.
`disableSshSavedPasswords`| set to `true` to stop Desktop from offering to remember SSH passwords and from using or showing the ones it saved earlier. Turning it on doesn’t delete them. Read from managed settings only. Requires Claude Desktop v1.49585.0 or later.
--- a/env-vars.md
+++ b/env-vars.md
@@ -294,7 +294,7 @@
`CLAUDE_CODE_GZIP_REQUEST_BODIES`| Set to `0` to turn off gzip compression of Claude API, telemetry, and [artifact](</docs/en/artifacts>) publish request bodies sent to `api.anthropic.com`. By default, Claude Code compresses large request bodies on direct connections and skips compression when you send requests through a proxy, configure a client certificate, or set `NODE_EXTRA_CA_CERTS`. Use `0` if a [TLS-inspecting proxy](</docs/en/network-config#ca-certificate-store>) that Claude Code can’t detect mishandles compressed requests
`CLAUDE_CODE_HIDE_CWD`| Set to `1` to hide the working directory in the startup logo. Useful for screenshares or recordings where the path exposes your OS username
`CLAUDE_CODE_IDE_HOST_OVERRIDE`| Override the host address used to connect to the IDE extension. By default Claude Code auto-detects the correct address, including WSL-to-Windows routing
-`CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL`| Set to `1` to skip auto-installation of IDE extensions. Equivalent to setting [`autoInstallIdeExtension`](</docs/en/settings-reference#autoinstallideextension>) to `false`
+`CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL`| Set to `1` to stop `/ide` from installing the IDE extension. Equivalent to setting [`autoInstallIdeExtension`](</docs/en/settings-reference#autoinstallideextension>) to `false`
`CLAUDE_CODE_IDE_SKIP_VALID_CHECK`| Set to `1` to skip validation of IDE lockfile entries during connection. Use when auto-connect fails to find your IDE despite it running
`CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS`| Context size, in tokens, at which [idle compaction](</docs/en/settings-reference#idlecompaction>) applies to a conversation (default: `200000`). Accepts a positive whole number, and anything else is ignored. Values below `100000` are raised to `100000`, the lowest threshold. Idle compaction is on by default for conversations that meet its conditions. To turn it off, set `idleCompaction` to `false`. Requires Claude Code v2.1.290 or later
`CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS`| How many [subagents](</docs/en/sub-agents#concurrent-subagent-limit>) can be running in one session before the Agent tool refuses to spawn another (default: 20). Accepts a positive whole number in plain digits; anything else is ignored, so the variable can adjust the cap but can’t disable it. Requires Claude Code v2.1.217 or later
Show diff (106 lines)
--- a/errors.md
+++ b/errors.md
@@ -58,7 +58,8 @@
`This organization has been disabled`| Authentication
`Your organization has disabled API key authentication`| Authentication
`Your organization has disabled Claude subscription access`| Authentication
-`Routines are disabled by your organization's policy`| Authentication
+`Scheduled tasks are off for your organization`| Authentication
+`Routines are off for your organization`| Authentication
`Remote Control is only available when using Claude via api.anthropic.com`| Authentication
`OAuth token refresh failed — run /login to re-authenticate`| Authentication
`JWT refresh failed: no OAuth token — run /login`| Authentication
@@ -413,6 +414,9 @@
`Ignoring N permissions.allow entries from ... this workspace has not been trusted`| Configuration warnings
`is a network path, which cannot be added as a working directory`| Configuration warnings
`Remote managed settings failed to load (<cause>)`| Configuration warnings
+`Your organization requires remote managed settings to load, but they could not be loaded`| [Enforce fail-closed startup](</docs/en/server-managed-settings#enforce-fail-closed-startup>)
+`Remote managed settings are still loading`| Configuration warnings
+`Remote managed settings did not load`| Configuration warnings
`Managed settings were not approved; exiting without applying them.`| Configuration warnings
`Your organization's managed settings need your approval, which couldn't be asked for here.`| Configuration warnings
`Claude Code can't start: your organization's managed settings block the default model` / `Claude Code can't start: your organization allows only the models listed in "availableModels"`| Configuration warnings
@@ -445,6 +449,8 @@
`is ignored — managed settings set allowManagedReadPathsOnly` / `is ignored — managed settings set allowManagedDomainsOnly`| Configuration warnings
`Sandbox mask files left behind at write-deny paths`| Configuration warnings
`Stale sandbox mask files left by a killed session`| Configuration warnings
+`Ubuntu's AppArmor restriction on user namespaces stops bubblewrap here`| [Sandboxing troubleshooting](</docs/en/sandboxing#apparmor-restriction-stops-bubblewrap>)
+`bwrap: setting up uid map: Permission denied` / `bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted`| [Sandboxing troubleshooting](</docs/en/sandboxing#bwrap-uid-map-permission-denied>)
Responses seem lower quality than usual| Response quality
##
@@ -731,7 +737,7 @@
Auto mode is unavailable — the server returned no safety verdict for the last 10 responses, so Claude stopped. Send a message to try again, or switch out of auto mode.
-The stop message appears in a different place in each kind of session:
+Some denials don’t count toward the ten, including a denial from a hook or mod’s change. The stop message appears in a different place in each kind of session:
* In an interactive session, the message appears as a warning in the transcript and the turn ends
* In a [non-interactive](</docs/en/headless>) `-p` run, the run ends and reports an execution error. With the default text output, the message prints on stderr.
@@ -748,6 +754,21 @@
Before v2.1.280, Claude Code denied each action from a response without a verdict immediately and never stopped the turn. Before v2.1.302, on a direct connection to the Anthropic API, Claude Code didn’t compact a conversation that had grown too long for the server’s check.
+####
+
+
+
+`a hook changed this call's input after auto mode reviewed it`
+
+This denial means a hook or mod [changed the call’s input](</docs/en/hooks#pretooluse-updatedinput-in-auto-mode>) after the server reviewed it, so the review doesn’t cover what would run. It isn’t a judgment that the action is unsafe. Later calls in the same Claude response can be denied with this reason:
+
+ another call in this response was changed by a hook after auto mode reviewed it, or could not be confirmed unchanged
+
+Claude can then issue each denied call again so the server reviews it. If a permission prompt opens, answer it. You don’t need to do anything else unless Claude says in its reply that auto mode couldn’t check the call. Then stop the change or approve the call yourself, and ask Claude to try the call again:
+
+ * **Stop the change** : turn off the [hook](</docs/en/hooks#disable-or-remove-hooks>) or [mod](</docs/en/plugins/mods/overview#turn-mods-on-or-off>) that changed the call or an earlier call in the same Claude response, or ask your administrator to turn it off. To look for a hook, run [`/hooks`](</docs/en/hooks#the-%2Fhooks-menu>) at the Claude Code prompt. In a terminal session, run `/plugin` to see the active mods.
+ * **Approve the call yourself** : [switch to Manual mode](</docs/en/permission-modes#switch-permission-modes>)
+
###
@@ -1146,15 +1167,16 @@
-Routines are disabled by your organization’s policy
-
-An Owner in your Team or Enterprise organization has turned off [cloud scheduled tasks](</docs/en/routines>), formerly routines, at the organization level. The error appears when you try to create or run one, for example at [claude.ai/code/routines](<https://claude.ai/code/routines>). On Claude Code v2.1.227 or later, the same setting also [hides `/schedule`](</docs/en/routines#troubleshooting>) in the CLI.
-
- Routines are disabled by your organization's policy.
-
-This is a server-side setting, so it can’t be overridden from local settings, environment variables, or CLI flags. **What to do:**
-
- * Ask an Owner in your organization to turn on the **Scheduled tasks (Was Routines)** toggle at [**Organization settings > Capabilities > Remote sessions**](<https://claude.ai/admin-settings/capabilities>)
+Scheduled tasks are off for your organization
+
+[Cloud scheduled tasks](</docs/en/routines>) are off for your organization, so you can’t create or run them. The message from claude.ai calls them scheduled tasks or routines, and a sentence about your admin follows:
+
+ Scheduled tasks are off for your organization. …
+ Routines are off for your organization. …
+
+You can’t turn them on with local settings, environment variables, or CLI flags. **What to do:**
+
+ * Ask your Team or Enterprise Owner whether they can turn on the toggle labeled **Scheduled tasks (Was Routines)** or **Routines** at [**Organization settings > Capabilities > Remote sessions**](<https://claude.ai/admin-settings/capabilities>)
###
@@ -5621,10 +5643,16 @@
Remote managed settings failed to load
-Your session is eligible for [server-managed settings](</docs/en/server-managed-settings>), but Claude Code couldn’t fetch them or couldn’t apply what the server returned, so it shows this warning in interactive sessions. The parenthesized cause names what failed, such as `network error`, `request timed out`, or `authentication rejected (401)`. The cause `no setting in the server response could be applied as written` means the server answered but none of the settings it returned passed [validation](</docs/en/server-managed-settings#invalid-entries-in-delivered-settings>). Before v2.1.282, this cause read `server returned invalid settings`. The rest of the line says which policy the session runs on:
+Your session is eligible for [server-managed settings](</docs/en/server-managed-settings>), but Claude Code couldn’t fetch them or couldn’t apply what the server returned, so it shows this warning in interactive sessions and in Claude Desktop’s Code tab. The parenthesized cause names what failed, such as `network error`, `request timed out`, or `authentication rejected (401)`. The cause `no setting in the server response could be applied as written` means the server answered but none of the settings it returned passed [validation](</docs/en/server-managed-settings#invalid-entries-in-delivered-settings>). Before v2.1.282, this cause read `server returned invalid settings`. The rest of the line says which policy the session runs on:
* **Settings cached from an earlier successful fetch** : Claude Code runs the session on that cached policy, except the [withheld environment variables](</docs/en/server-managed-settings#fetch-and-caching-behavior>), and the line reads `using cached policy`.
* **No cache** : Claude Code runs the session without server-managed settings, and the line reads `no remote policy applied`.
+
+In the Code tab, the warning appears as a line in the conversation when you send a message, and a new line appears when the state of the fetch changes. Three related messages appear the same way:
+
+ * `Remote managed settings are still loading`: the fetch was still running when the session went ahead
+ * `Remote managed settings did not load`: the fetch ended without an answer
+ * `Remote managed settings have now loaded`: the settings loaded after one of these warnings, and the rest of the line says whether a remote policy applies
**What to do:**
--- a/hooks.md
+++ b/hooks.md
@@ -235,6 +235,7 @@
`matcher`| `string`| `undefined`| Pattern matched against the event’s filter field, following the [rules for matchers in settings files](</docs/en/hooks#matcher-patterns>). For tool hooks, that field is the tool name. Built-in tools include `Bash`, `Read`, `Write`, `Edit`, `Glob`, `Grep`, `WebFetch`, `Agent`, and others. See [Tool Input Types](</docs/en/agent-sdk/typescript#tool-input-types>) for the full list. MCP tools use the pattern `mcp__<server>__<action>`, where `<server>` is the key you use in the `mcpServers` configuration, spelled as the [tool naming convention](</docs/en/agent-sdk/mcp#tool-naming-convention>) describes.
`hooks`| `HookCallback[]`| -| Required. Array of callback functions to execute when the pattern matches
`timeout`| `number`| `undefined`| Timeout in seconds. When omitted, Claude Code applies the event’s default timeout. Your SDK callbacks follow the `command` hook defaults
+`onFailure`| `"continue" | "block"`| `undefined`| What a failed callback does. Set `"block"` to block the action when a callback fails. In Python, use `on_failure`
Use the `matcher` pattern to target specific tools whenever possible. A matcher with `'Bash'` only runs for Bash commands, while omitting the pattern runs your callbacks for every occurrence of the event.
@@ -305,6 +306,61 @@
`asyncTimeout`| `number`| Optional timeout in milliseconds for the background operation
Async outputs can’t block, modify, or inject context into the operation since the agent has already moved on. Use them only for side effects like logging, metrics, or notifications.
+
+###
+
+
+
+Block the action when a callback fails
+
+On most events, if a callback throws or returns output that fails validation, the action goes ahead and your app receives an [`SDKInformationalMessage`](</docs/en/agent-sdk/typescript#sdkinformationalmessage>) warning whose `tag` is `hook_callback_failed`. A `PreToolUse` guard that crashes then lets the tool call reach the normal permission flow. A callback that returns nothing, such as a path with no `return`, also counts as failing. In Python, read `tag` from `SystemMessage.data`. To block the action instead, set `onFailure: "block"` in TypeScript or `on_failure="block"` in Python on the matcher. Requires TypeScript Agent SDK v0.3.317 or later, or Python Agent SDK v0.2.177 or later. This example blocks a Bash call when `check_policy` in Python or `checkPolicy` in TypeScript fails:
+
+Python
+
+TypeScript
+
+ options = ClaudeAgentOptions(
+ hooks={
+ "PreToolUse": [
+ HookMatcher(matcher="Bash", hooks=[check_policy], on_failure="block")
+ ]
+ }
+ )
+
+ import type { Options } from "@anthropic-ai/claude-agent-sdk";
+
+ const options: Options = {
+ hooks: {
+ PreToolUse: [{ matcher: "Bash", hooks: [checkPolicy], onFailure: "block" }]
+ }
+ };
+
+To test it, make the callback raise an error and ask Claude to run a Bash command. The tool result includes `failed; blocking because onFailure is "block"`, and Claude doesn’t see your error text. Return `{}` when the callback has no opinion. With `"block"` set, a path with no `return` blocks the action. A callback that catches its own error and returns `{}` isn’t failing, so let the error propagate from a guard.
+
+####
+
+
+
+Events that behave differently
+
+These events don’t always block with `"block"` set:
+
+ * **`Stop`, `SubagentStop`, `TaskCompleted`, and `TeammateIdle`**: these events ignore the option, so the action goes ahead.
+ * **`PermissionRequest`** : the block counts only if it arrives before your `canUseTool` callback answers.
+ * **`PostToolUse`** : the tool has already run, so Claude receives the failure as feedback.
+
+A callback that exceeds its timeout follows Hook timeout. With `"block"` set, a timeout also blocks `PreCompact`, `Elicitation`, and `WorktreeCreate`.
+
+####
+
+
+
+Startup errors for `onFailure`
+
+With `"block"` set, the query fails at startup and sends no prompt when it can’t honor the option:
+
+ * **Claude Code doesn’t support the option** : the error includes `does not honor`. Update Claude Code, or remove the option.
+ * **The session was already running and didn’t register your hooks** : the error includes `did not register your hooks`. Start a new session.
##
@@ -831,7 +887,7 @@
* `Stop` and `SubagentStop`: the timed-out callback counts as returning no decision. The agent or subagent stops as if that callback had allowed it, and a decision from your other hooks on the event still applies. Before Claude Code v2.1.273, a timed-out `Stop` or `SubagentStop` callback counted as a failed hook run, and Claude Code discarded the decisions of your other hooks on the event.
* `SessionStart`: the timed-out callback counts as returning no output, and the session continues with the output of your other `SessionStart` hooks.
* `PreModelSwitch`: Claude Code blocks the model switch. A hook that doesn’t answer hasn’t approved the switch.
- * Other events, such as `Notification`, `PreCompact`, and `PostModelSwitch`: Claude Code logs the failure and continues.
+ * Other events, such as `Notification`, `PreCompact`, and `PostModelSwitch`: Claude Code logs the failure and continues. With `onFailure: "block"`, a timeout on `PreCompact`, `Elicitation`, or `WorktreeCreate` blocks the action.
The first time a `Stop` or `SessionStart` callback times out in the main session, Claude Code also adds an [`SDKInformationalMessage`](</docs/en/agent-sdk/typescript#sdkinformationalmessage>) to the message stream saying the app driving the session didn’t respond. Later timeouts don’t repeat that message while your app stays unresponsive. If you interrupt the query while a callback is pending, Claude Code cancels the pending tool call. Before v2.1.208, the tool call could still proceed if you interrupted during a pending `PreToolUse` callback. If your callback needs more time, set a higher `timeout` on its `HookMatcher`. In TypeScript, use the `AbortSignal` from the third callback argument to handle cancellation gracefully when the timeout fires.
--- a/interactive-mode.md
+++ b/interactive-mode.md
@@ -335,10 +335,10 @@
Reverse search with Ctrl+R
-Press `Ctrl+R` to interactively search through your command history. In [fullscreen rendering](</docs/en/fullscreen>), `Ctrl+R` opens a search dialog instead: type to filter, press `Up` and `Down` to move through matches, and press `Ctrl+S` to cycle the scope through this session, this project, and all projects. Press `Enter` or `Tab` to place a match in the prompt input, or `Esc` to cancel. The steps below describe the classic renderer’s inline search:
+Press `Ctrl+R` to interactively search through your command history. In [fullscreen rendering](</docs/en/fullscreen>), `Ctrl+R` opens a search dialog instead. Type to filter in the dialog, and press `Up` and `Down` to move through the list of matches, with a preview pane showing the start of the highlighted match. In the dialog, press `Ctrl+S` to cycle the scope through this session, this project, and all projects. Press `Enter` or `Tab` to place a match in the prompt input, or `Esc` to cancel. The steps below describe the classic renderer’s inline search:
1. **Start search** : press `Ctrl+R` to activate reverse history search
- 2. **Type query** : enter text to search for in previous commands. The search term is highlighted in matching results
+ 2. **Type query** : enter text to search for in previous commands. The current match appears in the prompt input.
3. **Navigate matches** : press `Ctrl+R` again to cycle through older matches
4. **Search scope** : the inline search always searches prompts from all projects
5. **Accept match** :
@@ -348,7 +348,7 @@
* Press `Ctrl+C` to cancel and restore your original input
* Press `Backspace` on empty search to cancel
-The inline search scans your full prompt history, newest first, with duplicates collapsed to the newest occurrence. The fullscreen dialog searches your whole prompt history in the selected scope, newest first, with duplicates collapsed to the newest occurrence: the most recent prompts appear immediately, and matches from older prompts fill in as Claude Code loads the rest. Matching prompts display with the search term highlighted, so you can find and reuse previous inputs. Accepting a match or canceling the search takes effect immediately, even while Claude Code is still loading the history.
+Accepting a match or canceling the search takes effect immediately, even while Claude Code is still loading the history.
##
--- a/large-codebases.md
+++ b/large-codebases.md
@@ -94,7 +94,7 @@
Write database queries with the Knex query builder. Never put raw SQL strings in route handlers.
Never edit a migration after it has merged. Add a new migration instead.
-When you start Claude from `packages/api/`, it loads both `packages/api/CLAUDE.md` and the root `CLAUDE.md`. Claude sees the local instructions alongside the repository-wide rules, with no instructions from `packages/web/` in context. The same holds for any subdirectory in a non-monorepo tree. To confirm which files loaded, run `/context` and check the list under **Memory files**. A few ways to keep the files current as the codebase and models change:
+When you start Claude from `packages/api/`, it loads both `packages/api/CLAUDE.md` and the root `CLAUDE.md`. Claude sees the local instructions alongside the repository-wide rules, with no instructions from `packages/web/` in context. The same holds for any subdirectory in a non-monorepo tree. To confirm which files loaded, run [`/context all`](</docs/en/commands#all-commands>) and check the list under **Memory files**. A few ways to keep the files current as the codebase and models change:
* **Review in pull requests** : treat CLAUDE.md edits like any other documentation change so conventions track the code
* **Revisit after major model releases** : instructions that worked around an older model’s limitation may become overhead once a newer model handles the case on its own. For example, a rule that forces single-file refactors can be deleted once the limitation is gone
--- a/manifest-reference.md
+++ b/manifest-reference.md
@@ -605,7 +605,7 @@
---|---|---
Hook commands| Anywhere in `command` and `args`| `CLAUDE_PLUGIN_ROOT`, `CLAUDE_PLUGIN_DATA`, `CLAUDE_PROJECT_DIR`, and `CLAUDE_PLUGIN_OPTION_<KEY>`
Monitor commands| Anywhere in `command`| Not exported
-MCP `stdio` servers| `command`, `args`, `env`| `CLAUDE_PLUGIN_ROOT`, `CLAUDE_PLUGIN_DATA`
+MCP `stdio` servers| `command`, `args`, `env`| `CLAUDE_PLUGIN_ROOT`, `CLAUDE_PLUGIN_DATA`, `CLAUDE_PROJECT_DIR`
MCP `http`, `sse`, `ws` servers| `url`, `headers`, `headersHelper`| Not applicable
LSP servers| `command`, `args`, `env`, `workspaceFolder`| `CLAUDE_PLUGIN_ROOT`, `CLAUDE_PLUGIN_DATA`, `CLAUDE_PROJECT_DIR`
Skill, command, and agent content| Anywhere in the Markdown body| Not applicable
--- a/memory.md
+++ b/memory.md
@@ -77,7 +77,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` in a session and check the list under **Memory files**.
+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.
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.
@@ -465,7 +465,7 @@
* **Editing** : Claude reads `CLAUDE.md` through the link, but the Edit and Write tools [refuse to write through a symlink](</docs/en/errors#refusing-after-a-symlink-changed>), and the refusal directs Claude to edit the link’s target, `AGENTS.md`, instead
* **Windows** : if you or anyone who clones the repository works on Windows, use the `@AGENTS.md` import instead. Creating a symlink there needs Administrator privileges or Developer Mode, and Git checks a committed symlink out as a plain text file unless `core.symlinks` is enabled, which leaves that clone with a one-line `CLAUDE.md` in place of your instructions
-With either approach, run `/context` in your next session and confirm `CLAUDE.md` appears under **Memory files**.
+With either approach, run `/context all` in your next session and confirm `CLAUDE.md` appears under **Memory files**.
###
@@ -563,7 +563,7 @@
View and edit with `/memory`
-The `/memory` command lists your CLAUDE.md, CLAUDE.local.md, and other memory file locations across user and project scopes, including user and project CLAUDE.md entries for files that don’t exist yet. It also lets you toggle auto memory on or off and provides an option to open the auto memory folder. Select any file to open it in your editor; selecting one that doesn’t exist yet creates it first. To check which `CLAUDE.md` and rules files loaded at launch, run `/context`. GUI editors such as VS Code open the file in a separate window, and you can keep using the session while it’s open. Terminal editors such as Vim take over the terminal until you exit. When you ask Claude to remember something, like “always use pnpm, not npm” or “remember that the API tests require a local Redis instance,” Claude saves it to auto memory. To add instructions to CLAUDE.md instead, ask Claude directly, like “add this to CLAUDE.md,” or edit the file yourself via `/memory`.
+The `/memory` command lists your CLAUDE.md, CLAUDE.local.md, and other memory file locations across user and project scopes. The list includes user and project CLAUDE.md entries for files that don’t exist yet. The command also lets you toggle auto memory on or off and provides an option to open the auto memory folder. Select any file to open it in your editor; selecting one that doesn’t exist yet creates it first. GUI editors such as VS Code open the file in a separate window, and you can keep using the session while it’s open. Terminal editors such as Vim take over the terminal until you exit. When you ask Claude to remember something, like “always use pnpm, not npm” or “remember that the API tests require a local Redis instance,” Claude saves it to auto memory. To add instructions to CLAUDE.md instead, ask Claude directly, like “add this to CLAUDE.md,” or edit the file yourself via `/memory`.
##
@@ -581,7 +581,7 @@
CLAUDE.md content is delivered as a user message after the system prompt, not as part of the system prompt itself. Claude reads it and tries to follow it, but there’s no guarantee of strict compliance, especially for vague or conflicting instructions. To debug:
- * Run `/context` and check the list under **Memory files** to verify the CLAUDE.md and CLAUDE.local.md files that should load at launch. If one is missing there, Claude can’t see it. Use `/memory` to open and edit the files.
+ * Run `/context all` and check the list under **Memory files** to verify the CLAUDE.md and CLAUDE.local.md files that should load at launch. If one is missing there, Claude can’t see it. Use `/memory` to open and edit the files.
* If an `Instruction file not loaded` notice appears, see [what it means and what to do about it](</docs/en/errors#instruction-file-not-loaded>).
* A `CLAUDE.md` in a subdirectory of your working directory doesn’t appear under **Memory files** , because it loads on demand rather than at launch. When it loads, a `Loaded` line with its path appears in the terminal. To test a new one, create it from your shell rather than asking Claude to write it, then ask Claude to read a file in that subdirectory.
* Check that the relevant CLAUDE.md is in a location that gets loaded for your session (see Choose where to put CLAUDE.md files).
--- a/model-config.md
+++ b/model-config.md
@@ -537,7 +537,7 @@
4. Your settings: the level you saved for the model or an [`effortLevel`](</docs/en/settings-reference#effortlevel>) key, with the precedence between them and across settings files stated at [`modelSettings`](</docs/en/settings-reference#modelsettings>)
5. The model’s default effort: `high` on every model that supports effort, except that Opus 5.5, Sonnet 5.5, and Haiku 5.5 default to `medium` and Opus 4.7 defaults to `xhigh`. If your organization sets a default effort level for its organization default model, that level is the default when you run that model.
-After an automatic model fallback, see Effort level after a fallback for the level that applies. Opus 5.5 starts at `medium` unless one of the sources above sets a level for it, and a top-level `effortLevel` in your user settings file doesn’t count for Opus 5.5. That key is the older form `/effort` wrote before Claude Code saved levels per model: it keeps applying where it applied before, on Opus 5, Fable 5.1, and earlier models, while Opus 5.5 and models released after it start at their own default until you choose a level for them with `/effort` or the `/model` picker. A top-level `effortLevel` in project, local, or managed settings, or one passed with `--settings`, applies to every model. When you set `low`, `medium`, `high`, or `xhigh` in an interactive session on your machine, you choose how long it lasts by how you confirm it:
+After an automatic model fallback, see Effort level after a fallback for the level that applies. For subagents and teammates, see Effort level of subagents and teammates. Opus 5.5 starts at `medium` unless one of the sources above sets a level for it, and a top-level `effortLevel` in your user settings file doesn’t count for Opus 5.5. That key is the older form `/effort` wrote before Claude Code saved levels per model: it keeps applying where it applied before, on Opus 5, Fable 5.1, and earlier models, while Opus 5.5 and models released after it start at their own default until you choose a level for them with `/effort` or the `/model` picker. A top-level `effortLevel` in project, local, or managed settings, or one passed with `--settings`, applies to every model. When you set `low`, `medium`, `high`, or `xhigh` in an interactive session on your machine, you choose how long it lasts by how you confirm it:
* `Enter` in the `/effort` slider or the `/model` picker, or a level typed after `/effort`: save the level as your default and apply it in later sessions
* `s` in the `/effort` slider or the `/model` picker: apply the level to this session only. Requires Claude Code v2.1.257 or later
@@ -607,6 +607,14 @@
* **Skill and subagent frontmatter** : set `effort` in a [skill](</docs/en/skills#frontmatter-reference>) or [subagent](</docs/en/sub-agents#supported-frontmatter-fields>) markdown file to override the effort level when that skill or subagent runs
A skill’s `effort` applies until the end of the turn it runs in, or for the forked subagent’s run with `context: fork`. A subagent’s `effort` applies while the subagent runs, unless [its invocation overrides it](</docs/en/sub-agents#choose-an-effort-level>). While either one applies, the skill or subagent runs at its level, whatever level you launch with, save, or pick. If `CLAUDE_CODE_EFFORT_LEVEL` is set, that level applies instead. A [`maxEffortLevel`](</docs/en/settings-reference#maxeffortlevel>) or organization effort cap still limits the level the skill or subagent runs at. If you set `effortLevel` in [managed settings](</docs/en/managed-settings>), Claude Code applies it at the settings step of the effort resolution order, and users can still change the level with `/effort` or `--effort`. To keep users at or below a level, set [`maxEffortLevel`](</docs/en/settings-reference#maxeffortlevel>).
+
+####
+
+
+
+Effort level of subagents and teammates
+
+On the main conversation’s model, a [subagent](</docs/en/sub-agents#choose-an-effort-level>) or [teammate](</docs/en/agent-teams#specify-teammates-and-models>) with no `effort` of its own runs at the level you pick in the session or set with `--effort`. On another model, that level doesn’t apply. To pick a subagent’s level, set `effort` in its definition.
####
--- a/monitoring-usage.md
+++ b/monitoring-usage.md
@@ -297,6 +297,8 @@
`error_class`| The error category in identifier form, with characters outside letters, digits, and underscores replaced by `_`, such as `Error_ENOENT` or `ShellError`. Carries the category even when `error` carries the full message. Requires Claude Code v2.1.268 or later|
**`claude_code.hook`** This span appears only when detailed beta tracing is active, which requires `ENABLE_BETA_TRACING_DETAILED=1` and `BETA_TRACING_ENDPOINT`, a pair that also [changes where your logs and traces go](</docs/en/env-vars#variables>). Set the pair in your shell, user settings, or managed settings; both variables are ignored in [project and local settings](</docs/en/settings-reference#variables-claude-code-ignores-in-env>). `CLAUDE_CODE_ENHANCED_TELEMETRY_BETA` alone doesn’t produce it. In interactive CLI sessions, detailed beta tracing also requires your organization to be allowlisted for the feature. Agent SDK and non-interactive `-p` sessions don’t require allowlisting.
+
+Set `ENABLE_BETA_TRACING_DETAILED` only for debugging, not in production. Detailed beta tracing has a high export volume, and its content attributes aren’t part of the stable span schema.
Attribute| Description| Gated by
---|---|---
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -333,7 +333,7 @@
Where the server reviews the actions, its verdicts decide them. Two other outcomes are possible:
* **The server doesn’t review the session** : a response completes with no review results, or the server answers that it doesn’t review this session. The most common causes are an LLM gateway or proxy that drops the request for review or the results, and a platform, region, or credential that doesn’t have server-side checks yet. Claude Code falls back to its own classifier requests. Once that fallback holds for the rest of the session, it shows a [notice about classifier request charges](</docs/en/auto-mode-classifier-billing>) on accounts where those requests are billed.
- * **The server gives no verdict for an action** : Claude Code denies the action rather than run it unreviewed. On any connection, this happens when the response ends before the review results arrive or the results arrive in a form Claude Code can’t read. An LLM gateway or proxy that cuts responses short or rewrites the results can cause either. On a direct connection to the Anthropic API, it also happens when the server’s check fails for the action, for example by timing out. [The server returned no safety verdict](</docs/en/errors#the-server-returned-no-safety-verdict>) covers the denial message, what happens when denials repeat, and what to do.
+ * **The server gives no verdict for an action** : Claude Code denies the action rather than run it unreviewed. On any connection, this happens when the response ends before the review results arrive or the results arrive in a form Claude Code can’t read. An LLM gateway or proxy that cuts responses short or rewrites the results can cause either. On a direct connection to the Anthropic API, it also happens when the server’s check fails for the action, for example by timing out. [The server returned no safety verdict](</docs/en/errors#the-server-returned-no-safety-verdict>) covers the denial message, what happens when denials repeat, and what to do. If a [hook](</docs/en/hooks#pretooluse-updatedinput-in-auto-mode>) or [mod](</docs/en/plugins/mods/overview>) changes an action’s input after the server’s review, Claude Code can deny the action with no verdict. In interactive terminal and VS Code sessions on a direct connection to the Anthropic API, the denial’s text includes `a hook changed this call's input after auto mode reviewed it`. [Its error entry](</docs/en/errors#hook-changed-input-after-review>) covers what to do.
To skip asking the server and always use Claude Code’s own classifier requests, set [`CLAUDE_CODE_AUTO_MODE_SERVER=0`](</docs/en/env-vars>). On a direct connection to the Anthropic API, the variable requires Claude Code v2.1.281 or later. Setting it to `1` there turns server review on in a session that doesn’t have it yet, unless you’ve also set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`. If you set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` and leave `CLAUDE_CODE_AUTO_MODE_SERVER` unset, Claude Code also stops asking the server, except as [Disable pre-release capabilities](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) describes.
@@ -519,7 +519,7 @@
* **A blocked action** : Claude Code shows a notification and lists the action in `/permissions` under the **Recently blocked** tab, where you can [approve the action so Claude may retry](</docs/en/auto-mode-config#review-denials>).
* **Repeated blocks** : if the classifier blocks an action 3 times in a row or 20 times total, auto mode pauses and Claude Code resumes prompting. Approving the prompted action resumes auto mode. See Repeated-block thresholds for how the blocks are counted.
* **No verdict from the classifier** : when a safety check separate from auto mode refuses the classifier’s own request, or the classifier’s response doesn’t parse, Claude Code blocks the action without the notification or the **Recently blocked** entry. See [Auto mode cannot determine the safety of an action](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the message each case shows and what to do.
- * **No verdict from the server** : under server-side classifier review, Claude Code denies an action the server gives no verdict for, and stops the turn after ten responses in a row with no verdict. See [The server returned no safety verdict](</docs/en/errors#the-server-returned-no-safety-verdict>).
+ * **No verdict from the server** : under server-side classifier review, Claude Code denies an action the server gives no verdict for, and can stop the turn after ten responses in a row with no verdict. See [The server returned no safety verdict](</docs/en/errors#the-server-returned-no-safety-verdict>).
* **A mode switch during a check** : if you switch permission modes while a classifier check is pending, Claude Code discards a verdict the new mode wouldn’t have requested. You’re prompted for approval instead, or the action is auto-denied in `dontAsk` mode.
####
--- a/python.md
+++ b/python.md
@@ -2341,6 +2341,11 @@
None # Timeout in seconds. When omitted, the per-event default applies:
# 600 for most events, 30 for UserPromptSubmit
)
+ on_failure: Literal["continue", "block"] | None = (
+ None # "block" blocks the action when a callback fails
+ )
+
+To decide what `on_failure` covers, see [Block the action when a callback fails](</docs/en/agent-sdk/hooks#block-the-action-when-a-callback-fails>).
###
--- a/reference.md
+++ b/reference.md
@@ -190,9 +190,11 @@
Event| Fires when| A hook can return
---|---|---
`agent.offer`| A subagent type is offered to Claude| `{ isOffered: false }` to withhold it
-`agent.spawn`| A subagent or an [agent team](</docs/en/agent-teams>) teammate is about to start. For a teammate, `e.isTeammate` is `true`.| `next({ ...e, model })` to choose its model, or `{ deny: reason }`
-
-When Claude resumes a subagent with the [`SendMessage`](</docs/en/sub-agents#resume-subagents>) tool, your `agent.spawn` hook doesn’t run again. To refuse the `SendMessage` calls that resume a subagent, match that tool in a [`tool.call`](</docs/en/plugins/mods/events#guard-or-change-a-tool-call>) hook.
+`agent.spawn`| A subagent or an [agent team](</docs/en/agent-teams>) teammate is about to start, or a subagent that finished or stopped is about to run again. For a teammate, `e.isTeammate` is `true`. For a resumed run, `e.resume` is set.| `next({ ...e, model })` to choose the model of one that is starting, or `{ deny: reason }`
+
+Your `agent.spawn` hook also runs when a subagent that finished or stopped is about to run again, such as when Claude sends it a message with the [`SendMessage`](</docs/en/sub-agents#resume-subagents>) tool. On that event, `e.resume` is `{ agentId }`. If your hook counts subagents, skip the events where `e.resume` is set, so a resumed subagent isn’t counted again. Return `{ deny: reason }` to refuse a resumed run. The run doesn’t start, and the subagent stays as it was. When a `SendMessage` call asked for the run, Claude reads `a plugin declined the resume:` followed by your reason as that call’s result. If you pass a changed event to `next` for a resumed run, such as a different `model`, Claude Code ignores the change.
+
+The event for a resumed run requires Claude Code v2.1.299 or later. Before v2.1.299, your `agent.spawn` hook didn’t run when a subagent resumed. On those versions, to refuse the `SendMessage` calls that resume a subagent, match that tool in a [`tool.call`](</docs/en/plugins/mods/events#guard-or-change-a-tool-call>) hook.
###
--- a/routines.md
+++ b/routines.md
@@ -15,7 +15,7 @@
Two other features schedule work on your machine instead of in the cloud: [Desktop scheduled tasks](</docs/en/desktop-scheduled-tasks>) and [`/loop`](</docs/en/scheduled-tasks>). To choose among all three, see [Compare scheduling options](</docs/en/scheduled-tasks#compare-scheduling-options>).
-Team and Enterprise Owners can turn off scheduled tasks for all members with the **Scheduled tasks (Was Routines)** toggle at [**Organization settings > Capabilities > Remote sessions**](<https://claude.ai/admin-settings/capabilities>). When the toggle is off, existing scheduled tasks stop running and members can’t create new ones. If your Enterprise organization manages your access with [custom roles](<https://support.claude.com/en/articles/13930452>), you also need a role that includes the scheduled tasks permission. An Owner can add it in a role’s **Remote sessions** section at [**Organization settings > Roles**](<https://claude.ai/admin-settings/roles>).
+Team and Enterprise Owners can turn off scheduled tasks for all members with the **Scheduled tasks (Was Routines)** or **Routines** toggle at [**Organization settings > Capabilities > Remote sessions**](<https://claude.ai/admin-settings/capabilities>). When the toggle is off, existing scheduled tasks stop running and members can’t create new ones. If your Enterprise organization manages your access with [custom roles](<https://support.claude.com/en/articles/13930452>), you also need a role that includes the scheduled tasks permission. An Owner can add it in a role’s **Remote sessions** section at [**Organization settings > Roles**](<https://claude.ai/admin-settings/roles>).
##
@@ -527,7 +527,7 @@
* **Web address** : `claude.ai/code/routines`
* **CLI** : the `/routines` alias for `/schedule`, the command’s description, and Claude’s replies while it sets up a task
* **API** : the `/fire` endpoint path, its beta header, its response `type`, the `<routine-fire-payload>` tag, and the [Trigger a routine through the API](<https://platform.claude.com/docs/en/api/claude-code/routines-fire>) reference page
- * **Organization settings** : the **Scheduled tasks (Was Routines)** toggle
+ * **Organization settings** : the **Scheduled tasks (Was Routines)** or **Routines** toggle
##
@@ -556,9 +556,9 @@
-“Routines are disabled by your organization’s policy”
-
-An Owner in your Team or Enterprise organization has likely turned off the **Scheduled tasks (Was Routines)** toggle at [**Organization settings > Capabilities > Remote sessions**](<https://claude.ai/admin-settings/capabilities>). On Claude Code v2.1.227 or later, the same toggle also hides `/schedule` in the CLI. This is a server-side organization setting, so it cannot be overridden from your local configuration. Ask an Owner to turn scheduled tasks back on for your organization.
+Scheduled tasks are off for your organization
+
+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>).
###
Show diff (113 lines)
--- a/sandboxing.md
+++ b/sandboxing.md
@@ -67,7 +67,7 @@
* **Overrides** : choose whether commands that fail under the sandbox can fall back to running unsandboxed. This is the [`allowUnsandboxedCommands`](</docs/en/settings-reference#sandbox-allowunsandboxedcommands>) setting
* **Config** : view the resolved sandbox settings
-If the panel shows only a Dependencies tab, a required package is missing. Install it as described in Set up Linux and WSL2, restart Claude Code, and run `/sandbox` again.
+If the panel shows only a Dependencies tab, the sandbox can’t start yet. Fix what the tab reports as described in Set up Linux and WSL2, restart Claude Code, and run `/sandbox` again.
2
@@ -85,7 +85,7 @@
claude --settings '{"sandbox": {"enabled": true, "allowUnsandboxedCommands": false}}'
-By default, if the sandbox can’t start because a dependency is missing or the platform is unsupported, Claude Code runs commands without sandboxing. To make Claude Code exit at startup instead, set [`sandbox.failIfUnavailable`](</docs/en/settings-reference#sandbox-failifunavailable>) to `true`. Managed deployments that require sandboxing as a security gate can use this setting.
+By default, when the platform doesn’t support the sandbox or the dependency check at startup fails, Claude Code runs commands without sandboxing. To make Claude Code exit at startup instead, set [`sandbox.failIfUnavailable`](</docs/en/settings-reference#sandbox-failifunavailable>) to `true`. Managed deployments that require sandboxing as a security gate can use this setting.
###
@@ -123,11 +123,29 @@
sudo dnf install bubblewrap socat
-When a dependency is missing, the Dependencies tab in `/sandbox` lists which of `ripgrep`, `bubblewrap`, `socat`, and the seccomp filter your platform lacks. If you don’t see the tab after installing and restarting Claude Code, all dependencies are present. Ripgrep is bundled with the native Claude Code binary. The seccomp filter is optional and adds Unix domain socket blocking. Install it with `npm install -g @anthropic-ai/sandbox-runtime` if it is missing. When a required dependency is missing, the Dependencies tab is the only tab shown until you install it. When only the optional seccomp filter is missing, the Dependencies tab appears alongside the other tabs. The dependency check runs at startup, so restart Claude Code after installing packages for `/sandbox` to detect them.
-
-Ubuntu 24.04 and later: allow bubblewrap to create user namespaces
-
-On Ubuntu 24.04 and later, the default AppArmor policy prevents bubblewrap from creating the user namespaces it needs for isolation.To check whether your environment enforces this restriction, including inside WSL2, run `sysctl kernel.apparmor_restrict_unprivileged_userns`. If the command returns `0`, skip this step. If it prints a `No such file or directory` error, the key doesn’t exist and you can skip this step. If it returns `1`, add an AppArmor profile that grants `bwrap` this capability:
+When a dependency is missing, the Dependencies tab in `/sandbox` lists which of `ripgrep`, `bubblewrap`, `socat`, and the seccomp filter your platform lacks. If you don’t see the tab after installing and restarting Claude Code, all dependencies are present. Ripgrep is bundled with the native Claude Code binary. The seccomp filter is optional and adds Unix domain socket blocking. Install it with `npm install -g @anthropic-ai/sandbox-runtime` if it is missing.
+
+ * **Dependencies is the only tab** : the sandbox can’t start. Install what the tab lists as missing, or if it reports Ubuntu’s AppArmor restriction, add an AppArmor profile for bubblewrap
+ * **Dependencies appears beside the other tabs** : the tab lists a missing optional item, such as the seccomp filter. The sandbox can start without it, so install it only if you want what it adds
+
+The dependency check runs at startup, so restart Claude Code after installing packages for `/sandbox` to detect them.
+
+WSL2 notes
+
+Check your WSL version with `wsl -l -v` from PowerShell. If you see `Sandboxing requires WSL2`, your distribution is running WSL1. Upgrade it to WSL2 or run Claude Code without sandboxing.On WSL2, WSL hands a launch of a Windows binary such as `cmd.exe`, `powershell.exe`, or anything under `/mnt/c/` to the Windows host over a Unix socket, so whether a sandboxed command can launch one follows the sandbox’s [Unix-socket settings](</docs/en/settings-reference#sandbox-network-allowunixsockets>): the optional seccomp filter has to be installed to block the socket in the first place. To allow these launches, set `allowAllUnixSockets`, which opens every Unix socket to sandboxed commands.
+
+####
+
+
+
+Add an AppArmor profile for bubblewrap
+
+Add the profile if Claude Code runs `/usr/bin/bwrap` and either of these happens:
+
+ * Claude Code reports Ubuntu’s AppArmor restriction on user namespaces
+ * Sandboxed commands fail with `bwrap: setting up uid map: Permission denied` or `bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted` while that restriction is on
+
+Claude Code runs the first `bwrap` on `PATH`, unless managed settings name one in [`sandbox.bwrapPath`](</docs/en/settings-reference#sandbox-bwrappath>). To see which `bwrap` is first, run `which bwrap` in the shell you start Claude Code from. If Claude Code runs any path other than `/usr/bin/bwrap`, lift the restriction with `sysctl` instead. To add the profile for `/usr/bin/bwrap`, run this command:
sudo tee /etc/apparmor.d/bwrap > /dev/null <<'EOF'
abi <abi/4.0>,
@@ -139,13 +157,11 @@
}
EOF
-The profile applies only to `bwrap` itself, not to the commands it runs inside the sandbox. Reload AppArmor to apply it:
+Reload AppArmor to apply it:
sudo systemctl reload apparmor
-WSL2 notes
-
-Check your WSL version with `wsl -l -v` from PowerShell. If you see `Sandboxing requires WSL2`, your distribution is running WSL1. Upgrade it to WSL2 or run Claude Code without sandboxing.On WSL2, WSL hands a launch of a Windows binary such as `cmd.exe`, `powershell.exe`, or anything under `/mnt/c/` to the Windows host over a Unix socket, so whether a sandboxed command can launch one follows the sandbox’s [Unix-socket settings](</docs/en/settings-reference#sandbox-network-allowunixsockets>): the optional seccomp filter has to be installed to block the socket in the first place. To allow these launches, set `allowAllUnixSockets`, which opens every Unix socket to sandboxed commands.
+Then restart Claude Code and confirm the sandbox works.
###
@@ -704,7 +720,7 @@
The two keys beyond `enabled` control what happens when the sandbox cannot run a command:
- * **`failIfUnavailable`** : a missing dependency such as bubblewrap on Linux blocks Claude Code from starting rather than falling back to unsandboxed execution
+ * **`failIfUnavailable`** : when the platform doesn’t support the sandbox or the dependency check at startup fails, Claude Code refuses to start rather than falling back to unsandboxed execution
* **`allowUnsandboxedCommands: false`** : Claude Code ignores the `dangerouslyDisableSandbox` escape hatch, so when a command fails under the sandbox, Claude can’t retry it unsandboxed
Consider these additions alongside them:
@@ -916,6 +932,32 @@
+Ubuntu’s AppArmor restriction stops bubblewrap
+
+On Linux and WSL2, the message `Ubuntu's AppArmor restriction on user namespaces stops bubblewrap here` means that Ubuntu’s AppArmor restriction keeps the sandbox from starting. To get the sandbox to start, lift the restriction in one of these two ways:
+
+ * Add an AppArmor profile for bubblewrap if Claude Code runs `/usr/bin/bwrap`
+ * In your shell, run `sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0`, which lifts the restriction for every program on the machine and lasts until you reboot
+
+Then restart Claude Code and confirm the sandbox works. Until you lift the restriction, commands run without the sandbox under the regular permission flow, or Claude Code refuses to start if [`sandbox.failIfUnavailable`](</docs/en/settings-reference#sandbox-failifunavailable>) is `true`.
+
+###
+
+
+
+Sandboxed commands fail with `bwrap: setting up uid map: Permission denied`
+
+On Linux and WSL2, this error or `bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted` can mean that Ubuntu’s AppArmor restriction on user namespaces is stopping bubblewrap. To check, run `sysctl kernel.apparmor_restrict_unprivileged_userns` in your shell:
+
+ * `kernel.apparmor_restrict_unprivileged_userns = 1`: the restriction is on. Add an AppArmor profile if Claude Code runs `/usr/bin/bwrap`, or run `sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0`, which lifts it for every program until you reboot. Then restart Claude Code and confirm the sandbox works
+ * Any other output: the restriction isn’t the cause. To report the failure, run [`/feedback`](</docs/en/commands#all-commands>) at the Claude Code prompt
+
+Before v2.1.310, Claude Code didn’t check for this restriction at startup, so `/sandbox` didn’t report it.
+
+###
+
+
+
0-byte read-only files appear at `.claude` settings paths, and “Yes, and don’t ask again” doesn’t save
On Linux and WSL2, the sandbox holds a write denial on a file that doesn’t exist yet by creating a 0-byte read-only placeholder there while a sandboxed command runs. The sandbox removes the placeholder afterward. A placeholder stays behind in cases such as these:
--- a/self-hosted-environments-configuration.md
+++ b/self-hosted-environments-configuration.md
@@ -8,7 +8,14 @@
Wrapper scripts
-Use a wrapper script when each session needs setup the runner can’t do on its own: provisioning short-lived credentials scoped to the session creator, exporting environment-specific secrets, preparing language toolchains, or applying resource limits around the child process. The runner starts your wrapper in place of the Claude Code binary, once per session. End the wrapper by `exec`-ing into `$CLAUDE_RUNNER_CLAUDE_BIN`, the runner’s own binary, so signals and exit codes propagate correctly. Point `--exec-path`, or `SELF_HOSTED_RUNNER_EXEC_PATH`, at the wrapper when you start the runner, replacing `<writable-dir>` as the [quickstart](</docs/en/self-hosted-environments-quickstart#set-up-manually>) describes:
+Use a wrapper script when each session needs setup the runner can’t do on its own:
+
+ * Provisioning short-lived credentials scoped to the session creator
+ * Exporting environment-specific secrets
+ * Preparing language toolchains
+ * Applying resource limits around the child process
+
+The runner starts your wrapper in place of the Claude Code binary each time it starts a session, including when a session resumes or is requeued. End the wrapper by `exec`-ing into `$CLAUDE_RUNNER_CLAUDE_BIN`, the runner’s own binary, so signals and exit codes propagate correctly. Point `--exec-path`, or `SELF_HOSTED_RUNNER_EXEC_PATH`, at the wrapper when you start the runner, replacing `<writable-dir>` as the [quickstart](</docs/en/self-hosted-environments-quickstart#set-up-manually>) describes:
claude self-hosted-runner --environment-secret-file /etc/claude/environment-secret --base-dir '<writable-dir>' --exec-path /etc/claude/session-wrapper.sh
@@ -137,7 +144,7 @@
checkout
-Runs once per repository, in place of the runner’s built-in clone and fetch. Use the hook to clone from a read-through mirror that you reach over HTTPS or SSH, seed a working tree from an archive, or apply per-session git auth. The runner sets these variables, and may set other `CLAUDE_RUNNER_` variables that the table doesn’t list:
+Runs for each repository each time the runner starts a session, including when the session resumes or is requeued, in place of the runner’s built-in clone and fetch. Use the hook to clone from a read-through mirror that you reach over HTTPS or SSH, seed a working tree from an archive, or apply per-session git auth. The runner sets these variables, and may set other `CLAUDE_RUNNER_` variables that the table doesn’t list:
Variable| Description
---|---
@@ -183,7 +190,12 @@
post-session
-Runs once per session, after the Claude Code child has exited and before the runner tears the workspace down. This hook is your only chance to save uncommitted work: at `--capacity` above one, the runner deletes per-session worktrees right after the hook returns, and at `--capacity 1` the reused [canonical clone](</docs/en/self-hosted-environments-deploy#reuse-a-pre-warmed-checkout>) is hard-reset when the next session starts, so uncommitted tracked changes don’t survive on either path. Typical uses are pushing a snapshot branch of uncommitted changes, archiving logs, or emitting a session-ended event to your own systems. The hook fires on every session end where a child process was spawned, whatever the cause; the `CLAUDE_RUNNER_EXIT_REASON` values below enumerate the cases. It can’t fire when the runner terminates abruptly, such as a VM preemption or a power loss; if you need guarantees against abrupt termination, snapshot periodically from inside the session with a Claude Code `PostToolUse` hook instead. The runner sets:
+Runs after the Claude Code child has exited and before the runner tears the workspace down. This hook is your only chance to save uncommitted work, because uncommitted tracked changes don’t survive on either path:
+
+ * **At`--capacity` above one**: the runner deletes per-session worktrees right after the hook returns
+ * **At`--capacity 1`**: the reused [canonical clone](</docs/en/self-hosted-environments-deploy#reuse-a-pre-warmed-checkout>) is hard-reset when the next session starts
+
+Typical uses are pushing a snapshot branch of uncommitted changes, archiving logs, or emitting a session-ended event to your own systems. The hook fires on every session end where a child process was spawned, whatever the cause; the `CLAUDE_RUNNER_EXIT_REASON` values below enumerate the cases. It can’t fire when the runner terminates abruptly, such as a VM preemption or a power loss; if you need guarantees against abrupt termination, snapshot periodically from inside the session with a Claude Code `PostToolUse` hook instead. The runner sets:
Variable| Description
---|---
@@ -277,7 +289,7 @@
command
-Runs once per session after checkout, in place of the built-in child spawn. The hook receives the same environment as a wrapper script and should `exec` into `"$CLAUDE_RUNNER_CLAUDE_BIN"` the same way. Use the `command` hook to keep all customization in one hooks directory; use `--exec-path` when the wrapper lives elsewhere. If `--exec-path` is also set, the flag takes precedence and the `command` hook is ignored. Always `exec` the runner’s own binary rather than a PATH-resolved `claude`; otherwise you defeat [version pinning](</docs/en/self-hosted-environments-deploy#pin-the-version>).
+Runs after checkout each time a session starts or resumes, in place of the built-in child spawn. The hook receives the same environment as a wrapper script and should `exec` into `"$CLAUDE_RUNNER_CLAUDE_BIN"` the same way. Use the `command` hook to keep all customization in one hooks directory; use `--exec-path` when the wrapper lives elsewhere. If `--exec-path` is also set, the flag takes precedence and the `command` hook is ignored. Always `exec` the runner’s own binary rather than a PATH-resolved `claude`; otherwise you defeat [version pinning](</docs/en/self-hosted-environments-deploy#pin-the-version>).
##
@@ -516,7 +528,7 @@
* **Metadata endpoint** : if you deny sessions the [cloud metadata endpoint](</docs/en/self-hosted-environments-deploy#harden-your-deployment>) outright, credentials served from it, such as an instance profile, don’t reach Claude Code either. A file-based web identity, such as IAM Roles for Service Accounts (IRSA) on Amazon EKS or a Workload Identity Federation credential file, doesn’t depend on it.
* **Renewal** : a session can outlive a credential, so use a method that renews itself, such as a file-based web identity
- * **Wrapper script** : the runner starts your wrapper script once per session, so credentials it exports aren’t renewed. Claude Code reads AWS credentials from its environment, so if your wrapper already exports AWS credentials for other work, Claude Code can sign model requests with them.
+ * **Wrapper script** : credential values your wrapper script exports aren’t renewed while Claude Code runs, so for a long session, use a method that renews itself. Claude Code reads AWS credentials from its environment, so if your wrapper already exports AWS credentials for other work, Claude Code can sign model requests with them.
3
--- a/self-hosted-environments-deploy.md
+++ b/self-hosted-environments-deploy.md
@@ -907,7 +907,7 @@
Some sessions don’t count as idle
-A session holding a background task that never finishes doesn’t count as idle, so `--release-idle-session-min` won’t release that session’s slot. A session that’s waiting on an approval requested from inside a running tool call also doesn’t count as idle. Always set `--kill-session-after-min` alongside it as a hard backstop so no session can hold a slot indefinitely. `--kill-session-after-min` is a backstop for runaway sessions. On a runner on v2.1.260 or later, a session that reaches the limit isn’t terminated outright. The runner gives it a grace window, 15 minutes by default, which you can change with [`SELF_HOSTED_RUNNER_MAX_LIFETIME_GRACE_MS`](</docs/en/self-hosted-environments-reference#environment-variable-only-settings>):
+A session holding a background task that keeps running doesn’t count as idle, so `--release-idle-session-min` won’t release that session’s slot. A session that’s waiting on an approval requested from inside a running tool call also doesn’t count as idle. Set `--kill-session-after-min` alongside it as a hard backstop. `--kill-session-after-min` is a backstop for runaway sessions. On a runner on v2.1.260 or later, a session that reaches the limit isn’t terminated outright. The runner gives it a grace window, 15 minutes by default, which you can change with [`SELF_HOSTED_RUNNER_MAX_LIFETIME_GRACE_MS`](</docs/en/self-hosted-environments-reference#environment-variable-only-settings>):
* If the session is waiting on its user, the runner releases it. If its turn has ended and it holds only background tasks, the runner waits up to 60 seconds for those tasks to finish and then releases it. The session resumes when its user sends their next message.
* If a turn is still running, the runner waits for the turn to finish, or for the session to next wait on its user, and then releases it.
--- a/self-hosted-environments-reference.md
+++ b/self-hosted-environments-reference.md
@@ -163,7 +163,7 @@
"last_poll_age_ms": 842
}
-Use `last_poll_age_ms` as a liveness signal in custom probes; a value that grows unbounded indicates the poll loop is stuck. Both `last_poll_at` and `last_poll_age_ms` are `null` until the first poll completes. The orchestrator’s own `/healthz`, on its health port, always returns `200`. The body carries a `connected` field reporting whether the most recent poll succeeded, plus per-state spawn-queue counts in `queue_counts`. To see why `connected` is `false`, read the top-level `last_error` field, which each successful poll resets to `null`. Gate readiness and alerting on `connected` rather than the status code. When the SCM connector is configured, the orchestrator’s `/healthz` body also carries `scm_connector_connected` and a `scm_connector` object with `connected`, `last_connected_at`, `last_error`, `reconnects`, and `requests_forwarded`. Both fields are `null` when `--scm-connector-host` isn’t set.
+Alert on `last_poll_age_ms`, but don’t use it in a liveness probe; keep that probe on the HTTP status code. The value is the time since the last successful poll, so it also rises while the runner can’t reach Anthropic. Both `last_poll_at` and `last_poll_age_ms` are `null` until the first poll succeeds. To catch polls that fail from the start, also alert on `claude_code_self_hosted_runner_poll_errors_total`, listed under Prometheus metrics. The orchestrator’s own `/healthz`, on its health port, always returns `200`. The body carries a `connected` field reporting whether the most recent poll succeeded, plus per-state spawn-queue counts in `queue_counts`. To see why `connected` is `false`, read the top-level `last_error` field, which each successful poll resets to `null`. Gate readiness and alerting on `connected` rather than the status code. When the SCM connector is configured, the orchestrator’s `/healthz` body also carries `scm_connector_connected` and a `scm_connector` object with `connected`, `last_connected_at`, `last_error`, `reconnects`, and `requests_forwarded`. Both fields are `null` when `--scm-connector-host` isn’t set.
##
--- a/server-managed-settings.md
+++ b/server-managed-settings.md
@@ -184,7 +184,7 @@
* When a developer signs in at startup, such as on a first run or after `/logout`, Claude Code waits up to five seconds for the fetch before it opens the session. When the policy arrives in time, Claude Code enforces it from the first screen and shows your [`companyAnnouncements`](</docs/en/settings-reference#companyannouncements>) on it. When the payload needs security approval, Claude Code ends the wait and applies the payload once the developer approves
* In any other startup, and when that five-second wait runs out, Claude Code opens the session while the fetch continues, so a brief window passes before the settings load and the restrictions take effect
- * If the fetch fails, Claude Code continues without server-managed settings and warns in interactive sessions that no remote policy applies; endpoint-managed settings still apply. If a managed source sets `forceRemoteSettingsRefresh`, Claude Code exits instead
+ * If the fetch fails, Claude Code continues without server-managed settings and warns in interactive sessions and in [Claude Desktop’s Code tab](</docs/en/desktop>) that no remote policy applies; endpoint-managed settings still apply. If a managed source sets `forceRemoteSettingsRefresh`, Claude Code exits instead
**Subsequent launches with cached settings:**
@@ -194,7 +194,7 @@
* A cached [`prependPlugins`](</docs/en/settings-reference#prependplugins>), [`appendPlugins`](</docs/en/settings-reference#appendplugins>), or [`enabledPlugins`](</docs/en/settings-reference#enabledplugins>) value can’t remove the built-in guard, change its position, or turn it off until the session’s fetch confirms the payload
* On a machine where an [endpoint-managed source](</docs/en/managed-settings#choose-a-delivery-mechanism>) lists or enables plugins of its own, a plugin that only a cached list enables counts as [the user’s](</docs/en/plugins/mods/admin#install-your-organizations-mods>), not your organization’s, until the fetch confirms the payload
* Claude Code fetches fresh settings in the background
- * Cached settings persist through network failures. If the startup fetch fails, Claude Code warns in interactive sessions that the cached policy is in effect
+ * Cached settings persist through network failures. If the startup fetch fails, Claude Code warns in interactive sessions and in the Code tab that the cached policy is in effect
* Until a fetch succeeds, the values withheld at startup stay withheld
Claude Code withholds several categories of variables in the cached `env` block until the server confirms the payload for the session. This keeps a cached proxy, certificate authority, endpoint, or credential value from redirecting, intercepting, or re-authenticating the settings fetch that confirms the payload. The hardening applies only to the server-fetched settings cache: [endpoint-managed settings](</docs/en/managed-settings#delivery-mechanisms>) deployed through MDM or `managed-settings.json` are unaffected. The withheld categories include:
--- a/settings-reference.md
+++ b/settings-reference.md
@@ -34,7 +34,7 @@
`autoCompactWindow`| Set how full the context gets before Claude Code [compacts](</docs/en/context-window>)| Memory and context| Any file
`autoConnectIde`| Connect to a running [VS Code](</docs/en/vs-code>) or [JetBrains](</docs/en/jetbrains#from-external-terminals>) IDE automatically from an external terminal| Global config settings| Global config
`autoContinueAtUsageLimit`| Wait in the open session and [continue the task automatically](</docs/en/interactive-mode#wait-for-a-usage-limit-to-reset>) after a claude.ai usage limit resets| Interface and terminal| User or managed
-`autoInstallIdeExtension`| Turn off automatic install of the [IDE extension](</docs/en/vs-code#install-the-extension>) from a VS Code terminal| Global config settings| Global config
+`autoInstallIdeExtension`| Let `/ide` install the [IDE extension](</docs/en/vs-code#install-the-extension>) from an external terminal| Global config settings| Global config
`autoMemoryDirectory`| Store [auto memory](</docs/en/memory#auto-memory>) in a directory you choose| Memory and context| Any file
`autoMemoryEnabled`| Turn [auto memory](</docs/en/memory#auto-memory>) off or on| Memory and context| Any file
`autoMode`| Add your own allow and deny rules to the [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) classifier| Permission settings| User or managed
@@ -1395,7 +1395,7 @@
`sandbox.failIfUnavailable`
-Make Claude Code exit with an error at startup when `sandbox.enabled` is `true` but the sandbox can’t start, because a dependency is missing or the platform is unsupported. Without this key, Claude Code runs commands unsandboxed. Managed deployments that require sandboxing as a security gate can use this setting. On a platform the sandbox doesn’t support, Claude Code doesn’t start with this key on. See [Enforce sandboxing with managed settings](</docs/en/sandboxing#enforce-sandboxing-with-managed-settings>).
+Make Claude Code exit with an error at startup when `sandbox.enabled` is `true` but the sandbox can’t start because the platform doesn’t support it or the dependency check fails. Without this key, Claude Code runs commands unsandboxed. Managed deployments that require sandboxing as a security gate can use this setting. On a platform the sandbox doesn’t support, Claude Code doesn’t start with this key on. See [Enforce sandboxing with managed settings](</docs/en/sandboxing#enforce-sandboxing-with-managed-settings>).
* **Scope** : `Any file`, with [limits on project and local settings](</docs/en/sandboxing#repository-settings-under-an-admin-required-sandbox>)
* **Type** : Boolean
@@ -5831,10 +5831,10 @@
`sshHostCommands`
-Add SSH connections whose host comes from a command to the [Desktop](</docs/en/desktop#create-an-ssh-connection-from-a-command>) environment selector. When you create a connection or replace its host, Desktop runs the entry’s command on your computer and connects to the host that the command prints. Requires Claude Desktop v3.6556.0 or later on macOS or Linux, signed in with a Claude account.
+Add SSH connections whose host comes from a command to the [Desktop](</docs/en/desktop#create-an-ssh-connection-from-a-command>) environment selector. When you create a connection or create another machine for it, Desktop runs the entry’s command on your computer and connects to the host that the command prints. Requires Claude Desktop v3.6556.0 or later on macOS or Linux, or v4.16336.0 or later on Windows, signed in with a Claude account. On Windows, Desktop also has to [connect through the OpenSSH client](</docs/en/desktop#use-your-ssh-configuration>).
* **Scope** : `User or managed`. Only the desktop app reads this key. It reads managed entries from [one managed settings file or MDM policy](</docs/en/desktop#distribute-commands-to-your-team>) on the computer, and ignores the key in [server-managed settings](</docs/en/server-managed-settings>).
- * **Type** : array of objects, each with required `id`, `name`, and `command` and optional `sshIdentityFile` and `startDirectory`. Desktop starts `command` without a shell, so [write it as a program and plain arguments](</docs/en/desktop#write-the-command>).
+ * **Type** : array of objects, each with required `id`, `name`, and `command` and optional `sshIdentityFile` and `startDirectory`. Desktop doesn’t read `command` as shell syntax, so pipes and variables don’t work: [write it as a program and its arguments](</docs/en/desktop#write-the-command>).
* **Default** : unset
This example adds one connection named `Dev box`, where `acme-dev create` stands for your own tool:
@@ -5851,7 +5851,7 @@
]
}
-Before Claude Code v2.1.307, the Edit tool refused a change that added this key to a valid settings file, with the error `Unrecognized field: sshHostCommands`. On those versions, add the key in a text editor instead; Claude Code loads a file that holds the key. In Desktop, the version that counts is the [Code tab’s Claude Code version](</docs/en/desktop#claude-code-version-in-the-code-tab>), not your terminal’s.
+On Windows, a bare name such as `acme-dev` doesn’t work, so [start the command with the program’s full path](</docs/en/desktop#write-the-command-on-windows>). Before Claude Code v2.1.307, the Edit tool refused a change that added this key to a valid settings file, with the error `Unrecognized field: sshHostCommands`. On those versions, add the key in a text editor instead; Claude Code loads a file that holds the key. In Desktop, the version that counts is the [Code tab’s Claude Code version](</docs/en/desktop#claude-code-version-in-the-code-tab>), not your terminal’s.
##
@@ -6681,12 +6681,12 @@
`autoInstallIdeExtension`
-Install the Claude Code IDE extension automatically when you run Claude Code from a VS Code terminal. Appears in `/config` as **Auto-install IDE extension** when you run Claude Code inside a VS Code or JetBrains terminal.
+Let [`/ide`](</docs/en/commands>) install the Claude Code IDE extension in a running VS Code, Cursor, or Devin Desktop when you run the command from an external terminal. Claude Code doesn’t install the extension when you start it. Appears in `/config` as **Auto-install IDE extension** when you run Claude Code inside a VS Code or JetBrains terminal.
* **Scope** : `Global config`
* **Type** : Boolean
- * `true`: Claude Code installs the IDE extension automatically when you run it from a VS Code terminal
- * `false`: Claude Code doesn’t install the extension automatically
+ * `true`: `/ide` installs the extension
+ * `false`: `/ide` doesn’t install the extension
* **Default** : `true`
* **Per-session overrides** : [`CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL`](</docs/en/env-vars>) set to `1` skips the install for one session even when this key is `true`
--- a/sub-agents.md
+++ b/sub-agents.md
@@ -353,6 +353,14 @@
To run a subagent at its own [effort level](</docs/en/model-config#adjust-effort-level>), set the `effort` field in its definition. When you ask Claude to run a non-fork subagent at a specific effort level, it can also pass an `effort` parameter for that invocation. The parameter overrides the `effort` field and stays in effect when the subagent is resumed. The [`CLAUDE_CODE_EFFORT_LEVEL`](</docs/en/env-vars#variables>) environment variable takes precedence over both. The per-invocation parameter requires Claude Code v2.1.292 or later.
+####
+
+
+
+When a subagent has no `effort` field or parameter
+
+On the main conversation’s model, the subagent runs at the level you pick in the session, such as with `/effort`, or set with `--effort`. On another model, [that level doesn’t apply](</docs/en/model-config#effort-level-of-subagents-and-teammates>). To choose its level, set the `effort` field.
+
###
--- a/troubleshoot.md
+++ b/troubleshoot.md
@@ -259,6 +259,8 @@
In auto mode, a denied tool call gives this reason. A hook changed the tool call’s input after the [server-side classifier](</docs/en/permission-modes#server-side-classifier-review>) reviewed it, so that review doesn’t cover what would run. The hook can be a mod’s [`tool.call`](</docs/en/plugins/mods/reference#tools>) or [`turn.step`](</docs/en/plugins/mods/reference#turns>) hook, or a [`PreToolUse`](</docs/en/hooks#pretooluse>) settings hook. The message doesn’t say which. The message tells Claude to issue the call once more as recorded. If that’s denied too, the hook changes the input every time, so turn off the mod or hook, or leave auto mode and approve the call yourself.
+In [some interactive terminal sessions and VS Code sessions](</docs/en/hooks#pretooluse-updatedinput-in-auto-mode>), the same denial gives the reason `a hook changed this call's input after auto mode reviewed it`. The repeated call there carries the mod’s first change, and a `tool.call` hook still runs on it, but a further change is dropped. You don’t need to change your mod unless Claude tells you in its reply that [auto mode couldn’t check the call](</docs/en/errors#hook-changed-input-after-review>).
+
###
--- a/typescript.md
+++ b/typescript.md
@@ -2274,6 +2274,7 @@
level: "info" | "notice" | "suggestion" | "warning";
tool_use_id?: string;
prevent_continuation?: boolean;
+ tag?: string;
uuid: UUID;
session_id: string;
};
@@ -2679,7 +2680,10 @@
matcher?: string;
hooks: HookCallback[];
timeout?: number; // Timeout in seconds for all hooks in this matcher
+ onFailure?: "continue" | "block"; // "block" blocks the action when a callback fails
}
+
+To decide what `onFailure` covers, see [Block the action when a callback fails](</docs/en/agent-sdk/hooks#block-the-action-when-a-callback-fails>).
###
--- a/vs-code.md
+++ b/vs-code.md
@@ -854,7 +854,12 @@
Run CLI in VS Code
-To use the CLI while staying in VS Code, press `Ctrl+`` on Windows/Linux or `Cmd+`` on Mac to open the integrated terminal, then run `claude`. The CLI automatically integrates with your IDE for features like diff viewing and diagnostic sharing. If you use an external terminal, run `/ide` inside Claude Code to connect it to VS Code. Installing the extension does not put `claude` on your shell PATH. The extension bundles a private copy of the CLI for its chat panel, but typing `claude` in a terminal requires the [standalone CLI install](</docs/en/setup>). Run the install once and the commands on this page, including `claude mcp add` and `claude --resume`, work in any terminal. If `claude` is still not found after installing, [verify your PATH](</docs/en/troubleshoot-install#verify-your-path>).
+To use the CLI while staying in VS Code, press `Ctrl+`` on Windows/Linux or `Cmd+`` on Mac to open the integrated terminal, then run `claude`. Starting `claude` doesn’t install the extension. Without it, `/ide` in the integrated terminal reports “No available IDEs detected” and `/status` shows the IDE as “Not connected”. To get features like diff viewing and diagnostic sharing, connect the CLI to the extension from the integrated terminal or an external terminal:
+
+ * **Integrated terminal** : install the extension, then start `claude`. The CLI connects automatically.
+ * **External terminal** : run `/ide` inside Claude Code to connect to VS Code. If VS Code is running without the extension, `/ide` installs it, unless you turned off [`autoInstallIdeExtension`](</docs/en/settings-reference#autoinstallideextension>).
+
+Installing the extension does not put `claude` on your shell PATH. The extension bundles a private copy of the CLI for its chat panel, but typing `claude` in a terminal requires the [standalone CLI install](</docs/en/setup>). Run the install once and the commands on this page, including `claude mcp add` and `claude --resume`, work in any terminal. If `claude` is still not found after installing, [verify your PATH](</docs/en/troubleshoot-install#verify-your-path>).
###
@@ -1144,7 +1149,7 @@
2. Search for “Claude Code”
3. Click **Uninstall**
-If you run `claude` in a VS Code integrated terminal, Claude Code reinstalls the extension automatically. To keep it uninstalled, turn off **Auto-install IDE extension** in `/config`, or set [`autoInstallIdeExtension`](</docs/en/settings-reference#autoinstallideextension>) to `false`. You can also set the [`CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL`](</docs/en/env-vars>) environment variable to `1`. To also remove extension data and reset all settings, delete the extension’s storage directory for your platform. On macOS:
+The extension stays uninstalled when you start `claude`. If you run `/ide` from an external terminal while VS Code is running, Claude Code reinstalls it. To stop that, set [`autoInstallIdeExtension`](</docs/en/settings-reference#autoinstallideextension>) to `false` in `~/.claude.json`, or turn off **Auto-install IDE extension** in `/config` from the integrated terminal. You can also set the [`CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL`](</docs/en/env-vars>) environment variable to `1`. To also remove extension data and reset all settings, delete the extension’s storage directory for your platform. On macOS:
rm -rf ~/Library/"Application Support"/Code/User/globalStorage/anthropic.claude-code
--- a/web-quickstart.md
+++ b/web-quickstart.md
@@ -65,7 +65,7 @@
Sign in with GitHub
-After you sign in, claude.ai/code prompts you to connect GitHub. Follow the prompt, and claude.ai/code sends you to GitHub’s authorization page. Approve the authorization request, and GitHub returns you to claude.ai/code. Cloud sessions work with existing GitHub repositories. To start a new project, [create a repository with a README on GitHub](<https://github.com/new>) first.With this connection, a session can clone any public repository, but can work in a private repository only when the Claude GitHub App is installed on it. [Install the Claude GitHub App](<https://github.com/apps/claude/installations/new>) on each GitHub account or organization whose private repositories you want to use. On a GitHub organization, an organization owner may need to approve the installation. Installing it also enables [Auto-fix](</docs/en/claude-code-on-the-web#auto-fix-pull-requests>), which lets Claude respond to CI failures and review comments on pull requests in those repositories.When you connect, Claude also links the GitHub accounts you own to your Claude organization, if they have the Claude GitHub App installed. On Team and Enterprise plans, admins see those accounts in the [connected GitHub accounts list](</docs/en/admin-setup#connected-github-accounts>).If onboarding prompts you to install the Claude GitHub App at this point and you’d rather do it later, click **Skip**.
+After you sign in, claude.ai/code prompts you to connect GitHub. Follow the prompt, and claude.ai/code sends you to GitHub’s authorization page. Approve the authorization request, and GitHub returns you to claude.ai/code. Cloud sessions work with existing GitHub repositories. To start a new project, [create a repository with a README on GitHub](<https://github.com/new>) first.With this connection, a session can clone any public repository, but can work in a private repository only when the Claude GitHub App is installed on it. [Install the Claude GitHub App](<https://github.com/apps/claude/installations/new>) on each GitHub account or organization whose private repositories you want to use. On a GitHub organization, an organization owner may need to approve the installation. Installing it also enables [Auto-fix](</docs/en/claude-code-on-the-web#auto-fix-pull-requests>), which lets Claude respond to CI failures and review comments on pull requests in those repositories.When you connect, Claude also links the GitHub accounts you own to your Claude organization, if they have the Claude GitHub App installed. On Team and Enterprise plans, Owners of your Claude organization see those accounts in the [connected GitHub accounts list](</docs/en/admin-setup#connected-github-accounts>).If onboarding prompts you to install the Claude GitHub App at this point and you’d rather do it later, click **Skip**.
3