Changes on
32 changes detected
--- a/2026-w19.md
+++ b/2026-w19.md
@@ -1,4 +1,4 @@
-Releases [v2.1.128 → v2.1.136](</docs/en/changelog#2-1-128>)2 features · May 4–8
+Releases [v2.1.128 → v2.1.136](</en/changelog#2-1-128>)2 features · May 4–8
Plugins from .zip archives and URLs
@@ -10,13 +10,13 @@
claude --plugin-url https://example.com/my-plugin.zip
-[Plugins guide](</docs/en/plugins>)
+[Plugins guide](</en/plugins>)
History search across all your projectsv2.1.129
`Ctrl+R` reverse-search now defaults to all prompts across every project, restoring the behavior from before v2.1.124. Press `Ctrl+S` while searching to narrow back to the current project or session. Handy when you remember a command you ran in another repo last week and don’t want to go digging for it.
-[Interactive mode: command history](</docs/en/interactive-mode#command-history>)
+[Interactive mode: command history](</en/interactive-mode#command-history>)
Other wins
--- a/2026-w32.md
+++ b/2026-w32.md
@@ -1,4 +1,4 @@
-Releases [v2.1.220 → v2.1.224](</docs/docs/en/changelog#2-1-220>)3 features · August 3–7
+Releases [v2.1.220 → v2.1.224](</docs/en/changelog#2-1-220>)3 features · August 3–7
Cross-session messagingv2.1.224
@@ -12,7 +12,7 @@
The other session shows a `Message from` row once Claude has read the message; press `Ctrl+O` to expand it. To see which sessions Claude can reach, run `/list-agents`.
-[Message another session](</docs/docs/en/cross-session-messaging#message-another-session>)
+[Message another session](</docs/en/cross-session-messaging#message-another-session>)
Self-hosted environmentsv2.1.224
@@ -26,7 +26,7 @@
The environment shows **Healthy** in admin settings once the runner registers.
-[Self-hosted environments quickstart](</docs/docs/en/self-hosted-environments-quickstart#set-up-an-environment-and-runner>)
+[Self-hosted environments quickstart](</docs/en/self-hosted-environments-quickstart#set-up-an-environment-and-runner>)
Auto mode becomes the defaultCLI
@@ -44,34 +44,34 @@
New sessions then show `auto mode on` in the status bar.
-[Auto mode requirements and controls](</docs/docs/en/permission-modes#eliminate-prompts-with-auto-mode>)
+[Auto mode requirements and controls](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>)
Other wins
-The VS Code extension gets [Focus view](</docs/docs/en/vs-code#extension-settings>), which hides tool activity behind one expandable row per turn; toggle it from the command menu or with `Ctrl+Alt+F` (`Ctrl+Option+F` on Mac)
+The VS Code extension gets [Focus view](</docs/en/vs-code#extension-settings>), which hides tool activity behind one expandable row per turn; toggle it from the command menu or with `Ctrl+Alt+F` (`Ctrl+Option+F` on Mac)
-Sandbox credential files accept [`mode: “mask”`](</docs/docs/en/sandboxing#mask-credential-files>) on Linux and WSL2, so sandboxed commands read a sentinel copy while the sandbox proxy substitutes the real value on egress; credential masking also gains `extract`, JWT-aware `decode`, and AWS SigV4 re-signing options
+Sandbox credential files accept [`mode: “mask”`](</docs/en/sandboxing#mask-credential-files>) on Linux and WSL2, so sandboxed commands read a sentinel copy while the sandbox proxy substitutes the real value on egress; credential masking also gains `extract`, JWT-aware `decode`, and AWS SigV4 re-signing options
-Marketplaces can distribute a plugin as a [zip archive](</docs/docs/en/plugin-marketplaces#zip-archives>) with the new `archive` source, downloaded over HTTPS with an optional SHA-256 pin, so installs work without git or npm
+Marketplaces can distribute a plugin as a [zip archive](</docs/en/plugin-marketplaces#zip-archives>) with the new `archive` source, downloaded over HTTPS with an optional SHA-256 pin, so installs work without git or npm
-`/review` is now an alias of [`/code-review`](</docs/docs/en/code-review#review-a-diff-locally>), and `/code-review` with no effort level reuses the level you typed last
+`/review` is now an alias of [`/code-review`](</docs/en/code-review#review-a-diff-locally>), and `/code-review` with no effort level reuses the level you typed last
-A session you copy with [`/fork`](</docs/docs/en/agent-view#copy-the-session-with-%2Ffork>) now makes its code changes in a worktree of its own instead of the original session’s checkout
+A session you copy with [`/fork`](</docs/en/agent-view#copy-the-session-with-%2Ffork>) now makes its code changes in a worktree of its own instead of the original session’s checkout
-Plugins you install from [`/plugin`](</docs/docs/en/discover-plugins#install-plugins>) activate in the current session when it’s safe to do so; the install summary reports `Plugin is now active.` or tells you to run `/reload-plugins`
+Plugins you install from [`/plugin`](</docs/en/discover-plugins#install-plugins>) activate in the current session when it’s safe to do so; the install summary reports `Plugin is now active.` or tells you to run `/reload-plugins`
-[Background sessions](</docs/docs/en/agent-view#how-file-edits-are-isolated>) that changed code in a worktree now commit and push before finishing, open a draft pull request only when the task calls for one, and follow the git instructions in your `CLAUDE.md`
+[Background sessions](</docs/en/agent-view#how-file-edits-are-isolated>) that changed code in a worktree now commit and push before finishing, open a draft pull request only when the task calls for one, and follow the git instructions in your `CLAUDE.md`
-The 200-subagent-per-session cap is removed, so long-running sessions no longer refuse new subagents; the [concurrency](</docs/docs/en/sub-agents#concurrent-subagent-limit>) and depth limits still apply
+The 200-subagent-per-session cap is removed, so long-running sessions no longer refuse new subagents; the [concurrency](</docs/en/sub-agents#concurrent-subagent-limit>) and depth limits still apply
-A repository’s checked-in settings can no longer turn on [Remote Control auto-connect](</docs/docs/en/remote-control#enable-remote-control-for-all-sessions>); set `remoteControlAtStartup` in your user or managed settings instead, and project and local settings can only turn it off
+A repository’s checked-in settings can no longer turn on [Remote Control auto-connect](</docs/en/remote-control#enable-remote-control-for-all-sessions>); set `remoteControlAtStartup` in your user or managed settings instead, and project and local settings can only turn it off
-[Worktree isolation](</docs/docs/en/worktrees#how-claude-code-enforces-isolation>) now blocks not only file edits but also Bash commands and git redirects that reach the main checkout, in every session type and in the session’s subagents
+[Worktree isolation](</docs/en/worktrees#how-claude-code-enforces-isolation>) now blocks not only file edits but also Bash commands and git redirects that reach the main checkout, in every session type and in the session’s subagents
A Bash command can no longer hide part of itself from permission checks, and tab or invisible-Unicode padding no longer hides part of a command from the approval dialog
PreToolUse auto-allow hooks no longer bypass tool restrictions in Claude Code’s internal side tasks such as summaries and compaction
-The [Ultraplan](</docs/docs/en/ultraplan>) research preview is removed, including the `/ultraplan` command and the `ultraplan` keyword; use plan mode or Claude Code on the web instead
+The [Ultraplan](</docs/en/ultraplan>) research preview is removed, including the `/ultraplan` command and the `ultraplan` keyword; use plan mode or Claude Code on the web instead
[Full changelog for v2.1.220–v2.1.224 →](</docs/en/changelog#2-1-220>)
--- a/2026-w33.md
+++ b/2026-w33.md
@@ -1,4 +1,4 @@
-Releases [v2.1.225 → v2.1.233](</docs/docs/en/changelog#2-1-225>)3 features · August 10–14
+Releases [v2.1.225 → v2.1.233](</docs/en/changelog#2-1-225>)3 features · August 10–14
Auto-continue after a usage limit on DesktopDesktop
@@ -6,7 +6,7 @@
The next time a session-limit card appears, check **Auto-continue when limits reset** and leave the session open. The card shows `Auto-resuming at` followed by the reset time, and the turn picks up on its own once the limit resets.
-[What to do when you hit a usage limit](</docs/docs/en/errors#youve-hit-your-session-limit>)
+[What to do when you hit a usage limit](</docs/en/errors#youve-hit-your-session-limit>)
Fork mode on by defaultv2.1.232
@@ -20,7 +20,7 @@
The fork appears in the panel below your prompt and its result arrives in your conversation when it finishes. To turn fork mode off, set `CLAUDE_CODE_FORK_SUBAGENT=0`.
-[Turn fork mode on or off](</docs/docs/en/sub-agents#turn-fork-mode-on-or-off>)
+[Turn fork mode on or off](</docs/en/sub-agents#turn-fork-mode-on-or-off>)
GitLab merge requests and marketplacesv2.1.232
@@ -34,30 +34,30 @@
When `origin` is on gitlab.com, Claude Code fetches `merge-requests/42/head` and opens the session on that branch in its own worktree.
-[Branch a worktree from a pull or merge request](</docs/docs/en/worktrees#branch-from-a-pull-request>)
+[Branch a worktree from a pull or merge request](</docs/en/worktrees#branch-from-a-pull-request>)
Other wins
-Type `@` in the prompt to [mention another Claude session](</docs/docs/en/cross-session-messaging#message-another-session>) by name, and Claude messages it directly with `SendMessage`; a bare name that matches exactly one live session now delivers without a confirmation step
+Type `@` in the prompt to [mention another Claude session](</docs/en/cross-session-messaging#message-another-session>) by name, and Claude messages it directly with `SendMessage`; a bare name that matches exactly one live session now delivers without a confirmation step
-Interactive sessions on one machine keep [unique names](</docs/docs/en/cross-session-messaging#see-which-sessions-claude-can-reach>): if you start or rename a session with a name another live session already uses, Claude Code gives yours a `name-word-word` variant and tells you
+Interactive sessions on one machine keep [unique names](</docs/en/cross-session-messaging#see-which-sessions-claude-can-reach>): if you start or rename a session with a name another live session already uses, Claude Code gives yours a `name-word-word` variant and tells you
-Plugin marketplaces accept [`command` sources](</docs/docs/en/plugin-marketplaces#command-sources>): a local command prints the plugin directory, which Claude Code re-resolves each session and applies without a restart
+Plugin marketplaces accept [`command` sources](</docs/en/plugin-marketplaces#command-sources>): a local command prints the plugin directory, which Claude Code re-resolves each session and applies without a restart
-On Linux and WSL, set [`CLAUDE_CODE_TOOL_MEMORY_LIMIT`](</docs/docs/en/tools-reference#memory-limit-on-linux-and-wsl>) to a size such as `4G` to cap the memory Bash and PowerShell tool commands can use
+On Linux and WSL, set [`CLAUDE_CODE_TOOL_MEMORY_LIMIT`](</docs/en/tools-reference#memory-limit-on-linux-and-wsl>) to a size such as `4G` to cap the memory Bash and PowerShell tool commands can use
-The task-tracking tools, such as `TaskCreate`, `TaskUpdate`, and `TodoWrite`, are [no longer available on Opus 4.8, Sonnet 5, Fable 5, Mythos 5, and later models in those families](</docs/docs/en/tools-reference#task-tool-availability>); set `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` to re-enable them
+The task-tracking tools, such as `TaskCreate`, `TaskUpdate`, and `TodoWrite`, are [no longer available on Opus 4.8, Sonnet 5, Fable 5, Mythos 5, and later models in those families](</docs/en/tools-reference#task-tool-availability>); set `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` to re-enable them
-[`/code-review`](</docs/docs/en/code-review#review-a-diff-locally>) at high, xhigh, and max effort now runs in a background agent like the other levels
+[`/code-review`](</docs/en/code-review#review-a-diff-locally>) at high, xhigh, and max effort now runs in a background agent like the other levels
-[`/plugin install plugin@marketplace`](</docs/docs/en/discover-plugins#install-plugins>) refreshes the marketplace first, so newly published plugins install without a manual marketplace update
+[`/plugin install plugin@marketplace`](</docs/en/discover-plugins#install-plugins>) refreshes the marketplace first, so newly published plugins install without a manual marketplace update
-Settings accept [`additionalMarketplaces` and `allowedMarketplaces`](</docs/docs/en/settings-reference#marketplace-key-aliases>) as aliases for `extraKnownMarketplaces` and `strictKnownMarketplaces`
+Settings accept [`additionalMarketplaces` and `allowedMarketplaces`](</docs/en/settings-reference#marketplace-key-aliases>) as aliases for `extraKnownMarketplaces` and `strictKnownMarketplaces`
-On newer models, Claude can [overwrite an existing file with the Write tool](</docs/docs/en/tools-reference#write-tool-behavior>) without reading it first this session, matching the Edit tool’s rules; older models require the read
+On newer models, Claude can [overwrite an existing file with the Write tool](</docs/en/tools-reference#write-tool-behavior>) without reading it first this session, matching the Edit tool’s rules; older models require the read
-The VS Code extension can [organize the sessions list into groups](</docs/docs/en/vs-code#organize-sessions-into-groups>): right-click to create, rename, or delete a group, and Cmd/Ctrl- or Shift-click to move several sessions at once
+The VS Code extension can [organize the sessions list into groups](</docs/en/vs-code#organize-sessions-into-groups>): right-click to create, rename, or delete a group, and Cmd/Ctrl- or Shift-click to move several sessions at once
-If your organization routes Claude Code through a [Claude apps gateway with spend limits](</docs/docs/en/claude-apps-gateway-spend-limits>), Claude Code shows the limit period, its reset time, and the operator’s message when you reach the limit
+If your organization routes Claude Code through a [Claude apps gateway with spend limits](</docs/en/claude-apps-gateway-spend-limits>), Claude Code shows the limit period, its reset time, and the operator’s message when you reach the limit
[Full changelog for v2.1.225–v2.1.233 →](</docs/en/changelog#2-1-225>)
--- a/2026-w34.md
+++ b/2026-w34.md
@@ -1,4 +1,4 @@
-Releases [v2.1.234 → v2.1.239](</docs/docs/en/changelog#2-1-234>)3 features · August 17–21
+Releases [v2.1.234 → v2.1.239](</docs/en/changelog#2-1-234>)3 features · August 17–21
/designresearch preview
@@ -12,7 +12,7 @@
Claude prints a link to the published canvas. Open it, pick an artboard, and tell Claude which option to implement.
-[Where artifacts are available](</docs/docs/en/artifacts#availability>)
+[Where artifacts are available](</docs/en/artifacts#availability>)
Concise output stylev2.1.237
@@ -28,7 +28,7 @@
Run `/clear` or start a new session, and Claude’s replies lead with the result.
-[Built-in output styles](</docs/docs/en/output-styles#built-in-output-styles>)
+[Built-in output styles](</docs/en/output-styles#built-in-output-styles>)
Start a session on your machine from your phonemobile
@@ -42,34 +42,34 @@
Your machine appears as a device card at the top of the Code tab. Tap it to pick a directory and start a session there.
-[Start a Remote Control session](</docs/docs/en/remote-control#start-a-remote-control-session>)
+[Start a Remote Control session](</docs/en/remote-control#start-a-remote-control-session>)
Other wins
Claude Code now continues your session automatically when a claude.ai usage limit resets; turn it off from the **Continue automatically at usage limit** row in `/config`
-The optional [`spellcheck` setting](</docs/docs/en/interactive-mode#check-spelling-as-you-type>) underlines misspelled words in the prompt input as you type, using your installed `aspell`, `hunspell`, or `ispell`
+The optional [`spellcheck` setting](</docs/en/interactive-mode#check-spelling-as-you-type>) underlines misspelled words in the prompt input as you type, using your installed `aspell`, `hunspell`, or `ispell`
-On a branch with an open GitLab merge request, with the `glab` CLI authenticated through `glab auth login`, the footer shows an [`MR !N` badge](</docs/docs/en/interactive-mode#gitlab-merge-requests>) colored by whether the merge request is a draft, open, or mergeable
+On a branch with an open GitLab merge request, with the `glab` CLI authenticated through `glab auth login`, the footer shows an [`MR !N` badge](</docs/en/interactive-mode#gitlab-merge-requests>) colored by whether the merge request is a draft, open, or mergeable
-Change the effort level from your phone or claude.ai/code and it [applies to the session on your machine](</docs/docs/en/remote-control#what-connected-devices-see>); Remote Control sessions hosted by Desktop or VS Code also show connected devices the session’s current permission mode
+Change the effort level from your phone or claude.ai/code and it [applies to the session on your machine](</docs/en/remote-control#what-connected-devices-see>); Remote Control sessions hosted by Desktop or VS Code also show connected devices the session’s current permission mode
-You can open [`/permissions`](</docs/docs/en/permissions#manage-permissions>) or run `/add-dir <path>` while Claude is working; permission rule changes apply to the rest of the current turn
+You can open [`/permissions`](</docs/en/permissions#manage-permissions>) or run `/add-dir <path>` while Claude is working; permission rule changes apply to the rest of the current turn
-When background tasks keep a [`/goal`](</docs/docs/en/goal#background-work-defers-evaluation>) waiting, Claude checks in on them after 30 minutes instead of waiting indefinitely and keeps checking in, at longer intervals while the session sits idle; set `CLAUDE_CODE_GOAL_CHECKIN_MINUTES=0` to opt out
+When background tasks keep a [`/goal`](</docs/en/goal#background-work-defers-evaluation>) waiting, Claude checks in on them after 30 minutes instead of waiting indefinitely and keeps checking in, at longer intervals while the session sits idle; set `CLAUDE_CODE_GOAL_CHECKIN_MINUTES=0` to opt out
Your own prompts now render markdown in the transcript, with highlighted code blocks, inline code, and lists, the same way replies do
-The new [`ANTHROPIC_DEFAULT_MODEL`](</docs/docs/en/model-config#set-a-default-model-for-new-sessions>) environment variable sets the model new sessions start on; a `/model` pick still overrides it and persists across restarts
+The new [`ANTHROPIC_DEFAULT_MODEL`](</docs/en/model-config#set-a-default-model-for-new-sessions>) environment variable sets the model new sessions start on; a `/model` pick still overrides it and persists across restarts
-With the `notify_when_idle` input on `SendMessage`, Claude can ask another Claude Code session on the same machine to [send one notice when it next goes idle](</docs/docs/en/cross-session-messaging#get-a-notice-when-another-session-goes-idle>)
+With the `notify_when_idle` input on `SendMessage`, Claude can ask another Claude Code session on the same machine to [send one notice when it next goes idle](</docs/en/cross-session-messaging#get-a-notice-when-another-session-goes-idle>)
-Set [`keybindingFlavor`](</docs/docs/en/interactive-mode#make-ctrl-w-delete-back-to-whitespace>) to `“readline”` to make `Ctrl+W` in the prompt delete back to the previous whitespace, as Bash does, instead of stopping at punctuation such as `/`
+Set [`keybindingFlavor`](</docs/en/interactive-mode#make-ctrl-w-delete-back-to-whitespace>) to `“readline”` to make `Ctrl+W` in the prompt delete back to the previous whitespace, as Bash does, instead of stopping at punctuation such as `/`
-On native Windows, your Claude Code sessions can now [message each other](</docs/docs/en/cross-session-messaging#availability>) with `SendMessage` and find each other with `ListAgents`, as on macOS and Linux
+On native Windows, your Claude Code sessions can now [message each other](</docs/en/cross-session-messaging#availability>) with `SendMessage` and find each other with `ListAgents`, as on macOS and Linux
-Self-hosted runners accept `--defer-shutdown-max-min`, which [keeps serving attached sessions](</docs/docs/en/self-hosted-environments-deploy#defer-the-drain-past-the-first-signal>) for a set number of minutes after SIGTERM
+Self-hosted runners accept `--defer-shutdown-max-min`, which [keeps serving attached sessions](</docs/en/self-hosted-environments-deploy#defer-the-drain-past-the-first-signal>) for a set number of minutes after SIGTERM
-Self-hosted runners accept `--proxy-authorization-command` or `--proxy-authorization-file` to supply a fresh `Proxy-Authorization` header for [egress proxies that require one](</docs/docs/en/self-hosted-environments-deploy#authenticate-to-an-egress-proxy>)
+Self-hosted runners accept `--proxy-authorization-command` or `--proxy-authorization-file` to supply a fresh `Proxy-Authorization` header for [egress proxies that require one](</docs/en/self-hosted-environments-deploy#authenticate-to-an-egress-proxy>)
[Full changelog for v2.1.234–v2.1.239 →](</docs/en/changelog#2-1-234>)
--- a/advisor.md
+++ b/advisor.md
@@ -149,7 +149,7 @@
Impact on prompt caching
-Enabling or disabling the advisor mid-session does not invalidate your main model’s [prompt cache](</docs/en/prompt-caching>). Unlike [changing model or effort level](</docs/en/prompt-caching#actions-that-invalidate-the-cache>), toggling `/advisor` keeps the cached prefix intact, and the advisor’s returned guidance is cached as part of the transcript on later turns. The advisor model’s own read of the conversation is not cached. Each advisor call processes the full transcript anew, with no reuse between calls.
+Enabling or disabling the advisor mid-session does not invalidate your main model’s [prompt cache](</docs/en/prompt-caching>). Unlike [switching models](</docs/en/prompt-caching#switching-models>), toggling `/advisor` keeps the cached prefix intact, and the advisor’s returned guidance is cached as part of the transcript on later turns. The advisor model’s own read of the conversation is not cached. Each advisor call processes the full transcript anew, with no reuse between calls.
##
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,77 @@
This page is generated from the [CHANGELOG.md on GitHub](<https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md>). Run `claude --version` to check your installed version.
+
+
+
+2.1.260
+
+September 3, 2026
+
+ * Added a diff panel that opens beside the conversation in fullscreen mode and shows your uncommitted changes as Claude edits; toggle it with `/diff`
+ * Added a likely cause for prompt-cache misses (e.g. tool definitions or system prompt changed, idle past the TTL) to `/cost` and the status line’s `prompt_cache` field
+ * Added `/reload-plugins` to headless sessions, so it appears in the Claude Code Desktop and SDK command lists
+ * Added a text form of `/advisor` (`/advisor`, `/advisor <model>`, `/advisor off`) for the desktop app, Remote Control, and other headless (`-p`/Agent SDK) sessions
+ * Added `oidc.scope_on_refresh` to the Claude apps gateway for IdPs that return an id_token on refresh only when asked for `openid` again
+ * Added Claude apps gateway support for newer Claude Desktop keys in `desktop` policy blocks, including `userPluginMarketplacesEnabled` and `userPluginUploadsEnabled`
+ * Fixed `Edit`/`Write`/`Read` permission rules whose path contains parentheses being dropped as invalid or ignored by the Bash sandbox, which left “read-only” folders writable
+ * Fixed one file permission rule with an uncompilable pattern (e.g. an unclosed `[`) making every file edit fail with `Invalid regular expression`; such a deny rule now guards the literal path it spells
+ * Fixed Bash permission checks auto-approving zsh commands that hide a command substitution in a REPORTTIME, REPORTMEMORY or DIRSTACKSIZE assignment; these now prompt for approval
+ * Fixed Bedrock model discovery, token counting and AWS SSO/STS credential calls failing with “unable to get local issuer certificate” when the corporate root CA is only in the OS certificate store
+ * Fixed `permissions.blockReadsOutsideWorkingDirectories` on macOS hiding the user’s git config from sandboxed git and hiding a worktree-isolated sub-agent’s own checkout
+ * Fixed managed settings not loading for claude.ai Enterprise/Team users who also had a leftover API key from an earlier `/login`
+ * Fixed `/status` listing a signed-in claude.ai account and a configured API key as if both were in effect; the credential not in use is now marked
+ * Fixed managed `skillOverrides` entries keyed on a bundled skill’s alias (e.g. `checkup` for `/doctor`) not applying, and `Skill(name)` deny rules not covering a nested skill listed as `<dir>:name`
+ * Fixed `model: fable` agents ignoring the `[1m]` tag on an `ANTHROPIC_DEFAULT_FABLE_MODEL` pin and silently running with a 200K context window
+ * Fixed the `/model` picker not showing Fable 5.1 for organizations that can use it, which was only accepted when typed as `/model claude-fable-5-1`
+ * Fixed prompt caching on Claude Fable 5.1 not covering the context attached after tool results, so it was re-sent as uncached input on every tool-call turn
+ * Fixed model switching staying blocked for the rest of the session after a plugin hook load failure; each switch now re-checks and the refusal names the cause
+ * Fixed model switching being blocked for the session when an organization-managed plugin’s marketplace could not be loaded
+ * Fixed SDK-provided MCP servers (e.g. Desktop connectors) sometimes missing from the first turn and only appearing on the next one
+ * Fixed Claude in Chrome tools failing with “Not connected” mid-task in cloud-hosted claude.ai sessions when a connector was added or removed
+ * Fixed flags, joined emoji and accented letters splitting across wrapped lines, and stale text staying on screen when a flag or joined emoji falls in the terminal’s last two columns (now shown as `…`)
+ * Fixed Remote Control accepting a model pick that is not a valid model name; it is now refused with an error instead of failing on the next message
+ * Fixed `/rewind` and `--rewind-files` reporting success when checkpoint backup files were missing and nothing was actually restored
+ * Fixed `/rewind` leaving stale file-read tracking from the rewound-away turns, which caused “File unchanged since last read” stubs and full-file re-injection after external edits
+ * Fixed `-p --resume`/`--continue` (as used by the desktop app) failing on every retry once a session’s worktree directory lost its git metadata; it now fails once, then resumes without the worktree
+ * Fixed a subagent that resumed another agent via SendMessage never being woken by that agent’s completion (the notification went to the main conversation instead)
+ * Fixed agent teams: an in-process teammate’s transcript losing messages, or going blank, during long API retry waits (e.g. under `CLAUDE_CODE_RETRY_WATCHDOG`) as retry notices evicted real messages
+ * Fixed a session that moved to the background appearing twice in ListAgents (once as a phantom “interactive” twin with the same name) and receiving SendMessage deliveries in the viewer
+ * Fixed intermittent “task output swap refused” errors when many sessions share a project directory
+ * Fixed Ctrl+Z in fullscreen leaving the shell on the alternate screen, drawn over the paused interface
+ * Fixed Workflow tool subagents being restarted as stalled while a long context compaction was still in progress
+ * Fixed plugins from a URL marketplace failing to install with “marketplace entry path does not stay inside the marketplace directory” when a host app (e.g. Claude Desktop) stores it as a directory
+ * Fixed an extra browser tab opening when an artifact is published in a session you’re driving from claude.ai, the desktop app, or mobile (Remote Control)
+ * Fixed the Artifact tool’s first call failing with an “Invalid tool parameters” validation error in some Cowork sessions
+ * Fixed IDE line selections being dropped when running a skill or slash command (the “N lines selected” context now reaches Claude)
+ * Fixed repository detection for GitLab projects in nested subgroups (e.g. `gitlab.com/group/subgroup/project`)
+ * Fixed `owner/repo#123` issue references in rendered output linking to github.com when working in a GitLab repository; they now link to the gitlab.com issue
+ * Glob/Grep: Fixed the search path being probed on disk before the permission check; a missing path is now reported after permission is decided, as Read does
+ * Reverted the 2.1.259 change applying `Read()` deny rules to Bash arguments; it denied `npm run build` under a `Read(./**/build/**)` rule in every mode and made `cd … && grep` prompt even in auto mode
+ * Improved structured output: Workflow `agent({schema})` rejects a JSON Schema that can never be satisfied up front, and retry-cap errors now include the last validation failure
+ * Improved deleting a background session whose worktree has unpushed commits: the message now names the branch and commit count, and deleting again discards the worktree
+ * Improved the Claude apps gateway’s refresh-failure log to name the step that failed
+ * Improved idle CPU usage of non-interactive (`-p` / SDK) sessions
+ * Improved the Claude apps gateway on Amazon Bedrock: input tokens for an aborted request are now counted with AWS’s free CountTokens API (grant `bedrock:CountTokens`) instead of a one-token request
+ * Improved the settings error for rules such as `Edit(C:\dir\(name)\**)`, where `\(` is read as an escaped parenthesis rather than a path separator, to suggest an unambiguous spelling
+ * Improved auto-compact for 1M-context models: Opus and Fable sessions now compact shortly before the 1M-token limit, and recovery compaction on very large contexts no longer times out at 10 minutes
+ * Improved `/ultrareview` and `claude ultrareview` to wait up to 45 minutes (previously 30) for long-running cloud reviews
+ * Improved `/effort` on Claude Fable 5.1 so changing effort mid-session no longer invalidates the prompt cache
+ * Updated the bundled `claude-api` skill so its Go, Java, and C# samples use current-generation model IDs, and clarified that cheaper worker or sub-agent models should be current-generation too
+ * Changed `ctrl+l` / `cmd+k` in fullscreen mode to clear the transcript view like a terminal `clear`; scroll up to see earlier messages
+ * Changed permission rules with text after the closing parenthesis (e.g. `Bash(ls) x`), which never matched anything, to be reported as invalid settings instead of being silently ignored
+ * Changed server-managed settings so a managed CLAUDE.md (`claudeMd`) no longer triggers the security approval dialog; hooks, shell-command, sandbox, and unsafe `env` settings still require approval
+ * Changed Claude in Chrome to follow your organization’s Claude in Chrome admin setting; when an admin turns it off, `--chrome`, `/chrome` and the browser tools are unavailable
+ * Changed Claude apps gateway to send `orgPluginSettings` in the list form read by Claude Desktop 1.15200.0 and later; older desktops ignore it
+ * Changed Claude apps gateway to also refuse to start, naming the field, when a `desktop` policy misspells a field in a nested object of a `managedMcpServers` or `orgPluginSettings` entry
+ * Changed commands typed at the `!` bash-mode prompt to run outside the sandbox even when strict sandbox mode (`sandbox.allowUnsandboxedCommands: false`) is on, like typing into your own terminal
+ * Changed self-hosted runner `--kill-session-after-min` to release a session that is only waiting on its user (paused, resumable on the next message) instead of killing it and reporting a failure
+ * Removed the one-hour time limit on background commands started by subagents; they now run until they exit or are stopped, matching the main session
+ * [VSCode] Added the selected effort level to the footer model pill, fixed a stale effort level after switching models, and returned the footer pills to their earlier compact size
+ * [VSCode] Added Open and Closed to the session list’s status filter menu
+ * [VSCode] Fixed the welcome screen disappearing in a new session when Remote Control turns on automatically
+ * [VSCode] Fixed the session history picker loading a session a second time when it is already open in another tab; it now switches to that tab
+ * [VSCode] Fixed the session tab’s Rename command silently doing nothing while the tab’s view was reloading; it now always applies
+ * [VSCode] Fixed a half-finished message, an empty tool card or an extra “Thought for” line staying on screen after Claude Code retried a dropped response
+ * [VSCode] Fixed “Enable Remote Control for all sessions” not applying to a session tab that was still starting when the toggle was flipped
modified
Claude apps gateway for Amazon Bedrock, Claude Platform on AWS, Google Cloud, and Microsoft Foundry
View current →
--- a/claude-apps-gateway.md
+++ b/claude-apps-gateway.md
@@ -33,7 +33,7 @@
Other gateway implementations
-If you already run an LLM gateway or API gateway that meets your needs, keep using it; [Other LLM gateways](</docs/en/llm-gateway>) covers configuring Claude Code against it. The [gateway protocol reference](</docs/en/llm-gateway-protocol>) documents the contract Claude Code expects from any gateway: the endpoints it calls, the headers and body fields to forward, and what stops working when they’re stripped. A running Claude apps gateway serves a superset of that contract at `GET /protocol`, adding the Claude apps gateway-specific endpoints for SSO sign-in, managed settings delivery, and telemetry. Fetch it with `curl https://claude-gateway.internal.example.com/protocol` from any deployed gateway, such as the one the quickstart below produces. Breaking changes to the protocol are announced in advance, but indefinite backwards compatibility isn’t guaranteed.
+If you already run an LLM gateway or API gateway that meets your needs, keep using it; [Other LLM gateways](</docs/en/llm-gateway>) covers configuring Claude Code against it. The [gateway compatibility guide](</docs/en/llm-gateway-protocol>) documents what Claude Code expects from any gateway: the endpoints it calls, the headers and body fields to forward, and what stops working when they’re stripped. A running Claude apps gateway also serves its own protocol reference at `GET /protocol`, which describes the endpoints it exposes to Claude Code clients: SSO sign-in, inference, managed settings delivery, model discovery, and telemetry. Fetch it with `curl https://claude-gateway.internal.example.com/protocol` from any deployed gateway, such as the one the quickstart below produces. Breaking changes to the protocol are announced in advance, but indefinite backwards compatibility isn’t guaranteed.
##
--- a/claude-apps-gateway-config.md
+++ b/claude-apps-gateway-config.md
@@ -608,7 +608,6 @@
* shell-execution settings such as `apiKeyHelper` and `statusLine`
* the sandbox binary settings `sandbox.bwrapPath`, `sandbox.socatPath`, and `sandbox.ripgrep`
* Sandbox settings that intercept traffic, inject credentials, or weaken isolation, such as `sandbox.network.tlsTerminate` and the proxy port settings. [Security approval dialogs](</docs/en/server-managed-settings#security-approval-dialogs>) lists them all.
- * managed CLAUDE.md content
[Approval memory](</docs/en/server-managed-settings#approval-memory>) covers how long an approval lasts and when the dialog appears again. Claude Code applies some delivered `env` variables without showing the developer the approval dialog, such as model selection settings and numeric limits. Other delivered variables can require the developer’s approval before they take effect; a non-empty proxy, base-URL, or `OTEL_EXPORTER_OTLP_ENDPOINT` value always does. When a delivered variable needs approval, the dialog names it. [Environment variables and the approval dialog](</docs/en/server-managed-settings#environment-variables-and-the-approval-dialog>) has the details, including four privacy toggles whose delivered value decides whether they need approval. Before v2.1.218, Claude Code applied fewer variables without asking the developer, so more delivered variables triggered the dialog. The gateway’s telemetry configuration pushes `OTEL_EXPORTER_OTLP_ENDPOINT`, so setting `telemetry.forward_to` triggers the dialog on each interactive client. The dialog protects the developer’s machine from a compromised or hostile gateway, not the organization from the developer. A non-interactive run with the `-p` flag can’t show the dialog. It applies the pushed settings for that run only and doesn’t record them as approved, so the developer’s next interactive session still shows the dialog. Before v2.1.207, a non-interactive run saved the settings as approved and no later interactive session showed the dialog for them. If a developer declines, Claude Code exits that session rather than applying the policy. When you push a new hook, or any env var that triggers the dialog, to a broad policy, Claude Code therefore shows the dialog to every matching developer. It shows the dialog in a running session on the next hourly poll, and otherwise at the developer’s next startup. The `cli` key was named `settings` in earlier releases. That spelling is still accepted as an alias, but new deployments should use `cli`.
--- a/claude-code-on-the-web.md
+++ b/claude-code-on-the-web.md
@@ -318,7 +318,7 @@
* **Isolated virtual machines** : each session runs in an isolated, Anthropic-managed VM. Sessions your organization routes to a [self-hosted environment](</docs/en/self-hosted-environments>) run on your own infrastructure instead, where isolation is your deployment’s responsibility
* **Network access controls** : in Anthropic-hosted environments, network access is limited by default and can be disabled. In a self-hosted environment, you restrict session egress at your own network boundary. When running with network access disabled, Claude Code can still communicate with the Anthropic API, which may allow data to exit the VM.
* **Credential protection** : in Anthropic-hosted environments, git credentials and signing keys stay outside the sandbox, and a proxy authenticates on the session’s behalf with scoped credentials. In a self-hosted environment, your deployment supplies git credentials; see [Configure git](</docs/en/self-hosted-environments-deploy#configure-git>)
- * **API credentials** : in Anthropic-hosted environments, keys you [add to a cloud environment](</docs/en/cloud-environments#add-api-credentials>) stay outside the sandbox the same way, attached to matching requests after they leave the session. A self-hosted environment doesn’t have API credentials
+ * **API credentials** : in Anthropic-hosted environments on Pro and Max plans, keys you [add to a cloud environment](</docs/en/cloud-environments#add-api-credentials>) stay outside the sandbox the same way, attached to matching requests after they leave the session. A self-hosted environment doesn’t have API credentials, and Team and Enterprise plans don’t have them yet
* **Secure analysis** : code is analyzed and modified within the session’s isolated environment before creating PRs
##
--- a/cli-reference.md
+++ b/cli-reference.md
@@ -110,6 +110,7 @@
`--permission-prompt-tool`| Specify an MCP tool to handle permission prompts in non-interactive mode. Claude Code waits for that tool’s MCP server to connect before running the first turn, up to the [`MCP_TIMEOUT`](</docs/en/env-vars>) startup timeout, 30 seconds by default.
The prompt tool can’t approve an MCP tool marked as [requiring user interaction](</docs/en/mcp#require-approval-for-a-specific-tool>): Claude Code converts an `allow` result for one to a deny. This restriction requires Claude Code v2.1.199 or later| `claude -p --permission-prompt-tool mcp_auth_tool "query"`
+`--permission-prompts`| Set who answers permission prompts in print mode. With the default `host`, Claude Code sends them to the Agent SDK host or the `--permission-prompt-tool` tool. Pass `none` when nobody can answer, and Claude Code denies them instead. See [Turn off permission prompts in unattended runs](</docs/en/headless#turn-off-permission-prompts-in-unattended-runs>). Requires Claude Code v2.1.259 or later| `claude -p --permission-prompts none "query"`
`--plugin-dir`| Load a plugin from a directory or `.zip` archive for this session only. Each flag takes one path. Repeat the flag for multiple plugins: `--plugin-dir A --plugin-dir B.zip`| `claude --plugin-dir ./my-plugin`
`--plugin-url`| Fetch a plugin `.zip` archive from a URL for this session only. Repeat the flag for multiple plugins, or pass space-separated URLs in a single quoted value| `claude --plugin-url https://example.com/plugin.zip`
`--print`, `-p`| Print response without interactive mode (see [Agent SDK documentation](</docs/en/agent-sdk/overview>) for programmatic usage details)| `claude -p "query"`
--- a/cloud-environments.md
+++ b/cloud-environments.md
@@ -1,6 +1,6 @@
Cloud environments require [Claude Code on the web](</docs/en/claude-code-on-the-web>), which is in research preview for Pro, Max, and Team users, and for Enterprise users with [premium seats or Chat + Claude Code seats](<https://support.claude.com/en/articles/11845131-use-claude-code-with-your-team-or-enterprise-plan>).
-Each [cloud session](</docs/en/claude-code-on-the-web>) runs in a cloud environment. You can configure an environment to allow or deny network access, set environment variables for the session, store API credentials that sessions use without seeing them, and run a setup script before Claude starts working. The same environments apply wherever you start a cloud session: [Claude Code on the web](</docs/en/claude-code-on-the-web>), the terminal with [`claude --cloud`](</docs/en/claude-code-on-the-web#from-terminal-to-web>), [Claude Tag](<https://claude.com/docs/claude-tag/overview>), [routines](</docs/en/routines>), the [Claude mobile app](</docs/en/mobile>), and the [Desktop app](</docs/en/desktop>). Each of these surfaces can also route to a [self-hosted environment](</docs/en/self-hosted-environments>). [Availability and limitations](</docs/en/self-hosted-environments#availability-and-limitations>) covers what Claude can’t use yet when a Claude Tag session runs in one.
+Each [cloud session](</docs/en/claude-code-on-the-web>) runs in a cloud environment. You can configure an environment to allow or deny network access, set environment variables for the session, on Pro and Max plans store API credentials that sessions use without seeing them, and run a setup script before Claude starts working. The same environments apply wherever you start a cloud session: [Claude Code on the web](</docs/en/claude-code-on-the-web>), the terminal with [`claude --cloud`](</docs/en/claude-code-on-the-web#from-terminal-to-web>), [Claude Tag](<https://claude.com/docs/claude-tag/overview>), [routines](</docs/en/routines>), the [Claude mobile app](</docs/en/mobile>), and the [Desktop app](</docs/en/desktop>). Each of these surfaces can also route to a [self-hosted environment](</docs/en/self-hosted-environments>). [Availability and limitations](</docs/en/self-hosted-environments#availability-and-limitations>) covers what Claude can’t use yet when a Claude Tag session runs in one.
[Remote Control](</docs/en/remote-control>) sessions connect the web and mobile interfaces to a session on your own machine, which uses your machine’s network and files, not a cloud environment. Claude Tag channel sessions use organization-level environments only, either shared environments or [self-hosted environments](</docs/en/self-hosted-environments>).
@@ -46,7 +46,7 @@
Add or edit an environment
-Select **Add cloud environment** , or hover over an existing environment and select the settings icon that appears on the right. The dialog includes the name, network access level, environment variables, and setup script. When you edit an existing cloud environment, the dialog also includes API credentials.
+Select **Add cloud environment** , or hover over an existing environment and select the settings icon that appears on the right. The dialog includes the name, network access level, environment variables, and setup script. When you edit an existing cloud environment on a Pro or Max plan, the dialog also includes API credentials.
###
@@ -60,7 +60,7 @@
LOG_LEVEL=debug
DATABASE_URL=postgres://localhost:5432/myapp
-Each session copies the environment’s values once, at startup, into ordinary environment variables that any command Claude runs can read. Because running sessions don’t re-read the configuration, editing or adding variables affects sessions you start afterward; sessions already running keep the values they started with. Claude Code on the web also sets some variables itself when it starts a session. For [`CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`](</docs/en/claude-code-on-the-web#manage-context>), the value Claude Code on the web sets overrides one you add here, so adding that key here has no effect. Anyone who uses the environment can read the values. For a key the agent proxy can attach to a request, use an API credential instead. The requests that never get a credential are listed there.
+Each session copies the environment’s values once, at startup, into ordinary environment variables that any command Claude runs can read. Because running sessions don’t re-read the configuration, editing or adding variables affects sessions you start afterward; sessions already running keep the values they started with. Claude Code on the web also sets some variables itself when it starts a session. For [`CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`](</docs/en/claude-code-on-the-web#manage-context>), the value Claude Code on the web sets overrides one you add here, so adding that key here has no effect. Anyone who uses the environment can read the values. On Pro and Max plans, use an API credential instead for a key the agent proxy can attach to a request. The requests that never get a credential are listed there.
###
@@ -68,7 +68,7 @@
Add API credentials
-An API credential is an API key or token you store on a cloud environment so Claude can call that API from any session in the environment without seeing the key. Anthropic’s agent proxy adds the key to requests for the hosts you list, after each request leaves the session’s VM. The key never reaches Claude, the commands it runs, or the session’s environment variables.
+An API credential is an API key or token you store on a cloud environment so Claude can call that API from any session in the environment without seeing the key. Anthropic’s agent proxy adds the key to requests for the hosts you list, after each request leaves the session’s VM. The key never reaches Claude, the commands it runs, or the session’s environment variables. API credentials are available on Pro and Max plans. They aren’t available on Team or Enterprise plans yet, so the **API credentials** section doesn’t appear in the environment dialog on those plans.
####
@@ -167,7 +167,7 @@
Organization-shared environments
-On Team and Enterprise plans, an Owner can create cloud environments that are shared with every member of the organization. The same role manages everything else on the **Cloud environments** admin page, including [self-hosted environments](</docs/en/self-hosted-environments>); the Admin role can’t open the page. The full list of roles that can open it is the one for [managing server-managed settings](</docs/en/server-managed-settings#access-control>). Shared environments appear in each member’s environment selector alongside their personal ones, so a team can standardize on one configuration instead of each member recreating it. Create, edit, and archive shared environments from the **Cloud environments** page in [admin settings](<https://claude.ai/admin-settings>). A shared environment also opens from the environment selector at [claude.ai/code](<https://claude.ai/code>): an Owner can edit it there, and that dialog is where API credentials are added. Other members see it read-only. Each shared environment has a name, a network access level, environment variables in `.env` format, and a setup script. Owners choose the organization’s default environment separately, at [claude.ai/admin-settings/claude-code](<https://claude.ai/admin-settings/claude-code>). Every member’s sessions in a shared environment read its variables, so don’t include secrets in them. To give those sessions a key they can’t read, add an API credential from that dialog.
+On Team and Enterprise plans, an Owner can create cloud environments that are shared with every member of the organization. The same role manages everything else on the **Cloud environments** admin page, including [self-hosted environments](</docs/en/self-hosted-environments>); the Admin role can’t open the page. The full list of roles that can open it is the one for [managing server-managed settings](</docs/en/server-managed-settings#access-control>). Shared environments appear in each member’s environment selector alongside their personal ones, so a team can standardize on one configuration instead of each member recreating it. Create, edit, and archive shared environments from the **Cloud environments** page in [admin settings](<https://claude.ai/admin-settings>). A shared environment also opens from the environment selector at [claude.ai/code](<https://claude.ai/code>): an Owner can edit it there. Other members see it read-only. Each shared environment has a name, a network access level, environment variables in `.env` format, and a setup script. Owners choose the organization’s default environment separately, at [claude.ai/admin-settings/claude-code](<https://claude.ai/admin-settings/claude-code>). Every member’s sessions in a shared environment read its variables, so don’t include secrets in them. API credentials, which give sessions a key they can’t read, aren’t available on Team or Enterprise plans yet.
###
@@ -287,10 +287,10 @@
Plugins enabled only in your user settings| No| User-scoped `enabledPlugins` lives in `~/.claude/settings.json`. Declare them in the repo’s `.claude/settings.json` instead, or enable them for your claude.ai account so Claude Code loads them as [synced plugins](</docs/en/plugins-reference#synced-plugins>)
MCP servers you added with `claude mcp add` at the default local scope or the user scope| No| Those write to `~/.claude.json` on your machine, not the repo. Add the server with `claude mcp add --scope project`, which writes the repo’s [`.mcp.json`](</docs/en/mcp#project-scope>), and commit that file
Transport variables in your repo’s `.claude/settings.json` `env` block, such as `NODE_EXTRA_CA_CERTS` and the [mTLS client certificate variables](</docs/en/network-config#mtls-authentication>)| No| The hosting environment manages the session’s API connection, so Claude Code ignores these keys and notes each ignored key in the session’s debug log
-API keys and tokens for services Claude calls| Yes, as API credentials| You add the key once on the environment and the agent proxy attaches it to requests for the hosts you list. A key the agent proxy can’t attach stays in an environment variable
+API keys and tokens for services Claude calls| On Pro and Max plans, as API credentials| You add the key once on the environment and the agent proxy attaches it to requests for the hosts you list. A key the agent proxy can’t attach, or any key on a Team or Enterprise plan, stays in an environment variable
Interactive auth like AWS SSO| No| Not supported. SSO requires browser-based login that can’t run in a cloud session
-To make your own configuration available in cloud sessions, commit it to the repo. Anyone who uses the environment can read its environment variables and setup script. The dialog’s note under **Environment variables** says so and warns against putting secrets there. Store a key the agent proxy can attach as an API credential instead.
+To make your own configuration available in cloud sessions, commit it to the repo. Anyone who uses the environment can read its environment variables and setup script. The dialog’s note under **Environment variables** says so and warns against putting secrets there. On Pro and Max plans, store a key the agent proxy can attach as an API credential instead.
###
--- a/errors.md
+++ b/errors.md
@@ -211,6 +211,8 @@
`Agent descriptions are over the 15.0k-token limit`| Configuration warnings
`Ignoring N permissions.allow entries from ... this workspace has not been trusted`| Configuration warnings
`Remote managed settings failed to load (<cause>)`| Configuration warnings
+`Managed settings document could not be parsed as a JSON object; none of its settings are in effect. Fix or remove it.`| Configuration warnings
+`Managed settings drop-in directory could not be read`| Configuration warnings
`"crossSessionInbound" must be one of "accept", "hold", "refuse"`| Configuration warnings
`headersHelper not run — this workspace has no persisted trust`| Configuration warnings
`... is not matched by file permission checks`| Configuration warnings
@@ -258,7 +260,7 @@
While retrying, the spinner shows a `Retrying in Ns · attempt x/y` countdown after an error label. The label names the specific reason from the first attempt for failures you can act on right away: the network is down, a TLS handshake failed, or you hit a rate limit. For other errors it reads `API error` at first. As of v2.1.198 it switches to the specific reason from the third attempt, or on the final attempt when `CLAUDE_CODE_MAX_RETRIES` allows fewer than three; earlier versions switch only on the final attempt. As of v2.1.198, the usual spinner tip is suppressed during retries. Once the error reason is revealed, if the failure is a 529 overload the line below the countdown also names where to check service status: `status.claude.com` on the Anthropic API, or the provider or gateway host named in the message on other configurations. If no data arrives on the response stream for 20 seconds while a request is still pending, the spinner shows `Waiting for API response · will retry in … · check your network` before any retry has started. The request hasn’t failed yet: the countdown runs to the point where Claude Code aborts the stalled connection. After the abort, what you see depends on how far the response had got:
* Before Claude has completed a block of text or a tool call, or started one after finishing its thinking, Claude Code retries the request or ends the turn with an error. Automatic retries says which stalls it retries and how many times.
- * After Claude has completed a block of text or a tool call, or started one after finishing its thinking, but before Claude has finished the response, Claude Code keeps what Claude completed, continues the turn from any tool calls Claude finished, and shows The response above may be incomplete. In a non-interactive session, Claude Code may first prompt Claude to continue the response; that entry says when it does and when you still see the notice there.
+ * After Claude has completed a block of text or a tool call, or started one after finishing its thinking, but before Claude has finished the response, Claude Code keeps what Claude completed, continues the turn from any tool calls Claude finished, and shows The response above may be incomplete. In a non-interactive session, and for a subagent’s response in any session, Claude Code may first prompt Claude to continue the response; that entry says when it does and when you still see the notice there.
* After Claude finished the response, Claude Code ends the turn normally.
The banner clears on its own once data resumes or a retry succeeds. If it reappears on every attempt, treat it as a network issue. Before v2.1.185, the banner appeared after 10 seconds with different wording. While Claude is consulting the [advisor](</docs/en/advisor>), the banner appears after 90 seconds without data instead of 20, because a long advisor review can send nothing for well over 20 seconds. Before v2.1.214, the 20-second threshold applied during advisor calls too, so the banner appeared during advisor reviews even when nothing was wrong.
@@ -377,11 +379,12 @@
* `Your computer went to sleep mid-response`: Claude Code detected that your computer went to sleep while the response was streaming. Once your computer wakes, Claude Code treats the connection as broken and stops reading from it.
* `The response stopped arriving`: the connection stayed open but stopped delivering data, so the streaming idle watchdog aborted it. Before v2.1.222, Claude Code could also report this failure on [gateway](</docs/en/gateways>) connections reached through `ANTHROPIC_BASE_URL` or `ANTHROPIC_AWS_BASE_URL` while the server’s keep-alive pings were still arriving, because it counted only parsed response events there; upgrading stops those spurious timeouts on those routes. Gateways reached through a provider base URL such as `ANTHROPIC_BEDROCK_BASE_URL` aren’t wrapped by the byte watchdog; see [Streaming idle watchdogs](</docs/en/network-config#streaming-idle-watchdogs>).
-Before v2.1.227, `Connection lost mid-response` read `Connection closed mid-response` and `The response stopped arriving` read `Response stalled mid-stream`. In three cases, Claude Code handles the failure without showing this notice right away:
+Before v2.1.227, `Connection lost mid-response` read `Connection closed mid-response` and `The response stopped arriving` read `Response stalled mid-stream`. In four cases, Claude Code handles the failure without showing this notice right away:
* Earlier in the response, Claude Code either retries the failure or ends the turn with a different error. See Automatic retries.
* When one of these failures arrives after Claude has finished the response, Claude Code keeps the complete response and ends the turn normally, without this notice. Before v2.1.222, Claude Code showed this notice when the connection dropped or stalled after the response finished, and reported the turn as an error even though the response was complete.
* In a [non-interactive session](</docs/en/headless>), such as a `-p` run, an [Agent SDK](</docs/en/agent-sdk/overview>) run, or a [cloud session](</docs/en/claude-code-on-the-web>), you don’t have to send `continue` yourself when the cut-off response is in the main conversation and contains text but no tool calls: Claude Code keeps the partial output and prompts Claude to continue from where it stopped, up to three times in a row. You see this notice for such a response only once Claude Code has used up those continuations. Before v2.1.246, Claude Code ended a non-interactive turn with this notice on the first cut-off.
+ * In a [subagent](</docs/en/sub-agents#api-errors-in-subagents>), whether the session is interactive or not: when its cut-off response contains text but no tool calls, Claude Code prompts the subagent to continue. The notice becomes the subagent’s last message only once those continuations are used up. Before v2.1.257, a subagent showed this notice on the first cut-off.
**What to do:**
@@ -3074,6 +3077,27 @@
+Managed settings document could not be parsed
+
+Your organization deploys [managed settings](</docs/en/managed-settings>), and one of the deployed documents is present but can’t be parsed as a JSON object, so Claude Code exits with code 1 at startup instead of running without the policy the document carries. The line names the failed source before the message:
+
+ /Library/Application Support/ClaudeCode/managed-settings.json: Managed settings document could not be parsed as a JSON object; none of its settings are in effect. Fix or remove it.
+
+The source is one of:
+
+ * The path of the `managed-settings.json` file or a drop-in file under `managed-settings.d`
+ * The macOS managed preferences profile, `per-user managed preferences` or `device-level managed preferences`
+ * The Windows registry value, `Registry: HKLM\SOFTWARE\Policies\ClaudeCode\Settings`
+
+[Find entries Claude Code dropped](</docs/en/managed-settings#find-entries-claude-code-dropped>) lists what makes each source unparseable. Claude Code refuses to start even when another admin source delivers a valid policy. You see this error in interactive sessions, `claude -p`, Agent SDK sessions, [background sessions](</docs/en/agent-view>), and most subcommands, `claude doctor` included. The refusal fails closed on purpose: settings in a document Claude Code can’t parse can’t be enforced, and starting anyway would run sessions without the organization’s controls. A schema problem in a parseable document doesn’t produce this error. [Find entries Claude Code dropped](</docs/en/managed-settings#find-entries-claude-code-dropped>) covers what Claude Code does with one. When a `managed-settings.d/` directory exists but can’t be listed, Claude Code reports `Managed settings drop-in directory could not be read:` followed by the underlying error instead. [Find entries Claude Code dropped](</docs/en/managed-settings#find-entries-claude-code-dropped>) covers when a read failure exits at startup. **What to do:**
+
+ * If you administer the machine, fix the named document so it parses as a JSON object, or remove the file, profile, or registry value. An empty `managed-settings.json` counts as `{}` and doesn’t block launch.
+ * If you don’t, ask your administrator to fix the deployed document. Nothing in your own settings files causes or clears this error.
+
+###
+
+
+
headersHelper not run
Claude Code connected an MCP server with its static `headers` alone and skipped the server’s [`headersHelper`](</docs/en/mcp#use-dynamic-headers-for-custom-authentication>), because the helper is a shell command and the folder has no saved trust. A folder gets saved trust when you set its entry in `~/.claude.json` by hand or, outside your home directory, when you accept the trust dialog for it in an interactive session. See [Trust a folder before its headersHelper runs](</docs/en/mcp#trust-a-folder-before-its-headershelper-runs>) for which servers this check applies to. Claude Code writes this line in [non-interactive mode](</docs/en/headless>) only, once per server. In an interactive session it writes the same refusal to the debug log instead.
--- a/gateways.md
+++ b/gateways.md
@@ -71,7 +71,7 @@
Next steps
-The next page depends on who runs the gateway. Anthropic’s gateway runs from the `claude` binary and has its own setup guide; a gateway your organization already runs has a protocol to implement and an admin rollout checklist.
+The next page depends on who runs the gateway. Anthropic’s gateway runs from the `claude` binary and has its own setup guide; a gateway your organization already runs has a compatibility guide to follow and an admin rollout checklist.
* [Claude apps gateway](</docs/en/claude-apps-gateway>) to deploy Anthropic’s self-hosted gateway with SSO sign-in and OTLP telemetry
* [Other LLM gateways](</docs/en/llm-gateway>) for what a gateway your organization already runs must implement, and how to point Claude Code at it
--- a/headless.md
+++ b/headless.md
@@ -263,6 +263,20 @@
+Turn off permission prompts in unattended runs
+
+Pass `--permission-prompts none` when nobody is available to answer permission prompts, for example in a scheduled job. The flag matters most when your run has a permission host: an Agent SDK app with a [`canUseTool` callback](</docs/en/agent-sdk/user-input>), or an MCP tool you pass with [`--permission-prompt-tool`](</docs/en/cli-reference#cli-flags>). Without the flag, your run waits for that host to answer each permission request. With the flag, your run doesn’t consult the host or wait on it. Anything that would prompt is denied unless a `PermissionRequest` hook allows it, Claude is told that nobody can approve the request and not to retry it, and the run continues. In a `-p` run with no host, these requests are denied either way, and the flag also tells Claude not to retry them. Permission rules, [`PermissionRequest` hooks](</docs/en/hooks#permissionrequest>), and the permission mode you set still decide every call first; Claude Code denies only the requests that nothing else resolves. This example runs an unattended task in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>). The classifier reviews each action as usual, and Claude Code denies anything that would have fallen back to a prompt:
+
+ claude -p "Update the dependency pins and run the tests" --permission-mode auto --permission-prompts none
+
+With `--permission-prompts none`, Claude Code removes the tools that need an answer from a person, such as [`AskUserQuestion`](</docs/en/tools-reference#askuserquestion-tool-behavior>), so Claude can’t call them. Any [MCP elicitation request](</docs/en/mcp#respond-to-mcp-elicitation-requests>) that no [`Elicitation` hook](</docs/en/hooks#elicitation>) answers is cancelled. With `--output-format stream-json`, denials appear as `permission_denied` system messages, and the final result message lists them in `permission_denials`.
+
+The `--permission-prompts` flag requires Claude Code v2.1.259 or later. Earlier versions reject it with an unknown-option error.
+
+###
+
+
+
Create a commit
This example reviews staged changes and creates a commit with an appropriate message:
--- a/llm-gateway.md
+++ b/llm-gateway.md
@@ -2,7 +2,7 @@
* If you’re a developer connecting to an existing gateway: [connect Claude Code to your gateway](</docs/en/llm-gateway-connect>)
* If you’re an admin rolling out a gateway for your organization: [deploy and distribute a gateway](</docs/en/llm-gateway-rollout>)
- * If you’re configuring a gateway product: the [gateway protocol reference](</docs/en/llm-gateway-protocol>)
+ * If you’re configuring a gateway product: the [gateway compatibility guide](</docs/en/llm-gateway-protocol>)
Any gateway that exposes a [supported API format](</docs/en/llm-gateway-protocol#api-formats>) works. Anthropic doesn’t endorse, maintain, or audit third-party gateway products, and doesn’t support routing Claude Code to non-Claude models through any gateway. Deploy the gateway following its own documentation, then complete the Claude Code side with the rollout steps below.
@@ -20,7 +20,7 @@
* **Audit logging** : log every model request for compliance
* **Provider switching** : change the provider in gateway configuration, without touching developer machines
-All of these except provider switching apply whether the upstream is Anthropic’s API or a [cloud provider](</docs/en/third-party-integrations>). Provider switching without reconfiguring developer machines also depends on the gateway exposing a single [Anthropic-format endpoint](</docs/en/llm-gateway-protocol#api-formats>) regardless of upstream; a gateway that exposes a provider’s own format ties the client configuration to that provider. The tradeoff is that the gateway becomes infrastructure your organization operates. Claude Code adds capabilities with each release, and a gateway that doesn’t forward them breaks the corresponding features, so the gateway product needs to be kept updated as Claude Code evolves. The [gateway protocol reference](</docs/en/llm-gateway-protocol>) covers what to forward.
+All of these except provider switching apply whether the upstream is Anthropic’s API or a [cloud provider](</docs/en/third-party-integrations>). Provider switching without reconfiguring developer machines also depends on the gateway exposing a single [Anthropic-format endpoint](</docs/en/llm-gateway-protocol#api-formats>) regardless of upstream; a gateway that exposes a provider’s own format ties the client configuration to that provider. The tradeoff is that the gateway becomes infrastructure your organization operates. Claude Code adds capabilities with each release, and a gateway that doesn’t forward them breaks the corresponding features, so the gateway product needs to be kept updated as Claude Code evolves. The [gateway compatibility guide](</docs/en/llm-gateway-protocol>) covers what to forward.
##
@@ -55,4 +55,4 @@
* [Claude apps gateway](</docs/en/claude-apps-gateway>): Anthropic’s self-hosted gateway with SSO sign-in and OTLP telemetry
* [Connect Claude Code to an LLM gateway](</docs/en/llm-gateway-connect>): set the base URL and credential on your own machine, with per-surface configuration and a troubleshooting table
* [Roll out an LLM gateway for your organization](</docs/en/llm-gateway-rollout>): the admin checklist for deploying a gateway, issuing developer credentials, and distributing managed settings
- * [Gateway protocol reference](</docs/en/llm-gateway-protocol>): what Claude Code sends to a gateway, for operators configuring one, covering endpoints, headers to forward, and feature pass-through
+ * [Gateway compatibility guide](</docs/en/llm-gateway-protocol>): what Claude Code sends to a gateway, for operators configuring one, covering endpoints, headers to forward, and feature pass-through
--- a/llm-gateway-connect.md
+++ b/llm-gateway-connect.md
@@ -1,7 +1,7 @@
An [LLM gateway](</docs/en/llm-gateway>) is a proxy your organization runs between Claude Code and the model provider. When your organization uses one, Claude Code authenticates to the gateway with a credential your organization issues instead of your personal claude.ai login. This page is for developers running Claude Code through a gateway their organization operates. It covers two paths: checking whether your administrator already configured it for you, and configuring it yourself when they haven’t.
* To deploy a gateway for your organization, see [Roll out an LLM gateway](</docs/en/llm-gateway-rollout>)
- * For what Claude Code sends to a gateway, see the [gateway protocol reference](</docs/en/llm-gateway-protocol>)
+ * For what Claude Code sends to a gateway, see the [gateway compatibility guide](</docs/en/llm-gateway-protocol>)
##
@@ -521,6 +521,6 @@
* [LLM gateways overview](</docs/en/llm-gateway>): what a gateway is and how it interacts with claude.ai subscriptions
* [Roll out an LLM gateway for your organization](</docs/en/llm-gateway-rollout>): the admin-facing checklist for deploying and distributing gateway configuration
- * [Gateway protocol reference](</docs/en/llm-gateway-protocol>): what Claude Code sends to a gateway, including the headers and fields the gateway must forward
+ * [Gateway compatibility guide](</docs/en/llm-gateway-protocol>): what Claude Code sends to a gateway, including the headers and fields the gateway must forward
* [Settings](</docs/en/settings>): where settings files live and how the `env` block is read
* [Authentication](</docs/en/authentication>): how credential variables, `apiKeyHelper`, and OAuth login interact
--- a/llm-gateway-protocol.md
+++ b/llm-gateway-protocol.md
@@ -1,4 +1,4 @@
-This page documents the requests Claude Code sends to a gateway, including the endpoints it calls, the headers and body fields the gateway must forward, and which features stop working when it doesn’t. It is written for operators configuring a gateway product to work with Claude Code. A running [Claude apps gateway](</docs/en/claude-apps-gateway>) serves a machine-readable version of this contract at `GET /protocol`, covering the same forwarding requirements plus the Claude apps gateway-specific endpoints for SSO sign-in, managed-settings delivery, and telemetry. Claude apps gateway runs from the same `claude` binary as the CLI, so the [Claude apps gateway quickstart](</docs/en/claude-apps-gateway#quickstart>) is the shortest path to a running instance you can fetch the spec from.
+This page documents the requests Claude Code sends to a gateway, including the endpoints it calls, the headers and body fields the gateway must forward, and which features stop working when it doesn’t. It is written for operators configuring a gateway product to work with Claude Code. The [Claude apps gateway](</docs/en/claude-apps-gateway>), Anthropic’s self-hosted gateway, serves its own endpoint reference at `GET /protocol`, covering that gateway’s sign-in, inference, managed settings, model discovery, and telemetry endpoints. It is a separate document from this guide.
* To roll out an existing or third-party gateway for your organization, see [Roll out an LLM gateway](</docs/en/llm-gateway-rollout>)
* If you’re an individual developer authenticating Claude Code to a gateway with a credential you were given, see [Connect Claude Code to an LLM gateway](</docs/en/llm-gateway-connect>)
@@ -219,7 +219,7 @@
* [Gateway overview](</docs/en/gateways>): what a gateway is and how to choose between Claude apps gateway and another product
* [Other LLM gateways](</docs/en/llm-gateway>): how to roll out a gateway your organization runs and how it interacts with claude.ai subscriptions
- * [Roll out an LLM gateway for your organization](</docs/en/llm-gateway-rollout>): the admin checklist that uses this contract
+ * [Roll out an LLM gateway for your organization](</docs/en/llm-gateway-rollout>): the admin checklist that uses this guide
* [Connect Claude Code to an LLM gateway](</docs/en/llm-gateway-connect>): per-developer configuration and the troubleshooting table
* [Beta headers reference](<https://platform.claude.com/docs/en/api/beta-headers>): the current set of `anthropic-beta` values
* [Messages API](<https://platform.claude.com/docs/en/api/messages>): the API format an Anthropic-format gateway implements
--- a/llm-gateway-rollout.md
+++ b/llm-gateway-rollout.md
@@ -1,7 +1,7 @@
This page walks an administrator through rolling out an LLM gateway for Claude Code. It assumes you have a gateway product deployed that meets the gateway requirements. Deploying or operating any specific product isn’t covered here; deploy yours following its vendor’s documentation.
* To connect Claude Code on your own machine to an existing gateway, see [Connect Claude Code to an LLM gateway](</docs/en/llm-gateway-connect>)
- * For what Claude Code sends to a gateway and what to forward, see the [gateway protocol reference](</docs/en/llm-gateway-protocol>)
+ * For what Claude Code sends to a gateway and what to forward, see the [gateway compatibility guide](</docs/en/llm-gateway-protocol>)
##
@@ -251,7 +251,7 @@
New Claude models become available| Developers selecting a new model name get `404`; the `/model` picker doesn’t list it| Add the model name to the gateway’s routing configuration, then re-run the routing check. If you distribute `ANTHROPIC_MODEL` or the default-model variables, update the managed settings
Credentials expire or need rotation| All developer requests start failing with `401` from the upstream| Rotate the gateway’s provider credential on its own schedule; developer keys rotate at the gateway, and an [`apiKeyHelper`](</docs/en/llm-gateway-connect#rotate-credentials-with-apikeyhelper>) handles per-developer rotation without redistributing settings
-When sizing per-key rate limits, account for the client [retrying transient failures](</docs/en/errors#automatic-retries>), including `429` responses, up to 10 times with backoff, honoring `Retry-After`. Keep the [protocol reference](</docs/en/llm-gateway-protocol>) as the contract for what each Claude Code release sends.
+When sizing per-key rate limits, account for the client [retrying transient failures](</docs/en/errors#automatic-retries>), including `429` responses, up to 10 times with backoff, honoring `Retry-After`. Keep the [compatibility guide](</docs/en/llm-gateway-protocol>) as the reference for what each Claude Code release sends.
##
@@ -260,7 +260,7 @@
Related resources
* [Connect Claude Code to an LLM gateway](</docs/en/llm-gateway-connect>): the developer-facing setup steps, with per-surface configuration and a troubleshooting table you can hand to developers
- * [Gateway protocol reference](</docs/en/llm-gateway-protocol>): the wire contract for gateway operators, covering endpoints, headers to forward, and the feature pass-through table
+ * [Gateway compatibility guide](</docs/en/llm-gateway-protocol>): the reference for gateway operators, covering endpoints, headers to forward, and the feature pass-through table
* [Which value Claude Code uses](</docs/en/settings#which-value-claude-code-uses>): how managed, project, and user settings combine
* [Delivery mechanisms](</docs/en/managed-settings#delivery-mechanisms>): where the managed file goes on each platform
* [Set up Claude Code for your organization](</docs/en/admin-setup>): the wider rollout this gateway is one part of, including policy enforcement, usage visibility, and data handling
--- a/managed-settings.md
+++ b/managed-settings.md
@@ -262,7 +262,7 @@
When Claude Code found a managed source on the machine and didn’t select it, a second line, `Skipped sources`, names each such source. Read it to distinguish a policy that never reached the machine from one that reached it and that a higher-priority source overrode. Requires Claude Code v2.1.242 or later. When the policy isn’t applying, the `Setting sources` line tells you which of two problems you have:
- * **The line is missing** : Claude Code found no managed source that delivers a policy key. If you deployed a managed settings file, check that it sits at the path for the OS, that it’s valid JSON, and that it contains a policy key rather than only the control keys. When you deployed through server-managed settings instead, run `claude doctor`, which reports the [fetch outcome](</docs/en/server-managed-settings#verify-settings-delivery>).
+ * **The line is missing** : Claude Code found no managed source that delivers a policy key. If you deployed a managed settings file, check that it sits at the path for the OS and that it contains a policy key rather than only the control keys. A file that isn’t valid JSON doesn’t produce this state; Claude Code refuses to start instead. When you deployed through server-managed settings instead, run `claude doctor`, which reports the [fetch outcome](</docs/en/server-managed-settings#verify-settings-delivery>).
* **The line names a source other than the one you deployed** : a higher-priority source is present and Claude Code ignored yours, and `Skipped sources` lists it. How Claude Code combines managed sources gives the order.
###
@@ -271,7 +271,19 @@
Find entries Claude Code dropped
-When a managed settings file, MDM profile, registry value, or server-managed payload fails schema validation, Claude Code first skips the individual entries it can repair, such as one invalid permission rule, with a warning for each, then drops any top-level key whose value still fails and keeps enforcing every remaining valid key. Claude Code is stricter with the `managedSettings` a [`policyHelper`](</docs/en/settings-reference#policyhelper>) emits: it makes the same entry repairs, but any schema violation that survives fails the whole helper run, and at startup Claude Code refuses to start, the same as for a helper that exits non-zero. A managed settings file or drop-in file that isn’t valid JSON contributes no settings at all; Claude Code reports it with the other validation errors and reads the remaining sources as usual. If a managed settings file or drop-in file can’t be read or parsed and no other admin source supplies a policy, sessions signed in with claude.ai or Claude Console credentials exit at startup with a message to contact an administrator. To find a dropped entry, look in one of three places:
+When a managed settings file, MDM profile, registry value, or server-managed payload fails schema validation, Claude Code first skips the individual entries it can repair, such as one invalid permission rule, with a warning for each, then drops any top-level key whose value still fails and keeps enforcing every remaining valid key. Claude Code is stricter with the `managedSettings` a [`policyHelper`](</docs/en/settings-reference#policyhelper>) emits: it makes the same entry repairs, but any schema violation that survives fails the whole helper run, and at startup Claude Code refuses to start, the same as for a helper that exits non-zero. When a managed settings file, drop-in file, MDM plist, or HKLM registry value is present but can’t be parsed as a JSON object, Claude Code refuses to start and prints [an error naming the source](</docs/en/errors#managed-settings-document-could-not-be-parsed>), even when another admin source delivers a valid policy. Each source fails this way when:
+
+ * **Managed settings file or drop-in file** : the file isn’t valid JSON, or its top level isn’t an object
+ * **MDM plist** : macOS’s `plutil` reports the plist malformed, or its converted content isn’t a JSON object
+ * **HKLM registry value** : the `Settings` value isn’t a string, is empty, or doesn’t hold a JSON object
+
+Three source states don’t cause this refusal:
+
+ * An absent file, profile, or registry value isn’t a failure; Claude Code runs without that source.
+ * An empty managed settings file counts as `{}`.
+ * A malformed value in the user-writable HKCU registry key never blocks launch. Claude Code reports it as a notice in `/status` and `claude doctor` instead.
+
+If a managed settings file, drop-in file, or `managed-settings.d/` directory can’t be read and no admin source supplies a policy, sessions signed in with claude.ai or Claude Console credentials exit at startup with a message to contact an administrator. To find a dropped entry, look in one of three places:
* Interactive sessions show a dialog at startup listing the invalid entries.
* Non-interactive runs with `-p` print a summary to stderr.
--- a/monitoring-usage.md
+++ b/monitoring-usage.md
@@ -1149,7 +1149,7 @@
Retention sweep event
-Logged once per run of the retention cleanup sweep, which deletes [session transcripts and other application data](</docs/en/claude-directory#cleaned-up-automatically>) older than the [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>) setting. Claude Code runs the sweep in the background at most once per session, and a run that deletes nothing still emits the event. If Claude Code ran the sweep in any session on the same machine in the last 24 hours, it delays this session’s sweep by at least 10 minutes, so a session that exits sooner emits nothing. When you run `claude -p` with `--bare`, Claude Code doesn’t run the sweep and emits nothing. Like every OTel event on this page, it goes only to the telemetry backend you configure. Requires Claude Code v2.1.227 or later. When Claude Code can’t safely determine the retention period, it pauses the sweep and emits the event with `result` set to `"skipped"` and a `skip_reason`. When [managed settings](</docs/en/server-managed-settings>) set `cleanupPeriodDays`, the managed value pins the retention period and the sweep runs even when a settings file in a lower-priority scope is broken or invalid. When `managed-settings.json` itself can’t be read or parsed, Claude Code still pauses the sweep unless the [managed tier](</docs/en/managed-settings#how-claude-code-combines-managed-sources>) supplies `cleanupPeriodDays` from elsewhere, such as server-managed settings or a `managed-settings.d/` drop-in beside the broken file. The deletion counter attributes are present only when `result` is `"complete"`. **Event Name** : `claude_code.retention_sweep` **Attributes** :
+Logged once per run of the retention cleanup sweep, which deletes [session transcripts and other application data](</docs/en/claude-directory#cleaned-up-automatically>) older than the [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>) setting. Claude Code runs the sweep in the background at most once per session, and a run that deletes nothing still emits the event. If Claude Code ran the sweep in any session on the same machine in the last 24 hours, it delays this session’s sweep by at least 10 minutes, so a session that exits sooner emits nothing. When you run `claude -p` with `--bare`, Claude Code doesn’t run the sweep and emits nothing. Like every OTel event on this page, it goes only to the telemetry backend you configure. Requires Claude Code v2.1.227 or later. When Claude Code can’t safely determine the retention period, it pauses the sweep and emits the event with `result` set to `"skipped"` and a `skip_reason`. When [managed settings](</docs/en/server-managed-settings>) set `cleanupPeriodDays`, the managed value pins the retention period and the sweep runs even when a settings file in a lower-priority scope is broken or invalid. When `managed-settings.json` itself can’t be read, Claude Code still pauses the sweep unless the [managed tier](</docs/en/managed-settings#how-claude-code-combines-managed-sources>) supplies `cleanupPeriodDays` from elsewhere, such as server-managed settings or a `managed-settings.d/` drop-in beside the broken file. The deletion counter attributes are present only when `result` is `"complete"`. **Event Name** : `claude_code.retention_sweep` **Attributes** :
* All standard attributes
* `event.name`: `"retention_sweep"`
--- a/network-config.md
+++ b/network-config.md
@@ -180,7 +180,7 @@
* `CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS` sets the first-byte deadline directly. Leave it unset and Claude Code derives the deadline from the byte-level watchdog’s timeout or from an `API_TIMEOUT_MS` you set above that timeout, so `CLAUDE_STREAM_IDLE_TIMEOUT_MS` and `CLAUDE_BYTE_STREAM_IDLE_TIMEOUT_MS` change the deadline too. For the clamps, the upload allowance, and the `API_TIMEOUT_MS` cap, see [No response from API](</docs/en/errors#no-response-from-api>).
* `API_FORCE_IDLE_TIMEOUT` set to `0` turns the body idle timeout off, and set to `1` turns it on for every provider. The watchdogs run independently of it, so to let a stream pause longer than their thresholds, also raise or disable them.
-When a watchdog aborts a stalled stream, Claude Code treats it as a mid-stream failure: depending on how far the response had got, it retries the request or ends the turn with an error, keeps the completed output and shows an [incomplete-response notice](</docs/en/errors#the-response-above-may-be-incomplete>), or ends the turn normally. [Automatic retries](</docs/en/errors#automatic-retries>) says where each outcome applies. In a [non-interactive session](</docs/en/headless>), Claude Code may first prompt Claude to continue the cut-off response; [that notice’s entry](</docs/en/errors#the-response-above-may-be-incomplete>) says when it does and when you still see the notice. When the first-byte deadline fires, no response has started, so there is no partial output to keep. For how Claude Code re-sends the request and when the turn ends instead, see [No response from API](</docs/en/errors#no-response-from-api>).
+When a watchdog aborts a stalled stream, Claude Code treats the abort as a mid-stream failure, and what you see depends on how far the response had got. Claude Code retries the request or ends the turn with an error, keeps the completed output and shows an [incomplete-response notice](</docs/en/errors#the-response-above-may-be-incomplete>), or ends the turn normally. [Automatic retries](</docs/en/errors#automatic-retries>) says where each outcome applies. In a [non-interactive session](</docs/en/headless>), and for a subagent’s response in any session, Claude Code may first prompt Claude to continue the cut-off response; [that notice’s entry](</docs/en/errors#the-response-above-may-be-incomplete>) says when it does and when you still see the notice. When the first-byte deadline fires, no response has started, so there is no partial output to keep. For how Claude Code re-sends the request and when the turn ends instead, see [No response from API](</docs/en/errors#no-response-from-api>).
##
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -32,6 +32,7 @@
* Tools that require user interaction: the built-in `AskUserQuestion` tool and MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>)
* `rm` and `rmdir` removals targeting a critical path, which no allow rule or `PreToolUse` hook `"allow"` approves
* The cross-session messaging safeguards
+ * Reads outside the working directories while [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is on: recognized file-reading Bash commands and any [unsandboxed retry](</docs/en/sandboxing#the-unsandboxed-retry-escape-hatch>) that needs approval to run outside the sandbox prompt even in auto mode and `bypassPermissions` mode. Requires Claude Code v2.1.257 or later
##
@@ -342,6 +343,18 @@
+The first read outside the working directories
+
+While [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is off, file reads run without a prompt in auto mode, including reads outside the [working directories](</docs/en/permissions#working-directories>). The first time Claude uses the Read, Grep, or Glob tool on a path outside them, Claude Code asks you whether to keep allowing those reads. The prompt doesn’t appear in non-interactive `-p` runs or background sessions; reads there run as before. Whatever you answer, Claude keeps working:
+
+ * **Keep allowing** : the read runs, later reads outside the working directories run as before, and Claude Code records your answer so the prompt doesn’t appear again
+ * **Block from now on** : the read is refused, and Claude Code sets [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) to `true` in your user settings, which makes the file tools refuse such reads in every later session and every permission mode. To let Claude read such a path later, add its directory with `/add-dir` or remove the setting.
+ * **Ask again next time** : the read is refused, and the next read outside the working directories prompts again
+
+###
+
+
+
Boundaries you state in conversation
The classifier treats boundaries you state in the conversation as a block signal. If you tell Claude “don’t push” or “wait until I review before deploying”, the classifier blocks matching actions even when the default rules would allow them. A boundary stays in force until you lift it in a later message. Claude’s own judgment that a condition was met does not lift it. Boundaries are not stored as rules. The classifier re-reads them from the transcript on each check, so a boundary can be lost if [context compaction](</docs/en/costs#reduce-token-usage>) removes the message that stated it. For a hard guarantee, add a [deny rule](</docs/en/permissions#permission-rule-syntax>) instead.
@@ -366,7 +379,7 @@
Each action goes through a fixed decision order. The first matching step wins:
1. Actions matching your [allow, ask, or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately. Writes to protected paths route to the classifier even when an allow rule matches, and so do `rm` and `rmdir` removals targeting a critical path in Claude Code v2.1.218 and later. MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) prompt you directly even when an allow rule matches, and so do connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. Ask rules that match on a command’s content, such as `Bash(git push *)`, fall back to a permission prompt
- 2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths
+ 2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths and the first read outside the working directories, which prompts you
3. Everything else goes to the classifier. The connector tools and `requiresUserInteraction` MCP tools that prompt you directly in step 1 never reach the classifier, so neither an org-required approval nor a consent step is auto-approved
4. If the classifier blocks, Claude receives the reason and tries an alternative. In most sessions the reason is the fixed text `Blocked by classifier` rather than a written explanation, in Claude Code v2.1.208 and later; see [Review denials](</docs/en/auto-mode-config#review-denials>)
--- a/prompt-caching.md
+++ b/prompt-caching.md
@@ -14,10 +14,10 @@
Project context| CLAUDE.md, auto memory, unscoped rules| Session starts, or after `/clear` or `/compact`
Conversation| Your messages, Claude’s responses, tool results| Every turn
-A change to the conversation layer leaves the system prompt and project context cached. A change to the system prompt invalidates everything, because all later content now sits behind a different prefix. The third column gives common triggers rather than an exhaustive list, and the sections below cover the full set, including content such as output style that is fixed at session start. The prefix-match rule explains most of the behaviors on this page. [Plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>) and [skill loading](</docs/en/skills>), for example, append their instructions as conversation messages, so the cached prefix stays intact. Two settings aren’t part of the prompt text at all, so they don’t appear in the layer table, but both are part of the cache key:
+A change to the conversation layer leaves the system prompt and project context cached. A change to the system prompt invalidates everything, because all later content now sits behind a different prefix. The third column gives common triggers rather than an exhaustive list, and the sections below cover the full set, including content such as output style that is fixed at session start. The prefix-match rule explains most of the behaviors on this page. [Plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>) and [skill loading](</docs/en/skills>), for example, append their instructions as conversation messages, so the cached prefix stays intact. Two settings don’t appear in the layer table but still affect what stays cached:
* **Model** : each model has its own cache. Switching models recomputes the entire request even when the content is identical. See Switching models below.
- * **Effort level** : each effort level has its own cache for the same model. Changing effort mid-session recomputes the entire request. See Changing effort level below.
+ * **Effort level** : on most models, each effort level has its own cache, so changing effort mid-session recomputes the entire request. On Fable 5.1 with an API key or a Claude subscription, the cache stays intact by default. See Changing effort level below.
Pick your model and effort level at the top of a session, then save `/compact` for natural breaks between tasks. The fewer changes you make mid-task, the higher your cache hit rate.
@@ -74,7 +74,7 @@
Changing effort level
-The cache is keyed by [effort level](</docs/en/model-config#adjust-effort-level>) as well as model, so switching with `/effort` means the next request reads the entire conversation history with no cache hits. Changing effort follows the same confirmation as switching models. When a change resolves to the same level already in effect, such as setting the model’s default explicitly, Claude Code keeps the cache and applies the change without asking.
+On most models, changing the [effort level](</docs/en/model-config#adjust-effort-level>) mid-session means the next request reads the entire conversation history with no cache hits. While the cache is still warm, Claude Code asks you to confirm the change first. On Fable 5.1 with an API key or a Claude subscription, changing effort keeps the cache, and Claude Code applies the new level without asking. This doesn’t apply on Amazon Bedrock, Google Cloud’s Agent Platform, or a [Claude apps gateway](</docs/en/claude-apps-gateway>), or when you set [`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS`](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) or your organization has a HIPAA configuration. Before v2.1.260, changing effort on Fable 5.1 with an API key or a Claude subscription also invalidated the cache.
###
--- a/python.md
+++ b/python.md
@@ -1729,7 +1729,7 @@
* `api_error_status`: the HTTP status code of the terminating API error. `None` when the turn ended without one. Populated only on `subtype="success"`.
* `result`: text of the final assistant message on `subtype="success"`, or `None` on the `error_*` subtypes. When `subtype="success"` and `is_error=True`, this holds the API error string if one is available but can be empty, so check `api_error_status` and the preceding `AssistantMessage` content for detail.
* `errors`: loop-level error strings such as the max-turns message. Populated only on the `error_*` subtypes.
- * `terminal_reason`: why the query loop ended, such as `"completed"`, `"max_turns"`, `"api_error"`, `"aborted_streaming"`, or `"aborted_tools"`. A value of `"aborted_streaming"` or `"aborted_tools"` means the turn was aborted before completing. Common causes are `interrupt()` and a permission callback returning `PermissionResultDeny` with `interrupt=True`. `None` on CLI versions that predate the field, on results that bypassed the query loop such as local slash commands, or on synthesized error results emitted when the session fails fatally. Mirrors the TypeScript SDK’s [`SDKResultMessage.terminal_reason`](</docs/en/agent-sdk/typescript#sdkresultmessage>), which lists the full set of values.
+ * `terminal_reason`: why the query loop ended, such as `"completed"`, `"max_turns"`, `"api_error"`, `"aborted_streaming"`, or `"aborted_tools"`. A value of `"aborted_streaming"` or `"aborted_tools"` means the turn was aborted before completing. Common causes are `interrupt()` and a permission callback returning `PermissionResultDeny` with `interrupt=True`. `None` on CLI versions that predate the field, on results from local commands such as `/voice` or `/usage`, which bypass the query loop, or on synthesized error results emitted when the session fails fatally. Mirrors the TypeScript SDK’s [`SDKResultMessage.terminal_reason`](</docs/en/agent-sdk/typescript#sdkresultmessage>), which lists the full set of values.
* `origin`: origin of the user message that triggered this turn. In [streaming input mode](</docs/en/agent-sdk/streaming-vs-single-mode>), check this to tell the result of your own prompt, where `origin` is `None` or `{"kind": "human"}`, from the result of an injected turn such as a background-task notification. Requires Python Agent SDK 0.2.137 or later.
The `usage` dict covers the main agent loop only and excludes subagent and other nested or auxiliary model calls. In [streaming input mode](</docs/en/agent-sdk/streaming-vs-single-mode>), the values are per-turn. Prefer `model_usage` for token and cost accounting. The `usage` dict contains the following keys when present:
--- a/routines.md
+++ b/routines.md
@@ -55,7 +55,7 @@
Pick a [cloud environment](</docs/en/cloud-environments>) for the routine. Environments control what the cloud session has access to:
* **Network access** : set the level of internet access available during each run
- * **Environment variables** : provide values Claude can use during each run. They’re [visible to anyone who uses the environment](</docs/en/cloud-environments#what-carries-over-from-your-setup>), so store keys for the APIs Claude calls during a run as [API credentials](</docs/en/cloud-environments#add-api-credentials>) instead. That section also lists the requests that never get a credential
+ * **Environment variables** : provide values Claude can use during each run. They’re [visible to anyone who uses the environment](</docs/en/cloud-environments#what-carries-over-from-your-setup>), so on Pro and Max plans, store keys for the APIs Claude calls during a run as [API credentials](</docs/en/cloud-environments#add-api-credentials>) instead. That section also lists the requests that never get a credential
* **Setup script** : install dependencies and tools the routine needs. The result is [cached](</docs/en/cloud-environments#environment-caching>), so the script doesn’t re-run on every session
A **Default** environment is provided with **Trusted** network access, which allows only the [default allowlist](</docs/en/cloud-environments#default-allowed-domains>) of package registries, cloud provider APIs, container registries, and common development domains through the session’s network. Connectors you add to the routine reach their services through Anthropic’s servers, so they don’t need allowlist changes. If your routine needs to reach your own services directly, or a domain outside that list, edit the environment’s [network access](</docs/en/cloud-environments#network-access>) before running. To use a separate environment, [create one](</docs/en/cloud-environments#configure-your-environment>) first.
--- a/sandboxing.md
+++ b/sandboxing.md
@@ -101,7 +101,7 @@
Auto-allow mode
-When a command can be sandboxed, Claude Code runs it inside the sandbox and approves it automatically, without asking your permission. Commands that cannot be sandboxed, such as those needing network access to non-allowed hosts, fall back to the regular permission flow, where Claude Code checks your [permission rules](</docs/en/permissions>) and gates any command those rules do not already allow, with a prompt in Manual mode or the classifier in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>). Even in auto-allow mode, the following still apply:
+When a command can be sandboxed, Claude Code runs it inside the sandbox and approves it automatically, without asking your permission. Commands that cannot be sandboxed, such as those needing network access to non-allowed hosts, fall back to the regular permission flow, where Claude Code checks your [permission rules](</docs/en/permissions>) and gates any command those rules do not already allow, with a prompt in Manual mode. Even in auto-allow mode, the following still apply:
* Explicit [deny rules](</docs/en/permissions>) are always respected
* `rm` or `rmdir` commands that target a [critical path](</docs/en/permission-modes#critical-paths>) still go through the regular permission flow
@@ -124,7 +124,7 @@
The unsandboxed retry escape hatch
-Some commands can’t run inside the sandbox at all, such as tools that are incompatible with it or that need a host you haven’t allowed. Claude Code reports sandbox violations in the blocked command’s result, naming the path or host the sandbox denied, so Claude sees what the sandbox blocked. Rather than failing the task or requiring you to turn sandboxing off, Claude Code includes an escape hatch: Claude analyzes the violation and may retry the command with the `dangerouslyDisableSandbox` parameter. The retried command runs outside the sandbox, so it goes through the regular permission flow: in Manual mode you get a confirmation prompt; in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) the classifier evaluates the underlying command instead of prompting you. To be prompted on every unsandboxed retry even in auto mode, add an [ask rule](</docs/en/permissions#match-by-input-parameter>) for `Bash(dangerouslyDisableSandbox:true)`. You can disable this escape hatch by setting `"allowUnsandboxedCommands": false` in your [sandbox settings](</docs/en/settings-reference#sandbox-settings>). When disabled, which the `/sandbox` Overrides tab shows as **Strict sandbox mode** , the `dangerouslyDisableSandbox` parameter is completely ignored and all commands must run sandboxed or be explicitly listed in `excludedCommands`.
+Some commands can’t run inside the sandbox at all, such as tools that are incompatible with it or that need a host you haven’t allowed. Claude Code reports sandbox violations in the blocked command’s result, naming the path or host the sandbox denied, so Claude sees what the sandbox blocked. Rather than failing the task or requiring you to turn sandboxing off, Claude Code includes an escape hatch: Claude analyzes the violation and may retry the command with the `dangerouslyDisableSandbox` parameter. The retried command runs outside the sandbox, so it goes through the regular permission flow. In Manual mode you get a confirmation prompt. In [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), the classifier evaluates the underlying command. While [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is on, a retry that needs approval to run outside the sandbox prompts you instead. To be prompted on every unsandboxed retry even in auto mode, add an [ask rule](</docs/en/permissions#match-by-input-parameter>) for `Bash(dangerouslyDisableSandbox:true)`. You can disable this escape hatch by setting `"allowUnsandboxedCommands": false` in your [sandbox settings](</docs/en/settings-reference#sandbox-settings>). When disabled, which the `/sandbox` Overrides tab shows as **Strict sandbox mode** , the `dangerouslyDisableSandbox` parameter is completely ignored and all commands must run sandboxed or be explicitly listed in `excludedCommands`.
####
@@ -179,7 +179,7 @@
}
}
-If you placed the same configuration in `~/.claude/settings.json`, `.` would resolve to `~/.claude` instead, and project files would remain blocked by the `denyRead` rule.
+If you placed the same configuration in `~/.claude/settings.json`, `.` would resolve to `~/.claude` instead, and project files would remain blocked by the `denyRead` rule. To deny sandboxed commands read access to home directories and mounted volumes while keeping the working directories readable, set [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) instead of writing path rules.
###
--- a/security.md
+++ b/security.md
@@ -29,7 +29,7 @@
To mitigate risks in agentic systems:
* **Sandboxed bash tool** : [Sandbox](</docs/en/sandboxing>) bash commands with filesystem and network isolation, reducing permission prompts while maintaining security. Configure with `/sandbox` to define boundaries where Claude Code can work autonomously
- * **Working directory boundary** : In Manual mode, Claude Code can only write to the folder where it was started and its subfolders, and can’t modify files in parent directories without explicit permission. In Manual mode, Claude Code also asks you before reading paths outside this boundary with the Read, Grep, and Glob tools. In auto mode it reads them without asking. Extend the boundary with [additional directories](</docs/en/permissions#working-directories>) to skip the prompt, or restrict the broader read access available to read-only Bash commands with [sandbox `denyRead` rules](</docs/en/sandboxing#filesystem-isolation>), which apply only when sandboxing is enabled
+ * **Working directory boundary** : In Manual mode, Claude Code can only write to the folder where it was started and its subfolders, and can’t modify files in parent directories without explicit permission. In Manual mode, Claude Code also asks you before reading paths outside this boundary with the Read, Grep, and Glob tools. Extend the boundary with [additional directories](</docs/en/permissions#working-directories>) to skip the prompt, or restrict the broader read access available to read-only Bash commands with [sandbox `denyRead` rules](</docs/en/sandboxing#filesystem-isolation>), which apply only when sandboxing is enabled
* **Prompt fatigue mitigation** : Support for allowlisting frequently used safe commands per-user, per-codebase, or per-organization
* **Accept Edits mode** : Auto-approves file edits and a fixed set of filesystem Bash commands like `mkdir`, `touch`, `rm`, `mv`, `cp`, and `sed` for paths in the working directory. Other Bash commands and out-of-scope paths still prompt
--- a/server-managed-settings.md
+++ b/server-managed-settings.md
@@ -194,7 +194,7 @@
Invalid entries in delivered settings
-Delivered payloads parse tolerantly with the same rules as the other managed sources. When part of a payload fails schema validation, Claude Code surfaces a validation error and applies every remaining valid setting; [Invalid entries in managed settings](</docs/en/managed-settings#invalid-entries-in-managed-settings>) says what it drops and which keys fall back to a stricter value. Requires Claude Code v2.1.169 or later. Server-managed delivery adds these behaviors:
+When part of a payload fails schema validation, Claude Code surfaces a validation error and applies every remaining valid setting; [Invalid entries in managed settings](</docs/en/managed-settings#invalid-entries-in-managed-settings>) says what it drops and which keys fall back to a stricter value. Requires Claude Code v2.1.169 or later. Server-managed delivery adds these behaviors:
* The cache at `~/.claude/remote-settings.json` stores the salvaged payload with invalid entries removed, apart from invalid `cleanupPeriodDays` and `desktopSessionCleanupPeriodDays` values, which stay in the cached copy and are never applied.
* When no field in the payload can be salvaged and the payload isn’t only those retention keys, Claude Code rejects the payload, keeps the last-accepted cached settings, and writes `Remote settings: Settings validation failed - no fields could be salvaged` to the debug log. With `forceRemoteSettingsRefresh` set, the CLI exits instead.
@@ -229,9 +229,8 @@
* **Sandbox network and isolation settings** : [sandbox](</docs/en/sandboxing>) settings that let the sandbox proxy read, reroute, or authenticate traffic, or that weaken the sandbox’s isolation: `sandbox.network.tlsTerminate`, `sandbox.network.httpProxyPort`, `sandbox.network.socksProxyPort`, `sandbox.credentials`, `sandbox.allowAppleEvents`, `sandbox.enableWeakerNestedSandbox`, `sandbox.enableWeakerNetworkIsolation`, `sandbox.filesystem.disabled`, `sandbox.network.allowAllUnixSockets`, `sandbox.network.allowUnixSockets`, and `sandbox.network.allowMachLookup`. A `sandbox.credentials` block that contains only `deny` rules doesn’t need approval, since it restricts the sandbox without giving the proxy a credential. Before v2.1.251, Claude Code applied these settings without approval
* **Custom environment variables** : delivered `env` variables that require the user’s approval, such as proxy and base-URL variables; see Environment variables and the approval dialog
* **Hook configurations** : any hook definition
- * **Managed CLAUDE.md content** : a `claudeMd` value delivered through managed settings
-
-When these settings are present, users see a security dialog explaining what is being configured. Users must approve to proceed. If a user rejects the settings, Claude Code exits.
+
+When these settings are present, users see a security dialog explaining what is being configured. Users must approve to proceed. If a user rejects the settings, Claude Code exits. A managed CLAUDE.md delivered through the [`claudeMd`](</docs/en/settings-reference#claudemd>) key doesn’t require approval, because it’s instruction text for Claude rather than a command Claude Code runs. Claude Code still checks [permissions](</docs/en/permissions>) for the tools Claude uses while following those instructions. Before v2.1.260, a `claudeMd` value required approval too.
####
--- a/settings.md
+++ b/settings.md
@@ -191,10 +191,10 @@
* **Settings Error** : a user, project, or local file has invalid JSON or a value the schema rejects. At the start of an interactive session Claude Code shows a dialog that lets you fix the file with Claude’s help, exit, or continue without the broken settings.
* **Settings Warning** : only individual entries fail, such as a malformed permission rule or an unknown hook event name. Claude Code skips those values and keeps the rest of the file in effect.
- * **Managed settings** : Claude Code keeps enforcing the rest of the file. [Invalid entries in managed settings](</docs/en/managed-settings#invalid-entries-in-managed-settings>) says what it drops and which keys fall back to a stricter value until you fix them.
+ * **Managed settings** : Claude Code keeps enforcing the rest of the file. [Invalid entries in managed settings](</docs/en/managed-settings#invalid-entries-in-managed-settings>) says what it drops and which keys fall back to a stricter value until you fix them. For a managed settings document that isn’t valid JSON, see [Managed settings document could not be parsed](</docs/en/errors#managed-settings-document-could-not-be-parsed>).
* **Configuration error** : `~/.claude.json` can’t be parsed. Claude Code copies the broken file to `~/.claude/backups/.claude.json.corrupted.<timestamp>` and asks whether to exit and fix it by hand or reset to the default configuration; a `-p` run prints the error and exits. To recover your previous state, copy back one of the five most recent `.claude.json.backup.<timestamp>` files in `~/.claude/backups/`, which Claude Code saves before it writes the file.
-After you continue, run `/status` to see the affected files and `claude doctor` for the details of each error. A `-p` run shows no dialog: Claude Code skips the broken file or values and continues with the rest, so after a `-p` run that ignores a setting, run `claude doctor` to see what it dropped.
+After you continue, run `/status` to see the affected files and `claude doctor` for the details of each error. A `-p` run shows no dialog. Unless [a managed settings document can’t be parsed](</docs/en/errors#managed-settings-document-could-not-be-parsed>), Claude Code skips the broken file or values and continues with the rest, so after a `-p` run that ignores a setting, run `claude doctor` to see what it dropped.
##
--- a/settings-reference.md
+++ b/settings-reference.md
@@ -120,6 +120,7 @@
`permissions.additionalDirectories`| Give Claude file access to [directories outside the current one](</docs/en/permissions#working-directories>)| Permission settings| Any file
`permissions.allow`| Approve listed [tool uses](</docs/en/permissions#permission-rule-syntax>) without a prompt| Permission settings| Any file
`permissions.ask`| Always prompt before listed [tool uses](</docs/en/permissions#permission-rule-syntax>)| Permission settings| Any file
+`permissions.blockReadsOutsideWorkingDirectories`| Make the file tools refuse reads outside the [working directories](</docs/en/permissions#working-directories>) in every permission mode| Permission settings| Any file
`permissions.defaultMode`| Set the [permission mode](</docs/en/permission-modes#which-mode-a-session-starts-in>) new sessions start in| Permission settings| Any file
`permissions.deny`| Block listed [tool uses](</docs/en/permissions#permission-rule-syntax>), including reads of files that hold secrets| Permission settings| Any file
`permissions.disableBypassPermissionsMode`| Prevent anyone from entering [bypassPermissions mode](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>)| Permission settings| Any file
@@ -860,7 +861,7 @@
Control which tools Claude can use without asking, which ones always prompt, and which ones are blocked, and set the [permission mode](</docs/en/permission-modes>) a session starts in. Every `permissions.*` key below nests under this object.
* **Scope** : `Any file`
- * **Type** : object with `allow`, `ask`, `deny`, `additionalDirectories`, `defaultMode`, `disableBypassPermissionsMode`, and `disableAutoMode`
+ * **Type** : object with `allow`, `ask`, `deny`, `additionalDirectories`, `blockReadsOutsideWorkingDirectories`, `defaultMode`, `disableBypassPermissionsMode`, and `disableAutoMode`
* **Default** : unset
This example approves `npm run` commands without asking, prompts before `git push`, blocks reads of `.env`, and starts sessions in `acceptEdits`:
@@ -1013,6 +1014,30 @@
}
Like `allow` rules, entries in a project’s `.claude/settings.json` take effect only after you accept the [workspace trust dialog](</docs/en/permissions#project-allow-rules-and-workspace-trust>) for that folder.
+
+###
+
+
+
+`permissions.blockReadsOutsideWorkingDirectories`
+
+Stop Claude from reading paths outside the session’s [working directories](</docs/en/permissions#working-directories>) with the Read, Grep, Glob, and LSP tools, in every permission mode including `bypassPermissions`. A Bash command that reads a matching path through a file command Claude Code recognizes, such as `cat`, prompts you even in auto mode and `bypassPermissions` mode. Requires Claude Code v2.1.257 or later. Claude Code also writes `true` here when you choose to block such reads on [auto mode’s prompt before the first read outside the working directories](</docs/en/permission-modes#first-read-outside-the-working-directories>).
+
+ * **Scope** : `Any file`. If any settings source sets `true`, the block applies, so a repository’s checked-in file can turn the block on for a project but can’t lift a block you set.
+ * **Type** : Boolean
+ * `true`: file reads outside the working directories are blocked
+ * `false`: the same as unset; a `true` in any other settings file still blocks
+ * **Default** : unset, so reads outside the working directories follow your permission mode and rules
+
+settings.json
+
+ {
+ "permissions": {
+ "blockReadsOutsideWorkingDirectories": true
+ }
+ }
+
+If only a repository’s checked-in settings file adds a directory, the block still applies to reads there. Files Claude Code itself needs stay readable, such as your skills, plugins, rules, agents, commands, and the `CLAUDE.md` memory file under `~/.claude/`. When the [sandbox](</docs/en/sandboxing>) is on, the block also denies sandboxed commands read access to home directories and mounted-volume roots outside the working directories. A retry that needs approval to [run outside the sandbox](</docs/en/sandboxing#the-unsandboxed-retry-escape-hatch>) prompts you even in `bypassPermissions` mode. Files a tool reads from your home directory, such as `~/.gitconfig`, are denied with the rest; re-open a specific path with `sandbox.filesystem.allowRead` when a tool needs it. When the session’s working directory is a linked [git worktree](</docs/en/worktrees>), including one Claude Code entered mid-session, the repository’s common `.git` directory stays readable and writable to sandboxed commands, so git keeps working there.
###
@@ -1273,7 +1298,7 @@
}
}
-An unsandboxed retry goes through the regular permission flow: a prompt in Manual mode, the classifier in auto mode. See [The unsandboxed retry escape hatch](</docs/en/sandboxing#the-unsandboxed-retry-escape-hatch>).
+An unsandboxed retry goes through the regular permission flow, with a prompt in Manual mode. See [The unsandboxed retry escape hatch](</docs/en/sandboxing#the-unsandboxed-retry-escape-hatch>).
###
--- a/sub-agents.md
+++ b/sub-agents.md
@@ -787,7 +787,7 @@
API errors in subagents
-As of v2.1.199, a subagent whose run ends on an API error, such as a usage limit or a repeated server error, reports that failure back to Claude instead of returning the error text as if it were the subagent’s findings. What Claude receives depends on where the subagent ran:
+When something [cuts off a subagent’s response mid-stream](</docs/en/errors#the-response-above-may-be-incomplete>), and the partial response contains text but no tool calls, Claude Code prompts the subagent to continue rather than ending the run. This happens in interactive sessions too. The run ends on the error only once those continuations are used up. As of v2.1.199, a subagent whose run ends on an API error, such as a usage limit or a repeated server error, reports that failure back to Claude instead of returning the error text as if it were the subagent’s findings. What Claude receives depends on where the subagent ran:
* **Foreground** : if a rate limit, overload, or server error cuts off a subagent that already produced text output, the Agent tool returns that partial output with a note that the subagent was cut off and didn’t finish its task. A subagent that produced nothing, or whose only output was tool calls, fails with [`Agent terminated early due to an API error`](</docs/en/errors#agent-terminated-early-due-to-an-api-error>), followed by the error detail. In v2.1.199, a rate limit, overload, or server error that cut off the tool-calls-only shape returned an empty partial result containing only the cut-off note instead.
* **Background** : the subagent is marked failed, and the message Claude receives when it ends names the API error and includes the subagent’s last output, so partial work isn’t lost.
@@ -953,7 +953,7 @@
Continue that code review and now analyze the authorization logic
[Claude resumes the subagent with full context from previous conversation]
-A completed subagent that receives a `SendMessage` auto-resumes in the background without a new `Agent` invocation. The same applies to a subagent that Claude stopped with the `TaskStop` tool. As of v2.1.191, a subagent you stopped yourself, with `x` in `/tasks` or an SDK `stop_task` request, doesn’t auto-resume. The `SendMessage` call returns a refusal telling Claude the agent was cancelled. While that subagent’s row is still in the subagent panel, type into its transcript to resume it yourself, which clears the stop so later `SendMessage` calls can auto-resume it again. Resuming starts a new run of the agent under the same ID, so a subagent that had already failed or completed shows as running again in the task list and in the Agent SDK’s task events. Before v2.1.205, it kept showing its earlier failed or completed status while the resumed run was working. As of v2.1.199, `SendMessage` checks that a name still refers to the same agent it reached earlier in the conversation. If a newer agent has taken the name, such as a re-spawned background agent that reused it, Claude Code refuses the send rather than delivering it to the wrong agent, and the error reports which agent the name now reaches so Claude can retarget. To reach the earlier agent while it’s still running, Claude addresses it by the agent ID it received when it spawned that agent. The check is scoped to the current conversation and resets on `/clear`. As of v2.1.198, a subagent treats messages from the agent that launched it as normal task direction, including mid-task course corrections, and acts on them within its own permission settings. Two limits still hold regardless of who sent the message: no message from any agent counts as your approval for a pending permission prompt, and no agent message can change a subagent’s permission settings, `CLAUDE.md`, or configuration. Only the permission system or your own messages can grant approval. You can also ask Claude for the agent ID if you want to reference it explicitly, or find IDs in the transcript files at `~/.claude/projects/{project}/{sessionId}/subagents/`. Each transcript is stored as `agent-{agentId}.jsonl`. Subagent transcripts persist independently of the main conversation:
+A completed subagent that receives a `SendMessage` auto-resumes in the background without a new `Agent` invocation. The same applies to a subagent that Claude stopped with the `TaskStop` tool. A subagent you stopped yourself, with `x` in `/tasks` or an SDK `stop_task` request, doesn’t auto-resume. If Claude sends it a message, the message is refused and Claude is told the agent was cancelled. While that subagent’s row is still in the subagent panel, type into its transcript to resume it yourself. After that, a message from Claude can auto-resume it again. Requires Claude Code v2.1.191 or later. Resuming starts a new run of the agent under the same ID, so a subagent that had already failed or completed shows as running again in the task list and in the Agent SDK’s task events. Before v2.1.205, it kept showing its earlier failed or completed status while the resumed run was working. As of v2.1.199, `SendMessage` checks that a name still refers to the same agent it reached earlier in the conversation. If a newer agent has taken the name, such as a re-spawned background agent that reused it, Claude Code refuses the send rather than delivering it to the wrong agent, and the error reports which agent the name now reaches so Claude can retarget. To reach the earlier agent while it’s still running, Claude addresses it by the agent ID it received when it spawned that agent. The check is scoped to the current conversation and resets on `/clear`. As of v2.1.198, a subagent treats messages from the agent that launched it as normal task direction, including mid-task course corrections, and acts on them within its own permission settings. Two limits still hold regardless of who sent the message: no message from any agent counts as your approval for a pending permission prompt, and no agent message can change a subagent’s permission settings, `CLAUDE.md`, or configuration. Only the permission system or your own messages can grant approval. You can also ask Claude for the agent ID if you want to reference it explicitly, or find IDs in the transcript files at `~/.claude/projects/{project}/{sessionId}/subagents/`. Each transcript is stored as `agent-{agentId}.jsonl`. Subagent transcripts persist independently of the main conversation:
* **Main conversation compaction** : when the main conversation compacts, subagent transcripts are unaffected. They’re stored in separate files.
* **Session persistence** : subagent transcripts persist within their session. You can resume a subagent after restarting Claude Code by resuming the same session.
--- a/typescript.md
+++ b/typescript.md
@@ -653,7 +653,7 @@
`updateSettings(source, settings)`| Merges settings into the project’s local settings file, `.claude/settings.local.json`; they take effect on the next request. Accepts only `source: 'localSettings'` and an allowlisted key set, currently `outputStyle`, with string values; deleting a key isn’t supported. Rejects on remote transports and in sessions whose `settingSources` exclude `local`. Requires TypeScript SDK v0.3.257 or later, which bundles Claude Code v2.1.257
`initializationResult()`| Returns the full initialization result including supported commands, models, account info, and output style configuration
`reinitialize()`| Re-sends the `initialize` control request to the running CLI and returns a fresh result instead of the cached first-connect result. Use it after a transport gap, such as reattaching to a session after a disconnect, so pending permission requests reach your `canUseTool` callback again. Make the callback idempotent per request ID, because a request whose response was lost is dispatched again. Requires Claude Code v2.1.195 or later
-`supportedCommands()`| Returns available slash commands. From Agent SDK v0.3.216 the list reflects mid-session command changes; see `SDKCommandsChangedMessage`
+`supportedCommands()`| Returns available commands. From Agent SDK v0.3.216 the list reflects mid-session command changes; see `SDKCommandsChangedMessage`
`supportedModels()`| Returns available models with display info
`supportedAgents()`| Returns available subagents as `AgentInfo``[]`
`mcpServerStatus()`| Returns status of connected MCP servers
@@ -4658,7 +4658,7 @@
`SlashCommand`
-Information about an available slash command.
+Information about an available command.
type SlashCommand = {
name: string;