Changes on
48 changes detected
--- a/admin-setup.md
+++ b/admin-setup.md
@@ -155,7 +155,7 @@
HIPAA configuration| For Claude for Enterprise organizations that have HIPAA enabled. Some Claude Code (local mode) features are turned off and others are off by default| [Set up Claude Code (local mode) for a HIPAA-ready organization](</docs/en/hipaa-setup>)
Security architecture| Network model, encryption, authentication, audit trail| [Security](</docs/en/security>)
-If you need request-level audit logging or to route traffic by data sensitivity, we recommend you place a gateway between developers and your provider: a self-hosted [Claude apps gateway](</docs/en/claude-apps-gateway>) records a per-request audit log with IdP identity, or you can use another [LLM gateway](</docs/en/llm-gateway>). Sessions that go through a gateway aren’t eligible for the HIPAA configuration. [Check how developers sign in and connect](</docs/en/hipaa-setup#check-how-developers-sign-in-and-connect>) lists the connections that are. For regulatory requirements and certifications, see [Legal and compliance](</docs/en/legal-and-compliance>).
+If you need request-level audit logging or to route traffic by data sensitivity, we recommend you place a gateway between developers and your provider: a self-hosted [Claude apps gateway](</docs/en/claude-apps-gateway>) records a per-request audit log with IdP identity, or you can use another [LLM gateway](</docs/en/llm-gateway>). Sessions that go through a gateway aren’t eligible for the HIPAA configuration. [Check how developers sign in and connect](</docs/en/hipaa-setup#check-how-developers-sign-in-and-connect>) lists which sign-in and connection methods are. For regulatory requirements and certifications, see [Legal and compliance](</docs/en/legal-and-compliance>).
##
--- a/agent-view.md
+++ b/agent-view.md
@@ -634,6 +634,7 @@
`claude rm <id> --discard-unpushed <commit>@<worktree-id>`| Delete a session whose delete was refused over unpushed commits, discarding the worktree along with its branch and commits. Pass the exact value that refusal printed; see What deleting a session removes. Requires v2.1.260 or later
`claude rm <id> --force-remove-worktree <worktree-id>`| Delete a session whose delete was refused because git or the `WorktreeRemove` hook couldn’t remove its worktree, deleting the worktree directory anyway and leaving its branch in the repository. Pass the exact value that refusal printed; see What deleting a session removes. Requires v2.1.268 or later
`claude daemon status`| Print the supervisor’s state, version, socket directory, and worker count
+`claude daemon logs`| Follow the supervisor’s log file, `~/.claude/daemon.log`, printing new lines as they arrive until you press `Ctrl+C`
`claude daemon stop --any`| Stop the supervisor process and the background sessions it hosts. Pass `--keep-workers` to leave background sessions running so the next supervisor reconnects to them. The next `claude agents` or `claude --bg` starts a fresh supervisor
`claude attach` and `claude logs` can take part of a running session’s name in place of the ID, as in `claude logs "auth refactor"`. Passing a name requires Claude Code v2.1.290 or later.
--- a/agents.md
+++ b/agents.md
@@ -10,7 +10,7 @@
In every approach the workers are Claude sessions. To involve a different tool, expose it to Claude as an [MCP server](</docs/en/mcp>). Three more tools support this work without being a way to run agents themselves:
- * [Worktrees](</docs/en/worktrees>) give each session a separate git checkout, so parallel sessions never edit the same files. Use them for sessions you run yourself. A session you dispatch from agent view [moves into a worktree of its own before it edits files](</docs/en/agent-view#how-file-edits-are-isolated>), and subagents you spawn can each get one too.
+ * [Worktrees](</docs/en/worktrees>) give each session a separate git checkout, so parallel sessions each edit their own copy of the files. Use them for sessions you run yourself. A session you dispatch from agent view [moves into a worktree of its own before it edits files](</docs/en/agent-view#how-file-edits-are-isolated>), and subagents you spawn can each get one too.
* [Cross-session messaging](</docs/en/cross-session-messaging>) lets Claude list and message your other Claude Code sessions on this machine, on another machine, or [in the cloud](</docs/en/claude-code-on-the-web>), so sessions you run yourself can pass findings and status between themselves.
* [`/batch`](</docs/en/commands>) is a [skill](</docs/en/skills>) that has Claude split one large change into 5 to 30 worktree-isolated subagents. It’s a packaged use of subagents and worktrees, not a separate coordination style.
--- a/amazon-bedrock.md
+++ b/amazon-bedrock.md
@@ -484,7 +484,7 @@
Authentication loop with SSO and corporate proxies
-If browser tabs spawn repeatedly when using AWS SSO, remove the `awsAuthRefresh` setting from your [settings file](</docs/en/settings>). This can occur when corporate VPNs or TLS inspection proxies interrupt the SSO browser flow. Claude Code treats the interrupted connection as an authentication failure, re-runs `awsAuthRefresh`, and loops indefinitely. If your network environment interferes with automatic browser-based SSO flows, use `aws sso login` manually before starting Claude Code instead of relying on `awsAuthRefresh`.
+If browser sign-in tabs keep opening when you use AWS SSO, remove the `awsAuthRefresh` setting from your [settings file](</docs/en/settings>). The loop can occur when corporate VPNs or TLS inspection proxies interrupt the SSO browser flow. Claude Code treats the interrupted connection as an authentication failure. When a later request finds the credentials still expired, Claude Code re-runs `awsAuthRefresh`, which opens another tab. If your network environment interferes with automatic browser-based SSO flows, use `aws sso login` manually before starting Claude Code instead of relying on `awsAuthRefresh`.
###
@@ -525,7 +525,7 @@
Streaming errors behind a gateway or proxy
-Amazon Bedrock streams `InvokeModelWithResponseStream` responses in a binary event-stream format with the header `Content-Type: application/vnd.amazon.eventstream`. A gateway or proxy between Claude Code and Amazon Bedrock must forward the response body and its headers, including `Content-Type`, as Amazon Bedrock sent them. If the gateway rewrites `Content-Type` to another value, Claude Code rejects the response with an error that begins `Bedrock streaming response has content-type`, naming the value it received. The common rewrite is `text/event-stream`, from an integration that re-emits the stream as server-sent events. If the gateway drops or blanks the header instead, Claude Code assumes the body is Amazon Bedrock’s event stream and decodes it, so a body the gateway passed through unmodified keeps streaming. If a gateway that drops the header also re-emits the stream as server-sent events, Claude Code can’t decode the body and falls back to a slower non-streaming path on every turn: each response appears only once it is complete instead of streaming in. In that case, set [`CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_DEFAULT=1`](</docs/en/env-vars>) so Claude Code reads the body as server-sent events instead. To fix the error or the fallback, configure the gateway to forward the `InvokeModelWithResponseStream` response body and its `Content-Type` header unmodified. A gateway that converts the stream to server-sent events is no longer serving the Amazon Bedrock API. If it also accepts Anthropic Messages API requests, connect to it as an [LLM gateway](</docs/en/llm-gateway-connect>) with `ANTHROPIC_BASE_URL` instead of `CLAUDE_CODE_USE_BEDROCK`.
+Amazon Bedrock streams `InvokeModelWithResponseStream` responses in a binary event-stream format with the header `Content-Type: application/vnd.amazon.eventstream`. A gateway or proxy between Claude Code and Amazon Bedrock must forward the response body and its headers, including `Content-Type`, as Amazon Bedrock sent them. If the gateway rewrites `Content-Type` to another value, Claude Code rejects the response with an error that begins `Bedrock streaming response has content-type`, naming the value it received. The common rewrite is `text/event-stream`, from an integration that re-emits the stream as server-sent events. For the `CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_GUARD` variable that the error message names, see [Bedrock streaming response has an unexpected content-type](</docs/en/errors#bedrock-streaming-response-has-an-unexpected-content-type>). If the gateway drops or blanks the header instead, Claude Code assumes the body is Amazon Bedrock’s event stream and decodes it, so a body the gateway passed through unmodified keeps streaming. If a gateway that drops the header also re-emits the stream as server-sent events, Claude Code can’t decode the body and falls back to a slower non-streaming path on every turn: each response appears only once it is complete instead of streaming in. In that case, set [`CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_DEFAULT=1`](</docs/en/env-vars>) so Claude Code reads the body as server-sent events instead. To fix the error or the fallback, configure the gateway to forward the `InvokeModelWithResponseStream` response body and its `Content-Type` header unmodified. A gateway that converts the stream to server-sent events is no longer serving the Amazon Bedrock API. If it also accepts Anthropic Messages API requests, connect to it as an [LLM gateway](</docs/en/llm-gateway-connect>) with `ANTHROPIC_BASE_URL` instead of `CLAUDE_CODE_USE_BEDROCK`.
###
--- a/auto-mode-config.md
+++ b/auto-mode-config.md
@@ -299,7 +299,7 @@
]
}
-Get AI feedback on your custom `allow`, `soft_deny`, and `hard_deny` rules:
+Get AI feedback on your custom `allow`, `soft_deny`, `hard_deny`, and `environment` entries:
claude auto-mode critique
Show diff (106 lines)
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,103 @@
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.292
+
+October 6, 2026
+
+ * Added `--marketplace <source>` to `claude plugin install`: adds the marketplace if needed, under the same policy checks as `claude plugin marketplace add`, then installs the plugin from it
+ * Added an `effort` parameter to the Agent tool, so Claude runs a sub-agent at the effort level you ask for
+ * Added `CLAUDE_CODE_OVERLOADED_RETRY_BASE_DELAY_MS` environment variable to set a longer base delay for the backoff when retrying an overloaded (529) request
+ * Added `prompt.autocomplete`, an event a mod hooks to add its own rows to the prompt box’s autocomplete list
+ * Added prompt caching to `$.model.complete` for mods: `prompt` and `system` take blocks of text, and `cache: true` on a block caches the request up to it
+ * Added workflow agents to the `agent.spawn` mod hook, with their run and index, so a mod can refuse them
+ * Fixed subagent definitions with `permissionMode: auto` entering auto mode when auto mode is unavailable (disabled by settings, circuit breaker, or a model that doesn’t support it)
+ * Fixed sandboxed commands being able to read the staged file copies of `/ultrareview` uploads under `~/.claude/seed-admin`
+ * Fixed a managed sandbox read-deny path (and user ones beside it) that appears or re-points mid-session not dropping project grants inside it or ending credential injection from files it covers
+ * Fixed a notebook or PDF read on macOS and Windows being able to return a file outside what was approved, through a link swapped in mid-read
+ * Fixed a tampered on-disk cache of server-managed settings being able to switch off or unseat the built-in policy plugin while the settings fetch failed
+ * Fixed `rm -rf` on the 8.3 short name or another alternate Windows spelling of the home folder or a drive not being treated as removing it
+ * Security: Fixed PreToolUse hook approvals and auto mode bypassing the permission prompt for file reads from network (UNC) paths
+ * Fixed a skill’s or slash command’s `allowed-tools` rule coming back in a later turn when you leave auto mode or plan mode partway through that turn
+ * Fixed `NO_PROXY` being ignored for Claude Code’s own API requests (sign-in, policy, feedback, artifacts) when `HTTPS_PROXY` is set
+ * Fixed an MCP tool with a name longer than 128 characters making every request fail; that tool is now left out and an MCP error names it
+ * Fixed `claude plugin` commands such as `marketplace add` and `install` running before an organization’s managed settings had loaded on a first run
+ * Fixed one-shot `claude -p` and Agent SDK runs stopping a background command 5 seconds after the final result, and one-shot `claude -p` runs dropping a scheduled wakeup; both are now waited for
+ * Fixed plan mode not being restored when resuming a session from the `claude --resume` session picker or with `/resume`
+ * Fixed saved scheduled tasks created after `/resume`, `/branch` or `/clear` never firing, and saved tasks ignoring later creates and deletes after two writes to the tasks file milliseconds apart
+ * Fixed a background session’s `/loop` silently stopping when the session’s process restarted (for example after a crash), because its pending wakeup was lost
+ * Fixed Grep and Glob reporting no matches when the file or folder they were given could not be read; Claude now retries once or tells you
+ * Fixed the Read tool returning only the first entry, with no error, when a PDF’s `pages` was a list such as “6,9,15”; it now returns an error saying to read each page or range separately
+ * Fixed @-mentioned text files over 256KB being left out silently: Claude is now told the file’s size and to read it in portions
+ * Fixed the usage limit alert repeating once per background agent when agents failed on a limit that had already stopped the main conversation
+ * Fixed Remote Control viewers seeing an empty subagent pane for background subagents in sessions hosted by the desktop app or an IDE
+ * Fixed cross-session delivery notices showing two sessions with similar names as one recipient, and the expiry notice blaming the desktop app when a terminal session let the message lapse
+ * Fixed Send now in the desktop app ending the subagent a turn was waiting on when another message was already queued
+ * Fixed `/bug`, `/share` and `/feedback <text>` starting over after Ctrl+O or Ctrl+Z while a report was being sent, and closing as cancelled after it had been sent
+ * Fixed `/remote-env` replacing your saved default environment when you pressed Enter right away: the list now opens on your default, and no row has a check mark when no default is in effect
+ * Fixed some pasted text reaching Claude as typed text when several pastes overlapped in one prompt
+ * Fixed vim mode leaving the cursor past the end of a line, j/k losing their column on shorter lines, and `f`/`t`/`F`/`T`/`;`/`,` jumping to, or deleting up to, a match on another line of the prompt
+ * Fixed `/add-dir` path box letting Shift+Enter or a paste add a line break, and treating fast-typed “tab”, “up” or “down” as those keys
+ * Fixed fast typing, input-method text and decomposed accents being dropped while a prompt footer row was selected, and `!` leaving the row selected
+ * Fixed fullscreen mode sending a full-screen clear on every window resize and Ctrl+L when iTerm2 is detected, which may be what filled iTerm2’s scrollback with stale pages
+ * Fixed a spurious “could not be examined” note for @-words that name no file when a Read deny rule is set and the working directory is under a symlink
+ * Fixed “instruction file not loaded” lines going stale or missing after `/cd` or a permission change, and added a transcript line when a nested one isn’t loaded
+ * Fixed a compaction summary that repeated `/name` letting Claude invoke a skill that is reserved for the user
+ * Fixed Write, Edit, NotebookEdit and LSP rows, and single Read, Grep and Glob rows, hiding why a mod denied the call: the row now shows the reason
+ * Fixed a cloud session showing a turn that never ended when its worker was stopped just as the turn finished
+ * Fixed cloud sessions with a large transcript sometimes asking for a permission again after it was approved
+ * Fixed scheduled tasks and other queued notifications being lost in cloud sessions when a message was retried or edited while Claude was reading them
+ * Fixed cloud sessions forgetting the thinking setting chosen in the client when the session’s container restarted
+ * Fixed Cowork cloud sessions saying a proxy blocked artifacts when Anthropic couldn’t confirm the organization’s settings
+ * Fixed plugins whose hooks module makes many `$.state` calls through one const taking minutes to load or validate
+ * Fixed `claude plugin validate` listing a matcher or state value for a hooks module that the engine reads from elsewhere
+ * Fixed `claude plugin validate` listing a `$.state` value read through a top-level `var` that was declared again or reassigned; such a module is now refused
+ * Fixed a plugin’s served `$` method restarting the hook origin, which could run a guard hook with a `.catch` above it again without end
+ * Fixed plugin interface calls made while the plugin hooks worker restarts running without the hooks other plugins put on them
+ * Fixed a mod’s `config.set`, `state.set`, `env.set` or `agent.spawn` hook that denies after calling `next(e)` being answered as a refusal: the hook is now reported as failed, by name
+ * Fixed `/theme`, the `/config` Theme menu and the first-run theme step saving a theme before a plugin’s `config.set` hook was asked
+ * Fixed a plugin’s `tool.check` hook answering allow running a tool that requires your answer (a question, a plan approval) without showing its dialog
+ * Fixed a mod’s start-up prompt, command or subagent being queued a second time when the hooks worker was replaced
+ * Fixed a mod’s hook that called `next(e)` and then failed while the turn was interrupted letting the call through; the call is now rejected
+ * Fixed a plugin’s prompt drop or setting deny being ignored when its reason was longer than 4,096 characters
+ * Fixed an organization’s plugin being unloaded on its own reload, or after another plugin crashed, when it returned a `$` name that a user-installed mod had added; the mod is now unloaded instead
+ * Fixed tool calls made while the plugin hooks worker restarts being answered without the plugins’ permission hooks
+ * Fixed plugin `tool.call` hooks seeing some tool calls before misnamed parameters were repaired; a hook now sees the arguments the tool will run with
+ * Fixed a mod’s guard hook with a `.catch` being skipped silently for calls another mod’s hook makes beneath the guard’s own `$` call; its `.catch` is now asked
+ * Improved startup of `claude -p` and SDK sessions: the first turn no longer waits for HTTP and SSE MCP servers to answer `resources/list`
+ * Improved rendering speed of long bulleted or numbered replies: they stream, resize and re-open in the transcript (ctrl+o) much faster
+ * Improved Ctrl+C draft recovery: a cleared prompt now stays reachable with Up after a slash command or a sent message
+ * Improved hook output handling: `<system-reminder>` tags written in a hook’s output are escaped before they reach Claude
+ * Improved tool input handling: Grep accepts `file_path` for `path`, and Write, WebFetch and Read ignore a few stray parameters instead of failing the call
+ * Improved the steps shown when a marketplace declared in a settings file has a name that looks like an official Anthropic marketplace
+ * Improved sandbox auto-allow: with strict sandbox mode set in user, managed or —settings settings, an interpreter command with an env var prefix like `FOO=bar python3 app.py` runs unprompted
+ * Improved the Artifact tool’s listing: Claude now sees how many published artifacts you have and can list up to 200 at once instead of 50
+ * Improved cloud sessions after a restart: Claude is now told which stopped background agents it can resume by id
+ * Improved the Claude in Chrome message in claude.ai cloud sessions when the browser can’t be reached: Claude is now told it may continue with alternatives if the user prefers
+ * Improved the /focus tip: it now invites you to try focus view mid-turn and shows how to switch back
+ * Improved startup with local (stdio) MCP servers that ignore the newer protocol check: after one slow connect they are remembered for 7 days and connected the older way without the wait
+ * Changed local (stdio) MCP server connections to negotiate protocol version 2026-07-28 by default on every install, including Bedrock, Vertex and Foundry; `MCP_PROTOCOL_NEGOTIATION=legacy` opts out
+ * Changed `claude plugin test`: a failed `expect` inside a hook the test registered, or a stub answer the engine refuses, now fails the test instead of passing silently
+ * Changed usage limit messages to write claude.ai settings links with https:// so terminals and apps can make them clickable
+ * Changed scheduled and Run now routine runs to publish a new artifact only you can see without asking for approval; artifacts that request connectors or other access still ask
+ * Changed agent names to allow at most 256 characters: a longer one is rejected, and a skill’s or a plugin file’s `name` longer than that is ignored
+ * [Cloud sessions] Fixed routine runs occasionally staying listed as running for hours after they had finished
+ * [Cloud sessions] Fixed editing or duplicating a routine turning off its push notifications when the routine had no saved notification setting
+ * [Cloud sessions] Fixed SVG, HEIC, TIFF and other less common image files failing to attach; they now attach as regular files
+ * [Cloud sessions] Fixed approval prompts offering “Always allow” for connector tools that an organization set to require approval; the choice had no effect
+ * [Remote Control] Fixed the first message of a new Remote Control session started from claude.ai/code accepting only images; it now accepts PDFs and other files like later messages
+ * [Claude Tag] Added an Edit button to the Allowed domains card on a channel’s Configure page, so Enterprise admins can open the access bundle that sets the channel’s domains
+ * [Claude Tag] Fixed replies sent in a Slack thread while Claude was still on its first request there being held until that request finished, or missed when sent seconds apart
+ * [Claude Tag] Fixed Slack threads woken only by GitHub pull request activity or a routine staying on their original model after an admin changed the channel or workspace default model
+ * [Claude Tag] Fixed Claude sometimes posting a spend limit notice in Slack when the real cause was that your organization had run out of usage credits
+ * [Claude Tag] Fixed a session hanging until interrupted when a permission prompt that can’t be answered from Slack was denied automatically
+ * [Claude Tag] Improved `@Claude !status` in a channel to say when Claude has stopped reading its untagged messages, why, and that an @-mention starts it reading again
+ * [Claude Tag] Changed the first message of a Slack thread continued with `!fork` to a card showing where it came from, the request, and who asked, with a link to the original thread
+ * [Claude Tag] Changed the organization-wide and default spend limit boxes on Claude Tag’s spend limits page in admin settings to save only when you press Save or Enter, not when you click away
+ * [Code Review] Added the period’s total with its change from the previous period, and a breakdown by repository, to the PRs reviewed chart in Code Review analytics
+ * [Code Review] Fixed a queued review failing when the pull request moved to a new base branch and the old one was deleted; the commit is now re-queued for review
+ * [Code Review] Fixed reviews ignoring a CLAUDE.md’s rules when the pull request edits that file; reviews now use its version from the base branch
--- a/chrome.md
+++ b/chrome.md
@@ -329,7 +329,7 @@
Error| Cause| Fix
---|---|---
-”Browser extension is not connected”| Native messaging host cannot reach the extension, or your organization’s IP allowlist rejects the connection to `bridge.claudeusercontent.com`| Restart Chrome and Claude Code, then run `/chrome` to reconnect. If your organization uses IP allowlisting and the error persists, see [Organization IP allowlists and proxy egress](</docs/en/network-config#organization-ip-allowlists-and-proxy-egress>)
+”Browser extension is not connected”| Native messaging host cannot reach the extension, or your organization’s IP allowlist rejects the connection to `bridge.claudeusercontent.com`| Check that the extension is signed in to the same claude.ai account as Claude Code, restart Chrome and Claude Code, then run `/chrome` to reconnect. If your organization uses IP allowlisting and the error persists, see [Organization IP allowlists and proxy egress](</docs/en/network-config#organization-ip-allowlists-and-proxy-egress>)
Extension shows “Not detected” in `/chrome`| Chrome extension is not installed or is disabled| Install or enable the extension in `chrome://extensions`
”No tab available”| Claude tried to act before a tab was ready| Ask Claude to create a new tab and retry
”Receiving end does not exist”| Extension service worker went idle| Run `/chrome` and select “Reconnect extension”
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
@@ -57,7 +57,7 @@
---|---
Claude Code v2.1.195 or later| The `claude gateway` subcommand and the gateway sign-in flow ship in v2.1.195. Earlier public builds don’t include them. Both the machine running the gateway server and each developer’s machine must be on v2.1.195 or later; run `claude update` to get the latest release. The [Claude Platform on AWS upstream](</docs/en/claude-apps-gateway-config#claude-platform-on-aws>) requires Claude Code v2.1.198 or later on the gateway server.
OpenID Connect (OIDC) identity provider| Okta, Microsoft Entra ID, Google Workspace, Keycloak, or Dex, or any other OIDC-compliant IdP such as PingFederate. The gateway runs standard OIDC discovery and the authorization-code flow against it. SAML and LDAP aren’t supported.
-PostgreSQL 14 or later| Backs the device sign-in flow, where the browser callback writes and the polling CLI reads, plus rate-limit counters. Any managed Postgres works, including the smallest tier. Without spend limits configured, the gateway stores a few KB of short-lived auth state; with [spend limits](</docs/en/claude-apps-gateway-spend-limits>), it also holds durable spend, audit, and identity tables that should be backed up. TLS via `?sslmode=require` is recommended.
+PostgreSQL 11 or later| Backs the device sign-in flow and rate-limit counters. A managed PostgreSQL service works, including the smallest tier; see [which databases are supported](</docs/en/claude-apps-gateway-deploy#postgres>). With [spend limits](</docs/en/claude-apps-gateway-spend-limits>), it also holds durable spend, audit, and identity tables that should be backed up. TLS via `?sslmode=require` is recommended. PostgreSQL 11, 12, and 13 require Claude Code v2.1.290 or later on the gateway server. The PostgreSQL project no longer maintains those versions, so use a newer one where you can.
Model upstream| Amazon Bedrock credentials, Claude Platform on AWS credentials, Google Cloud credentials, a Microsoft Foundry resource, or an Anthropic API key. Multiple upstreams are supported with failover.
HTTPS| The gateway must be reachable over `https://` from developer laptops and from any browser used for sign-in; the gateway serves the device-verification page on the same listener. Either provide a TLS cert via `listen.tls` or run behind a TLS-terminating ingress, and set `listen.public_url` to the external origin in both cases. At `/login`, Claude Code accepts a plain `http://` origin only when the gateway host is loopback: `localhost`, `127.0.0.1`, or `::1`.
Private-network address| At `/login`, Claude Code requires the gateway’s hostname or IP address to resolve only to private addresses: RFC 1918, link-local, CGNAT `100.64.0.0/10`, IPv6 ULA `fc00::/7`, or loopback. For a gateway you host, any public address outside a block you declare is rejected; see the [threat model](</docs/en/claude-apps-gateway-deploy#threat-model-summary>) in the deployment guide. If developer machines route HTTPS through a corporate proxy, sign-in also requires the proxy host to resolve to private addresses; if it doesn’t, add the gateway host to `NO_PROXY` so the CLI connects directly. If your internal network is numbered from public IPv4 space your organization owns, declare those blocks so `/login` accepts a gateway there.
@@ -79,7 +79,7 @@
Provision a PostgreSQL database
-Any Postgres 14 or later works, including the smallest managed tier. The gateway runs its own schema migrations at boot, so the database role needs rights to create and alter tables; see [`store`](</docs/en/claude-apps-gateway-config#store>).
+Use PostgreSQL 11 or later. The smallest managed tier is enough. The gateway runs its own schema migrations at boot, so the database role needs rights to create and alter tables; see [`store`](</docs/en/claude-apps-gateway-config#store>).
3
--- a/claude-apps-gateway-config.md
+++ b/claude-apps-gateway-config.md
@@ -152,8 +152,8 @@
The gateway reads the key and certificate once at boot, so a changed file takes effect only after a restart. Rotate in this order so that no token request presents a certificate the IdP doesn’t have:
1. Upload the new certificate to the IdP alongside the old one.
- 2. Replace the key and certificate files that `gateway.yaml` loads, then restart the gateway.
- 3. Remove the old certificate from the IdP.
+ 2. Replace the key and certificate files that `gateway.yaml` loads, then restart the gateway. If you run several replicas, a [rolling restart](</docs/en/claude-apps-gateway-deploy#upgrades>) works, because the IdP has both certificates until you remove the old one.
+ 3. After every replica has restarted, remove the old certificate from the IdP.
####
@@ -217,7 +217,7 @@
Field| Required| Description
---|---|---
-`postgres_url`| Yes| `postgres://` or `postgresql://` URL. Required: the device-grant rendezvous, where the browser callback writes and the polling CLI reads, needs cross-replica state. The gateway runs its own schema migrations at boot and on upgrade, so the role needs rights to create and alter tables on the target schema. See [Upgrades](</docs/en/claude-apps-gateway-deploy#upgrades>) and [Postgres](</docs/en/claude-apps-gateway-deploy#postgres>).
+`postgres_url`| Yes| `postgres://` or `postgresql://` URL with one host, not a comma-separated list. The gateway runs its own schema migrations at boot and on upgrade, so the role needs rights to create and alter tables on the target schema. See [Upgrades](</docs/en/claude-apps-gateway-deploy#upgrades>) and [Postgres](</docs/en/claude-apps-gateway-deploy#postgres>).
`username`| No| Overrides the user in `postgres_url`
`password`| No| Database credential. Set it here rather than in `postgres_url` so the credential stays out of the URL. Accepts any characters and takes precedence over URL credentials.
`max_connections`| No| Postgres connection-pool size per replica. Default `5`, which is conservative and friendly to shared databases. With spend limits enabled, the hot path does a few operations per inference request, so raise it for a dedicated database under load, and keep replicas × this below the database’s `max_connections`.
--- a/claude-apps-gateway-deploy.md
+++ b/claude-apps-gateway-deploy.md
@@ -215,6 +215,11 @@
Postgres
+
+The gateway stores its state in a PostgreSQL database:
+
+ * **Database** : PostgreSQL itself, self-hosted or managed, at the [minimum version](</docs/en/claude-apps-gateway#prerequisites>) or later. Databases that only implement the Postgres protocol, such as distributed SQL databases, aren’t supported.
+ * **Address** : `store.postgres_url` takes one host. If the database has several nodes, use the address in front of them, such as your managed service’s endpoint, a load balancer, or a virtual IP. Set a readiness grace period longer than a failover takes.
The gateway holds five data tables plus a `_migrations` table, all created by its boot-time migrations:
@@ -355,10 +360,11 @@
CLI `/login`: `Could not resolve the configured HTTP proxy`| The hostname in `HTTPS_PROXY` or `HTTP_PROXY` doesn’t resolve from the developer’s machine, typically because it isn’t connected to the corporate network| Have the developer connect to your network or VPN and retry, or fix the proxy URL
CLI `/login`: `Could not resolve gateway host <host>`| The machine can’t resolve the gateway’s internal DNS name, typically because it isn’t on the corporate network| Have the developer connect to your network or VPN, then retry `/login`
Boot exits with a config validation error naming `store.postgres_url`| No Postgres configured; the gateway requires Postgres| Set `store.postgres_url`. For local development, use a throwaway container: `docker run --rm -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust postgres`.
+Boot exits: `store.postgres_url in <path> is not a URL the gateway can read`, or before v2.1.290 a bare `Invalid URL` or `URI error`| The URL can’t be parsed, for example because it lists more than one host or its password has an unencoded `/`, `?`, `#`, or `%`| Name one host, and move the password into [`store.password`](</docs/en/claude-apps-gateway-config#store>)
Boot exits: `requires the native binary`| Running under Node instead of the native binary| Install Claude Code with one of the [standalone install methods](</docs/en/setup>)
Boot exits with an OIDC discovery error after `config.load`| `oidc.issuer` unreachable, or TLS chain not trusted| Check the issuer is reachable from the pod and serves `/.well-known/openid-configuration`. Set `ca_cert_pem` for private PKI. If the pod reaches the IdP only through a forward proxy, set [`oidc.use_proxy: true`](</docs/en/claude-apps-gateway-config#idp-requests-through-a-forward-proxy>); on versions before v2.1.227, give the pod a direct route to each of the IdP’s endpoints instead. If the pod also can’t resolve the IdP’s hostname, or the proxy refuses `CONNECT` to an IP address, see [Proxy-only egress](</docs/en/claude-apps-gateway-config#proxy-only-egress>), which requires v2.1.277 or later.
Boot exits with a Postgres permission error| The database role lacks DDL rights on its schema| Grant the role `CREATE` on the gateway’s schema so it can create and alter its tables at boot
-Log: `could not connect to Postgres at boot, attempt 1 of 3`| The database wasn’t reachable yet when the gateway started, for example on a cold instance whose network is still coming up| If the gateway then finishes booting, no action is needed. When the database isn’t reachable, the gateway tries the connection three times, two seconds apart, before it exits. If it exits with `could not connect to Postgres`, check `store.postgres_url` and the network path to the database. If the attempts time out rather than being refused, raise [`store.connect_timeout_seconds`](</docs/en/claude-apps-gateway-config#store>) to give each one longer.
+Log: `could not connect to Postgres at boot, attempt 1 of 3`| The database wasn’t reachable yet when the gateway started, for example on a cold instance whose network is still coming up| If the gateway then finishes booting, no action is needed. When the database isn’t reachable, the gateway tries the connection three times, two seconds apart, before it exits. If it exits with `could not connect to Postgres`, check `store.postgres_url`, including that it names one host, and the network path to the database. If the attempts time out rather than being refused, raise [`store.connect_timeout_seconds`](</docs/en/claude-apps-gateway-config#store>) to give each one longer.
`/oauth/callback` shows “Sign-in could not be completed”| Email domain rejected, id_token validation failed, or `email_verified` is explicitly `false`, which the gateway always rejects with no override| Check `allowed_email_domains` and that the IdP returns a verified `email` claim. For `email_verified: false`, fix the IdP-side verification. If your IdP emits email under a different claim name, set `oidc.email_claim`.
Log: `token exchange failed request_id=<id>: id_token missing email claim`| The IdP isn’t including `email` in the id_token by default. This rejection fires only when `allowed_email_domains` is set; without it, a missing email mints a session with no email| Configure the IdP to emit `email` in the id_token. Okta: add `email` to a custom authorization server’s ID-token claims. Entra: add `email` as an optional claim on the app registration. PingFederate: enable an OpenID Connect Policy that emits `email`. If the IdP serves `email` from the userinfo endpoint but won’t include it in the id_token, such as the Okta org authorization server, set `oidc.userinfo_fallback: true`.
Log: `refresh failed request_id=<id>: invalid_token (…) (at userinfo_no_id_token, …)`, and developers see `Cloud gateway session expired` every `session.ttl_hours`| The IdP accepted the refresh token but returned no id_token with it, so the gateway asked the IdP’s userinfo endpoint for the user’s claims. The IdP rejected the refreshed access token there. The gateway answers `temporarily_unavailable`, so Claude Code keeps the refresh token but can’t renew the session. Gateway versions before v2.1.260 log the same line without the `(at …)` detail.| Set [`oidc.scope_on_refresh: true`](</docs/en/claude-apps-gateway-config#oidc>), available in gateway v2.1.260 or later, so the refresh request asks for `openid` again. Some IdPs, such as Okta, return an id_token on refresh only when asked. On PingFederate, enable **Return ID Token On Refresh Grant** under **Applications > OAuth > OpenID Connect Policy Management** instead. The key doesn’t change PingFederate’s behavior. For other IdPs that still omit it, check whether the userinfo endpoint accepts access tokens issued by a refresh. As a stopgap, raise [`session.ttl_hours`](</docs/en/claude-apps-gateway-config#session>). See Identity provider setup for the deprovisioning tradeoff.
--- a/claude-apps-gateway-on-aws.md
+++ b/claude-apps-gateway-on-aws.md
@@ -151,7 +151,7 @@
Provision Amazon RDS for PostgreSQL
-The instance runs in the private subnets with no public address and storage encryption on. The engine version is pinned to Postgres 16, which satisfies the gateway’s supported floor of PostgreSQL 14 and guarantees the parameter-group family below matches the instance.First, create the subnet group that places the database in the private subnets, and a parameter group with `rds.force_ssl=1` so the server rejects plaintext connections. The engine version is pinned once because the parameter group’s family must match the engine major version the instance runs:
+The instance runs Postgres 16 in the private subnets, with no public address and storage encryption on.First, create the subnet group that places the database in the private subnets, and a parameter group with `rds.force_ssl=1` so the server rejects plaintext connections. The engine version is pinned once because the parameter group’s family must match the engine major version the instance runs:
aws rds create-db-subnet-group --db-subnet-group-name claude-gateway-db \
--db-subnet-group-description "Claude gateway" --subnet-ids $PRIVATE_SUBNETS
--- a/claude-code-on-the-web.md
+++ b/claude-code-on-the-web.md
@@ -412,10 +412,10 @@
`claude --cloud` and `claude --teleport` require sign-in with a claude.ai account. If you authenticate with an API key, or your stored account details are stale, you see one of these:
* `Unable to get organization UUID`
- * A message that API key authentication is not sufficient
+ * `Cloud sessions need a claude.ai sign-in. Run `claude auth login` (or /login in a local session), then try again.`
* `Error loading Claude Code sessions` in the session picker, when you run `claude --teleport` without a session ID
-Run `/login` to sign in with your claude.ai account, then retry the command. If the error names your provider instead, see the error table: cloud sessions aren’t available through third-party providers.
+Run [`claude auth login`](</docs/en/cli-reference#cli-commands>) in your shell to sign in with your claude.ai account, then retry the command. Inside a running session, `/login` does the same. If the error names your provider instead, see the error table: cloud sessions aren’t available through third-party providers. From v2.1.274 through v2.1.289, the sign-in message read `Claude Code cloud sessions require authentication with a Claude.ai account. API key authentication is not sufficient. Please run /login to authenticate, or check your authentication status with /status.`
###
--- a/claude-directory.md
+++ b/claude-directory.md
@@ -1,4 +1,4 @@
-Claude Code reads instructions, settings, skills, subagents, and memory from your project directory and from `~/.claude` in your home directory. Commit project files to git to share them with your team; files in `~/.claude` are personal configuration that applies across all your projects. On Windows, `~/.claude` resolves to `%USERPROFILE%\.claude`. If you set [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>), every `~/.claude` path on this page lives under that directory instead. Most users only edit `CLAUDE.md` and `settings.json`. If your repository already has an `AGENTS.md` for other coding agents, Claude Code [can read that](</docs/en/memory#agents-md>) on its own or alongside `CLAUDE.md`. The rest of the directory is optional: add skills, rules, or subagents as you need them.
+Claude Code reads instructions, settings, skills, subagents, and memory from your project directory and from `~/.claude` in your home directory. Commit project files to git to share them with your team; files in `~/.claude` are personal configuration that applies across all your projects. On Windows, `~/.claude` resolves to `%USERPROFILE%\.claude`. If you set [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>), every `~/.claude` path on this page lives under that directory instead. Most users only edit `CLAUDE.md` and `settings.json`. If your repository already has an `AGENTS.md` for other coding agents, Claude Code [can read that](</docs/en/memory#agents-md>) in place of a `CLAUDE.md`. The rest of the directory is optional: add skills, rules, or subagents as you need them.
##
@@ -20,7 +20,7 @@
---|---|---
`managed-settings.json`| System-level, varies by OS| Enterprise-enforced settings that you can’t override, apart from [narrow exceptions](</docs/en/settings#security-keys-where-the-stricter-value-applies>). See [where to save the file](</docs/en/managed-settings#deploy-a-managed-settings-file>) and [which managed source Claude Code uses](</docs/en/managed-settings#precedence-within-the-managed-tier>).
`CLAUDE.local.md`| Project root| Your private preferences for this project, loaded alongside CLAUDE.md. Create it manually and add it to `.gitignore`.
-`AGENTS.md`| Project root, `.claude/`, or any directory| Project instructions you write for AI coding agents. Claude Code can [load it](</docs/en/memory#agents-md>) on its own or alongside `CLAUDE.md`.
+`AGENTS.md`| Project root, `.claude/`, or any directory| Project instructions you write for AI coding agents. Claude Code can [load it](</docs/en/memory#agents-md>) in place of a `CLAUDE.md`.
Installed plugins| `~/.claude/plugins`| Cloned marketplaces, installed plugin versions, the `installed_plugins.json` install record, and per-plugin data, managed by `claude plugin` commands. Plugins [synced from your claude.ai account](</docs/en/plugins/loading#synced-plugins>) download into `~/.claude/plugins/synced/`. For a plugin installed from a marketplace [`command` source](</docs/en/plugins/marketplace-reference#command-plugin-source>) in link mode, Claude Code stores links here instead of a copy, and the plugin’s files stay in the directory the command prints. A `command` source requires Claude Code v2.1.229 or later. A plugin listed by relative path in a marketplace you added from a local path also [loads in place](</docs/en/plugins/loading#find-plugins-on-disk>) from its source directory rather than from a cache copy. See [plugin caching](</docs/en/plugins/loading#find-plugins-on-disk>) for how orphaned versions are cleaned up.
`~/.claude` also holds data Claude Code writes as you work: transcripts, prompt history, file snapshots, caches, and logs. See application data below.
@@ -162,6 +162,8 @@
* **Bare mode** : when you run `claude -p` with [`--bare`](</docs/en/headless#start-faster-with-bare-mode>), Claude Code doesn’t run the sweep in that session.
* **Paused sweep** : if Claude Code can’t safely determine the retention period, it pauses the retention cleanup sweep; the [`retention_sweep` event](</docs/en/monitoring-usage#retention-sweep-event>) lists each configuration that pauses it. When the cause is a settings file that can’t be read or parsed, or settings errors with `cleanupPeriodDays` or `desktopSessionCleanupPeriodDays` explicitly set, Claude Code also shows a warning in `/status` until you fix the settings errors. When [managed settings](</docs/en/server-managed-settings>) provide `cleanupPeriodDays`, Claude Code runs the sweep at the managed value in either case.
+To check that the machines in your organization run the sweep with the retention period you set, see [Check the retention sweep](</docs/en/monitoring-usage#check-the-retention-sweep>).
+
###
@@ -261,7 +263,7 @@
claude purge ~/work/my-repo --yes
-Pass `--all` instead of a path to purge state for every project at once, which deletes `history.jsonl` outright rather than filtering it. Pass `-i` to step through the deletion plan one item at a time. The command leaves `shell-snapshots/` and `backups/` alone because those are not project-scoped, and warns about them in the plan output. You can also delete any of the application-data paths above by hand, apart from the state files to keep. New sessions are unaffected. The table below shows what you lose for past sessions.
+Pass `--all` instead of a path to purge state for every project at once, which deletes `history.jsonl` outright rather than filtering it. Pass `-i` to step through the deletion plan one item at a time. In a script, check the output rather than the exit status alone. A run that deletes everything in its plan ends with `Purged N item(s)`. Treat that line as the sign of success. The command leaves `shell-snapshots/` and `backups/` alone because those are not project-scoped, and warns about them in the plan output. If anyone ran [`/heapdump`](</docs/en/troubleshooting#high-cpu-or-memory-usage>) on the machine, delete the `.heapsnapshot` files it wrote too. A heap snapshot contains the full conversation and any credentials the process held, and neither the retention sweep nor the purge touches it. You can also delete any of the application-data paths above by hand, apart from the state files to keep. New sessions are unaffected. The table below shows what you lose for past sessions.
Delete| You lose
---|---
--- a/cli-reference.md
+++ b/cli-reference.md
@@ -25,6 +25,8 @@
`claude attach <id|name>`| Attach to a [background session](</docs/en/agent-view#manage-sessions-from-the-shell>) in this terminal. Passing part of a running session’s name in place of the ID requires Claude Code v2.1.290 or later| `claude attach 7c5dcf5d`
`claude auto-mode defaults`| Print the built-in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) classifier rules as JSON. Use `claude auto-mode config` to see your effective config with settings applied. `--label <prefix>` prints only the rules whose label starts with that prefix, matched case-insensitively. Requires Claude Code v2.1.208 or later| `claude auto-mode defaults --label 'Git Destructive'`
`claude auto-mode reset`| Restore the default [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) configuration by removing the `autoMode` section from your user settings file. Prompts for confirmation before writing; pass `-y`/`--yes` to skip the prompt. Rules from [managed settings](</docs/en/server-managed-settings>) or the `--settings` flag still apply. Requires Claude Code v2.1.212 or later. See [Inspect the defaults and your effective config](</docs/en/auto-mode-config#inspect-the-defaults-and-your-effective-config>)| `claude auto-mode reset --yes`
+`claude daemon logs`| Follow the background-session [supervisor’s](</docs/en/agent-view#the-supervisor-process>) log file, `~/.claude/daemon.log`, printing new lines as they arrive until you press `Ctrl+C`| `claude daemon logs`
+`claude daemon run`| Run the background-session [supervisor](</docs/en/agent-view#the-supervisor-process>) in the foreground of this terminal, printing its log| `claude daemon run`
`claude daemon status`| Print the background-session [supervisor’s](</docs/en/agent-view#the-supervisor-process>) state, version, socket directory, and worker count for diagnostics. Exits 1 if the supervisor isn’t running| `claude daemon status`
`claude daemon stop --any`| Stop the background-session [supervisor](</docs/en/agent-view#the-supervisor-process>) and the sessions it hosts. Pass `--keep-workers` to leave background sessions running so the next supervisor reconnects to them. `--any` confirms stopping an on-demand supervisor, which is the default. Use this to recover from an [unresponsive supervisor](</docs/en/agent-view#agent-view-says-the-background-service-did-not-respond>)| `claude daemon stop --any --keep-workers`
`claude doctor`| Print read-only installation and settings diagnostics from the terminal without starting a session, including install health, settings-file validation errors, and Remote Control eligibility. For the in-session setup checkup that can also apply fixes, run [`/doctor`](</docs/en/commands#all-commands>)| `claude doctor`
--- a/components.md
+++ b/components.md
@@ -123,7 +123,7 @@
You are a security reviewer. Read the changed files and report injection, authentication, and secrets-handling risks.
-This agent is named `my-plugin:security-reviewer`, and the user can [invoke it explicitly](</docs/en/sub-agents#invoke-subagents-explicitly>) with `@agent-my-plugin:security-reviewer`. The name form is `<plugin>:<name>`, where `<name>` comes from the frontmatter, or from the file name when there is none. The `agents` manifest key replaces the `agents/` scan.
+This agent is named `my-plugin:security-reviewer`, and the user can [invoke it explicitly](</docs/en/sub-agents#invoke-subagents-explicitly>) with `@agent-my-plugin:security-reviewer`. The name form is `<plugin>:<name>`, where `<name>` comes from the frontmatter `name` field, or from the file name when that field is missing. The `agents` manifest key replaces the `agents/` scan.
####
--- a/context-window.md
+++ b/context-window.md
@@ -8,7 +8,7 @@
The session walks through a realistic flow with representative token counts:
- * **Before you type anything** : CLAUDE.md, auto memory, MCP tool names, and skill descriptions all load into context. [AGENTS.md files](</docs/en/memory#agents-md>) can load too, on their own or alongside CLAUDE.md. Your own setup may add more here, like an [output style](</docs/en/output-styles>) or text from [`--append-system-prompt`](</docs/en/cli-reference>).
+ * **Before you type anything** : CLAUDE.md, auto memory, MCP tool names, and skill descriptions all load into context. [AGENTS.md files](</docs/en/memory#agents-md>) can load in place of CLAUDE.md. Your own setup may add more here, like an [output style](</docs/en/output-styles>) or text from [`--append-system-prompt`](</docs/en/cli-reference>).
* **As Claude works** : each file read adds to context, [path-scoped rules](</docs/en/memory#path-specific-rules>) load automatically alongside matching files, and a [PostToolUse hook](</docs/en/hooks-guide>) fires after each edit.
* **The follow-up prompt** : a [subagent](</docs/en/sub-agents>) handles the research in its own separate context window, so the large file reads stay out of yours. Only the summary and a small metadata trailer come back.
* **At the end of the walkthrough** : you run `/compact`, which replaces the conversation with a structured summary. Most startup content reloads automatically; the table below shows what happens to each mechanism.
--- a/costs.md
+++ b/costs.md
@@ -1,4 +1,4 @@
-Claude Code charges by API token consumption. For subscription plan pricing (Pro, Max, Team, Enterprise), see [claude.com/pricing](<https://claude.com/pricing>). Per-developer costs vary widely based on model selection, codebase size, and usage patterns such as running multiple instances or automation. Across enterprise deployments, the average cost is around $13 per developer per active day and $150-250 per developer per month, with costs remaining below $30 per active day for 90% of users. To estimate spend for your own team, start with a small pilot group and use the tracking tools below to establish a baseline before wider rollout. This page covers how to track your costs, manage costs for your organization, and reduce token usage.
+Claude Code charges by API token consumption. For subscription plan pricing (Pro, Max, Team, Enterprise), see [claude.com/pricing](<https://claude.com/pricing>). Per-developer costs vary widely based on model selection, codebase size, and usage patterns such as running multiple instances or automation. Across enterprise deployments, the average cost is around $13 per developer per active day and $150-250 per developer per month, with costs remaining below $30 per active day for 90% of users. To estimate spend for your own team, start with a small pilot group and use the tracking tools below to establish a baseline before wider rollout. This page covers Claude Code usage only: how to track your costs, manage costs for your organization, and reduce token usage. For usage limits in other Claude products, see the [Claude Help Center](<https://support.claude.com>).
##
--- a/desktop.md
+++ b/desktop.md
@@ -1004,7 +1004,7 @@
To see which version of the desktop app you’re running:
* **macOS** : click **Claude** in the menu bar, then **About Claude**
- * **Windows** : click **Help** , then **About**
+ * **Windows** : click **Help** , then **About Claude**
Click the version number to copy it to your clipboard.
--- a/desktop-ios-simulator.md
+++ b/desktop-ios-simulator.md
@@ -76,7 +76,7 @@
* Save a screenshot with **Cmd+S** or a screen recording with **Cmd+R** , using the pane’s capture buttons or the shortcuts; the files are saved to your Desktop
* Stop streaming a device without shutting it down by clicking **Detach simulator** , which returns the pane to its **Attach simulator** state
-To tune the video stream from the simulator, open the pane’s **Display** menu. Lower **Frame rate** or **Resolution** if the pane strains your Mac. Both settings change how the pane displays the device, not how the app runs. You and Claude drive the same device, so your taps change the app state Claude sees. To have Claude check a specific screen, tap through to it, then ask. While Claude is driving the device, the pane shows a **Claude is using this device** badge above the screen; hold off tapping until the badge clears, so the result reflects the app rather than your input.
+If the pane shows a **Display** menu, use it to tune the video stream from the simulator. Lower **Frame rate** or **Resolution** if the pane strains your Mac. Both settings change how the pane displays the device, not how the app runs. You and Claude drive the same device, so your taps change the app state Claude sees. To have Claude check a specific screen, tap through to it, then ask. While Claude is driving the device, the pane shows a **Claude is using this device** badge above the screen; hold off tapping until the badge clears, so the result reflects the app rather than your input.
##
--- a/env-vars.md
+++ b/env-vars.md
@@ -324,6 +324,7 @@
`CLAUDE_CODE_PERFORCE_MODE`| Set to `1` to enable Perforce-aware write protection. When set, Edit, Write, and NotebookEdit fail with a `p4 edit <file>` hint if the target file lacks the owner-write bit, which Perforce clears on synced files until `p4 edit` opens them. This prevents Claude Code from bypassing Perforce change tracking
`CLAUDE_CODE_PLUGIN_CACHE_DIR`| Override the plugins root directory. Despite the name, this sets the parent directory, not the cache itself: marketplaces and the plugin cache live in subdirectories under this path. Defaults to `~/.claude/plugins`
`CLAUDE_CODE_PLUGIN_DIRS`| Plugin directories to load for the session, each loaded the way a [`--plugin-dir`](</docs/en/plugins/cli-reference#flags-that-load-a-plugin-for-one-session>) flag loads it. Separate multiple paths with `:` on Unix or `;` on Windows. Give each path as an absolute path or start it with `~`, because Claude Code skips relative paths. Requires Claude Code v2.1.280 or later. See [Load a plugin for one session](</docs/en/plugins/create#load-a-directory-or-archive-for-one-session>)
+`CLAUDE_CODE_PLUGIN_DIR_WATCH`| Controls whether Claude Code reloads a [mod](</docs/en/plugins/mods/overview>) when the mod’s files change. Reloading applies to a mod you load from a directory with `--plugin-dir`, and it’s on by default in interactive sessions. Set to `1` to turn it on in non-interactive sessions as well, or `0` to turn it off in every session. Requires Claude Code v2.1.287 or later. See [mod settings and environment variables](</docs/en/plugins/mods/reference#settings-and-environment-variables>)
`CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS`| Timeout in milliseconds for cloning or refreshing a plugin marketplace (default: 120000). Increase this value for large repositories or slow network connections. See [Git clone timed out](</docs/en/plugins/troubleshooting#git-clone-timed-out-after-120s>)
`CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE`| Set to `1` to skip the re-clone attempt and keep using the existing marketplace checkout when a marketplace refresh can’t reach or authenticate to the remote. Useful in offline or airgapped environments where re-cloning would fail the same way. See [Marketplace updates fail in offline environments](</docs/en/plugins/troubleshooting#marketplace-updates-keep-failing-offline>)
`CLAUDE_CODE_PLUGIN_PREFER_HTTPS`| Set to `1` to clone GitHub `owner/repo` shorthand sources over HTTPS instead of SSH. Applies to plugin install and update, and to `/plugin marketplace add` and `update`. Useful in CI runners, containers, or any environment without a configured SSH key for `github.com`
@@ -506,7 +507,7 @@
What the subprocess environment scrub removes
-When you set `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB` to `1`, Claude Code removes credentials from the environments of the subprocesses it starts, such as Bash commands, hooks, and stdio MCP servers. This reduces what a prompt injection attack can read through shell expansion. The Claude Code process keeps the credentials for its own API calls. The scrub recognizes a credential by its variable name or by the shape of its value, so use it as one layer alongside narrow [permission rules](</docs/en/permissions>) rather than as the only control. The table shows what the scrub does to example variables:
+When you set `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB` to `1`, Claude Code removes credentials from the environments of the subprocesses it starts, such as Bash commands, hooks, and stdio MCP servers. This reduces what a prompt injection attack can read. The Claude Code process keeps the credentials for its own API calls. The scrub recognizes a credential by its variable name or by the shape of its value, so use it as one layer alongside narrow [permission rules](</docs/en/permissions>) rather than as the only control. The table shows what the scrub does to example variables:
Example variable| What the scrub does
---|---
@@ -514,13 +515,13 @@
`NPM_TOKEN`, `DB_PASSWORD`| Removes it, because the name looks like a credential
`DATABASE_URL` that contains a password| Removes it, because the value looks like a credential
`PIP_INDEX_URL` or `NPM_CONFIG_REGISTRY` that contains a password| Keeps the URL and cuts the username and password from it
-`CLAUDE_CONFIG_DIR`| Removes it. Requires Claude Code v2.1.251 or later
+`CLAUDE_CONFIG_DIR`| Removes it
`GITHUB_TOKEN`, `GH_TOKEN`, `GH_ENTERPRISE_TOKEN`, `GITHUB_ENTERPRISE_TOKEN`| Leaves it in place, so that `gh` and scripts that call the GitHub API keep working
`HTTP_PROXY`, `HTTPS_PROXY`| Leaves it in place, including a [username and password in the URL](</docs/en/network-config#basic-authentication>). The [sandbox](</docs/en/sandboxing#network-isolation>) can set these variables itself for sandboxed commands
`GIT_CONFIG_COUNT`, `GIT_CONFIG_KEY_<n>`, `GIT_CONFIG_VALUE_<n>`| Leaves it in place, whatever it holds
A secret whose variable name and value don’t look like a credential| Leaves it in place
-Because the scrub leaves `GITHUB_TOKEN` in place, give a GitHub Actions job the narrowest `permissions` it needs. To remove a GitHub token from sandboxed Bash commands, add a `deny` entry under [`sandbox.credentials`](</docs/en/sandboxing#protect-credentials>). Leave the scrub unset if a subprocess needs one of the removed variables. On Linux, the scrub also runs Bash subprocesses in an isolated PID namespace so they can’t read host process environments through `/proc`. As a side effect, `ps`, `pgrep`, and `kill` can’t see or signal host processes.
+Because the scrub leaves `GITHUB_TOKEN` in place, give a GitHub Actions job the narrowest `permissions` it needs. To remove a GitHub token from sandboxed Bash commands, add a `deny` entry under [`sandbox.credentials`](</docs/en/sandboxing#protect-credentials>). Leave the scrub unset if a subprocess needs one of the removed variables. On Linux, the scrub also runs Bash subprocesses in an isolated PID namespace so they can’t read host process environments through `/proc`. As a side effect, `ps`, `pgrep`, and `kill` can’t see or signal host processes. Before v2.1.251, the scrub removed `ANTHROPIC_API_KEY` and `AWS_SECRET_ACCESS_KEY` and left the table’s other example variables unchanged.
##
--- a/errors.md
+++ b/errors.md
@@ -187,6 +187,7 @@
`Cloud sessions cannot be created from a --restricted session`| Command-line errors
`Cloud sessions are disabled by your organization's policy`| Command-line errors
`Couldn't verify your organization's policy for cloud sessions`| Command-line errors
+`Cloud sessions need a claude.ai sign-in`| [Unable to get organization UUID](</docs/en/claude-code-on-the-web#unable-to-get-organization-uuid>)
`Error: --json-schema is not a valid JSON Schema`| Command-line errors
`Error: Invalid --agents configuration:`| Command-line errors
`Error: --agents takes a JSON object, or a file path only with --print (-p)`| Command-line errors
@@ -377,6 +378,7 @@
* A connection that Claude Code detects was broken by your computer going to sleep partway through a request. Claude Code counts it as a dropped connection under the rules above; once the retry label names the specific reason, it reads `Connection lost while your computer was asleep`, and if the turn ends after Claude has finished thinking but before any text or tool call, the message reads `Your computer went to sleep before a response was produced`.
* A stalled response stream, when the response headers have arrived but none of Claude’s response has arrived, or when Claude has finished thinking but hasn’t started any text or tool call: Claude Code aborts the stalled connection and re-issues the request at most once, outside the 10-attempt budget above. If the response stalls a second time after Claude has finished thinking but before any text or tool call, Claude Code ends the turn with `The response stalled before a response was produced`.
* A streaming request the API never answers with response headers, on a connection where the [first-byte deadline runs](</docs/en/network-config#streaming-idle-watchdogs>): Claude Code aborts it at the deadline and re-sends it at most once per model request, within the retry budget, then ends the turn with No response from API if that attempt goes unanswered too. On other connections, the request waits out `API_TIMEOUT_MS`. When you set `CLAUDE_CODE_RETRY_WATCHDOG`, the one-retry cap doesn’t apply.
+ * A streaming response that the API’s output content filter stops before Claude has either finished thinking or started any text or tool call. Claude Code re-sends the request once, within the retry budget, and shows Output blocked by content filtering policy if the filter stops the second response too.
* Temporary 429 throttles, but not a gateway’s spend-limit `429`, which isn’t a throttle; see Spend limit reached.
* When you’re signed in with a claude.ai subscription, this includes 429 throttles that don’t carry your plan’s quota headers. Before v2.1.199, Claude Code retried those throttles only for API key and Enterprise sign-ins.
* A request rejected because the input plus `max_tokens` exceeds the context limit. Re-sending it unchanged would fail the same way, so Claude Code retries with a reduced `max_tokens`, and stops retrying and compacts instead in two cases:
@@ -393,7 +395,6 @@
* An Amazon Bedrock streaming response with an unexpected content-type, because the gateway or proxy rewriting the response would rewrite the retry the same way. Requires Claude Code v2.1.208 or later.
* A non-streaming retry of a failed streaming request that gets a success status but no Claude API message in the body. Claude Code ends the turn with that error.
* A request that your organization’s policy check denied, which surfaces as an `API Error:` line carrying the denial message. Your organization’s administrators set up the check with [Inference hooks](<https://platform.claude.com/docs/en/manage-claude/inference-hooks>), a Claude Enterprise feature, and the message ends with the instructions they configured, or by default tells you to contact them. Claude Code doesn’t re-send the denied request to the same model or to a [fallback model](</docs/en/model-config#fallback-model-chains>), because the denial is about the request’s content rather than the model. Before v2.1.239, Claude Code could re-send a denied request, without streaming or on a configured fallback model, before showing you the denial.
- * A response the API’s output content filter blocked. Claude Code shows Output blocked by content filtering policy at once and doesn’t retry or re-send that request.
###
@@ -1502,7 +1503,7 @@
Could not load AWS or Google Cloud credentials
-Claude Code couldn’t obtain usable credentials from the AWS credential provider chain or from your Google application default credentials on the machine it runs on, so no request reached your cloud provider. Claude Code clears its cached credentials and retries twice before showing this message. The detail after the `·` names the specific cause, such as an expired SSO session, missing application default credentials reported as `Could not load the default credentials`, or a revoked sign-in reported as `invalid_grant`:
+Claude Code couldn’t obtain usable credentials from the AWS credential provider chain or from your Google application default credentials on the machine it runs on, so no request reached your cloud provider. The detail after the `·` names the specific cause, such as an expired SSO session, missing application default credentials reported as `Could not load the default credentials`, or a revoked sign-in reported as `invalid_grant`:
API Error: Could not load AWS credentials · Could not load credentials from any providers. Check or refresh your AWS credentials and try again.
API Error: Could not load Google Cloud credentials · invalid_grant. Check or refresh your Google Cloud credentials and try again.
@@ -1986,7 +1987,7 @@
Claude Code replaces the unprocessable image with a text placeholder and retries, so subsequent messages succeed. On versions before 2.1.142, a pasted image could remain in the conversation and repeat the same error on every subsequent message. To recover on those versions, press Esc twice and step back past the turn where the image was added. **What to do:**
- * Resize the image before pasting. The API accepts images up to 8000 pixels on the longest edge for a single image, or 2000 pixels when many images are in context.
+ * Resize the image before pasting. The API accepts images up to 8000 pixels on the longest edge for a single image, or 3000 pixels when more than 20 images are in context.
* Take a tighter screenshot of the relevant region instead of the full screen
###
@@ -2506,7 +2507,7 @@
API Error: Output blocked by content filtering policy
-Claude Code shows the error as soon as the block arrives and ends the request there. It doesn’t retry the request, re-send it without streaming, or switch to a [fallback model](</docs/en/model-config#fallback-model-chains>). Before v2.1.285, Claude Code could re-send and retry a blocked request, sometimes for minutes, before showing you the error. **What to do:**
+**What to do:**
* Rephrase your last message or take a different approach
* To step back to a checkpoint before the turn that triggered the block, press Esc twice or run `/rewind`. See [Checkpointing](</docs/en/checkpointing>)
--- a/glossary.md
+++ b/glossary.md
@@ -128,7 +128,7 @@
CLAUDE.md
-A markdown file of persistent instructions you write for Claude, loaded at the start of every session as a user message after the system prompt. Put project conventions, architecture notes, and “always do X” rules here. Project-root CLAUDE.md survives compaction and is re-read fresh from disk afterward. You can place CLAUDE.md at project scope in `./CLAUDE.md` or `./.claude/CLAUDE.md`, at user scope in `~/.claude/CLAUDE.md`, or as managed policy for your organization. All discovered files are concatenated into context rather than overriding each other, ordered from broadest scope to most specific. Claude Code can also load a project’s AGENTS.md files, on their own or alongside CLAUDE.md. Learn more: [CLAUDE.md files](</docs/en/memory#claude-md-files>)
+A markdown file of persistent instructions you write for Claude, loaded at the start of every session as a user message after the system prompt. Put project conventions, architecture notes, and “always do X” rules here. Project-root CLAUDE.md survives compaction and is re-read fresh from disk afterward. You can place CLAUDE.md at project scope in `./CLAUDE.md` or `./.claude/CLAUDE.md`, at user scope in `~/.claude/CLAUDE.md`, or as managed policy for your organization. All discovered files are concatenated into context rather than overriding each other, ordered from broadest scope to most specific. Claude Code can also load a project’s AGENTS.md files in place of CLAUDE.md. Learn more: [CLAUDE.md files](</docs/en/memory#claude-md-files>)
###
--- a/google-vertex-ai.md
+++ b/google-vertex-ai.md
@@ -134,7 +134,7 @@
export VERTEX_REGION_CLAUDE_HAIKU_4_5=us-east5
export VERTEX_REGION_CLAUDE_4_6_SONNET=europe-west1
-Most model versions have a corresponding `VERTEX_REGION_CLAUDE_*` variable. See the [Environment variables reference](</docs/en/env-vars>) for the full list. Check [Google Cloud’s Agent Platform Model Garden](<https://console.cloud.google.com/vertex-ai/model-garden>) to determine which models support global endpoints versus regional only. If a region value isn’t shaped like a region or location name, Claude Code treats it as unset. For example, Claude Code treats a value containing a slash, dot, or space as unset. Claude Code falls back to a different source for each variable:
+Most model versions have a corresponding `VERTEX_REGION_CLAUDE_*` variable. See the [Environment variables reference](</docs/en/env-vars#variables>) for the full list. Check [Google Cloud’s Agent Platform Model Garden](<https://console.cloud.google.com/vertex-ai/model-garden>) to determine which models support global endpoints versus regional only. If a region value isn’t shaped like a region or location name, Claude Code treats it as unset. For example, Claude Code treats a value containing a slash, dot, or space as unset. Claude Code falls back to a different source for each variable:
* `VERTEX_REGION_CLAUDE_*`: Claude Code falls back to `CLOUD_ML_REGION`.
* `CLOUD_ML_REGION`: Claude Code falls back to `us-east5`.
@@ -262,7 +262,7 @@
* Verify the model is available in the location you specified. Some models are offered only on `global` or multi-region locations such as `eu` and `us`, not in specific regions
* If using `CLOUD_ML_REGION=global`, check that your models support global endpoints in [Model Garden](<https://console.cloud.google.com/vertex-ai/model-garden>) under “Supported features”. For models that don’t support global endpoints, either:
* Specify a supported model via `ANTHROPIC_MODEL` or `ANTHROPIC_DEFAULT_HAIKU_MODEL`, or
- * Set a region or multi-region location using `VERTEX_REGION_<MODEL_NAME>` environment variables
+ * Set a region or multi-region location using the model’s `VERTEX_REGION_CLAUDE_*` variable, listed in the [environment variables reference](</docs/en/env-vars#variables>)
If you encounter 429 errors:
--- a/hipaa-setup.md
+++ b/hipaa-setup.md
@@ -202,7 +202,7 @@
If `HIPAA` is missing from `/status`, check these causes in order:
- 1. **The wrong account or connection** : confirm that `/status` shows your organization on the `Organization` line, and shows no `API provider` or `Anthropic base URL` line. Check how developers sign in and connect lists the connections that aren’t eligible for the configuration.
+ 1. **The wrong account or connection** : confirm that `/status` shows your organization on the `Organization` line, and shows no `API provider` or `Anthropic base URL` line. Check how developers sign in and connect lists which sign-in and connection methods aren’t eligible for the configuration.
2. **A blocked policy fetch** : look for an `Organization policy` line in `/status`, which gives the cause. Outside a session, run `claude doctor` and read the same line, which says where Claude Code loaded the policy from or why the policy didn’t load. Allow `api.anthropic.com` through your proxy, then restart Claude Code.
3. **The configuration isn’t applied yet** : ask the Primary Owner whether they have applied the configuration.
--- a/hooks.md
+++ b/hooks.md
@@ -137,7 +137,7 @@
}
}
-When you run either script, Claude attempts to create the `.env` file, the hook denies the tool call, and Claude’s final response explains that it can’t create `.env` files.
+When you run either script, Claude attempts to create the `.env` file and the hook denies the tool call.
##
@@ -178,7 +178,7 @@
`ConfigChange`| No| Yes| Configuration file changes| Reload settings dynamically
`InstructionsLoaded`| No| Yes| A `CLAUDE.md` or rules file is loaded into context| Audit which instruction files load
`WorktreeCreate`| No| Yes| Git worktree created| Track isolated workspaces
-`WorktreeRemove`| No| Yes| Git worktree removed| Clean up workspace resources
+`WorktreeRemove`| No| Yes| A worktree created by a `WorktreeCreate` hook is being removed| Clean up workspace resources
`CwdChanged`| No| Yes| The working directory changes during a session| Reload environment variables per directory
`FileChanged`| No| Yes| A watched file is modified, created, or deleted| Reload configuration when project files change
`DirectoryAdded`| No| Yes| A working directory is added during a session| Install dependencies for a repository added mid-session
@@ -267,7 +267,7 @@
* **Top-level fields** are accepted on every event: `systemMessage` shows a message to the user, and `continue` (`continue_` in Python) determines whether the agent keeps running after this hook. Some events discard them or deliver them elsewhere. Each [event’s section](</docs/en/hooks#hook-events>) on the hooks page says where they land.
* **`hookSpecificOutput`** controls the current operation. The fields you set inside depend on the hook event type:
* For `PreToolUse` hooks, this is where you set `permissionDecision` (`"allow"`, `"deny"`, `"ask"`, or `"defer"`), `permissionDecisionReason`, and `updatedInput`. If you return `"defer"`, the turn ends with a result message whose `stop_reason` is `"tool_deferred"`, so you can [resume the call later](</docs/en/hooks#defer-a-tool-call-for-later>).
- * For `PostToolUse` hooks, you can set `additionalContext` to append information to the tool result. To replace the tool’s output before Claude sees it, set `updatedToolOutput`, which works for any tool in both SDKs. The older `updatedMCPToolOutput` field replaces MCP tool output only and is deprecated.
+ * For `PostToolUse` hooks, you can set `additionalContext` to append information to the tool result. To replace the tool’s output before Claude sees it, set `updatedToolOutput`, which works for any tool in both SDKs. The older `updatedMCPToolOutput` field replaces MCP tool output only.
* In the TypeScript SDK, a `PostToolUse` callback can also return `classifierContext`, a short note about the tool call’s result for the [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) permission classifier. Because your callback runs in your application’s own process, the classifier may weigh a user statement you relay in the note as user intent. The field requires TypeScript Agent SDK v0.3.236 or later. [Annotate a result for the auto mode classifier](</docs/en/hooks#annotate-a-result-for-the-auto-mode-classifier>) covers the length cap, the synchronous-only rule, and what not to put in the note.
Return `{}` to allow the operation without changes. SDK callback hooks use the same JSON output format as [Claude Code shell command hooks](</docs/en/hooks#json-output>), which documents every field and event-specific option. For the SDK type definitions, see the [TypeScript](</docs/en/agent-sdk/typescript#synchookjsonoutput>) and [Python](</docs/en/agent-sdk/python#synchookjsonoutput>) SDK references.
@@ -867,7 +867,7 @@
Session hooks not available in Python
-`SessionStart` and `SessionEnd` can be registered as SDK callback hooks in TypeScript, but aren’t available in the Python SDK because its `HookEvent` type omits them. In Python, they are only available as [shell command hooks](</docs/en/hooks#hook-events>) defined in settings files such as `.claude/settings.json`. To load shell command hooks from your SDK application, include the appropriate setting source with [`setting_sources`](</docs/en/agent-sdk/python#settingsource>) or [`settingSources`](</docs/en/agent-sdk/typescript#settingsource>):
+`SessionStart` and `SessionEnd` can be registered as SDK callback hooks in TypeScript, but aren’t available in the Python SDK because its `HookEvent` type omits them. In Python, they are only available as [shell command hooks](</docs/en/hooks#hook-events>) defined in settings files such as `.claude/settings.json`. Which settings files your SDK application loads depends on [`setting_sources`](</docs/en/agent-sdk/python#settingsource>) or [`settingSources`](</docs/en/agent-sdk/typescript#settingsource>). If you set that option, include the source that holds the hooks:
Python
--- a/hooks-guide.md
+++ b/hooks-guide.md
@@ -456,7 +456,7 @@
`DirectoryAdded`| When a working directory is added mid-session via `/add-dir` or the SDK `register_repo_root` control request
`FileChanged`| When a watched file changes on disk. The `matcher` field specifies which filenames to watch
`WorktreeCreate`| When a worktree is being created via `--worktree`, `isolation: "worktree"`, or for a background session. Replaces default git behavior
-`WorktreeRemove`| When a worktree is being removed at session exit, when a subagent finishes, or when you delete a background session
+`WorktreeRemove`| When a worktree that a `WorktreeCreate` hook created is being removed
`PreCompact`| Before context compaction
`PostCompact`| After context compaction completes
`PreModelSwitch`| Before Claude Code applies a model switch that you or a client requested. Can block the switch
--- a/how-claude-code-works.md
+++ b/how-claude-code-works.md
@@ -54,7 +54,7 @@
* **Your project.** Files in your directory and subdirectories, plus files elsewhere with your permission.
* **Your terminal.** Any command you could run: build tools, git, package managers, system utilities, scripts. If you can do it from the command line, Claude can too.
* **Your git state.** Current branch, uncommitted changes, and recent commit history.
- * **Your[CLAUDE.md](</docs/en/memory>).** A markdown file where you store project-specific instructions, conventions, and context that Claude should know every session. If your repository has an AGENTS.md for other coding agents, Claude [can read that](</docs/en/memory#agents-md>) on its own or alongside CLAUDE.md.
+ * **Your[CLAUDE.md](</docs/en/memory>).** A markdown file where you store project-specific instructions, conventions, and context that Claude should know every session. If your repository has an AGENTS.md for other coding agents, Claude [can read that](</docs/en/memory#agents-md>) in place of a CLAUDE.md.
* **[Auto memory](</docs/en/memory#auto-memory>).** Learnings Claude saves automatically as you work, like your preferences. The first 200 lines or 25KB of MEMORY.md, whichever comes first, load at the start of each session.
* **Extensions you configure.** [MCP servers](</docs/en/mcp>) for external services, [skills](</docs/en/skills>) for workflows, [subagents](</docs/en/sub-agents>) for delegated work, and [Claude in Chrome](</docs/en/chrome>) for browser interaction.
--- a/install.md
+++ b/install.md
@@ -187,7 +187,7 @@
claude plugin install formatter@your-org --scope project
-The command prints `Successfully installed plugin: formatter@your-org (scope: project)` when it finishes. Some plugins install by running a command that their marketplace names, called a [`command` source](</docs/en/plugins/marketplace-reference#command-plugin-source>). Claude Code shows you that command and asks you to accept it before it runs. A script has no one to answer that prompt, so pass `--yes` there to accept it. For every `claude plugin install` flag, see [plugin install](</docs/en/plugins/cli-reference#plugin-install>).
+The command prints `Successfully installed plugin: formatter@your-org (scope: project)` when it finishes. Some plugins install by running a command that their marketplace names, called a [`command` source](</docs/en/plugins/marketplace-reference#command-plugin-source>). Claude Code shows you that command and asks you to accept it before it runs. A script has no one to answer that prompt, so pass `--yes` there to accept it. For the other `claude plugin install` flags, see [plugin install](</docs/en/plugins/cli-reference#plugin-install>).
##
--- a/interface.md
+++ b/interface.md
@@ -350,7 +350,7 @@
Element| What it draws| Where
---|---|---
-`Box`| A flex container. Takes layout props such as `flexDirection`, `columnGap`, `padding`, `borderStyle`, and `width`.| Everywhere
+`Box`| A flex container. Takes layout props such as `flexDirection`, `columnGap`, `padding`, [`borderStyle`](</docs/en/plugins/mods/reference#box-border-styles>), and `width`.| Everywhere
`Text`| Styled text. Takes `color`, `bold`, `dimColor`, `italic`, and `wrap`. A `color` is a theme key or a color such as `'red'`. A `wrap` is `'wrap'`, `'truncate'`, `'truncate-start'`, `'truncate-middle'`, or `'truncate-end'`.| Everywhere
`Button`| A control that calls `onPress`| Everywhere
`Link`, `Code`, `Markdown`| A link with `href` and an optional `label`, a code block, and text formatted the way Claude’s replies are. `Markdown` takes its content in a `text` prop, not in `children`, and needs a `key` when you pass `onLinkPress`.| Everywhere
@@ -484,13 +484,13 @@
Many panes are a text field with a list under it. The example in this section is a notes pane: you type a note and press Enter to add it, and each note has an `x` button that deletes it. With two notes added, the terminal draws the pane this way:
- ╭──────────────────────────────────────────────────────────╮
- │ Note: Type a note and press Enter ⏎ add ✕ │
+ ╭────────────────────────────────────────────────────────✕─╮
+ │ Note: Type a note and press Enter ⏎ add │
│ x buy milk │
│ x call bob │
╰──────────────────────────────────────────────────────────╯
-The example uses these techniques:
+The `✕` on the top border is Claude Code’s own mark for closing the pane. The example uses these techniques:
* **Take typed input** : an `Input` calls `onSubmit(value)` with the field’s text when the user presses Enter, and `onInput(value)` on every change
* **Draw a list** : map your data to one row each, and give every row’s button its own `key`
--- a/llm-gateway-protocol.md
+++ b/llm-gateway-protocol.md
@@ -53,7 +53,7 @@
* Inference requests post to `/v1/messages?beta=true`
* The Google Cloud’s Agent Platform method suffixes attach to the publisher model path, as in `/projects/{project}/locations/{location}/publishers/anthropic/models/{model}:streamRawPredict`
-A gateway also sees best-effort startup traffic it can reject without breaking anything. An Anthropic Messages-format gateway receives a `HEAD /api/hello` connection-warming probe, which Claude Code skips when an HTTP proxy or client certificate is configured. An Amazon Bedrock-format gateway receives a `GET /inference-profiles?type=SYSTEM_DEFINED` request and, when the configured model is an inference profile, `GET /inference-profiles/{profile}` lookups. The [fast mode](</docs/en/fast-mode>) availability check never appears in gateway logs: it calls `api.anthropic.com` directly rather than following `ANTHROPIC_BASE_URL`, so on a network that blocks direct egress to `api.anthropic.com`, fast mode can report a connectivity error while inference through the gateway keeps working. The [WebFetch domain safety check](</docs/en/data-usage#webfetch-domain-safety-check>) also calls `api.anthropic.com` directly. [Use fast mode behind proxies and LLM gateways](</docs/en/fast-mode#use-fast-mode-behind-proxies-and-llm-gateways>) covers the variables that restore it.
+A gateway also sees best-effort startup traffic it can reject without breaking anything. An Anthropic Messages-format gateway receives a `HEAD /api/hello` connection-warming probe, which Claude Code skips when an HTTP proxy or client certificate is configured. An Amazon Bedrock-format gateway receives a `GET /inference-profiles?type=SYSTEM_DEFINED` request and, when the configured model is an inference profile, `GET /inference-profiles/{profile}` lookups. Sessions that go through a gateway aren’t eligible for the HIPAA configuration. [Check how developers sign in and connect](</docs/en/hipaa-setup#check-how-developers-sign-in-and-connect>) lists which sign-in and connection methods are. See [The HIPAA configuration behind a gateway](</docs/en/llm-gateway-rollout#the-hipaa-configuration-behind-a-gateway>). The [fast mode](</docs/en/fast-mode>) availability check never appears in gateway logs: it calls `api.anthropic.com` directly rather than following `ANTHROPIC_BASE_URL`, so on a network that blocks direct egress to `api.anthropic.com`, fast mode can report a connectivity error while inference through the gateway keeps working. The [WebFetch domain safety check](</docs/en/data-usage#webfetch-domain-safety-check>) also calls `api.anthropic.com` directly. [Use fast mode behind proxies and LLM gateways](</docs/en/fast-mode#use-fast-mode-behind-proxies-and-llm-gateways>) covers the variables that restore it.
###
--- a/llm-gateway-rollout.md
+++ b/llm-gateway-rollout.md
@@ -194,6 +194,19 @@
+The HIPAA configuration behind a gateway
+
+Sessions that go through a gateway aren’t eligible for the HIPAA configuration. [Check how developers sign in and connect](</docs/en/hipaa-setup#check-how-developers-sign-in-and-connect>) lists which sign-in and connection methods are. To restrict features for those sessions in the managed settings file, use the keys in [Map egress paths to managed controls and events](</docs/en/monitoring-usage#map-egress-paths-to-managed-controls-and-events>). These keys don’t make a session eligible for the HIPAA configuration, and they don’t cover everything the configuration changes. For example:
+
+ * **Cloud sessions** : no managed key turns them off. See [Admin console controls](</docs/en/desktop#admin-console-controls>)
+ * **Anthropic credentials in child processes** : the configuration [removes them](</docs/en/hipaa-setup#anthropic-credentials-in-commands-hooks-and-mcp-servers>) from the processes Claude Code starts, and no settings key does only that
+
+Don’t use `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` in place of these keys. It turns off some of these features, but it also turns off the auto-updater, and it leaves WebFetch on.
+
+####
+
+
+
Hand developers the values to set themselves
If you don’t have managed-settings distribution in place, send each developer what they need to follow the [connect page](</docs/en/llm-gateway-connect#configure-claude-code-yourself>):
--- a/memory.md
+++ b/memory.md
@@ -1,12 +1,12 @@
Each Claude Code session begins with a fresh context window. Two mechanisms carry knowledge across sessions:
- * **CLAUDE.md files** : instructions you write to give Claude persistent context. Claude can also read a repository’s `AGENTS.md` files, on their own or alongside CLAUDE.md
+ * **CLAUDE.md files** : instructions you write to give Claude persistent context. Claude can also read a repository’s `AGENTS.md` files in place of CLAUDE.md
* **Auto memory** : notes Claude writes itself based on your corrections and preferences
This page covers how to:
* Write and organize CLAUDE.md files
- * Use an existing AGENTS.md as your project instructions, on its own or alongside CLAUDE.md
+ * Use an existing AGENTS.md as your project instructions
* Scope rules to specific file types with `.claude/rules/`
* Configure auto memory so Claude takes notes automatically
* Troubleshoot when instructions aren’t being followed
--- a/monitoring-usage.md
+++ b/monitoring-usage.md
@@ -1276,7 +1276,7 @@
* `session_files_deleted`: Number of artifacts the session-files sweep deleted: transcripts plus per-session companion files such as sidecars, recordings, and tool results
* `artifacts_deleted`: Total items the sweep deleted across the data directories it covers, including the session files. Some sweeps count a whole removed directory tree as one item and a few cleanup passes don’t contribute to the counter, so treat the value as a floor rather than an exact file count
* `files_retained_fresh`: Files inspected and left in place because they’re still within the retention period. Only per-file sweeps count these, so the value is a floor; a nonzero value is the normal steady state
- * `files_past_cutoff`: Files older than the retention period that the sweep failed to delete, for example because of a permission error or a file held open. A value above zero means files outlived the configured retention period; zero isn’t proof that none did, because a failed removal of a whole directory counts toward `error_count` instead
+ * `files_past_cutoff`: Files older than the retention period that the sweep failed to delete, for example because of a permission error or a file held open. The count also includes each stale folder the sweep finds under `skills/synced/` or `plugins/synced/`, whether or not it moves the folder to the trash. Apart from those folders, a value above zero means files outlived the configured retention period; zero isn’t proof that none did, because a failed removal of a whole directory counts toward `error_count` instead
* `error_count`: Number of errors the sweep encountered while listing or deleting files
####
@@ -1485,6 +1485,57 @@
+Map egress paths to managed controls and events
+
+The table pairs paths that can carry session content off a machine, plus local retention, with the [managed settings](</docs/en/managed-settings>) keys that restrict them and the events that record them. For what Claude Code itself sends to Anthropic, such as `/feedback` reports, see [Data usage](</docs/en/data-usage>). The names link to their reference entries, which give the values and defaults.
+
+Path| Managed controls| Events
+---|---|---
+Bash and PowerShell commands| [`sandbox.enabled`](</docs/en/settings-reference#sandbox-enabled>), [`sandbox.failIfUnavailable`](</docs/en/settings-reference#sandbox-failifunavailable>), [`sandbox.allowUnsandboxedCommands`](</docs/en/settings-reference#sandbox-allowunsandboxedcommands>), [`sandbox.network.allowManagedDomainsOnly`](</docs/en/settings-reference#sandbox-network-allowmanageddomainsonly>), [`sandbox.network.allowedDomains`](</docs/en/settings-reference#sandbox-network-alloweddomains>)| `tool_decision`, `tool_result`
+MCP servers| [`allowedMcpServers`](</docs/en/settings-reference#allowedmcpservers>), [`allowManagedMcpServersOnly`](</docs/en/settings-reference#allowmanagedmcpserversonly>), [`deniedMcpServers`](</docs/en/settings-reference#deniedmcpservers>), [`managed-mcp.json`](</docs/en/managed-mcp>)| `mcp_server_connection`, `tool_decision`, `tool_result`
+Hooks| [`allowManagedHooksOnly`](</docs/en/settings-reference#allowmanagedhooksonly>), [`allowedHttpHookUrls`](</docs/en/settings-reference#allowedhttphookurls>)| `hook_registered`, `hook_execution_start`, `hook_execution_complete`
+Plugins| [`strictKnownMarketplaces`](</docs/en/settings-reference#strictknownmarketplaces>), [`disableSideloadFlags`](</docs/en/settings-reference#disablesideloadflags>), [`syncClaudeAiPlugins`](</docs/en/settings-reference#syncclaudeaiplugins>), [`syncClaudeAiSkills`](</docs/en/settings-reference#syncclaudeaiskills>)| `plugin_installed`, `plugin_loaded`
+[WebFetch](</docs/en/permissions#webfetch>)| [`permissions.deny`](</docs/en/settings-reference#permissions-deny>), [`allowManagedPermissionRulesOnly`](</docs/en/settings-reference#allowmanagedpermissionrulesonly>)| `tool_decision`, `tool_result`
+Tools that upload to claude.ai, such as Artifact| `permissions.deny`, [`enableArtifact`](</docs/en/settings-reference#enableartifact>)| `tool_decision`, `tool_result`
+Remote Control| [`disableRemoteControl`](</docs/en/settings-reference#disableremotecontrol>)| No dedicated event
+Local transcript retention| [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>)| `retention_sweep`
+
+The `allowedHttpHookUrls`, `managed-mcp.json`, and hook event entries need more than the table shows:
+
+ * **`allowedHttpHookUrls`** : entries merge across settings files, so a developer can add to an empty managed list. `allowManagedHooksOnly` decides which hooks run
+ * **`managed-mcp.json`** : to turn MCP off, see [Disable MCP entirely](</docs/en/managed-mcp#disable-mcp-entirely>). To confirm Claude Code reads the file, see [Validate the configuration](</docs/en/managed-mcp#validate-the-configuration>)
+ * **Hook events** : Claude Code logs `hook_execution_start` and `hook_execution_complete` once per hook event, covering every matching hook. `OTEL_LOG_TOOL_DETAILS=1` on its own doesn’t record an HTTP hook’s URL. The hook configuration appears only in `hook_definitions`, which also needs detailed beta tracing
+
+`OTEL_LOG_TOOL_DETAILS=1` adds command strings, server and tool names, and tool input to these events. That detail can contain the same sensitive content as the session itself, so enable it only when your collector is approved to hold that content.
+
+###
+
+
+
+Check the retention sweep
+
+To give every machine the same retention period, set [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>) in [managed settings](</docs/en/managed-settings>). To check that machines run the sweep with that value, collect the `retention_sweep` event. `period_days` and the counters are strings, so cast them to numbers before you compare them.
+
+What a machine reports| What it means
+---|---
+`result` is `"skipped"`| Claude Code paused the sweep. `skip_reason` gives the cause
+`used_default` is `"true"`, or `period_days` differs from your managed value| The machine isn’t applying your managed `cleanupPeriodDays`
+`error_count` is above zero| The sweep hit errors while it listed or deleted files, so data past the retention period can remain
+`files_past_cutoff` is above zero| The sweep failed to delete files past the retention period, or it found stale synced skills and plugins folders. Read it with `error_count`
+No event| Not a failure on its own
+
+A machine that works as intended can go without an event for reasons such as these:
+
+ * **Nobody starts Claude Code** : no sweep runs, and the machine keeps its data until the next launch
+ * **A session stays open** : Claude Code runs the sweep at most once per session
+ * **A session ends early** : a sweep that hasn’t finished when the session exits emits nothing, and neither does one that stops on an unexpected error
+
+The sweep doesn’t cover every path. [Kept until you delete them](</docs/en/claude-directory#kept-until-you-delete-them>) lists what stays, and [Clear local data](</docs/en/claude-directory#clear-local-data>) shows how to remove it.
+
+###
+
+
+
Send events to a SIEM
Point `OTEL_EXPORTER_OTLP_LOGS_ENDPOINT` at your SIEM’s OTLP receiver, or at an OpenTelemetry Collector that forwards to your SIEM’s native ingest API. The following managed-settings example exports events only, with full tool detail enabled for MCP and Bash auditing:
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -71,6 +71,7 @@
---|---
Any settings file sets `disableAutoMode` to `"disable"`| `default`
`claude -p` or the [Agent SDK](</docs/en/agent-sdk/permissions#permission-modes>)| `default` in sessions that [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>). In sessions that don’t, such as on a third-party provider or with telemetry off, `auto` with Claude Code v2.1.285 or later and `default` on earlier versions. A session in an organization whose policy withholds the `auto` default starts in `default` instead
+Your organization has the HIPAA configuration applied and the session is [eligible for it](</docs/en/hipaa-setup#check-how-developers-sign-in-and-connect>)| `default` with Claude Code v2.1.285 or later; auto mode stays available to switch to
In a terminal or through the [VS Code extension](</docs/en/vs-code>)| `auto` with Claude Code v2.1.283 or later; on earlier versions, `auto` on Pro, Max, or Team plans in sessions that [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), and `default` otherwise
In your [first session after an install or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>), Claude Code can choose the starting permission mode before its feature flags arrive. That session can start in a different permission mode than the table gives. When the flag, a settings file, or the built-in default selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when the session doesn’t meet the availability requirements, such as a settings file turning it off or a model that doesn’t support it, or when Anthropic has temporarily turned it off server-side. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
@@ -104,6 +105,21 @@
}
The next session you start shows `⏸ manual mode on` in the status bar.
+
+###
+
+
+
+Permission modes with the HIPAA configuration
+
+In an organization with the [HIPAA configuration](</docs/en/hipaa-setup>) applied, the built-in `auto` default doesn’t apply. A terminal or VS Code session starts in Manual mode when nothing else chooses its starting permission mode. A terminal session also shows `Auto mode isn't the default for your organization · Shift+Tab to switch`, and the VS Code extension shows no notice. [Check how developers sign in and connect](</docs/en/hipaa-setup#check-how-developers-sign-in-and-connect>) lists the sessions this applies to. Auto mode and `bypassPermissions` stay available:
+
+ * **Switch to auto mode** : press `Shift+Tab`, or use your interface’s control
+ * **Start in auto mode** : pass `--permission-mode auto`, or set `permissions.defaultMode` to `auto` in your user settings, or in managed settings for your whole organization. See Start in a different permission mode
+ * **Remove auto mode** : set [`permissions.disableAutoMode`](</docs/en/settings-reference#disableautomode>) to `"disable"` in managed settings
+ * **Block`bypassPermissions`**: set [`permissions.disableBypassPermissionsMode`](</docs/en/settings-reference#permissions-disablebypasspermissionsmode>) to `"disable"` in managed settings
+
+Requires Claude Code v2.1.285 or later, the [minimum version for the HIPAA configuration](</docs/en/hipaa-setup#update-claude-code-and-claude-desktop>).
##
--- a/python.md
+++ b/python.md
@@ -191,7 +191,7 @@
`ToolAnnotations`
-Behavioral hints for a tool, passed as the `annotations` argument of `tool()`. `ToolAnnotations` extends the MCP SDK’s `mcp.types.ToolAnnotations` with a `maxResultSizeChars` field, and you can write each hint in camelCase or snake_case: `ToolAnnotations(readOnlyHint=True)` and `ToolAnnotations(read_only_hint=True)` are equivalent. You can also pass a plain `mcp.types.ToolAnnotations` wherever the SDK accepts annotations. The snake_case names and the typed `maxResultSizeChars` field require Python Agent SDK 0.2.140 or later. Versions 0.1.31 through 0.2.139 re-export `mcp.types.ToolAnnotations` unchanged. On versions 0.1.55 through 0.2.139 you can still pass `maxResultSizeChars` as a keyword argument: the MCP class accepts extra fields, and the SDK forwards the value to Claude Code. All fields are optional. Clients shouldn’t rely on the hints for security decisions.
+Behavioral hints for a tool, passed as the `annotations` argument of `tool()`. `ToolAnnotations` extends the MCP SDK’s `mcp.types.ToolAnnotations` with a `maxResultSizeChars` field, and you can write each hint in camelCase or snake_case: `ToolAnnotations(readOnlyHint=True)` and `ToolAnnotations(read_only_hint=True)` are equivalent. To read a hint back from the object, use the spelling your installed `mcp` package declares: `.readOnlyHint` on `mcp` 1.x and `.read_only_hint` on 2.x, while `.maxResultSizeChars` works on both. You can also pass a plain `mcp.types.ToolAnnotations` wherever the SDK accepts annotations. The snake_case names and the typed `maxResultSizeChars` field require Python Agent SDK 0.2.140 or later. Versions 0.1.31 through 0.2.139 re-export `mcp.types.ToolAnnotations` unchanged. On versions 0.1.55 through 0.2.139 you can still pass `maxResultSizeChars` as a keyword argument: the MCP class accepts extra fields, and the SDK forwards the value to Claude Code. All fields are optional. Clients shouldn’t rely on the hints for security decisions.
Field| Type| Default| Description
---|---|---|---
@@ -1435,7 +1435,7 @@
`enabled`| `type`, `budget_tokens`, `display`| Enable thinking with a specific token budget
`disabled`| `type`| Disable thinking
-The optional `display` field controls whether thinking text is returned `"summarized"` or `"omitted"`. On Claude Opus 4.7 and later, the API default is `"omitted"`, so set `"summarized"` to receive thinking content in `ThinkingBlock` outputs. Claude Code doesn’t send `display` to Amazon Bedrock or Google Cloud’s Agent Platform, so on those providers Opus 4.7 and later return empty `ThinkingBlock` outputs even when you set `display` to `"summarized"`. Because these are `TypedDict` classes, they’re plain dicts at runtime. Either construct them as dict literals or call the class like a constructor; both produce a `dict`. Access fields with `config["budget_tokens"]`, not `config.budget_tokens`:
+The optional `display` field controls whether thinking text is returned `"summarized"` or `"omitted"`. On Claude Opus 4.7 and later, the API default is `"omitted"`, so set `"summarized"` to receive thinking content in `ThinkingBlock` outputs. Claude Code leaves `display` out of requests to some providers, such as Amazon Bedrock and Google Cloud’s Agent Platform. On those providers, Opus 4.7 and later return empty `ThinkingBlock` outputs even when you set `display` to `"summarized"`. Because these are `TypedDict` classes, they’re plain dicts at runtime. Either construct them as dict literals or call the class like a constructor; both produce a `dict`. Access fields with `config["budget_tokens"]`, not `config.budget_tokens`:
from claude_agent_sdk import ClaudeAgentOptions, ThinkingConfigEnabled
@@ -1829,6 +1829,7 @@
`maxOutputTokens`| `int`| Maximum output token limit for this model.
`canonicalModel`| `str`| Canonical model ID used for the pricing lookup. May differ from the raw model string the entry is keyed by, such as a provider-specific ID or alias. Not always present.
`provider`| `str`| API provider that served this model, such as `firstParty`, `bedrock`, `vertex`, `foundry`, `anthropicAws`, `mantle`, or `gateway`. Not always present.
+`costBasis`| `str`| Price table that priced this model’s latest request: `list` for list price, `managed` for a [`modelPricing`](</docs/en/settings-reference#modelpricing>) table, or `unknown` when neither matched the model ID. Not always present, and not declared on the TypedDict, so read it with `.get()`. Requires Claude Code v2.1.246 or later.
###
@@ -2121,7 +2122,7 @@
class ClaudeSDKError(Exception):
"""Base error for Claude SDK."""
-When a single-shot `query()` ends with an error result, for example a turn-limit error, the SDK raises a `ResultError` after yielding the final result message. Python Agent SDK versions before 0.2.140 raised a plain `Exception` that wasn’t a `ClaudeSDKError` subclass.
+When a single-shot `query()` ends with an error result, for example a turn-limit error, the SDK raises a `ResultError`.
###
@@ -2173,7 +2174,7 @@
`ResultError`
-Raised after the final `ResultMessage` when the Claude Code process exits because the run ended with an error result, such as a turn-limit error or an API error. `ResultError` subclasses `ProcessError`, so an existing `except ProcessError` handler also catches it. Its attributes carry the fields of that result message, so you can branch on why the run failed without parsing the message text. Requires Python Agent SDK 0.2.140 or later.
+Raised when the Claude Code process exits because the run ended with an error result message, such as a turn-limit error or an API error. `ResultError` subclasses `ProcessError`, so an existing `except ProcessError` handler also catches it. Its attributes carry the fields of that result message, so you can branch on why the run failed without parsing the message text. Requires Python Agent SDK 0.2.140 or later.
class ResultError(ProcessError):
subtype: str | None # "error_max_turns", "error_during_execution", ...; "success" when the run ended on a failed request
@@ -2602,7 +2603,7 @@
hookEventName: Literal["PostToolUse"]
additionalContext: NotRequired[str]
updatedToolOutput: NotRequired[Any]
- updatedMCPToolOutput: NotRequired[Any] # Deprecated: use updatedToolOutput, which works for all tools
+ updatedMCPToolOutput: NotRequired[Any] # MCP tools only. Prefer updatedToolOutput, which works for all tools
class PostToolUseFailureHookSpecificOutput(TypedDict):
hookEventName: Literal["PostToolUseFailure"]
@@ -2709,7 +2710,7 @@
Tool Input/Output Types
-Documentation of input/output schemas for all built-in Claude Code tools. While the Python SDK doesn’t export these as types, they represent the structure of tool inputs and outputs in messages. Each output shown is the value you read from `UserMessage.tool_use_result` for that tool. Key names appear exactly as Claude Code emits them. A key annotated `| None` with a “present when” or “optional” comment is omitted when it doesn’t apply.
+Documentation of input/output schemas for built-in Claude Code tools. While the Python SDK doesn’t export these as types, they represent the structure of tool inputs and outputs in messages. Each output shown is the value you read from `UserMessage.tool_use_result` for that tool. Key names appear exactly as Claude Code emits them. A key annotated `| None` with a “present when” or “optional” comment is omitted when it doesn’t apply.
###
--- a/reference.md
+++ b/reference.md
@@ -1,4 +1,4 @@
-Look up any event a [mod](</docs/en/plugins/mods/overview>) can handle, mods API method it can call, or render site it can draw in, for the Claude Code CLI and the Desktop app as of v2.1.289. Each entry gives the name and a one-line description, and links to the guide section that explains it where there is one.
+Look up any event a [mod](</docs/en/plugins/mods/overview>) can handle, mods API method it can call, or render site it can draw in, for the Claude Code CLI and the Desktop app as of v2.1.290. Each entry gives the name and a one-line description, and links to the guide section that explains it where there is one.
The complete reference is Claude Code’s [TypeScript declarations for mods](<https://github.com/anthropics/claude-code/blob/main/mods/types/claude-code.d.ts>), which describe every event, method, and element, with examples. The copy on GitHub can be older than the Claude Code version you have installed. When the two disagree, trust [the copy Claude Code writes for your version](</docs/en/plugins/mods/create#get-the-types-for-your-build>).
@@ -78,6 +78,7 @@
[`prompt.section`](</docs/en/plugins/mods/events#rewrite-or-add-to-a-prompt>)| Once for each named section of the system prompt. `e.name` is the section’s `id` in `prompt.compose`.| `{ text }`, or `{ text: null }` to omit the section
[`prompt.context`](</docs/en/plugins/mods/events#rewrite-or-add-to-a-prompt>)| Once for each conversation, for the context sent with the first message| `{ blocks }`
`prompt.attachment`| Claude Code adds a message of its own for Claude, such as a reminder. `e.type` names the kind, and for the kinds the types declare, `e.detail` holds the facts the text was written from.| `{ text }`, or `{ text: null }` to omit it
+`prompt.mention`| Claude Code is about to read a file that a prompt @-mentions. Requires Claude Code v2.1.290 or later.| `next({ ...e, path })` to read a different file, or `{ deny: reason }`
[`skill.prompt`](</docs/en/plugins/mods/events#rewrite-or-add-to-a-prompt>)| A skill’s text is expanded for Claude| `{ text }`
`attribution.text`| Claude Code composes commit or pull request attribution text| `{ text }`
@@ -170,7 +171,7 @@
Event| Fires when| A hook can return
---|---|---
[`plugin.register`](</docs/en/plugins/mods/admin#enforce-a-policy-with-a-mod-of-your-own>)| A hooks module is about to load. `e.uses` lists its events, mods API calls, environment variables, and state, as `claude plugin validate` prints them. Each call is written without the `$.` prefix, such as `fs.read`.| `{ refuse: reason }`
-`engine.create`| The mods API is being built for this mod| A changed mods API, to add a namespace or withhold one
+`engine.create`| The mods API is being built for this mod| A changed mods API, to add a namespace. A mod outside the `user` tier can also withhold one.
###
@@ -259,8 +260,8 @@
`e.viewport` holds `columns`, `rows`, and `isFullscreen`. It’s absent until the app has measured its window. Its `rows` is the height of the whole window, not of your pane. To fit a tree to its site, read these props in the hook:
* **Width of a`Pane` or the band**: draw to `e.props.bodyColumns`
- * **Height of a`Pane` beside the transcript**: where `e.props.placement` is `'dock'`, `e.props.scroll.bodyRows` is the number of rows the pane has
- * **Height of a`Pane` above the prompt**: where `e.props.placement` is `'inline'`, the pane grows with your tree up to a limit, and `bodyRows` counts only the rows showing now. The [`rows` field of `$.ui.open`](</docs/en/plugins/mods/interface#open-a-pane-at-the-right-time>) asks for a different limit.
+ * **Height of a`Pane` beside the transcript**: where `e.props.placement` is `'dock'`, `e.props.scroll.bodyRows` is the number of rows the pane has for your tree
+ * **Height of a`Pane` above the prompt**: where `e.props.placement` is `'inline'`, the pane grows with your tree up to a limit, and `bodyRows` is that limit. The [`rows` field of `$.ui.open`](</docs/en/plugins/mods/interface#open-a-pane-at-the-right-time>) asks for a different one.
A tree taller than the pane scrolls as a whole.
@@ -278,8 +279,8 @@
[`Text`](</docs/en/plugins/mods/interface#build-a-tree-from-elements>)| `color`, `backgroundColor`, `bold`, `italic`, `underline`, `dimColor`, `inverse`, `wrap`| ✓| ✓
[`Button`](</docs/en/plugins/mods/interface#respond-to-presses-and-typing>)| `key`, `label`, `onPress`, `hotkey`, `plain`, `dimColor`, `autoFocus`, `action`| ✓| ✓
`Link`| `href`, `label`| ✓| ✓
-`Code`| The code, up to 10,000 characters| ✓| ✓
-`Markdown`| `text`, up to 10,000 characters, `key`, `dimColor`, `onLinkPress`, `pressableLinks`| ✓| ✓
+`Code`| The code| ✓| ✓
+`Markdown`| `text`, `key`, `dimColor`, `onLinkPress`, `pressableLinks`| ✓| ✓
[`Input`](</docs/en/plugins/mods/interface#take-typed-input-and-draw-a-row-for-each-item>)| `key`, `label`, `placeholder`, `value`, `submitLabel`, `onSubmit`, `onInput`, `autoFocus`| ✓| ✓
`Select`| `key`, `label`, `options`, `value`, `onSelect`, `autoFocus`| ✓| ✓
`Svg`| An SVG document, up to 131,072 characters| | ✓
@@ -289,6 +290,29 @@
More `Button` rules: `action` names one of Claude Code’s own [keybinding actions](</docs/en/keybindings>), and the user’s binding for it presses the button when that binding is a chord or a modified key. A digit `hotkey` on a button in the band also fires when the user types that digit alone into an empty prompt and pauses. When two buttons in one drawing name the same `hotkey`, the later one gets it. `autoFocus` accepts only `true` on any control, so omit the prop to leave it off.
+###
+
+
+
+`Box` border styles
+
+To draw a border around a `Box`, set its `borderStyle` to one of these names, as in `borderStyle: 'round'`. Each row says what the terminal draws for that name and shows the top edge of the border.
+
+`borderStyle`| What the terminal draws| Top edge
+---|---|---
+`'single'`| Thin lines with square corners| `┌──┐`
+`'double'`| Double lines| `╔══╗`
+`'round'`| Thin lines with rounded corners| `╭──╮`
+`'bold'`| Thick lines| `┏━━┓`
+`'singleDouble'`| Thin lines on the top and bottom, double lines on the sides| `╓──╖`
+`'doubleSingle'`| Double lines on the top and bottom, thin lines on the sides| `╒══╕`
+`'classic'`| The ASCII characters `+`, `-`, and `|`| `+--+`
+`'arrow'`| Arrows that point into the `Box`| `↘↓↓↙`
+`'dashed'`| Dashed lines with blank corners| `╌╌`
+`'quote'`| A bar, `▎`, down the left side and blank cells on the other three sides| Blank
+
+A `Box` whose `borderStyle` names anything else, such as `'rounded'`, draws with no border.
+
##
@@ -305,7 +329,7 @@
`$.process.run` timeout| 30 seconds by default, 10 minutes at most
`$.model.complete` `maxTokens`| 1024 by default, up to 64,000 or the model’s output limit
`$.fs.read` and `$.fs.write`| 4 MiB for one file
-One string child of a `Text`| 10,000 characters
+Text in one tree| The first 100,000 characters are drawn
`$.store`| 4 MiB of JSON in total
`$.session.messages()`| The newest 4,096 entries
`$.ui.invalidate('ui.render')` redraws| Throttled to 10 a second, or 30 in the terminal for the visible pane, the expanded band, and the hint line under the prompt. Calls that come sooner are coalesced.
--- a/remote-control.md
+++ b/remote-control.md
@@ -6,6 +6,8 @@
* **Survive interruptions** : if your laptop sleeps or your network drops, Claude Code reconnects automatically when your machine comes back online.
Unlike [cloud sessions](</docs/en/claude-code-on-the-web>), which run on cloud infrastructure, Remote Control sessions run directly on your machine and interact with your local filesystem. The web and mobile interfaces are a window into that local session, so your computer has to stay on and the `claude` process has to keep running.
+
+Remote Control is a Claude Code feature. For conversations in other Claude products, see the [Claude Help Center](<https://support.claude.com>).
##
--- a/sandboxing.md
+++ b/sandboxing.md
@@ -994,6 +994,8 @@
* **Computer use** : when Claude opens apps and controls your screen, it runs on your actual desktop rather than in an isolated environment. Per-app permission prompts gate each application. See [computer use in the CLI](</docs/en/computer-use>) or [computer use in Desktop](</docs/en/desktop#let-claude-use-your-computer>).
* **Subagents** : [subagents](</docs/en/sub-agents>) run in the same process as the parent session and use the same sandbox configuration. Bash commands inside a subagent are sandboxed when sandboxing is enabled in the parent session.
+ * **Background sessions** : a [background session](</docs/en/agent-view>) runs in its own process, and its Bash commands are sandboxed when [its settings](</docs/en/agent-view#settings-and-provider>) enable sandboxing.
+ * **A boundary around the whole process** : to put the processes in What runs outside the sandbox behind a boundary too, run Claude Code (local mode) inside the [sandbox runtime](</docs/en/sandbox-environments#sandbox-runtime>) with a network allowlist limited to the hosts you approve, or in the [dev container](</docs/en/devcontainer>) with its firewall script. For the background service and the sessions it hosts, see [Run Claude Code behind a corporate launcher](</docs/en/corporate-launcher>).
* **Mods** : a [mod](</docs/en/plugins/mods/overview>) is a plugin that runs its own code inside Claude Code, and a process that a mod starts runs outside the sandbox. See [What a mod can reach](</docs/en/plugins/mods/overview#what-a-mod-can-reach>).
Effective sandboxing requires both filesystem and network isolation. Without network isolation, a compromised agent could exfiltrate sensitive files like SSH keys. Without filesystem isolation, whether from a permissive policy or from disabling the filesystem layer, a compromised agent could backdoor system resources to gain network access. When you widen the defaults, check that an `allowWrite` path, a broad `allowedDomains` entry, or an `excludedCommands` exception does not undo a restriction on the other side.
--- a/security.md
+++ b/security.md
@@ -154,7 +154,7 @@
* Review all suggested changes before approval
* Use project-specific permission settings for sensitive repositories
- * Consider using [dev containers](</docs/en/devcontainer>) for additional isolation
+ * For additional isolation, run the whole Claude Code (local mode) process inside the [sandbox runtime](</docs/en/sandbox-environments#sandbox-runtime>) or a [dev container](</docs/en/devcontainer>)
* Regularly audit your permission settings with `/permissions`
###
--- a/self-hosted-environments-deploy.md
+++ b/self-hosted-environments-deploy.md
@@ -11,6 +11,7 @@
A self-hosted runner executes arbitrary, model-directed code on your infrastructure on behalf of everyone who can dispatch a session to its environment. That’s any member of your Anthropic organization, and anyone who can start a [Claude Tag](<https://claude.com/docs/claude-tag/overview>) channel session in a scope an Owner routed to the environment. Work through each item before you connect an environment to production systems:
* **Ephemeral, per-session containers** : run each runner process in a fresh container or VM that’s destroyed when the process exits, with `--capacity 1` and the default `--drain-grace-sec 0` so each container serves exactly one session. At a higher capacity, or with a positive drain grace, one container serves multiple sessions from the same [locked owner](</docs/en/self-hosted-environments#key-concepts>); see [Runner lifecycle](</docs/en/self-hosted-environments#runner-lifecycle>). Don’t reuse a filesystem between runner restarts, except in the deliberate pre-warmed checkout setup, and never across owners.
+ * When the runner stops a session, it sends no signal to a process still running after its shell command exited, such as a service that daemonized. Destroying the container or VM ends that process.
* **No broad credentials in the image** : don’t include long-lived SSH keys, cloud-provider credentials, or personal access tokens that grant more than a session needs. Mint credentials used during a session, such as push or API tokens, per session from your [wrapper script](</docs/en/self-hosted-environments-configuration#wrapper-scripts>). For the initial clone, which happens before the wrapper runs, use a [`checkout` lifecycle hook](</docs/en/self-hosted-environments-configuration#checkout>) or `--use-anthropic-git-proxy`; see Configure git.
* **Keep the environment secret off session-running hosts** : the environment secret can register runners and pick up any session queued on the environment. On a fixed fleet it lives on every runner host, where any session’s code can read the secret file. Prefer [on-demand runners](</docs/en/self-hosted-environments-configuration#on-demand-runners>), where the secret stays on the orchestrator host, which never runs user code, and each runner receives a single-use work order that registers exactly one runner. On a fixed fleet, treat the environment-secret file as readable by every session and rotate the secret after any suspected session compromise.
* **Default-deny network egress** : restrict runner and session container outbound traffic at your own network boundary on every environment; Default-deny egress covers what to allow and why.
@@ -385,11 +386,24 @@
Shutdown timing
-On `SIGTERM`, the runner stops taking new work and, unless you set `--defer-shutdown-max-min`, waits up to `--drain-wait-sec`, zero by default, for in-flight turns to finish, terminates each session’s process tree, and runs the [`post-session` lifecycle hook](</docs/en/self-hosted-environments-configuration#post-session>). That process tree includes commands Claude was still running in the session. The full drain path needs up to `--session-stop-grace-sec` \+ `--drain-wait-sec` \+ `--post-session-hook-timeout-sec`, plus 15 seconds of fixed overhead for process cleanup, plus 30 more seconds when [`--push-outcome-on-release`](</docs/en/self-hosted-environments-reference#runner-cli-flags>) is set. That is 80 seconds at defaults, and the runner logs the total at startup. Sessions drain in parallel under this one budget, so the total doesn’t grow with `--capacity`. At the default `--drain-wait-sec 0`, a rolling restart interrupts in-flight turns; each session resumes on another runner, losing unpushed work as described under Known issues. Set `--drain-wait-sec`, and raise the grace period to match, to let turns finish first. Throughout that whole path, the runner keeps heartbeating to the control plane at zero capacity, so the session lease doesn’t expire and get requeued to another runner while the `post-session` hook is still writing out uncommitted work. The heartbeat stops just before the runner deregisters. Give the runner at least the total it logs at startup before the host stops it. Where you set that depends on how your hosts stop:
-
- * **With a`SIGTERM` grace period**: set `terminationGracePeriodSeconds` on Kubernetes, `stop_grace_period` on Docker Compose, or your orchestrator’s equivalent to at least that total. The Kubernetes default of 30 seconds is shorter than the runner’s drain path, so Kubernetes stops the pod before the runner finishes draining.
- * **With[`--retire-at`](</docs/en/self-hosted-environments-reference#runner-cli-flags>)**: size the margin between the retire time and the host’s stop time to cover typical turns, plus the background-task hold that [Runner lifecycle](</docs/en/self-hosted-environments#runner-lifecycle>) describes, plus that same total. Compute the retire time at each launch, for example `date +%s` plus the runner’s intended lifetime.
- * **With`--defer-shutdown-max-min`**: add two more parts to the drain-path total. The first is the minutes you configure. The second is the post-release grace that Defer the drain past the first signal describes, 75 seconds at defaults. With the flag set, the runner also prints the combined figure at startup, after the drain-path total.
+After `SIGTERM`, a runner needs time to shut its sessions down cleanly before your orchestrator kills it. It logs how long at startup, in a line that contains `This runner needs up to 80s` at default settings. Set your orchestrator’s stop timeout to at least that many seconds: `terminationGracePeriodSeconds` on Kubernetes, `stop_grace_period` on Docker Compose, or your platform’s equivalent. Kubernetes defaults to 30 seconds, so without this setting it can stop the pod before the runner finishes. On `SIGTERM`, the runner stops accepting new sessions. It then begins a graceful shutdown, called a drain, unless you set `--defer-shutdown-max-min` to delay it. The drain has three steps:
+
+ 1. The runner waits up to [`--drain-wait-sec`](</docs/en/self-hosted-environments-reference#runner-cli-flags>) seconds, `0` by default, for turns still running to finish.
+ 2. It terminates each session’s process tree, including any command Claude was still running, but not a process still running after its shell command exited.
+ 3. It runs the [`post-session` lifecycle hook](</docs/en/self-hosted-environments-configuration#post-session>).
+
+The runner keeps polling Anthropic throughout the drain. That keeps its sessions assigned to it, so another runner doesn’t pick one up while your `post-session` hook is still saving uncommitted work. Because `--drain-wait-sec` defaults to `0`, a rolling restart cuts off any turn that’s still running, and the session resumes on another runner without its unpushed work. To let turns finish first, set `--drain-wait-sec` and raise your stop timeout to match. The logged time is the sum of these values:
+
+ * `--drain-wait-sec` for step 1, 0 seconds by default
+ * [`--session-stop-grace-sec`](</docs/en/self-hosted-environments-reference#runner-cli-flags>) for step 2, 5 seconds by default
+ * [`--post-session-hook-timeout-sec`](</docs/en/self-hosted-environments-reference#runner-cli-flags>) for step 3, 60 seconds by default
+ * A fixed 15 seconds of headroom
+ * 30 more seconds when [`--push-outcome-on-release`](</docs/en/self-hosted-environments-reference#runner-cli-flags>) is set
+
+At default settings that comes to 0 + 5 + 60 + 15 = 80 seconds. A higher `--capacity` doesn’t add to it, because the runner drains all of its sessions at the same time. Allow more time if you set either of these flags:
+
+ * **With[`--retire-at`](</docs/en/self-hosted-environments-reference#runner-cli-flags>)**: leave enough time between the retire time and the time the host stops for typical turns to finish, plus the wait for background tasks that [Runner lifecycle](</docs/en/self-hosted-environments#runner-lifecycle>) describes, plus the logged time. Compute the retire time at each launch, for example `date +%s` plus the runner’s intended lifetime.
+ * **With`--defer-shutdown-max-min`**: the stop timeout must also cover the minutes you configure and a further wait before the drain starts, 75 seconds at default settings. Defer the drain past the first signal explains both. The runner logs this longer time at startup too.
###
@@ -419,7 +433,7 @@
Size the stop timeout
-Give your host’s stop timeout at least the sum of three parts: the `n` minutes you configure, the post-release grace, and the full drain path that Shutdown timing describes. With default settings the post-release grace is 75 seconds and the drain path is 80 seconds, so allow `n` minutes plus 155 seconds. The runner prints this sum at startup whenever `--defer-shutdown-max-min` is set. If the stop timeout runs out before the runner finishes, the host kills the runner. The sessions it still holds get no `post-session` hook. The runner doesn’t deregister, and the control plane requeues the sessions within a few minutes. If you can’t give the stop timeout that sum, leave `--defer-shutdown-max-min` unset so the runner drains on the first signal instead.
+Give your host’s stop timeout at least the sum of three parts: the `n` minutes you configure, the post-release grace, and the drain that Shutdown timing describes. With default settings the post-release grace is 75 seconds and the drain takes up to 80 seconds, so allow `n` minutes plus 155 seconds. The runner prints this sum at startup whenever `--defer-shutdown-max-min` is set. If the stop timeout runs out before the runner finishes, the host kills the runner. The sessions it still holds get no `post-session` hook. The runner doesn’t deregister, and the control plane requeues the sessions within a few minutes. If you can’t give the stop timeout that sum, leave `--defer-shutdown-max-min` unset so the runner drains on the first signal instead.
###
@@ -429,9 +443,9 @@
The `post-session` hook and the Claude session child each run in their own POSIX process group, separate from the runner’s, so stop mechanisms reach them differently:
- * **A`SIGTERM` while the runner is already draining**: force-exits the runner immediately, skipping whatever remains of the drain path. Without `--defer-shutdown-max-min`, that is the second `SIGTERM` the runner receives. Nothing signals a mid-run `post-session` hook, so on a bare host where an init process adopts orphans, it finishes on its own, but unsupervised: its timeout budget no longer applies, and a write to the closed log pipe can kill it with `SIGPIPE`, so a hook that needs to survive a forced exit there should redirect its own output to a file. In the container recipes on this page the runner is the container’s PID 1 and its exit ends the container, and under systemd’s default `KillMode=control-group` the cgroup-wide kill reaches the hook too, as the **Cgroup-wide kills** entry describes; in both, treat a forced exit as fatal to the hook and rely on the grace period instead.
+ * **A`SIGTERM` while the runner is already draining**: force-exits the runner immediately, skipping whatever remains of the drain. Without `--defer-shutdown-max-min`, that is the second `SIGTERM` the runner receives. Nothing signals a mid-run `post-session` hook, so on a bare host where an init process adopts orphans, it finishes on its own, but unsupervised: its timeout budget no longer applies, and a write to the closed log pipe can kill it with `SIGPIPE`, so a hook that needs to survive a forced exit there should redirect its own output to a file. In the container recipes on this page the runner is the container’s PID 1 and its exit ends the container, and under systemd’s default `KillMode=control-group` the cgroup-wide kill reaches the hook too, as the **Cgroup-wide kills** entry describes; in both, treat a forced exit as fatal to the hook and rely on the grace period instead.
* **Process-group-wide signals** , such as `kill -- -<pid>` in a wrapper script, shell job control, or a group-wide watchdog: reach the runner and a mid-`checkout`-hook subprocess, which stays group-attached deliberately, but not a mid-run `post-session` hook or the session child.
- * **Cgroup-wide kills** , such as systemd’s default `KillMode=control-group` or the `SIGKILL` Kubernetes delivers to the whole container when `terminationGracePeriodSeconds` expires: reach everything, including the hook. Process-group isolation doesn’t protect against these, which is why the grace period must cover the full drain path.
+ * **Cgroup-wide kills** , such as systemd’s default `KillMode=control-group` or the `SIGKILL` Kubernetes delivers to the whole container when `terminationGracePeriodSeconds` expires: reach everything, including the hook. Process-group isolation doesn’t protect against these, which is why the grace period must cover the whole drain.
* **The hook’s own timeout** : when a hook exceeds `--post-session-hook-timeout-sec`, the runner sends `SIGTERM` to the hook’s whole process group, then `SIGKILL` two seconds later, so a worker the hook forked, such as tar, rsync, or git, terminates with the wrapper shell instead of surviving as an orphan. The runner’s supervision ends once the hook’s stdio closes: a worker that redirected its own output to a file and outlives the `SIGTERM` stage is past the runner’s reach.
When the drain starts, and again on a forced exit, the runner logs how many `post-session` hooks are still running, so you can tell a quiet drain from one that’s mid-snapshot.
--- a/self-hosted-environments-testing.md
+++ b/self-hosted-environments-testing.md
@@ -98,7 +98,7 @@
Example script
-The script below runs the full loop against `$CLAUDE_TEST_ENVIRONMENT_ID`, your test environment’s `ccpool_...` ID, shown in the environment’s detail dialog on the admin page or returned by the create-environment call, and asserts on a sentinel phrase in each reply. Run it from a git checkout of the repository you want the session to work in, after starting a runner on this host with the capture hook installed and `E2E_REPLY_DIR` exported.
+The script below runs the full loop against `$CLAUDE_TEST_ENVIRONMENT_ID`, your test environment’s `ccpool_...` ID, shown in the environment’s detail dialog on the admin page or returned by the create-environment call, and asserts on a sentinel phrase in each reply. Run it from a git checkout of the repository you want the session to work in, after starting a runner on this host with the capture hook installed and `E2E_REPLY_DIR` exported. First sign in with a claude.ai account on the machine that runs the script, as Authenticate from CI describes. Without that sign-in, the first dispatch fails with an error such as `Unable to get organization UUID for cloud session creation`.
#!/usr/bin/env bash
# End-to-end test against a self-hosted environment, using Stop-hook read-back.
--- a/server-managed-settings.md
+++ b/server-managed-settings.md
@@ -39,7 +39,7 @@
Open the admin console
-In the claude.ai console, go to [**Organization settings > Claude Code > Managed settings**](<https://claude.ai/admin-settings/claude-code>).If the link redirects you to a different Organization settings page instead of the Claude Code page, your account doesn’t have the required role. Admin and other non-Owner roles can’t view or edit managed settings, so ask an Owner or Primary Owner in your organization to make the change. See Access control.
+In the claude.ai console, go to [**Organization settings > Claude Code > Managed settings**](<https://claude.ai/admin-settings/claude-code>).In a Team or Enterprise organization, if the page says you don’t have access, ask an Owner or Primary Owner to make the change.
2
--- a/statusline.md
+++ b/statusline.md
@@ -1100,7 +1100,7 @@
}
}
-The command runs once per refresh tick and receives all visible subagent rows as a single JSON object on stdin. The input includes the [base hook fields](</docs/en/hooks#common-input-fields>), a `columns` field with the usable row width, and a `tasks` array. Each task has `id`, `name`, `type`, `status`, `description`, `label`, `startTime`, `model`, `effort`, `contextWindowSize`, `tokenCount`, `tokenSamples`, and `cwd`. The per-task `model` field is the resolved model ID the task runs on. `contextWindowSize` is that model’s context window in tokens, computed the same way as the main status line’s `context_window.context_window_size`, so you can render a per-row percentage from `tokenCount`. Both fields require Claude Code v2.1.205 or later and are omitted for a task whose model isn’t resolved yet. The per-task `effort` field is the reasoning effort set for that subagent, in its [definition frontmatter](</docs/en/sub-agents#supported-frontmatter-fields>) or on the individual invocation. The value is either one of the effort level strings `low`, `medium`, `high`, `xhigh`, or `max`, or a numeric token budget. The field reports the configured value as written: if the model doesn’t support that level, the effort Claude Code actually applies may differ. The field requires Claude Code v2.1.214 or later and is absent when the subagent inherits the session’s effort level. Write one JSON line to stdout per row you want to override, in the form `{"id": "<task id>", "content": "<row body>"}`. The `content` string is rendered as-is, including ANSI colors and OSC 8 hyperlinks. Omit a task’s `id` to keep the default rendering for that row; emit an empty `content` string to hide it. The same trust, `disableAllHooks`, and [`allowManagedHooksOnly`](</docs/en/settings-reference#allowmanagedhooksonly>) gates that apply to `statusLine` apply here. Plugins can ship a default `subagentStatusLine` in their [`settings.json`](</docs/en/plugins/manifest-reference#standard-layout>), but unlike hooks, plugin values don’t run under `allowManagedHooksOnly` even when the plugin is force-enabled in managed settings `enabledPlugins`.
+The command runs once per refresh tick and receives all visible subagent rows as a single JSON object on stdin. The input includes the [base hook fields](</docs/en/hooks#common-input-fields>), a `columns` field with the usable row width, and a `tasks` array. Each task has `id`, `name`, `type`, `status`, `description`, `label`, `startTime`, `model`, `effort`, `contextWindowSize`, `tokenCount`, `tokenSamples`, and `cwd`. The per-task `model` field is the resolved model ID the task runs on. `contextWindowSize` is that model’s context window in tokens, computed the same way as the main status line’s `context_window.context_window_size`, so you can render a per-row percentage from `tokenCount`. Both fields require Claude Code v2.1.205 or later and are omitted for a task whose model isn’t resolved yet. The per-task `effort` field is the reasoning effort set for that subagent, in its [definition frontmatter](</docs/en/sub-agents#supported-frontmatter-fields>) or on the individual invocation. The value is either one of the effort level strings `low`, `medium`, `high`, `xhigh`, or `max`, or a numeric token budget. The field reports the configured value as written: if the model doesn’t support that level, the effort Claude Code actually applies may differ. The field requires Claude Code v2.1.214 or later and is absent when no level is set for the subagent. Write one JSON line to stdout per row you want to override, in the form `{"id": "<task id>", "content": "<row body>"}`. The `content` string is rendered as-is, including ANSI colors and OSC 8 hyperlinks. Omit a task’s `id` to keep the default rendering for that row; emit an empty `content` string to hide it. The same trust, `disableAllHooks`, and [`allowManagedHooksOnly`](</docs/en/settings-reference#allowmanagedhooksonly>) gates that apply to `statusLine` apply here. Plugins can ship a default `subagentStatusLine` in their [`settings.json`](</docs/en/plugins/manifest-reference#standard-layout>), but unlike hooks, plugin values don’t run under `allowManagedHooksOnly` even when the plugin is force-enabled in managed settings `enabledPlugins`.
##
--- a/structured-outputs.md
+++ b/structured-outputs.md
@@ -44,7 +44,7 @@
Quick start
-To use structured outputs, define a [JSON Schema](<https://json-schema.org/understanding-json-schema/about>) describing the shape of data you want, then pass it to `query()` via the `outputFormat` option (TypeScript) or `output_format` option (Python). When the agent finishes, the result message includes a `structured_output` field with validated data matching your schema. The example below asks the agent to research Anthropic and return the company name, year founded, and headquarters as structured output.
+To use structured outputs, define a [JSON Schema](<https://json-schema.org/understanding-json-schema/about>) describing the shape of data you want, then pass it to `query()` via the `outputFormat` option (TypeScript) or `output_format` option (Python). When the agent finishes, the result message includes a `structured_output` field with validated data matching your schema. Before running the examples on this page, install the Claude Agent SDK by following the [quickstart](</docs/en/agent-sdk/quickstart#setup>). The example below asks the agent to research Anthropic and return the company name, year founded, and headquarters as structured output.
TypeScript
@@ -358,7 +358,7 @@
Error handling
-Structured output generation can fail when the agent cannot produce valid JSON matching your schema. This typically happens when the schema is too complex for the task, the task itself is ambiguous, or the agent hits its retry limit trying to fix validation errors. It can also happen without any validation failure: a [model fallback](</docs/en/model-config#automatic-model-fallback>) can retract an already-completed output mid-stream, and if no retry replaces it the run ends with the same error. Check the `errors` list on the result message to tell the two causes apart before debugging your schema. When an error occurs, the result message has a `subtype` indicating what went wrong:
+Structured output generation can fail when the agent cannot produce valid JSON matching your schema. This typically happens when the schema is too complex for the task, the task itself is ambiguous, or the agent hits its retry limit trying to fix validation errors. It can also happen without any validation failure: a [model fallback](</docs/en/model-config#automatic-model-fallback>) can retract an already-completed output mid-stream, and if no retry replaces it the run ends with the same error. Check the `errors` list on the error result message to tell the two causes apart before debugging your schema. When an error occurs, the result message has a `subtype` indicating what went wrong:
Subtype| Meaning
---|---
--- a/sub-agents.md
+++ b/sub-agents.md
@@ -237,7 +237,7 @@
Field| Required| Description
---|---|---
-`name`| Yes| Unique identifier, such as `code-reviewer` or `reviewer-v2`. [Hooks](</docs/en/hooks#subagentstart>) receive this value as `agent_type`. The filename doesn’t have to match. Names can’t contain `:`, which is reserved for [plugin-scoped identifiers](</docs/en/plugins/overview>) such as `my-plugin:reviewer`. Claude Code doesn’t load a file whose name contains one and logs an error to the debug log. Before v2.1.218, such names were accepted
+`name`| Yes| Unique identifier of at most 256 characters, such as `code-reviewer` or `reviewer-v2`. [Hooks](</docs/en/hooks#subagentstart>) receive this value as `agent_type`. The filename doesn’t have to match. Names can’t contain `:`, which is reserved for [plugin-scoped identifiers](</docs/en/plugins/overview>) such as `my-plugin:reviewer`
`description`| Yes| When Claude should delegate to this subagent
`tools`| No| Tools the subagent can use, as a comma-separated string such as `Read, Grep, Bash` or a YAML list. Inherits every tool available to subagents if omitted. If no entry in the list resolves to a tool, the subagent usually [fails to launch](</docs/en/errors#agent-would-be-spawned-with-zero-tools>) with an error naming the entries. To preload Skills into context, use the `skills` field rather than listing `Skill` here
`disallowedTools`| No| Tools to deny, removed from inherited or specified list. Same format as `tools`. An entry with a specifier, such as `Bash(git push *)`, still removes the whole tool
@@ -250,7 +250,7 @@
`memory`| No| Persistent memory scope: `user`, `project`, or `local`. Enables cross-session learning
`background`| No| Set to `true` to keep this subagent in the background even when Claude asks to run it in the foreground. Where fork mode is on, Claude Code already runs the subagents Claude spawns in the background
`omitClaudeMd`| No| Set to `true` to launch this subagent without the user, project, and local CLAUDE.md files; [managed policy files](</docs/en/memory#how-claude-md-files-load>) still load, except for managed subagents. Use it for subagents that take everything they need from the delegation prompt. Ignored when the agent runs as the main session agent via `--agent` or the `agent` setting. Requires Claude Code v2.1.271 or later
-`effort`| No| Effort level when this subagent is active. Overrides the session effort level. Default: inherits from session. Options: `low`, `medium`, `high`, `xhigh`, `max`; available levels depend on the model
+`effort`| No| Effort level when this subagent is active. Overrides the session effort level, but not the [`CLAUDE_CODE_EFFORT_LEVEL`](</docs/en/env-vars#variables>) environment variable. Options: `low`, `medium`, `high`, `xhigh`, `max`; available levels depend on the model
`isolation`| No| Set to `worktree` to run the subagent in a temporary [git worktree](</docs/en/worktrees>), giving it an isolated copy of the repository branched by default from your [default branch](</docs/en/worktrees#choose-the-base-branch>) rather than the parent session’s `HEAD`. The worktree is automatically cleaned up if the subagent makes no changes
`color`| No| Display color for the subagent in the task list and transcript. Accepts `red`, `blue`, `green`, `yellow`, `purple`, `orange`, `pink`, or `cyan`
`initialPrompt`| No| Auto-submitted as the first user turn when this agent runs as the main session agent (via `--agent` or the `agent` setting). [Commands](</docs/en/commands>) and [skills](</docs/en/skills>) are processed. Prepended to any user-provided prompt. Ignored for plugin subagents
@@ -275,7 +275,7 @@
* **No`name`**: Claude Code treats the file as documentation kept beside your agents.
* **An opening`---` that isn’t the file’s first line**: Claude Code reads the file as having no frontmatter and treats it as documentation.
- * **A`name` that starts with `-` or contains `:`**: Claude Code skips the file and writes an error to the debug log. See the `name` row in the table above.
+ * **A`name` that starts with `-`, contains `:`, or is longer than 256 characters**: Claude Code skips the file and writes an error to the debug log.
* **A`name` but no `description`**: Claude Code skips the file and writes the reason to the debug log.
* **YAML that doesn’t parse** : Claude Code reads no fields from the file, skips it, and writes the parse error to the debug log.
--- a/typescript.md
+++ b/typescript.md
@@ -173,8 +173,13 @@
console.error("Claim failed:", error.message);
});
- for await (const message of claimedQuery) {
- console.log(message);
+ try {
+ for await (const message of claimedQuery) {
+ console.log(message);
+ }
+ } catch (error) {
+ // After a refused claim, the claimed query throws once it has yielded the error result
+ console.error(`Session ended with an error: ${error}`);
}
###
@@ -725,7 +730,7 @@
`accountInfo()`| Returns account information
`reconnectMcpServer(serverName)`| Reconnect an MCP server by name. If the name also matches an entry in a settings file such as `.mcp.json` or `~/.claude.json`, Claude Code reconnects the server you configured through `mcpServers` or `setMcpServers()`, not the settings-file entry. That resolution order requires Claude Code v2.1.257 or later
`toggleMcpServer(serverName, enabled)`| Enable or disable an MCP server by name, with the same name resolution as `reconnectMcpServer()`. Disabling a server disconnects it and removes its tools. See `toggleMcpServer()` for the Claude Code version this needs for each kind of server
-`setMcpServers(servers)`| Dynamically replace the set of MCP servers for this session. Resolves with an `McpSetServersResult` naming which servers were added and removed, and any errors
+`setMcpServers(servers)`| Replace the MCP servers this method manages: servers added through it and in-process SDK servers. Resolves with an `McpSetServersResult` naming which servers were added and removed, and any errors; that section says which other servers stay connected
`readMcpResource(serverName, uri)`| _Alpha._ Reads one MCP Apps `ui://` resource from a connected MCP server so your application can render a tool’s widget. Resolves with an `SDKControlMcpReadResourceResponse`. Requires TypeScript Agent SDK v0.3.280 or later
`streamInput(stream)`| Stream input messages to the query for multi-turn conversations
`stopTask(taskId)`| Stop a running background task by ID
@@ -844,7 +849,7 @@
`exited`| Settles when the process exits, claimed or not. Replace a spare that exits before you claim it
`close()`| Terminate the process. Before a claim this discards the spare and rejects `claimed`
-`options.cwd` is required. A claim can also set `additionalDirectories`, `model`, `permissionMode`, `maxThinkingTokens`, a flag-settings overlay in `settings`, `appendSystemPrompt`, `title`, `agents`, and per-session tokens in `env`. Claude Code can refuse a claim, for example for a folder that doesn’t exist or one whose project settings set `env`, `agent`, or `model`. When `claimed` rejects with a message that starts with `option_not_applied`, the session is running without the `model` or `maxThinkingTokens` you asked for. After any other rejection your prompt hasn’t run, so start the session with `query()` instead.
+`options.cwd` is required. A claim can also set `additionalDirectories`, `model`, `permissionMode`, `maxThinkingTokens`, a flag-settings overlay in `settings`, `appendSystemPrompt`, `title`, `agents`, and per-session tokens in `env`. Claude Code can refuse a claim, for example for a folder that doesn’t exist or one whose project settings set `env`, `agent`, or `model`. After a refusal, a prompt that `claim()` already sent gets an error result whose text starts with `not_claimed`, and the returned query then throws. Wrap the query’s loop in a try block to continue past the throw. When `claimed` rejects with a message that starts with `option_not_applied`, the session is running without the `model` or `maxThinkingTokens` you asked for. After any other rejection your prompt hasn’t run, so start the session with `query()` instead.
###
@@ -1307,7 +1312,7 @@
`mcpServer`| `{ name: string; source: string }`| For an `mcp__*` tool, the MCP server that serves it and where that server’s definition came from, with the fields of `McpServerProvenance`. Absent for other tools. Requires Agent SDK v0.3.274 or later
`decisionReason`| `string`| Explains why this permission request was triggered
`defaultToNo`| `boolean`| When `true`, a single stray keystroke must not approve this request: open your prompt on its decline option, don’t pre-select approve, and offer no one-key approve shortcut. Requires Agent SDK v0.3.268 or later
-`suppressAlwaysAllowRule`| `boolean`| When `true`, don’t offer a persistent always-allow choice for this request, because the rule it would write grants more than the request’s own action. Requires Agent SDK v0.3.268 or later
+`suppressAlwaysAllowRule`| `boolean`| When `true`, don’t offer a persistent always-allow choice for this request. Requires Agent SDK v0.3.268 or later
`toolUseID`| `string`| Unique identifier for this specific tool call within the assistant message
`agentID`| `string`| If running within a sub-agent, the sub-agent’s ID
`requestId`| `string`| The `control_request` envelope’s `request_id`. A `control_response` your application sends outside the SDK, such as a signed HTTP POST, must echo this value so the Claude Code process can match the reply to the request
@@ -5337,7 +5342,7 @@
| { type: "enabled"; budgetTokens?: number; display?: ThinkingDisplay } // Fixed thinking token budget
| { type: "disabled" }; // No extended thinking
-The optional `display` field controls whether thinking text is returned `"summarized"` or `"omitted"`. On Claude Opus 4.7 and later, the API default is `"omitted"`, so set `"summarized"` to receive thinking content in `thinking` blocks. Claude Code doesn’t send `display` to Amazon Bedrock or Google Cloud’s Agent Platform, so on those providers Opus 4.7 and later return empty `thinking` blocks even when you set `display` to `"summarized"`.
+The optional `display` field controls whether thinking text is returned `"summarized"` or `"omitted"`. On Claude Opus 4.7 and later, the API default is `"omitted"`, so set `"summarized"` to receive thinking content in `thinking` blocks. Claude Code leaves `display` out of requests to some providers, such as Amazon Bedrock and Google Cloud’s Agent Platform. On those providers, Opus 4.7 and later return empty `thinking` blocks even when you set `display` to `"summarized"`.
###
@@ -5404,8 +5409,8 @@
When you call `setMcpServers()`, Claude Code applies these rules:
- * **Servers the call doesn’t name** : Claude Code keeps plugin-provided servers running. Requires Agent SDK v0.3.210 or later.
- * **Servers the call names** : except for built-in servers the CLI started at startup, Claude Code replaces a running server only when its config differs from the one you passed.
+ * **Servers the call doesn’t name** : outside a [cloud session](</docs/en/claude-code-on-the-web>), Claude Code disconnects the servers an earlier `setMcpServers()` call added and the in-process SDK servers, and lists them in `removed`. Other servers keep running and aren’t listed in `removed`, among them the stdio, HTTP, and SSE servers from the `mcpServers` option, servers from settings files, and plugin-provided servers.
+ * **Servers the call names** : Claude Code replaces a stdio, HTTP, or SSE server that an earlier `setMcpServers()` call added only when its config differs from the one you passed. An in-process SDK server already registered under that name stays as it is, so to swap one, leave it out of one call and add it in the next.
* **Built-in servers the CLI started at startup** : if the call names one, Claude Code drops that entry and reports it in `errors`.
The promise resolves after newly added stdio, HTTP, and SSE servers connect or fail, so tools from servers that connected are available on the next turn. `added` lists the servers Claude Code added or replaced, whether or not they connected. A server that failed to connect appears in both `added` and `errors`, with the failure text under `errors` and a `failed` row in `mcpServerStatus()`. Before Claude Code v2.1.257, a server whose connection attempt threw was reported only under `errors`.
--- a/vs-code.md
+++ b/vs-code.md
@@ -508,7 +508,7 @@
`environmentVariables`| `[]`| Set environment variables for the Claude process. Use Claude Code settings instead for shared config. A [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>) entry applies only when its value is an absolute path; the extension doesn’t expand `~` and ignores a relative value.
`disableLoginPrompt`| `false`| Skip authentication prompts (for third-party provider setups)
`allowDangerouslySkipPermissions`| `false`| Adds Bypass permissions to the mode selector. Use it only in sandboxes with no internet access.
-`claudeProcessWrapper`| -| Executable used to launch the Claude process. The bundled binary path is passed as an argument when present. Set this to a separately installed `claude` binary if the extension build doesn’t include one for your platform. In a wrapped setup, conversations start in Manual mode unless you set `initialPermissionMode` or picked Manual, Edit automatically, or Auto in an earlier conversation, because the extension skips the settings and built-in-default steps there; see [Switch permission modes](</docs/en/permission-modes#switch-permission-modes>). An “Unsupported platform” error at activation means no binary is bundled for your platform; see [which platforms have prebuilt binaries](</docs/en/troubleshoot-install#native-binary-not-found-after-npm-install>).
+`claudeProcessWrapper`| -| Executable used to launch the Claude process. The bundled binary path is passed as an argument when present. Set this to a separately installed `claude` binary if the extension build doesn’t include one for your platform.
##
--- a/worktrees.md
+++ b/worktrees.md
@@ -1,4 +1,4 @@
-A [git worktree](<https://git-scm.com/docs/git-worktree>) is a separate working directory with its own files and branch, sharing the same repository history and remote as your main checkout. Running each Claude Code session in its own worktree means edits in one session never touch files in another, so one session can build a feature while a second fixes a bug.
+A [git worktree](<https://git-scm.com/docs/git-worktree>) is a separate working directory with its own files and branch, sharing the same repository history and remote as your main checkout. Running each Claude Code session in its own worktree gives it a separate copy of the files to edit, so one session can build a feature while a second fixes a bug.
Worktrees require a git repository; for other version control systems, configure hooks to replace the git logic. In the [desktop app](</docs/en/desktop#work-in-parallel-with-sessions>), select the **worktree** option when you start a session to give it its own worktree.
@@ -82,7 +82,7 @@
* **Git redirects** : Claude Code blocks a Bash or Monitor command that redirects git into the main checkout. The redirect can come through `git -C`, `--git-dir`, a `GIT_DIR` or `GIT_WORK_TREE` variable, or a `cd` into the main checkout before running git.
* **Command shape** : Claude Code blocks a Bash or Monitor command when it can’t verify from the command text that any git the command runs stays inside the worktree. That happens, for example, when the command name is computed at runtime, when the syntax can’t be parsed, or when an expansion such as `${!name}` or `${ command; }` could run a command the text doesn’t spell out. Claude Code tells Claude how to rewrite the refused command, such as splitting it into plain, separate commands. You can’t turn this check off.
-The checks apply to the repository you launched Claude Code from. They also cover the main checkout a linked worktree is linked from. For PowerShell commands, Claude Code applies only the working-directory check. Claude sees each refusal as a tool error that names the worktree and says how to proceed. For a refused command, see [what the refusal message means and how to clear it](</docs/en/errors#command-blocked-by-the-worktree-isolation-checks>).
+These checks read the path an edit targets, the directory a command runs in, and the text of the command. None of them tracks which files a shell command writes, so a command that writes into the main checkout without running git there, such as `cp` or a shell redirect, isn’t refused by them. Claude Code treats that command like any other shell command, so whether it runs or prompts you depends on your [permission mode](</docs/en/permission-modes>) and rules. The checks apply to the repository you launched Claude Code from. They also cover the main checkout a linked worktree is linked from. For PowerShell commands, Claude Code applies only the working-directory check. Claude sees each refusal as a tool error that names the worktree and says how to proceed. For a refused command, see [what the refusal message means and how to clear it](</docs/en/errors#command-blocked-by-the-worktree-isolation-checks>).
##