Changes on
50 changes detected
--- a/admin-setup.md
+++ b/admin-setup.md
@@ -87,6 +87,7 @@
[Disable claude.ai sync](</docs/en/settings-reference#syncclaudeaiskills>)| Stop Claude Code from loading the [skills](</docs/en/skills#how-synced-skills-behave>) and [plugins](</docs/en/plugins/loading#synced-plugins>) your developers enable on claude.ai. If you turn off Skills for your organization on claude.ai, Claude Code stops syncing both, and on v2.1.273 or later it also removes the ones it already synced. To stop either one without turning Skills off, set its key to `false` in managed settings| `syncClaudeAiSkills`, `syncClaudeAiPlugins`
[Hook restrictions](</docs/en/settings-reference#allowmanagedhooksonly>)| Restrict which hooks run and restrict HTTP hook URLs; see [what runs under `allowManagedHooksOnly`](</docs/en/settings-reference#what-runs-under-allowmanagedhooksonly>) for the full effect list| `allowManagedHooksOnly`, `allowedHttpHookUrls`
[Login enforcement](</docs/en/settings-reference#forceloginmethod>)| Restrict login to a specific method or Anthropic organization. The method restriction applies across the VS Code extension, Agent SDK, `claude setup-token`, and `/install-github-app`, and the terminal’s interactive login screen, reached by `/login` or first-run onboarding, pre-selects the method without enforcing it; Claude Code verifies the organization for claude.ai account logins in the terminal, VS Code extension, and Agent SDK, and doesn’t check it for Claude Console logins or for [gateway](</docs/en/claude-apps-gateway>) sign-in. Before v2.1.212, only terminal logins applied either key. When set, sessions authenticated by `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, or `apiKeyHelper` are blocked at startup; cloud provider sessions aren’t affected unless one of those credentials, or an API key saved by an earlier Claude Console login, is also present| `forceLoginMethod`, `forceLoginOrgUUID`
+[Provider restrictions](</docs/en/settings-reference#allowedproviders>)| Limit which API providers a machine may use. A session on a provider that isn’t listed is refused at startup, at login, and when it next contacts the API. Requires Claude Code v2.1.285 or later| `allowedProviders`
[Disable agent view](</docs/en/agent-view#how-background-sessions-are-hosted>)| Turn off `claude agents`, `--bg`, `/background`, and the on-demand supervisor| `disableAgentView`
[Configure the corporate launcher](</docs/en/corporate-launcher>)| Prefix the [background-agent supervisor](</docs/en/agent-view#how-background-sessions-are-hosted>), its workers, and the [other covered background processes](</docs/en/corporate-launcher#what-the-launcher-covers>) with a required corporate launcher instead of turning agent view off| `processWrapper`
[Model restrictions](</docs/en/model-config#restrict-model-selection>)| `availableModels` filters which models appear in the picker. Adding `enforceAvailableModels` also constrains the auto-selected default model. See [surface coverage](</docs/en/model-config#surface-coverage>) for how this setting reaches the CLI, web, and IDE| `availableModels`, `enforceAvailableModels`
--- a/advisor.md
+++ b/advisor.md
@@ -79,13 +79,14 @@
Choose an advisor model
-The advisor must be at least as capable as the main model. The accepted advisors for each main model are:
+Both Claude Code and the API require an advisor at least as capable as the main model, and the two rank some models differently. The accepted advisors for each main model are:
Main model| Accepted advisors| Notes
---|---|---
Haiku 4.5| Fable, Opus, Sonnet| Haiku can call the advisor but cannot act as one
Sonnet 4.6| Fable, Opus, Sonnet|
-Sonnet 5.5 or Sonnet 5| Fable, Opus 4.7 or later, Sonnet 5 or later| A Sonnet 4.6 advisor is rejected, and the API refuses an Opus 4.6 advisor
+Sonnet 5| Fable, Opus 4.7 or later, Sonnet 5 or later| A Sonnet 4.6 advisor is rejected, and the API refuses an Opus 4.6 advisor
+Sonnet 5.5| Fable, Opus 5 or later, Sonnet 5.5| A Sonnet 4.6 advisor is rejected, and the API refuses a Sonnet 5, Opus 4.6, Opus 4.7, or Opus 4.8 advisor
Opus 4.6| Fable, Opus, Sonnet 5 or later| A Sonnet 4.6 advisor is rejected
Opus 4.7 or Opus 4.8| Fable, and Opus 4.7 or later| An Opus 4.6 or Sonnet advisor is rejected
Opus 5.5 or Opus 5| Fable, and Opus 5 or later| An Opus 4.6 or Sonnet advisor is rejected, and the API refuses an Opus 4.7 or Opus 4.8 advisor
--- a/agent-loop.md
+++ b/agent-loop.md
@@ -240,7 +240,7 @@
`"acceptEdits"`| Auto-approves file edits and common filesystem commands (`mkdir`, `touch`, `mv`, `cp`, etc.); other Bash commands follow default rules| You trust Claude’s edits and want faster iteration, such as during prototyping or when working in an isolated directory
`"plan"`| Claude explores and plans without editing your source files; file edits are never auto-approved and prompt through your `canUseTool` callback| You want Claude to propose changes without executing them, such as during code review or when you need to approve changes before they’re made
`"dontAsk"`| Never prompts. Tools pre-approved by [permission rules](</docs/en/settings-reference#permission-settings>) run, and so do calls that need no approval in `default` mode, such as file reads inside your working directories; every call that would otherwise prompt is denied. `AskUserQuestion`, connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), and MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) are denied even if you’ve allowed them| You want a fixed, explicit tool surface for a headless agent and prefer a hard deny over silent reliance on `canUseTool` being absent
-`"auto"`| Uses a model classifier to approve or deny permission prompts. See [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) for availability and behavior| Autonomous agents that still want safety guardrails on tool use
+`"auto"`| Uses a model classifier to review actions such as shell commands and network requests, allowing or blocking each one it reviews. See [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) for availability and the decision order| Autonomous agents that still want safety guardrails on tool use
`"bypassPermissions"`| Runs all allowed tools without asking, except tools matched by an explicit [`ask` rule](</docs/en/settings-reference#permission-settings>), connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), and tools that require user interaction. The [cross-session messaging safeguards](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>) still apply. See [How permissions are evaluated](</docs/en/agent-sdk/permissions#how-permissions-are-evaluated>) for the precedence order. In the TypeScript SDK, also requires `allowDangerouslySkipPermissions: true` in `options`. Can’t be used when running as root on Unix. Use only in isolated environments where the agent’s actions can’t affect systems you care about| CI, containers, or other isolated environments
For interactive applications, use `"default"` with a tool approval callback to surface approval prompts. For autonomous agents on a dev machine, `"acceptEdits"` auto-approves file edits and common filesystem commands (`mkdir`, `touch`, `mv`, `cp`, etc.) while still gating other `Bash` commands behind allow rules. Reserve `"bypassPermissions"` for CI, containers, or other isolated environments. See [Permissions](</docs/en/agent-sdk/permissions>) for full details.
--- a/agent-view.md
+++ b/agent-view.md
@@ -782,28 +782,6 @@
The terminal host died or the session stopped responding
The supervisor runs each background session’s terminal in its own host process. When that process dies or stops responding, Claude Code shows the reason and offers a restart; in both cases the conversation is saved and the restart resumes it. The [error reference](</docs/en/errors#terminal-host-process-died>) quotes the full messages. Claude Code never restarts a row running a shell command, from `Enter` or from `claude attach`, because that would run the command again; the row’s message and `claude attach` both say the command isn’t run again.
-
-####
-
-
-
-Terminal host died
-
-On Linux and WSL, the supervisor checks each host process every few seconds, whether or not you open the session, and marks the session failed when the process has exited but its connection to the supervisor never closed.
-
- * In agent view, the row shows `terminal host process died — press Enter to restart`. Press `Enter` on it and Claude Code restarts the session on a fresh host process.
- * From the shell, `claude attach <id>` restarts a session already marked failed. Otherwise it reports the cause and exits, telling you to run `claude attach <id>` again.
-
-####
-
-
-
-Session isn’t responding
-
-When the supervisor accepts an open but no output arrives for about ten seconds, Claude Code ends the attempt and offers a restart. A session that merely stalled, for example across machine sleep, doesn’t reach this offer: the supervisor restarts it on open itself.
-
- * In agent view, the footer shows `Press enter again to restart this session — it isn't responding (its conversation is saved and resumes).` Press `Enter` on the same row again and Claude Code stops the unresponsive process and restarts the session; it stops nothing without that second press.
- * From the shell, `claude attach <id>` reports the cause and exits, telling you to run `claude stop <id>`, then `claude attach <id>`.
###
--- a/amazon-bedrock.md
+++ b/amazon-bedrock.md
@@ -252,7 +252,15 @@
Startup model checks
-When Claude Code starts with Amazon Bedrock configured, it verifies that the models it intends to use are accessible in your account. If you have pinned a model version that is older than the current Claude Code default, and your account can invoke the newer version, Claude Code prompts you to update the pin. Accepting writes the new model ID to your [user settings file](</docs/en/settings>) and restarts Claude Code. Declining is remembered until the next default version change. Pins that point to an application inference profile ARN are skipped, since those are managed by your administrator. If you have not pinned a model and the current default is unavailable in your account, Claude Code falls back for the current session and shows a notice. It tries earlier versions of the default model first and, when the default is an Opus model and no Opus version is available, falls back to the default Sonnet model. The fallback is not persisted. Enable the newer model in your Amazon Bedrock account or pin a version to make the choice permanent. When you start the session on a specific Sonnet or Opus version, for example with `--model`, `ANTHROPIC_MODEL`, or the [`model` setting](</docs/en/settings-reference#model>), that version acts as the session’s pinned default for the matching `sonnet` or `opus` alias. Claude Code skips the availability check for the built-in default your model replaces and starts on the model you configured, with no fallback notice. Model aliases such as `opus` don’t act as pins, and neither does a model ID Claude Code doesn’t recognize, such as an application inference profile ARN.
+When Claude Code starts with Amazon Bedrock configured, it verifies that the models it intends to use are accessible in your account. If you have pinned a model version that is older than the current Claude Code default, and your account can invoke the newer version, Claude Code prompts you to update the pin. Accepting writes the new model ID to your [user settings file](</docs/en/settings>) and restarts Claude Code. Declining is remembered until the next default version change. Pins that point to an application inference profile ARN are skipped, since those are managed by your administrator. If you have not pinned a model and the current default is unavailable in your account, Claude Code falls back for the current session and shows a notice. It tries earlier versions of the default model first and, when the default is an Opus model and no Opus version is available, falls back to the default Sonnet model. The fallback is not persisted. Enable the newer model in your Amazon Bedrock account or pin a version to make the choice permanent. When you start the session on a specific Sonnet or Opus version, for example with `--model`, `ANTHROPIC_MODEL`, or the [`model` setting](</docs/en/settings-reference#model>), that version acts as the session’s pinned default for the matching `sonnet` or `opus` alias. Claude Code skips the availability check for the built-in default your model replaces and starts on the model you configured, with no fallback notice. Model aliases such as `opus` don’t act as pins, and neither does a model ID Claude Code doesn’t recognize, such as an application inference profile ARN. When these checks find a model your account can’t invoke, Claude Code remembers the refusal on this machine for up to a day, and launches during that time skip the remembered model without asking Amazon Bedrock again. Claude Code checks a remembered refusal of a current default model again at launch once ten minutes have passed since the last check, so a default your administrator re-enables comes back. To turn the memory off, set [`CLAUDE_CODE_SKIP_MODEL_ACCESS_MEMORY=1`](</docs/en/env-vars>).
+
+###
+
+
+
+When a model is disabled mid-session
+
+If your account loses access to the model your session is running on, for example because an administrator disables it in your Amazon Bedrock account, Claude Code switches the session to another model instead of failing each request, and shows `Switched to <fallback> because <model> is not available`. It tries the same models as the startup fallback: earlier versions of the same tier first and, for an Opus session with no Opus version available, the default Sonnet model. The switch applies only to a tier you haven’t pinned, the same condition as the startup fallback. A session on a specific version you picked, or on an application inference profile ARN, keeps its model and, without a fallback model chain, the request fails instead. In [auto mode](</docs/en/permission-modes#enable-auto-mode-on-bedrock-agent-platform-or-foundry>), Claude Code switches only to a model auto mode supports on Amazon Bedrock. If none of those models is available either, the request fails with [AWS authentication failed](</docs/en/errors#aws-authentication-failed>) and a hint to enable the model. A [fallback model chain](</docs/en/model-config#fallback-model-chains>) you configure replaces the tier switch: on these refusals Claude Code switches to your configured fallback instead. To have refused requests fail rather than switch, set [`CLAUDE_CODE_DISABLE_MODEL_ACCESS_FALLBACK=1`](</docs/en/env-vars>). A fallback chain you configured still switches on these refusals; remove the chain as well if you want every refused request to fail.
##
--- a/artifacts.md
+++ b/artifacts.md
@@ -354,7 +354,7 @@
[Environment variable](</docs/en/env-vars>)| Set `CLAUDE_CODE_DISABLE_ARTIFACT=1`
[Permission rule](</docs/en/permissions>)| Add `Artifact` to `permissions.deny`
-Once you turn artifacts off in a [`--settings`](</docs/en/cli-reference#cli-flags>) file or with `CLAUDE_CODE_DISABLE_ARTIFACT`, or your administrator turns them off in [managed settings](</docs/en/server-managed-settings>), no settings file turns them back on. Before v2.1.242, a file higher in the [precedence stack](</docs/en/settings#settings-precedence>) could turn artifacts back on even when a lower-precedence file set `"enableArtifact": false`. You can also set `"enableArtifact": false` in a project’s `.claude/settings.json` or `.claude/settings.local.json` to turn artifacts off for sessions in that project. An `"enableArtifact": true` in either file doesn’t turn them back on. Honoring the key in project and local settings requires Claude Code v2.1.242 or later. If you add a `WebFetch` deny or ask rule with no `domain:` part, it doesn’t turn artifacts off or block artifact reads. A [`WebFetch(domain:claude.ai)` rule in `deny` or `ask` does apply to artifact reads](</docs/en/permissions#allow-or-deny-every-fetch>).
+Once you turn artifacts off in a [`--settings`](</docs/en/cli-reference#cli-flags>) file or with `CLAUDE_CODE_DISABLE_ARTIFACT`, or your administrator turns them off in [managed settings](</docs/en/server-managed-settings>), no settings file turns them back on. You can also set `"enableArtifact": false` in a project’s `.claude/settings.json` or `.claude/settings.local.json` to turn artifacts off for sessions in that project. An `"enableArtifact": true` in either file doesn’t turn them back on. Honoring the key in project and local settings requires Claude Code v2.1.242 or later. If you add a `WebFetch` deny or ask rule with no `domain:` part, it doesn’t turn artifacts off or block artifact reads. A [`WebFetch(domain:claude.ai)` rule in `deny` or `ask` does apply to artifact reads](</docs/en/permissions#allow-or-deny-every-fetch>).
##
--- a/authentication.md
+++ b/authentication.md
@@ -183,6 +183,28 @@
* **`ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, or `apiKeyHelper`**: blocked at startup. Under `forceLoginOrgUUID`, organization membership can’t be verified for an environment credential, and under `forceLoginMethod` the credential would stand in for the required sign-in. When the managed settings also require the [gateway](</docs/en/claude-apps-gateway>) sign-in, Claude Code blocks an API key saved by an earlier Claude Console login the same way. See [Administrator policy requires a Cloud gateway sign-in](</docs/en/errors#administrator-policy-requires-a-cloud-gateway-sign-in>)
* **Cloud provider sessions such as Amazon Bedrock** : blocked only while an `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, or `apiKeyHelper` credential, or an API key saved by an earlier Claude Console login, is still present on the machine. Remove it and the session starts. These sessions authenticate against your cloud provider, whose access policies govern them
* **Anthropic profile or federation credentials** : not blocked unless an `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, or `apiKeyHelper` credential, or an API key saved by an earlier Claude Console login, is also present on the machine. The keys don’t check which organization the profile belongs to
+
+###
+
+
+
+Restrict which API providers a machine may use
+
+[`allowedProviders`](</docs/en/settings-reference#allowedproviders>) in [managed settings](</docs/en/managed-settings>) lists which services a managed machine may reach Claude through, such as the Anthropic API, Amazon Bedrock, or an LLM gateway. It complements `forceLoginMethod` and `forceLoginOrgUUID`, which govern which account a session uses when it talks to Anthropic. Requires Claude Code v2.1.285 or later.
+
+managed-settings.json
+
+ {
+ "forceLoginMethod": "claudeai",
+ "forceLoginOrgUUID": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"],
+ "allowedProviders": ["anthropic", "bedrock"]
+ }
+
+With this file, a developer signed in to your claude.ai organization or configured for Amazon Bedrock starts normally. A session set up for any other provider is refused at startup, and a running session that switches to one is refused on its next request. [Managed settings don’t allow this API provider](</docs/en/errors#managed-settings-dont-allow-this-api-provider>) shows each message.
+
+ * **Allow an LLM gateway or proxy** : list `"customEndpoint"` and set the gateway’s URL in the managed `env` block of the same source. The [settings reference](</docs/en/settings-reference#allowedproviders>) lists every value and says which endpoint variables need a managed `env` pin.
+ * **Deploy on managed machines** : put the list in the managed source that carries the rest of your policy. The entry’s [Scope note](</docs/en/settings-reference#allowedproviders>) says how a server-managed list combines with it.
+ * **Server-managed settings only** : a list you set only in [server-managed settings](</docs/en/server-managed-settings>) reaches only sessions that fetch your organization’s settings, so treat it as a convenience for machines you can’t reach with device management, not as enforcement. [Platform availability](</docs/en/server-managed-settings#platform-availability>) lists which sessions fetch them.
##
--- a/auto-mode-config.md
+++ b/auto-mode-config.md
@@ -247,11 +247,7 @@
Edit rules from `/permissions`
-To view and edit classifier rules without opening a settings file, run [`/permissions`](</docs/en/permissions#manage-permissions>) and select the **Auto mode** tab. The tab requires Claude Code v2.1.246 or later, and it appears only when [auto mode is available](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) to your session. The tab lists the `allow`, `soft_deny`, `hard_deny`, and `environment` entries from each of the scopes the classifier reads, and shows whether the built-in rules are in effect for each section. Claude Code shows entries from [managed settings](</docs/en/server-managed-settings>) or the `--settings` flag as read-only, and saves every change you make on the tab to `~/.claude/settings.json`. From the tab you can:
-
- * Add, edit, or delete rules in the `allow`, `soft_deny`, and `hard_deny` sections. When you add the first rule to a section, Claude Code also inserts `"$defaults"` so the built-in rules stay in effect.
- * Turn the built-in rules for `allow`, `soft_deny`, or `hard_deny` off or back on. Claude Code records the choice by adding or removing `"$defaults"` in your list for that section, so a section needs at least one rule of your own before you can turn its built-in rules off.
- * Edit the `environment` entries as one document in your editor. If you haven’t configured any `environment` entries yet, Claude Code first asks whether to replace the built-in environment, then opens the editor on the full built-in text. When you save, Claude Code replaces your `autoMode.environment` array with the document. Include the `"$defaults"` line to keep the built-in entries.
+To view and edit classifier rules and `environment` entries without opening a settings file, run [`/permissions`](</docs/en/permissions#manage-permissions>) and select the **Auto mode** tab. The tab requires Claude Code v2.1.246 or later, and it appears only when [auto mode is available](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) to your session. Claude Code shows entries from [managed settings](</docs/en/server-managed-settings>) or the `--settings` flag as read-only, and saves every change you make on the tab to `~/.claude/settings.json`.
##
Show diff (102 lines)
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,99 @@
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.286
+
+September 30, 2026
+
+ * Added a count such as “2 of 5” to the permission prompt when several permission requests stack up
+ * Added mouse support for the “N more” rows of lists in fullscreen mode: click one to jump to that end of the list, with hover and pressed states
+ * Fixed several Claude Code processes and IDE extensions each opening a login browser when gcpAuthRefresh or awsAuthRefresh credentials expire
+ * Fixed `claude --resume` and `--continue` sometimes losing every turn after a batch of parallel tool calls when the earlier session crashed or was killed
+ * Fixed API 400 errors after a tool or hook returned an object, number or boolean instead of text, including in resumed sessions
+ * Fixed cloud sessions with very large histories never waking up because the container was stopped while the transcript was still loading
+ * Fixed the Claude apps gateway’s spend meter pricing 1-hour prompt cache writes at the cheaper 5-minute rate, and counting only the first model call’s input tokens on streamed turns that run a server-side tool such as web search
+ * Fixed macOS sessions still showing “Not logged in” or “Login expired” after `/login` succeeds in another Claude Code window when a leftover `~/.claude/.credentials.json` exists
+ * Fixed every turn failing when the Anthropic API refuses the model your default or a model alias resolves to: Claude Code now retries once on the previous model of the same tier
+ * Fixed Remote Control sessions (including `claude remote-control`) staying connected after your organization’s policy turns Remote Control off; they now disconnect with a notice
+ * Fixed refusal and `--fallback-model` retries failing when the fallback model can’t run fast; they now run at standard speed, with a one-time notice in interactive sessions
+ * Fixed headless sessions repeating the “MCP servers require authentication” reminder after a successful re-authentication when the MCP discovery cache is enabled
+ * Fixed `claude auth status` reporting a Console sign-in’s stored API key as `claude.ai`; it now reports `api_key`, and the VS Code extension treats that session as an API key session
+ * Fixed `/status` listing an Anthropic profile beside an API key as if both were in effect; the profile is now marked as not in use
+ * Fixed Claude not being told when a file attached to a message sent over Remote Control did not arrive, and a file sometimes getting only 10 seconds for its last download try
+ * Fixed a Remote Control message that arrived while Claude Code was exiting being marked delivered and then never answered; it now stays queued for the session’s next run
+ * Fixed MCP error messages showing a credential’s value when “Bearer” or “Basic” came before its key name
+ * Fixed percent-encoded Bearer tokens being only partly masked in error messages
+ * Fixed redacted logs and transcripts showing a secret whose key name has an invisible character inside, such as a zero-width space
+ * Fixed logs and transcripts showing part of a URL password that contains punctuation such as `)`, quotes, `]`, `&` or a second `@`, or that runs past a `/` to a bracketed host such as `[::1]` in an ssh URL
+ * Fixed the session transcript in the zip that `/feedback` saves to disk containing invalid JSON lines after secret redaction
+ * Fixed MCP connectors listing no tools for up to a day after their server dropped the older MCP handshake
+ * Fixed a repeat MCP sign-in request from Claude replacing the pending sign-in link, which could stop that link from working
+ * Fixed `/usage` not crediting an MCP server for a tool call made while that server was still connecting or had only just connected, such as right after a restart
+ * Fixed plugins enabled on claude.ai occasionally going missing from Claude Code for a session after a transient server error
+ * Fixed a message typed into a running subagent showing twice in its transcript after the subagent read it
+ * Fixed subagent hand-back messages showing a raw task id instead of the agent’s name when the subagent had no registered name
+ * Fixed foreground subagents sometimes missing the task-tracking tools (TaskCreate/Get/Update/List, TodoWrite) in sessions that have them enabled
+ * Fixed subagents spawned with worktree isolation loading the project CLAUDE.md and its imports a second time from the worktree copy on their first file read
+ * Fixed Workflow tool subagents being restarted from their original prompt when a connection stalled for a few minutes mid-response
+ * Fixed `/compact`, `/clear`, and `/rewind` typed while viewing a background agent’s or teammate’s transcript silently acting on the main conversation: a dialog now names the target and asks first
+ * Fixed background jobs showing done while waiting for your approval
+ * Fixed the commit attribution reminder being re-sent inside tool output when a model fallback lasts only one turn
+ * Fixed a click on the space between words of a collapsed row (such as “Thought for 4s”) highlighting the row without expanding it in fullscreen mode
+ * Fixed a row with no details, such as an action row with a long name, pushing every other row’s details to the right in list screens
+ * Fixed files with very long names not reaching a cloud session when attached to it
+ * Fixed plugin errors for a marketplace Claude Code refuses to load: they now say why and how to fix it instead of “not found”
+ * Fixed `/plugin`’s Discover tab showing a marketplace name unquoted in its “Checking … for new plugins” line when its rows already show that name in quotes
+ * Improved commit guidance: when your project or user skills include one named `verify`, Claude is now told to run it right before committing, except for docs-only and tests-only commits
+ * Improved send now (ctrl+enter) in a subagent’s view: it now moves the subagent’s running command to the background so your message is read right away
+ * Improved replies from background agents to your messages so they no longer open with a separate recap of what you said
+ * Improved claude.ai artifact link reads: WebFetch now asks the same questions as the Artifact tool’s read (no artifact prompt while the session’s network access is on, one per artifact while it is off), and an auto-mode yes no longer counts where only you can answer
+ * Improved fetch, skill, file read, sandbox network, Claude in Chrome, workflow script and notebook edit permission prompts to match the look of file edit prompts
+ * Improved Bash, PowerShell and Monitor permission prompts to show the command between dashed lines, matching file edit prompts
+ * Improved list scrollbars in fullscreen mode: in most lists the bar no longer shifts as the “N more” rows come and go, and it now has ↑/↓ arrows you can click or hold to scroll
+ * Improved the external editor (Ctrl+G): editors that take a line number now open on the line your cursor is on in the prompt
+ * Improved slash command suggestion responsiveness while typing when many skills or plugin commands are installed; command descriptions now match by word prefix
+ * Improved the output style picker: it now opens on your current style instead of Default, with each style’s description on the line under its name; number keys no longer pick a style
+ * Improved `/hooks`: the closing line of a hook’s detail screen now says “this hook” instead of “it”
+ * Improved the model fallback notice and the autocompact-thrashing error to say when a fallback dropped the context window from 1M to 200K tokens
+ * Improved responsiveness of SDK and `-p` sessions when a host re-sends an MCP server enable for a server that is already connected
+ * Improved the protocol page a Claude apps gateway serves at `/protocol`: it now says not to reject unknown input and matches what Claude Code sends today
+ * Changed prompts sent while nothing is running or queued to show in the normal text color right away instead of gray
+ * Changed how failed API requests are retried: one limit now covers a whole model call, so with the default retry settings a failing call sends at most 14 requests
+ * Changed `--bare` to connect only the MCP servers named on the command line, send the model no system reminders, and start no background tasks; under `--bare`, a shell command that reaches its timeout now stops instead of moving to the background
+ * Changed the send-now key (ctrl+enter) to move a skill’s own shell command to the background instead of ending it
+ * Changed the WebFetch error for a rate-limited domain safety check to tell Claude not to retry it in a loop
+ * Changed plugin installs to refuse npm sources that are git repositories or folders, and to install plugin dependencies only from registry packages
+ * Changed list screens (`/artifacts`, `/mcp`, `/skills`, `/hooks` and others) to always line up each row’s details in one column after the names
+ * Changed the overflow rows of lists to read ”↑ N more” / ”↓ N more” instead of “N more above” / “N more below”
+ * Changed `/hooks` to open on one list of your configured hooks grouped by event, so viewing a hook takes one Enter instead of three
+ * Changed the theme picker to a scrolling list that fits your terminal instead of pushing the preview off screen; number keys no longer pick a theme
+ * Changed `/exit`’s Remove worktree to run after Claude Code stops the servers and shells it started there, which on Windows could keep the folder from being deleted
+ * Changed the `claude-api` skill’s Managed Agents examples to create environments with limited networking
+ * Removed the browser link from `/ultrareview` and `claude ultrareview` output
+ * Windows: Fixed `claude --bg` and the agents view refusing a folder that `claude` already trusts when its trust record was saved with different letter case
+ * [VSCode] Added bookmarks: save Claude’s responses and keep them in view in a Bookmarks side panel
+ * [VSCode] Added the questions Claude asks and your answers to the conversation: after you answer a question card, a Questions row shows each question with your picks
+ * [VSCode] Added option previews to question cards in the chat panel: the highlighted choice’s mockup or snippet shows beside or under the options
+ * [VSCode] Added rows under a message that open to the terminal output, browser tab, browser instructions and selected code sent with it
+ * [VSCode] Fixed a second copy of a conversation opening in a tab when it was already open in the side bar; the side bar now switches to it
+ * [VSCode] Fixed settings dialogs reporting a failed save, without re-checking, when Claude Code printed more than 1 MB of output
+ * [VSCode] Fixed an endless “Teleporting session…” spinner when the extension stops responding
+ * [VSCode] Improved the Manage plugins dialog: it says when a turned-off plugin is still on because of other settings, and explains a plugin folder clash
+ * [VSCode] Changed Stop and Escape to end only the current turn; background agents keep running and can be stopped one by one from the agent map
+ * [VSCode] Changed the ”✻ Claude Code” status bar item to show in every window, so you can open Claude when no file is open
+ * [Cloud sessions] Fixed an answered question card or approved tool call getting no reply when the session had gone idle after Claude sent a message
+ * [Cloud sessions] Fixed clearing an organization environment’s setup script in admin settings leaving new cloud sessions still running the old script
+ * [Cloud sessions] Fixed the Runner actions menu on the self-hosted environments admin page closing on its own a few seconds after it opened
+ * [Cloud sessions] Fixed routine runs whose cloud session never started showing as Succeeded in the Runs pane, the routine’s page and the sidebar; they now show as Failed
+ * [Cloud sessions] Fixed clicking an audio or video file in a cloud session’s Outputs card opening an empty file search instead of playing the file
+ * [Cloud sessions] Changed a routine’s page to read “Due” with the scheduled time, instead of a next run time in the past, when a scheduled run is late and hasn’t started
+ * [Claude Tag] Added an Add channel button to Claude Tag’s spend limits page in admin settings, so a limit can be set on any channel, including a private one, from its channel ID or Slack link
+ * [Claude Tag] Fixed memory recall finding nothing in organizations that cannot use the default Sonnet model
+ * [Claude Tag] Fixed a Slack channel losing its Claude settings when an Enterprise Grid admin moves it to another workspace and the first post afterward doesn’t mention Claude
+ * [Claude Tag] Fixed Claude in a Slack thread occasionally starting over on a fresh machine, losing work it hadn’t pushed, when your reply answered a question it had just asked
+ * [Claude Tag] Fixed public channel names on Claude Tag’s spend limits page in admin settings showing as raw Slack IDs in larger organizations
+ * [Claude Tag] Improved the titles of sessions started from Slack as shown on claude.ai: they now read as the words you typed, without Slack user IDs or escape codes
Show diff (106 lines)
--- a/claude-apps-gateway-config.md
+++ b/claude-apps-gateway-config.md
@@ -168,7 +168,7 @@
`upstreams`
-`upstreams` is an ordered list. The gateway forwards inference to the first upstream that resolves the requested model. On `5xx`, `429`, `401`, `403`, `404`, or timeout the gateway fails over to the next upstream; other `4xx` doesn’t, because those errors are attributable to the request rather than the upstream. A `401` or `403` means the gateway’s own credential failed against that upstream. A `404` means that upstream doesn’t serve the requested model, so a later upstream in the list still can. If you set `forward_user_identity: true` on an upstream, a `429` it returns to a request that carried the developer’s email doesn’t fail over. See how a per-user limit denial reaches the developer. Failover on `404` requires gateway v2.1.198 or later. Earlier releases returned the first `404` to the client even when a later upstream in the list served the model. Multiple upstreams of the same provider must set a distinct `name:`. Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, and Microsoft Foundry clients are built once at startup, and their SDKs refresh credentials internally, so rotating cloud credentials doesn’t require a restart. Static Anthropic API keys and bearers are read at startup; see Anthropic API.
+`upstreams` is an ordered list. The gateway forwards inference to the first upstream that resolves the requested model. On `5xx`, `429`, `401`, `403`, `404`, or timeout the gateway fails over to the next upstream; other `4xx` doesn’t, because those errors are attributable to the request rather than the upstream. A `401` or `403` means the credential the gateway used against that upstream failed. A `404` means that upstream doesn’t serve the requested model, so a later upstream in the list still can. If you set `forward_user_identity: true` on an upstream, a `429` it returns to a request that carried the developer’s email doesn’t fail over. See how a per-user limit denial reaches the developer. Failover on `404` requires gateway v2.1.198 or later. Earlier releases returned the first `404` to the client even when a later upstream in the list served the model. Multiple upstreams of the same provider must set a distinct `name:`. Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, and Microsoft Foundry clients are built once at startup, and their SDKs refresh credentials internally, so rotating cloud credentials doesn’t require a restart. Static Anthropic API keys and bearers are read at startup; see Anthropic API.
####
@@ -291,7 +291,66 @@
The gateway doesn’t support guardrail input tags. It adds no guard content tags to prompts, so a guardrail filter that Amazon Bedrock applies only to tagged input doesn’t run on traffic through the gateway. For which filters depend on input tags, see [input tags](<https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-tagging.html>) in the Amazon Bedrock documentation.
-Also grant the gateway’s AWS principal `bedrock:ApplyGuardrail` on the guardrail. Set `guardrail` on every `bedrock` upstream or on none. The gateway refuses to start on a mix, because failover could otherwise send a request to a Bedrock upstream that has no guardrail. The guardrail covers Bedrock upstreams only. If you list another provider in `upstreams`, the gateway sends requests to that provider without the guardrail. When a `/v1/messages` request whose body carries an `amazon-bedrock-*` field, such as `amazon-bedrock-guardrailConfig`, reaches a Bedrock upstream that has `guardrail` set, the gateway answers 400 instead of forwarding it.
+Also grant `bedrock:ApplyGuardrail` on the guardrail to the principal that signs this upstream’s requests: the gateway’s AWS principal, or with `assume_role` the role named in `role_arn`. Set `guardrail` on every `bedrock` upstream or on none. The gateway refuses to start on a mix, because failover could otherwise send a request to a Bedrock upstream that has no guardrail. The guardrail covers Bedrock upstreams only. If you list another provider in `upstreams`, the gateway sends requests to that provider without the guardrail. When a `/v1/messages` request whose body carries an `amazon-bedrock-*` field, such as `amazon-bedrock-guardrailConfig`, reaches a Bedrock upstream that has `guardrail` set, the gateway answers 400 instead of forwarding it.
+
+##### Bedrock in another AWS account
+
+Set `assume_role` on a Bedrock upstream and the gateway uses its own AWS identity only to call `sts:AssumeRole` on a role you name, which can be in a different AWS account from the gateway. Every Bedrock request from that upstream is signed with the one-hour credentials STS returns, so no long-lived access key crosses accounts. Requires a gateway running Claude Code v2.1.281 or later. An earlier gateway refuses to start when it finds the key.
+
+ upstreams:
+ - name: bedrock-isolated
+ provider: bedrock
+ region: us-east-1
+ auth: {} # the gateway's own role: it only calls STS
+ assume_role:
+ role_arn: arn:aws:iam::222222222222:role/claude-gateway-bedrock
+ # external_id: ${BEDROCK_ROLE_EXTERNAL_ID} # when the role's trust policy requires one
+
+The `assume_role` block takes three keys:
+
+Key| Meaning
+---|---
+`role_arn`| The IAM role the gateway assumes, as an `arn:aws:iam::` or `arn:aws-us-gov:iam::` ARN. Give it the Bedrock permissions this upstream needs, `bedrock:CountTokens` included, plus `bedrock:ApplyGuardrail` when the upstream sets `guardrail`.
+`external_id`| Optional. Sent as the external ID on every `sts:AssumeRole` call. Set it when the role’s trust policy requires one, and quote it if it’s all digits.
+`session_name`| Optional. `email` or `sub` gives each developer their own session: see Per-developer AWS cost attribution. Unset, every request uses one session named `claude-apps-gateway`.
+
+The role’s trust policy names the gateway’s own principal, such as its IRSA or ECS task role. That principal needs `sts:AssumeRole` on the role and no Bedrock permission of its own. Drop the `Condition` if you set no `external_id`.
+
+ {
+ "Version": "2012-10-17",
+ "Statement": [{
+ "Effect": "Allow",
+ "Principal": { "AWS": "arn:aws:iam::111111111111:role/claude-gateway" },
+ "Action": "sts:AssumeRole",
+ "Condition": { "StringEquals": { "sts:ExternalId": "your-external-id" } }
+ }]
+ }
+
+ * If STS refuses or is unreachable, the gateway doesn’t send the request with the upstream’s own credentials. It logs the STS error with what to check, then tries the next upstream you listed. Upstream error messages covers what the client receives when no upstream succeeds. A later upstream without `assume_role` would serve the request with its own credentials, so list one only if that is what you want.
+ * The gateway calls the regional STS endpoint `sts.<region>.amazonaws.com`, which its network must reach. For the FIPS endpoint, set `AWS_USE_FIPS_ENDPOINT=true` in the gateway’s environment rather than `use_fips_endpoint` in an AWS config file.
+ * `assume_role` applies to `provider: bedrock` only and needs SigV4 source credentials: the gateway refuses to start when it’s set beside `aws_bearer_token`.
+ * Every developer the gateway admits can use this upstream; `managed` governs which developers may use which models. To keep a model served through the role from also being served from another account, give it a custom id whose `upstream_model` map has only this upstream’s name. For such an id the gateway skips every other upstream, so neither the request nor the token count for an aborted request can fail over to another account. Built-in model names are still tried on every upstream in order, this one included, and a request that reaches it is signed with the same role, so list this upstream last unless its account should also serve them.
+
+This example gives one model a custom id that only the isolated upstream serves:
+
+ models:
+ - id: claude-opus-restricted # a custom id, not a built-in model name
+ upstream_model:
+ bedrock-isolated: us.anthropic.claude-opus-4-8 # the only upstream that serves it
+
+##### Per-developer AWS cost attribution
+
+By default the gateway signs every Bedrock request with one credential, so AWS sees all developers’ requests under a single IAM principal. Add `session_name: email` to `assume_role` and the gateway calls `sts:AssumeRole` once per developer per hour, with the session name set to that developer’s email, and signs their requests with the returned credentials, so each developer’s requests reach AWS under their own assumed-role session. The role can be in the gateway’s own account. Requires a gateway running Claude Code v2.1.281 or later. [Cost attribution on AWS](</docs/en/claude-apps-gateway-on-aws#cost-attribution>) covers the IAM role and where AWS billing shows the sessions.
+
+ upstreams:
+ - provider: bedrock
+ region: us-east-1
+ auth: {} # the gateway's own role: it only calls STS
+ assume_role:
+ role_arn: arn:aws:iam::123456789012:role/claude-gateway-bedrock-user
+ session_name: email # or sub
+
+`session_name` selects which verified claim becomes the AWS `RoleSessionName`: `email` or `sub`. The gateway writes any character other than ASCII letters, digits, and `_+,.@-` as `=XX` hex per UTF-8 byte, and shortens a result longer than 64 characters to a prefix plus a hash, so each developer’s session name stays valid and unique. A request from a developer whose token lacks the claim isn’t sent through this upstream, and the operator log says to switch to `sub` or set `oidc.email_claim`. An active developer costs one STS call per hour per gateway replica, and concurrent first requests share one call. The gateway also makes one call of its own on this role: the token count for a request the client abandoned, so that [spend limits](</docs/en/claude-apps-gateway-spend-limits>) stay accurate. That count and its one-token fallback request are signed by the shared `claude-apps-gateway` session, so AWS attributes the fallback to `claude-apps-gateway` rather than to the developer. For strict per-developer attribution, set `assume_role` with `session_name` on every Bedrock upstream you list. An upstream without it signs the requests it serves with its own credentials.
####
@@ -434,7 +493,7 @@
provider: bedrock
region: us-west-2
auth: {}
- # Different account: a separate Bedrock allotment via assumed-role creds.
+ # Different account: a separate Bedrock allotment via static keys.
- name: bedrock-acct2
provider: bedrock
region: us-east-1
@@ -460,7 +519,7 @@
Lever| How
---|---
Different regions| One Amazon Bedrock upstream per region, each with its own `region:`. With `auto_include_builtin_models: true` the cross-region inference profiles route automatically; for region-pinned deployments use a `models:` block.
-Different accounts| One Amazon Bedrock upstream per account, each with its own credentials in `auth:`. The default chain (`auth: {}`) uses the pod’s identity; for a second account, set explicit credentials or a bearer token.
+Different accounts| One Amazon Bedrock upstream per account. The default chain (`auth: {}`) uses the pod’s identity; for a second account, add `assume_role` to reach it with short-lived credentials, or set explicit credentials or a bearer token in `auth:`.
Provisioned throughput| Map the model to the provisioned-throughput ARN in `models:` for that upstream’s name. Other upstreams keep the on-demand ID, so PT capacity is exhausted before failing over.
VPC / FIPS endpoints| Set `base_url:` on the upstream to your VPC endpoint or FIPS endpoint URL
Model-scoped routing| Only a custom model `id`, one that isn’t a built-in Claude model, skips the upstreams absent from its `upstream_model:` map. The gateway tries built-in models on every upstream in order and uses the provider’s default ID where the map has no entry, so for built-in models the map changes which ID an upstream receives rather than whether it is tried; an upstream that rejects the ID follows the same failover rules as any other upstream error.
@@ -1102,7 +1161,7 @@
"parentSettingsBehavior": "merge"
}
-`parentSettingsBehavior: "merge"` keeps Claude Desktop’s delivery of the egress allowlist to its embedded Claude Code sessions working; [Deliver policy to Claude Desktop sessions](</docs/en/claude-apps-gateway#deliver-policy-to-claude-desktop-sessions>) explains the mechanism and where the opt-in must sit. Deploy the `managed-settings.json` file to each device, typically via your MDM platform. The file path differs by platform. See [where each mechanism stores the policy](</docs/en/managed-settings#where-each-mechanism-stores-the-policy>). By default, a registry policy on Windows or a managed-preferences plist on macOS replaces the `managed-settings.json` file rather than merging with it, apart from the exception keys and cross-source checks above. All three keys in this snippet follow the highest-priority-source rule, so fleets that deliver policy through Group Policy or configuration profiles must put all three in that mechanism instead. For Claude Desktop, set the `bootstrapUrl` key in Claude Desktop’s own [managed configuration](<https://claude.com/docs/third-party/claude-desktop/configuration>) to `<listen.public_url>/user/bootstrap`. The sign-in flow and per-group policy then match the CLI’s once a policy opts in server-side with a `desktop` key; without the opt-in, `/user/bootstrap` returns 404. See Claude Desktop overlay for the server-side half. Claude Code honors [`forceLoginGatewayUrl`](</docs/en/settings-reference#forcelogingatewayurl>), [`gatewayInternalNetworks`](</docs/en/settings-reference#gatewayinternalnetworks>), and the `"gateway"` value of [`forceLoginMethod`](</docs/en/settings-reference#forceloginmethod>) only from a managed source on the machine: `managed-settings.json`, the macOS plist or Windows HKLM registry, or a policy helper. Setting them in a developer’s own `~/.claude/settings.json` or in the gateway payload doesn’t configure the gateway sign-in. Leave `forceLoginMethod` and `forceLoginOrgUUID` out of the payload. Claude Code still reads both keys from the payload for its startup credential check, so a developer who keeps an Anthropic-issued credential on the machine gets the startup exit described under [Administrator policy requires a Cloud gateway sign-in](</docs/en/errors#administrator-policy-requires-a-cloud-gateway-sign-in>) even after they sign in.
+`parentSettingsBehavior: "merge"` keeps Claude Desktop’s delivery of the egress allowlist to its embedded Claude Code sessions working; [Deliver policy to Claude Desktop sessions](</docs/en/claude-apps-gateway#deliver-policy-to-claude-desktop-sessions>) explains the mechanism and where the opt-in must sit. To stop developers from bypassing the gateway with a cloud provider variable or an `ANTHROPIC_BASE_URL` of their own, add `"allowedProviders": ["gateway"]` to the same file. Claude Code then refuses every session on the machine that isn’t set up for a Cloud gateway, and admits a gateway only when it is the one `forceLoginGatewayUrl` names or one whose URL the file’s `env` block sets as `ANTHROPIC_BASE_URL`. `claude gateway` refuses to run on a machine that sets the list, so keep the key off the gateway host. See the [`allowedProviders`](</docs/en/settings-reference#allowedproviders>) entry in the settings reference. Requires Claude Code v2.1.285 or later. Deploy the `managed-settings.json` file to each device, typically via your MDM platform. The file path differs by platform. See [where each mechanism stores the policy](</docs/en/managed-settings#where-each-mechanism-stores-the-policy>). By default, a registry policy on Windows or a managed-preferences plist on macOS replaces the `managed-settings.json` file rather than merging with it, apart from the exception keys and cross-source checks above. All three keys in this snippet follow the highest-priority-source rule, so fleets that deliver policy through Group Policy or configuration profiles must put all three in that mechanism instead. For Claude Desktop, set the `bootstrapUrl` key in Claude Desktop’s own [managed configuration](<https://claude.com/docs/third-party/claude-desktop/configuration>) to `<listen.public_url>/user/bootstrap`. The sign-in flow and per-group policy then match the CLI’s once a policy opts in server-side with a `desktop` key; without the opt-in, `/user/bootstrap` returns 404. See Claude Desktop overlay for the server-side half. Claude Code honors [`forceLoginGatewayUrl`](</docs/en/settings-reference#forcelogingatewayurl>), [`gatewayInternalNetworks`](</docs/en/settings-reference#gatewayinternalnetworks>), and the `"gateway"` value of [`forceLoginMethod`](</docs/en/settings-reference#forceloginmethod>) only from a managed source on the machine: `managed-settings.json`, the macOS plist or Windows HKLM registry, or a policy helper. Setting them in a developer’s own `~/.claude/settings.json` or in the gateway payload doesn’t configure the gateway sign-in. Leave `forceLoginMethod` and `forceLoginOrgUUID` out of the payload. Claude Code still reads both keys from the payload for its startup credential check, so a developer who keeps an Anthropic-issued credential on the machine gets the startup exit described under [Administrator policy requires a Cloud gateway sign-in](</docs/en/errors#administrator-policy-requires-a-cloud-gateway-sign-in>) even after they sign in.
##
--- a/claude-apps-gateway-on-aws.md
+++ b/claude-apps-gateway-on-aws.md
@@ -484,7 +484,70 @@
Spend
-Telemetry shows usage after the fact; [spend limits](</docs/en/claude-apps-gateway-spend-limits>) are the gateway’s live per-developer view and enforcement on top of the shared upstream credential.
+Telemetry shows usage after the fact; [spend limits](</docs/en/claude-apps-gateway-spend-limits>) are the gateway’s live per-developer view and enforcement.
+
+##
+
+
+
+Cost attribution
+
+The gateway signs every Bedrock request with its own principal, the ECS task role or EKS IRSA role, so by default AWS sees all of that spend under one IAM principal. There are two ways to split it in AWS’s own billing data, and they combine.
+
+###
+
+
+
+Per developer with `assume_role`
+
+Create a second IAM role that holds the Bedrock permissions and trusts the gateway’s principal, grant that principal `sts:AssumeRole` on it, and set [`assume_role`](</docs/en/claude-apps-gateway-config#per-developer-aws-cost-attribution>) with `session_name: email` on the Bedrock upstream. The gateway then assumes that role once per developer per hour with the session name set to their email and signs their requests with the result. Requires a gateway running Claude Code v2.1.281 or later. The role can also be in another AWS account: see [Bedrock in another AWS account](</docs/en/claude-apps-gateway-config#bedrock-in-another-aws-account>). In Terraform, next to the task role in the Terraform bundle:
+
+ resource "aws_iam_role" "bedrock_user" {
+ name = "claude-gateway-bedrock-user"
+ assume_role_policy = jsonencode({
+ Version = "2012-10-17"
+ Statement = [{ Effect = "Allow", Action = "sts:AssumeRole", Principal = { AWS = aws_iam_role.task.arn } }]
+ })
+ }
+ resource "aws_iam_role_policy" "bedrock_user_invoke" { # same Bedrock policy as the task role's
+ role = aws_iam_role.bedrock_user.id
+ policy = aws_iam_role_policy.bedrock_invoke.policy
+ }
+ resource "aws_iam_role_policy" "task_assume_bedrock_user" {
+ role = aws_iam_role.task.id
+ policy = jsonencode({
+ Version = "2012-10-17"
+ Statement = [{ Effect = "Allow", Action = "sts:AssumeRole", Resource = aws_iam_role.bedrock_user.arn }]
+ })
+ }
+
+With `assume_role` set the gateway signs every Bedrock call, the free `CountTokens` call for spend metering included, with the assumed role’s credentials, so the gateway’s principal needs a Bedrock policy of its own only for an upstream without `assume_role`. Because the gateway calls STS at request time, the private subnets need a path to `sts.<region>.amazonaws.com`. The NAT gateway from the prerequisites provides one, and so does an STS interface VPC endpoint that answers for that hostname. Each active developer costs one STS call per hour per gateway replica. Each developer’s requests reach AWS as the principal `arn:aws:sts::<account>:assumed-role/<role>/<email>`. To see spend per principal, use a billing export that includes IAM principal data; AWS’s [IAM principal cost allocation](<https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/iam-principal-cost-allocation.html>) page covers how to enable it and which billing tools show it.
+
+###
+
+
+
+Per team with application inference profiles
+
+This route uses only the [`models`](</docs/en/claude-apps-gateway-config#models>) and [`managed`](</docs/en/claude-apps-gateway-config#managed>) sections. Create one Bedrock [application inference profile](<https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-create.html>) per team and model, tag each profile with the team, and activate that tag as a cost allocation tag. Then give each team its own model id in `gateway.yaml` and pin each IdP group to its team’s ids:
+
+ models:
+ - id: platform-claude-opus-4-8
+ upstream_model:
+ bedrock: arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/abc123
+ - id: data-claude-opus-4-8
+ upstream_model:
+ bedrock: arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/def456
+ managed:
+ policies:
+ - match: {groups: [team-platform]}
+ cli: {availableModels: [platform-claude-opus-4-8], enforceAvailableModels: true}
+ - match: {groups: [team-data]}
+ cli: {availableModels: [data-claude-opus-4-8], enforceAvailableModels: true}
+ - match: {}
+ cli: {availableModels: [claude-opus-4-8, claude-sonnet-4-6], enforceAvailableModels: true}
+
+Tell developers in a pinned team to start Claude Code with `--model platform-claude-opus-4-8`, using their team’s id, because a session started without it runs the default model, which the gateway refuses for them. The gateway enforces `availableModels` on every request, not only in the model picker, and AWS billing groups the spend by the tag you activated. Without the `match: {}` catch-all, a developer who matches no policy gets every model in the catalog and can bill either team’s profile. The costs: the config grows with teams times models, and the role that signs this upstream’s Bedrock requests must also be allowed to invoke the `application-inference-profile/*` ARNs. That role is the gateway’s principal, or with `assume_role` the role it assumes. See [`pricing`](</docs/en/claude-apps-gateway-config#pricing>) for how the gateway’s own spend meter prices these ids.
##
--- a/claude-apps-gateway-spend-limits.md
+++ b/claude-apps-gateway-spend-limits.md
@@ -1,4 +1,4 @@
-Spend limits cap how much each developer can spend through your [Claude apps gateway](</docs/en/claude-apps-gateway>) in a given day, week, or month. When a developer passes their cap, the gateway returns `429` on their next request and blocks them until the period resets or an admin raises the cap. Use spend limits to give each developer, group, or the whole organization a ceiling on a credential everyone shares. A Claude apps gateway forwards all inference through one shared upstream credential, so your provider’s bill attributes everything to that credential, not to individual developers. Without per-developer limits, one runaway agent fleet can spend the organization’s entire commitment. Spend limits are the gateway’s per-developer view and circuit breaker on top of that shared bill.
+Spend limits cap how much each developer can spend through your [Claude apps gateway](</docs/en/claude-apps-gateway>) in a given day, week, or month. When a developer passes their cap, the gateway returns `429` on their next request and blocks them until the period resets or an admin raises the cap. Use spend limits to give each developer, group, or the whole organization a ceiling on a credential everyone shares. By default, a Claude apps gateway forwards all inference through one shared upstream credential, so your provider’s bill attributes everything to that credential, not to individual developers. On Amazon Bedrock, [per-developer AWS cost attribution](</docs/en/claude-apps-gateway-config#per-developer-aws-cost-attribution>) changes this. Without per-developer limits, one runaway agent fleet can spend the organization’s entire commitment. Spend limits are the gateway’s per-developer view and circuit breaker on top of that shared bill.
##
--- a/claude-tag.md
+++ b/claude-tag.md
@@ -51,7 +51,7 @@
Where Claude Tag runs
-Claude Tag works in Slack. You interact with it by writing in a Slack channel, thread, or direct message, and it replies there. Mention `@Claude` in a channel to guarantee it picks the message up. When Claude works on a task, it runs in an ephemeral sandbox, not on your computer. The sandbox is created when a conversation starts, holds any code or files Claude is working with, and is discarded when the conversation goes idle. See [how Claude Tag works](</docs/claude-tag/concepts/how-it-works>) for the full lifecycle. You extend what Claude can reach, like your repositories, ticketing systems, data warehouses, and custom tools, through [connections](</docs/claude-tag/admins/add-connections>), [plugins, and skills](</docs/claude-tag/admins/customize>). An Owner configures these per scope (a channel, a workspace, or the whole organization). Members’ own claude.ai connectors are separate from that configuration; Claude can use them in a channel for the member’s own requests, as [personal connectors in channels](</docs/claude-tag/concepts/personal-connectors>) describes.
+Claude Tag works in Slack. You interact with it by writing in a Slack channel, thread, or direct message, and it replies there. Mention `@Claude` in a channel to guarantee it picks the message up. When Claude works on a task, it runs in an ephemeral sandbox, not on your computer. The sandbox is created when a conversation starts, holds any code or files Claude is working with, and is discarded when the conversation goes idle. See [how Claude Tag works](</docs/claude-tag/concepts/how-it-works>) for the full lifecycle. You extend what Claude can reach, like your repositories, ticketing systems, data warehouses, and custom tools, through [connections](</docs/claude-tag/admins/add-connections>), [plugins, and skills](</docs/claude-tag/admins/customize>). An Owner or a [Claude Tag admin](</docs/claude-tag/admins/restrict-access#delegate-claude-tag-administration>) configures these per scope (a channel, a workspace, or the whole organization). Members’ own claude.ai connectors are separate from that configuration; Claude can use them in a channel for the member’s own requests, as [personal connectors in channels](</docs/claude-tag/concepts/personal-connectors>) describes.
[For administratorsSet up Claude Tag](</docs/claude-tag/admins/setup-overview>)
--- a/cli-reference.md
+++ b/cli-reference.md
@@ -78,6 +78,7 @@
`--dangerously-skip-permissions`| Skip permission prompts. Equivalent to `--permission-mode bypassPermissions`. See [permission modes](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>) for what this does and does not skip. For sessions started with `--bg`, the mode [persists when the supervisor restarts the session](</docs/en/agent-view#permission-mode-model-and-effort>)| `claude --dangerously-skip-permissions`
`--debug`| Enable debug mode with optional category filtering, such as `--debug='mcp,startup'` or `--debug='!1p'`. The filter binds only in the `=` form; a space-separated filter enables debug mode without filtering| `claude --debug='mcp,startup'`
`--debug-file <path>`| Write debug logs to a specific file path. Implicitly enables debug mode. Takes precedence over `CLAUDE_CODE_DEBUG_LOGS_DIR`| `claude --debug-file /tmp/claude-debug.log`
+`--desktop`| Open the [Claude Desktop app](</docs/en/desktop>) on the current directory and exit without starting a session in the terminal. Add `--continue`, or `--resume` with a session ID, to [open that session in Desktop](</docs/en/desktop#coming-from-the-cli>) instead. `--resume` here takes only a session ID, not a name or transcript path. Takes no prompt and no other flags except `--verbose` and the `--debug` flags, since the app starts the session itself. Available on macOS and x64 Windows when you’re signed in with a Claude subscription. Requires Claude Code v2.1.285 or later| `claude --desktop`
`--disable-slash-commands`| Disable all skills and commands for this session| `claude --disable-slash-commands`
`--disallowedTools`, `--disallowed-tools`| Deny rules. A bare tool name removes the matching tools from Claude’s context: `"Edit"` removes Edit, `"*"` removes every tool, and `"mcp__*"` removes every MCP tool. A scoped rule such as `Bash(rm *)` leaves the tool available and denies only calls that match [as written](</docs/en/permissions#bash-rule-limits>). A rule naming [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) can’t remove it while any other tool remains| `"Bash(git log *)" "Bash(git diff *)" "Edit"`
`--effort`| Set the [effort level](</docs/en/model-config#adjust-effort-level>) for the current session. Options: `low`, `medium`, `high`, `xhigh`, `max`, or `ultracode`. Available levels depend on the model. `ultracode` requests `xhigh` effort with [ultracode](</docs/en/workflows#let-claude-decide-with-ultracode>) turned on, and requires Claude Code v2.1.203 or later. Overrides the [`modelSettings`](</docs/en/settings-reference#modelsettings>) and [`effortLevel`](</docs/en/settings-reference#effortlevel>) settings for this session and does not persist| `claude --effort high`
@@ -107,14 +108,14 @@
`--no-chrome`| Disable [Chrome browser integration](</docs/en/chrome>) for this session| `claude --no-chrome`
`--no-session-persistence`| Disable session persistence so sessions are not saved to disk and cannot be resumed. Print mode only. The [`CLAUDE_CODE_SKIP_PROMPT_HISTORY`](</docs/en/env-vars>) environment variable does the same in any mode| `claude -p --no-session-persistence "query"`
`--output-format`| Specify output format for print mode (options: `text`, `json`, `stream-json`)| `claude -p "query" --output-format json`
-`--permission-mode`| Begin in a specified [permission mode](</docs/en/permission-modes>). Accepts `default`, `acceptEdits`, `plan`, `auto`, `dontAsk`, `bypassPermissions`, or `manual` as an alias for `default`. The `manual` alias selects the permission mode the UI labels Manual and requires Claude Code v2.1.200 or later; `claude --help` lists it in place of `default`, and both values work. Overrides `defaultMode` from settings files. Without this flag or `--dangerously-skip-permissions`, a new session starts in the permission mode described in [which permission mode a session starts in](</docs/en/permission-modes#which-mode-a-session-starts-in>). For `-p`, that’s `default` when nothing is configured| `claude --permission-mode plan`
+`--permission-mode`| Begin in a specified [permission mode](</docs/en/permission-modes>). Accepts `default`, `acceptEdits`, `plan`, `auto`, `dontAsk`, `bypassPermissions`, or `manual` as an alias for `default`. The `manual` alias selects the permission mode the UI labels Manual and requires Claude Code v2.1.200 or later; `claude --help` lists it in place of `default`, and both values work. Overrides `defaultMode` from settings files. Without this flag or `--dangerously-skip-permissions`, a new session starts in the permission mode described in [which permission mode a session starts in](</docs/en/permission-modes#which-mode-a-session-starts-in>), which also covers what a `-p` run starts in| `claude --permission-mode plan`
`--permission-prompt-tool`| Specify an MCP tool to handle permission prompts in non-interactive mode. Claude Code waits for that tool’s MCP server to connect before running the first turn, up to the [`MCP_TIMEOUT`](</docs/en/env-vars>) startup timeout, 30 seconds by default.
The prompt tool can’t approve an MCP tool marked as [requiring user interaction](</docs/en/mcp#require-approval-for-a-specific-tool>): Claude Code converts an `allow` result for one to a deny. This restriction requires Claude Code v2.1.199 or later| `claude -p --permission-prompt-tool mcp_auth_tool "query"`
`--permission-prompts`| Set who answers permission prompts in print mode. With the default `host`, Claude Code sends them to the Agent SDK host or the `--permission-prompt-tool` tool. Pass `none` when nobody can answer, and Claude Code denies them instead. See [Turn off permission prompts in unattended runs](</docs/en/headless#turn-off-permission-prompts-in-unattended-runs>). Requires Claude Code v2.1.259 or later| `claude -p --permission-prompts none "query"`
`--plugin-dir`| Load a plugin from a directory or `.zip` archive, or several from a [folder of plugins](</docs/en/plugins/create#load-a-directory-or-archive-for-one-session>), for this session only. Each flag takes one path. Repeat the flag for more paths: `--plugin-dir A --plugin-dir B.zip`. Passing a folder of plugins requires Claude Code v2.1.265 or later| `claude --plugin-dir ./my-plugin`
`--plugin-url`| Fetch a plugin `.zip` archive from a URL for this session only. Repeat the flag for multiple plugins, or pass space-separated URLs in a single quoted value| `claude --plugin-url https://example.com/plugin.zip`
-`--print`, `-p`| Print response without interactive mode (see [Agent SDK documentation](</docs/en/agent-sdk/overview>) for programmatic usage details)| `claude -p "query"`
+`--print`, `-p`| Print response without interactive mode (see [Agent SDK documentation](</docs/en/agent-sdk/overview>) for programmatic usage details). For `--resume` on a background session that is still running, see [Resume a session](</docs/en/sessions#resume-a-running-background-session>)| `claude -p "query"`
`--prompt-suggestions`| Emit a `prompt_suggestion` message with a predicted next user prompt after each turn that generates one; very short conversations can produce none. Requires `--print`, `--output-format stream-json`, and `--verbose`. See [Prompt suggestions](</docs/en/interactive-mode#prompt-suggestions>)| `claude -p --prompt-suggestions --output-format stream-json --verbose "query"`
`--ref <branch>`| With `--environment`, base the new session’s checkout on a named ref instead of local `HEAD`| `claude -p "Run the smoke test" --environment ccpool_abc123 --ref main`
`--remote`| Deprecated alias for `--cloud`, including the existing-session form| `claude --remote "Fix the login bug"`
@@ -122,7 +123,7 @@
`--remote-control-session-name-prefix <prefix>`| Prefix for auto-generated [Remote Control](</docs/en/remote-control>) session names when no explicit name is set. Defaults to your machine’s hostname, producing names like `myhost-graceful-unicorn`. Set `CLAUDE_REMOTE_CONTROL_SESSION_NAME_PREFIX` for the same effect| `claude remote-control --remote-control-session-name-prefix dev-box`
`--replay-user-messages`| Re-emit user messages from stdin back on stdout for acknowledgment. Requires `--input-format stream-json` and `--output-format stream-json`| `claude -p --input-format stream-json --output-format stream-json --verbose --replay-user-messages`
`--restricted`| Start in restricted mode. Use it when an evaluation harness drives `claude` on a shared machine and Claude Code must not run commands or read that machine’s user and project settings. Claude Code removes the built-in tools that run commands or code, and WebFetch, unless you name them individually in `--tools`, not through the `default` preset. It also confines the built-in file tools to the [working directories](</docs/en/permissions#working-directories>), loads only [managed settings](</docs/en/managed-settings>) and `--settings`, refuses [`bypassPermissions`](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>), and [refuses to create cloud sessions](</docs/en/errors#cloud-sessions-cannot-be-created-from-a-restricted-session>). Requires Claude Code v2.1.248 or later| `claude --restricted -p "query"`
-`--resume`, `-r`| Resume a specific session by ID or name, or show an interactive picker to choose a session. In place of an ID, you can pass the absolute path to a session’s `.jsonl` [transcript file](</docs/en/sessions#where-transcripts-are-stored>). The picker and name search include sessions that added this directory with `/add-dir`. When you pass a session ID, Claude Code searches the current project directory and its git worktrees, then every other project on this machine. Before v2.1.223, the ID search covered only the current project directory and its git worktrees. [Background sessions](</docs/en/agent-view>) appear in the picker marked with `bg`| `claude --resume auth-refactor`
+`--resume`, `-r`| Resume a specific session by ID or name, or show an interactive picker to choose a session. In place of an ID, you can pass the absolute path to a session’s `.jsonl` [transcript file](</docs/en/sessions#where-transcripts-are-stored>). The picker and name search include sessions that added this directory with `/add-dir`. When you pass a session ID, Claude Code searches the current project directory and its git worktrees, then every other project on this machine. Before v2.1.223, the ID search covered only the current project directory and its git worktrees. [Background sessions](</docs/en/agent-view>) appear in the picker marked with `bg`. Resuming one that is still running [opens that session](</docs/en/sessions#resume-a-running-background-session>) in this terminal through `claude attach`, and a prompt you pass on the command line goes to it as its next turn. Before v2.1.285, Claude Code refused and printed the `claude attach` command to run instead| `claude --resume auth-refactor`
`--safe-mode`| Start with all customizations disabled to troubleshoot a broken configuration: CLAUDE.md, skills, plugins, hooks, MCP servers, custom commands and agents, output styles, workflows, custom themes, custom keybindings, status line and file-suggestion commands, LSP servers, and auto memory do not load. Authentication, model selection, built-in tools, and permissions work normally, which differs from [`--bare`](</docs/en/headless#start-faster-with-bare-mode>). Managed settings policy still applies, including policy-configured hooks, status line, and file-suggestion commands; managed plugins, managed skills, managed CLAUDE.md, and policy-configured MCP servers do not. Useful for checking whether a customization is what triggers [automatic model fallback](</docs/en/model-config#automatic-model-fallback>). Sets [`CLAUDE_CODE_SAFE_MODE`](</docs/en/env-vars>)| `claude --safe-mode`
`--session-id`| Use a specific session ID for the conversation (must be a valid UUID)| `claude --session-id "550e8400-e29b-41d4-a716-446655440000"`
`--setting-sources`| Comma-separated list of setting sources to load (`user`, `project`, `local`). See [agent view](</docs/en/agent-view#what-carries-over-when-you-background>) and [agent teams](</docs/en/agent-teams#context-and-communication>) for the sessions you start from this one that inherit the list| `claude --setting-sources user,project`
--- a/cloud-environments.md
+++ b/cloud-environments.md
@@ -60,7 +60,12 @@
LOG_LEVEL=debug
DATABASE_URL=postgres://localhost:5432/myapp
-Each session copies the environment’s values once, at startup, into ordinary environment variables that any command Claude runs can read, except `OTEL_*` variables. Claude Code uses those for its own [telemetry export](</docs/en/monitoring-usage#telemetry-from-cloud-sessions-and-claude-tag>) and doesn’t pass them to the commands it runs. Because running sessions don’t re-read the configuration, editing or adding variables affects sessions you start afterward; sessions already running keep the values they started with. A cloud session also sets some variables itself when it starts. For [`CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`](</docs/en/claude-code-on-the-web#manage-context>), the value the session sets overrides one you add here, so adding that key here has no effect. Anyone who uses the environment can read the values. On Pro and Max plans, use an API credential instead for a key the agent proxy can attach to a request. The requests that never get a credential are listed there.
+A session reads the environment’s values into ordinary environment variables that any command Claude runs can read, except `OTEL_*` variables. Claude Code uses those for its own [telemetry export](</docs/en/monitoring-usage#telemetry-from-cloud-sessions-and-claude-tag>) and doesn’t pass them to the commands it runs. In an Anthropic-hosted environment, a session reads the environment’s values when you create it and again each time Claude Code starts in the session’s VM afterward, which happens in two cases:
+
+ * **The VM is restored after being idle** : after a few minutes without activity, a session’s VM pauses with its files saved. Your next message restores the same VM and starts Claude Code again.
+ * **The VM was reclaimed and is rebuilt** : if the paused VM has since been [reclaimed](</docs/en/claude-code-on-the-web#environment-expired>), reopening the session provisions a fresh VM.
+
+After you edit, add, or remove a variable, an existing session in an Anthropic-hosted environment keeps the values it last read until its VM is next restored or rebuilt, and uses your change from then on. Its VM pauses on its own once the session is idle, and you can’t pause it yourself. To use a new value right away, ask Claude to set it on the command it runs, for example `LOG_LEVEL=trace npm test`, or start a new session. A cloud session also sets some variables itself when it starts. For [`CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`](</docs/en/claude-code-on-the-web#manage-context>), the value the session sets overrides one you add here, so adding that key here has no effect. Anyone who uses the environment can read the values. On Pro and Max plans, use an API credential instead for a key the agent proxy can attach to a request. The requests that never get a credential are listed there.
###
@@ -192,7 +197,7 @@
Network access
-Each environment sets one network access level, which controls the outbound connections its sessions can make. The default level, **Trusted** , allows package registries and other allowlisted domains; **Custom** takes your own domain list. To change an environment’s network access, open it for editing and use the **Network access** selector in the dialog. A shared environment opens read-only there, so an Owner changes its network access from the **Cloud environments** page in [admin settings](<https://claude.ai/admin-settings>) instead. The cloud icon that opens the selector appears on the app surfaces listed under The Default environment and in the [routine editor](</docs/en/routines#environments-and-network-access>); personal environments don’t have a separate page in your claude.ai account settings.
+Each environment sets one network access level, which controls the outbound connections its sessions can make. The default level, **Trusted** , allows package registries and other allowlisted domains; **Custom** takes your own domain list. To change an environment’s network access, open it for editing and use the **Network access** selector in the dialog. A shared environment opens read-only there, so an Owner changes its network access from the **Cloud environments** page in [admin settings](<https://claude.ai/admin-settings>) instead. The cloud icon that opens the selector appears on the app surfaces listed under The Default environment and in the [routine editor](</docs/en/routines#environments-and-network-access>); personal environments don’t have a separate page in your claude.ai account settings. When you change an Anthropic-hosted environment’s network access, its existing sessions follow the new setting within about a minute, for requests that go through the session’s network allowlist. You don’t need to start a new session.
MCP connectors you enable on a session or routine work without adding their hosts to **Allowed domains** , because connector traffic travels through Anthropic’s servers rather than the session’s network. This relies on the same Anthropic-bound channel noted under [Security and isolation](</docs/en/claude-code-on-the-web#security-and-isolation>). Turn off any connector you don’t need to limit which tools Claude can reach.
@@ -410,10 +415,10 @@
In Anthropic-hosted environments, these time limits apply to long-running work in a cloud session, such as a build, an install, or a test run. Each entry links to the section that defines the limit.
- * **Commands Claude runs** : a cloud environment doesn’t set its own command timeout, so the Bash tool’s defaults apply. Claude waits 2 minutes for a command by default and can ask for up to 10 minutes. When a command reaches its [timeout](</docs/en/tools-reference#timeout-and-output-limits>), Claude Code [moves it to the background](</docs/en/tools-reference#background-commands>) instead of stopping it, unless the command starts with `sleep`.
+ * **Commands Claude runs** : a cloud environment doesn’t set its own command timeout, so the Bash tool’s defaults apply. Claude waits 2 minutes for a foreground command by default and can ask for up to 10 minutes. When a command reaches its [timeout](</docs/en/tools-reference#timeout-and-output-limits>), Claude Code [moves it to the background](</docs/en/tools-reference#foreground-commands-that-move-to-the-background>) instead of stopping it, unless the command starts with `sleep`. A command moved this way can keep running for up to 30 more minutes before Claude Code stops it at its [background time limit](</docs/en/tools-reference#time-limit-for-background-commands>). Setting `BASH_DEFAULT_TIMEOUT_MS` above `1800000` milliseconds lengthens that limit as well as the foreground default.
* **SessionStart hooks** : Claude Code cancels a `command` hook after 600 seconds unless you set [`timeout`](</docs/en/hooks#common-fields>), in seconds, on the hook entry. Claude Code doesn’t enforce the timeout on a hook you run with [`async: true`](</docs/en/hooks#run-hooks-in-the-background>).
* **Setup script** : a script that takes longer than roughly five minutes isn’t cached. Script requirements covers how to stay under that.
- * **Idle sessions** : a session stops after a period of inactivity and its VM is reclaimed. [Environment expired](</docs/en/claude-code-on-the-web#environment-expired>) covers what counts as inactive and how to reopen the session.
+ * **Idle sessions** : after a few minutes without activity, a session’s VM pauses with its files saved, and a paused VM can later be reclaimed. Set environment variables describes what a session picks up in each case, and [Environment expired](</docs/en/claude-code-on-the-web#environment-expired>) covers how to reopen a session whose VM was reclaimed.
To raise the command timeouts for an environment’s sessions, add [`BASH_DEFAULT_TIMEOUT_MS` and `BASH_MAX_TIMEOUT_MS`](</docs/en/env-vars#variables>) to its environment variables. Both take milliseconds. For example, `BASH_DEFAULT_TIMEOUT_MS=600000` makes 10 minutes the default.
@@ -446,7 +451,7 @@
Environment caching
-The setup script runs the first time you start a session in an environment. When setup completes within roughly five minutes, Anthropic snapshots the filesystem and reuses that snapshot as the starting point for later sessions. New sessions start with your dependencies, tools, and Docker images already on disk, and skip the setup script step. This keeps startup fast even when the script installs large toolchains or pulls container images. If setup takes longer than roughly five minutes, the environment isn’t cached. The cache is a filesystem snapshot, so it keeps what the setup script writes to disk and loses anything that was only running. Packages you install, Docker images you pull, and files you write all carry over. A database the script started, a `docker compose up` stack, or any other background process doesn’t; start those per session by asking Claude or with a SessionStart hook. The setup script runs again to rebuild the cache when you change the environment’s setup script or allowed network hosts, and when the cache reaches its expiry after roughly seven days. Resuming an existing session never re-runs the setup script. You don’t need to enable caching or manage snapshots yourself.
+The setup script runs the first time you start a session in an environment. When setup completes within roughly five minutes, Anthropic snapshots the filesystem and reuses that snapshot as the starting point for later sessions. New sessions start with your dependencies, tools, and Docker images already on disk, and skip the setup script step. This keeps startup fast even when the script installs large toolchains or pulls container images. If setup takes longer than roughly five minutes, the environment isn’t cached. The cache is a filesystem snapshot, so it keeps what the setup script writes to disk and loses anything that was only running. Packages you install, Docker images you pull, and files you write all carry over. A database the script started, a `docker compose up` stack, or any other background process doesn’t; start those per session by asking Claude or with a SessionStart hook. The setup script runs again to rebuild the cache when you change the environment’s setup script or allowed network hosts, and when the cache reaches its expiry after roughly seven days. In an Anthropic-hosted environment, the setup script doesn’t run when a session’s VM is restored after being idle, so a change to the script reaches an existing session only when its VM was [reclaimed](</docs/en/claude-code-on-the-web#environment-expired>) and is rebuilt. To apply a change right away, run the commands in the session or start a new session. You don’t need to enable caching or manage snapshots yourself.
###
--- a/commands.md
+++ b/commands.md
@@ -106,7 +106,7 @@
`/remote-control`| Make this session available for [Remote Control](</docs/en/remote-control>) from claude.ai. Running it while signed out prints that Remote Control requires a claude.ai subscription and tells you how to sign in; before v2.1.206 it reported `Unknown command: /remote-control`. Alias: `/rc`
`/remote-env`| Choose the default [cloud environment](</docs/en/cloud-environments#select-an-environment-from-the-cli>) for cloud sessions you start from the CLI
`/rename [name]`| Rename the current session and show the name on the prompt bar. Without a name, auto-generates one from conversation history. Also available in non-interactive mode (`-p`); requires Claude Code v2.1.205 or later. From every rename surface, including claude.ai and the desktop app, Claude Code replaces control and invisible characters in the new name with spaces and caps the name at 200 characters. If the name is empty once invisible characters are removed, Claude Code rejects it and shows `That name is empty once invisible characters are removed. Usage: /rename <name>`. The character replacement and length cap require Claude Code v2.1.221 or later. If another live session on this machine already uses a name you pass, Claude Code applies [a variant of it](</docs/en/sessions#name-your-sessions>) instead
-`/resume [session]`| Resume a conversation by ID or name, or open the session picker. [Background sessions](</docs/en/agent-view>) appear in the picker marked with `bg`; one that is still running can’t be resumed here, so attach to it from `claude agents` or stop it there first. Alias: `/continue`
+`/resume [session]`| Resume a conversation by ID or name, or open the session picker. [Background sessions](</docs/en/agent-view>) appear in the picker marked with `bg`. Resuming one that is still running, from the picker or by ID or name, [opens that session](</docs/en/sessions#resume-a-running-background-session>): your current conversation moves to the background and this terminal attaches to the running one. Press `←` on an empty prompt to return to agent view, which also lists the conversation you left. Before v2.1.285, Claude Code refused and told you to open the session with `claude attach` or stop it first. Alias: `/continue`
`/review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [pr#|branch|path]`| Alias of [`/code-review`](</docs/en/code-review#review-a-diff-locally>): reviews the current diff, or a PR number, branch, or path you pass, such as `/review 1234`, and takes the same effort levels and flags. With no level given, the review reuses the last `low` through `max` level you typed; see [Review a diff locally](</docs/en/code-review#review-a-diff-locally>) for the exact rules. For a deep cloud review, use [`/code-review ultra`](</docs/en/ultrareview>). Before v2.1.223, `/review` was a separate command that ran a single-pass, read-only review of a GitHub pull request by number, listing open PRs to pick from when run with no argument; from v2.1.186 through v2.1.201, it ran the same multi-agent engine as `/code-review medium`
`/rewind`| Rewind the conversation and/or code to a previous point, or summarize from a selected message. See [checkpointing](</docs/en/checkpointing>). Aliases: `/checkpoint`, `/undo`
`/run`| **[Skill](</docs/en/skills#bundled-skills>).** Launch and drive your project’s app to see a change working, not only passing tests. See [Run and verify your app](</docs/en/skills#run-and-verify-your-app>)
--- a/components.md
+++ b/components.md
@@ -255,7 +255,12 @@
"mcpServers": "./servers/db.mcpb"
}
-The server takes its name from the `name` in the bundle’s manifest. For transports and authentication, see [MCP](</docs/en/mcp#plugin-provided-mcp-servers>).
+The server takes its name from the `name` in the bundle’s manifest. A bundle’s own manifest can declare settings the server needs from the user in a `user_config` block. A bundled server with a required setting that has no saved value doesn’t start. The `/plugin` **Errors** tab shows `Bundled MCP server "<name>" was not started: it needs configuration`. Users supply the values in one of two ways:
+
+ * **In`/plugin`**: select the plugin on the **Installed** tab and choose **Configure**
+ * **At install, from the shell** : pass [`--config <server>.<key>=<value>`](</docs/en/plugins/cli-reference#plugin-install>) to `claude plugin install`. Requires Claude Code v2.1.285 or later, and works only for a bundle packaged inside the plugin.
+
+For transports and authentication, see [MCP](</docs/en/mcp#plugin-provided-mcp-servers>).
###
@@ -442,13 +447,13 @@
When the configuration dialog appears
-The dialog appears only in the interactive `/plugin` interface. It opens for any option that isn’t set yet when the user does any of the following:
+The dialog is part of the interactive `/plugin` interface. When the user does any of the following, it opens for any option that isn’t set yet:
* Installs the plugin in `/plugin`
* Runs `/plugin install <plugin>@<marketplace>` inside a session
* Enables the plugin from the **Installed** tab in `/plugin`
-To open the same dialog at any time, the user runs `/plugin configure <plugin>@<marketplace>`. The `claude plugin install` shell command never prompts for `userConfig` values. To set values from the shell, pass each one as `--config KEY=VALUE`. When options remain unset, the command prints a `userConfig options not yet set` line that names both ways to set them. [The `userConfig` dialog never appears](</docs/en/plugins/troubleshooting#the-userconfig-dialog-never-appears>) quotes the line. For the option fields, where each value is stored, how a component references a saved value, and which fields reject `${user_config.*}`, see [User configuration](</docs/en/plugins/manifest-reference#user-configuration>).
+To open the same dialog at any time, the user runs `/plugin configure <plugin>@<marketplace>`. The VS Code extension’s [Manage plugins dialog](</docs/en/vs-code#install-plugins>) asks for unset options as a form after an install, and a gear icon on the plugin’s row opens the form again with every option. The `claude plugin install` shell command never prompts for `userConfig` values. To set values from the shell, pass each one as `--config KEY=VALUE` when you install, or pipe a JSON object to [`claude plugin configure --values-stdin`](</docs/en/plugins/cli-reference#plugin-configure>) afterward. When options remain unset, `claude plugin install` prints a `userConfig options not yet set` line. For the line’s exact text, see [The `userConfig` dialog never appears](</docs/en/plugins/troubleshooting#the-userconfig-dialog-never-appears>). For the option fields, where each value is stored, how a component references a saved value, and which fields reject `${user_config.*}`, see [User configuration](</docs/en/plugins/manifest-reference#user-configuration>).
##
--- a/context-window.md
+++ b/context-window.md
@@ -52,7 +52,7 @@
* **Clear between tasks** : run `/clear` when switching to unrelated work. Old conversation crowds out the files you need next and costs tokens on every message.
* **Delegate large reads** : send research to a [subagent](</docs/en/sub-agents>) so the file contents stay in its context window, not yours.
-If you need a larger window rather than a smaller conversation, Fable models, Sonnet 5 and later, Opus 4.6 and later, and Sonnet 4.6 support a 1 million token context window. See [Extended context](</docs/en/model-config#extended-context>) for availability by plan and how to select a `[1m]` model variant. Compaction works the same way at the larger limit. Sonnet 5.5 and Sonnet 5 run with the 1M context window and have no `[1m]` variant to select. See [Sonnet 5.5 and Sonnet 5 context window](</docs/en/model-config#sonnet-5-5-and-sonnet-5-context-window>) for their auto-compaction thresholds and the LLM gateway exception. The point where automatic compaction runs depends on your model and configuration. See [Default auto-compact thresholds](</docs/en/model-config#default-auto-compact-thresholds>) for the boundaries per model, and [Correct the window for a gateway or custom model ID](</docs/en/model-config#correct-the-window-for-a-gateway-or-custom-model-id>) if Claude Code assumes the wrong window for your model ID, such as an [LLM gateway](</docs/en/llm-gateway>) alias.
+If you need a larger window rather than a smaller conversation, Fable models, Sonnet 5 and later, Opus 4.6 and later, and Sonnet 4.6 support a 1 million token context window. See [Extended context](</docs/en/model-config#extended-context>) for availability by plan and how to select a `[1m]` model variant. Compaction works the same way at the larger limit. Sonnet 5.5 and Sonnet 5 run with the 1M context window and have no `[1m]` variant to select. See [Sonnet 5.5 and Sonnet 5 context window](</docs/en/model-config#sonnet-5-5-and-sonnet-5-context-window>) for their auto-compaction thresholds, and [the context window behind a gateway](</docs/en/model-config#context-window-behind-a-gateway>) for how Claude Code sizes the window when you set `ANTHROPIC_BASE_URL` to an [LLM gateway](</docs/en/llm-gateway>). The point where automatic compaction runs depends on your model and configuration. See [Default auto-compact thresholds](</docs/en/model-config#default-auto-compact-thresholds>) for the boundaries per model, and [Correct the window for a gateway or custom model ID](</docs/en/model-config#correct-the-window-for-a-gateway-or-custom-model-id>) if Claude Code assumes the wrong window for your model ID, such as an [LLM gateway](</docs/en/llm-gateway>) alias.
##
--- a/costs.md
+++ b/costs.md
@@ -37,7 +37,7 @@
The misses, expected rebuilds, and warm or cold parts of the line mean the following:
- * **Misses** : requests that re-processed content the cache already held, with the time of the last miss and how many tokens those requests wrote back to the cache. Claude Code counts a request as a miss when the request re-processed more than 5% and at least 2,000 tokens of what it could have read from cache. [Actions that invalidate the cache](</docs/en/prompt-caching#actions-that-invalidate-the-cache>) lists the usual causes. When Claude Code can identify a likely cause for the last miss, the line names it too, for example `likely cause: tool definitions changed`. The likely-cause text requires Claude Code v2.1.260 or later.
+ * **Misses** : requests that re-processed content the cache already held, with the time of the last miss and how many tokens those requests wrote back to the cache. [Actions that invalidate the cache](</docs/en/prompt-caching#actions-that-invalidate-the-cache>) lists the usual causes. When Claude Code can identify a likely cause for the last miss, the line names it too, for example `likely cause: tool definitions changed`. The likely-cause text requires Claude Code v2.1.260 or later.
* **Expected rebuilds** : when Claude Code has itself just rewritten the conversation, by [compaction](</docs/en/prompt-caching#compacting-the-conversation>) or by clearing old tool results from context, it counts the same kind of miss as an expected rebuild instead. This part appears only after at least one expected rebuild has happened.
* **Warm or cold** : whether the cached prefix is still within its [cache lifetime](</docs/en/prompt-caching#cache-lifetime>), with the TTL in effect. When the cache is cold, the line shows how long the session has been idle. When no response has reported cache tokens, the line ends with `no prompt caching reported by the API` instead.
--- a/desktop.md
+++ b/desktop.md
@@ -81,7 +81,7 @@
**Manual**| `default`| Claude asks before editing files or running commands. You see a diff and can accept or reject each change.
**Accept edits**| `acceptEdits`| Claude auto-accepts file edits and common filesystem commands like `mkdir`, `touch`, and `mv`, but still asks before running other terminal commands. Use this when you trust file changes and want faster iteration.
**Plan**| `plan`| Claude reads files and runs commands to explore, then proposes a plan without editing your source code. Good for complex tasks where you want to review the approach first.
-**Auto**| `auto`| Claude executes all actions with background safety checks that verify alignment with your request. Reduces permission prompts while maintaining oversight. Appears when auto mode is available; there is no separate Settings toggle for it.
+**Auto**| `auto`| Claude runs without routine prompts; before actions such as shell commands and network requests run, a background classifier checks that they align with your request. Appears when auto mode is available; there is no separate Settings toggle for it.
**Bypass permissions**| `bypassPermissions`| Claude runs without permission prompts, except for the [actions no mode auto-approves](</docs/en/permission-modes#actions-no-mode-auto-approves>), safety classifiers when Claude acts on external sites, or desktop actions where Claude always asks first, such as archiving a session. Equivalent to `--dangerously-skip-permissions` in the CLI. On Pro and Max plans, enable it in your Settings → Claude Code under “Allow bypass permissions mode”; on Team and Enterprise plans there is no Settings toggle, and organization policy controls it instead. Only use this in sandboxed containers or VMs.
Earlier versions of the Code tab labeled these modes Ask permissions, Auto accept edits, and Plan mode. The `dontAsk` permission mode is available only in the [CLI](</docs/en/permission-modes#allow-only-pre-approved-tools-with-dontask-mode>). Auto mode is available to all users on the Anthropic API and requires Claude Opus 4.6 or later, Sonnet 4.6 or later, or a [Fable model](</docs/en/model-config#work-with-fable>). Organization administrators can turn auto mode off with the `disableAutoMode` key in managed settings. In Enterprise deployments that route Desktop to Google Cloud’s Agent Platform, auto mode is also available by default; see [Auto mode on Bedrock, Agent Platform, or Foundry](</docs/en/permission-modes#enable-auto-mode-on-bedrock-agent-platform-or-foundry>) for the supported models.
@@ -450,7 +450,7 @@
Use skills
-[Skills](</docs/en/skills>) extend what Claude can do. Claude loads them automatically when relevant, or you can invoke one directly: type `/` in the prompt box or click the **+** button and select **Slash commands** to browse what’s available. This includes [built-in commands](</docs/en/commands>), your [custom skills](</docs/en/skills#create-your-first-skill>), project skills from your codebase, and skills from any [installed plugins](</docs/en/plugins/install>). Select one and it appears highlighted in the input field. Type your task after it and send as usual. You can send a command while Claude is working, the same as any other message, and the session returns to idle once the turn finishes. Before v2.1.206, a command sent mid-turn could leave the session showing as running and messages you sent afterward weren’t delivered. Local sessions load your personal skills from `~/.claude/skills/`. An SSH session reads `~/.claude/skills/` from the remote host’s home directory, not from your machine. Local and cloud sessions also load the skills enabled for your claude.ai account. Cloud sessions load them instead of `~/.claude/skills/`, as [Skills in Cowork and cloud sessions](</docs/en/skills#skills-in-cowork-and-cloud-sessions>) describes.
+[Skills](</docs/en/skills>) extend what Claude can do. Claude loads them automatically when relevant, or you can invoke one directly: type `/` in the prompt box or click the **+** button and select **Slash commands** to browse what’s available. This includes [built-in commands](</docs/en/commands>), your [custom skills](</docs/en/skills#create-your-first-skill>), project skills from your codebase, and skills from any [installed plugins](</docs/en/plugins/install>). Select one and it appears highlighted in the input field. Type your task after it and send as usual. You can send a command while Claude is working, the same as any other message, and the session returns to idle once the turn finishes. Before v2.1.206, a command sent mid-turn could leave the session showing as running and messages you sent afterward weren’t delivered. Local sessions load your personal skills from `~/.claude/skills/`. An SSH session reads `~/.claude/skills/` from the remote host’s home directory, not from your machine. Local and cloud sessions also load the skills enabled for your claude.ai account, except local sessions when your organization sets [`disableSideloadFlags`](</docs/en/settings-reference#disablesideloadflags>). Cloud sessions load them instead of `~/.claude/skills/`, as [Skills in Cowork and cloud sessions](</docs/en/skills#skills-in-cowork-and-cloud-sessions>) describes.
###
@@ -458,7 +458,7 @@
Install plugins
-[Plugins](</docs/en/plugins/overview>) are reusable packages that add skills, agents, hooks, MCP servers, and LSP configurations to Claude Code. You can install plugins from the desktop app without using the terminal. For local and SSH sessions, click the **+** button next to the prompt box and select **Plugins** to see your installed plugins and their skills. To add a plugin, select **Add plugin** from the submenu to open the plugin browser, which shows available plugins from your configured [marketplaces](</docs/en/plugins/overview>) including the official Anthropic marketplace. Select **Manage plugins** to enable, disable, or uninstall plugins. You can scope plugins to your user account, a specific project, or local-only. If your organization manages plugins centrally, those plugins are available in desktop sessions the same way they are in the CLI. The plugin browser is not available in cloud sessions, and plugins you install from the desktop app aren’t available for cloud sessions. A cloud session also doesn’t install plugins that the repository’s `.claude/settings.json` declares, as [What carries over from your setup](</docs/en/cloud-environments#what-carries-over-from-your-setup>) explains. Plugins aren’t available in WSL sessions. For the full plugin reference including creating your own plugins, see [plugins](</docs/en/plugins/overview>).
+[Plugins](</docs/en/plugins/overview>) are reusable packages that add skills, agents, hooks, MCP servers, and LSP configurations to Claude Code. You can install plugins from the desktop app without using the terminal. For local and SSH sessions, click the **+** button next to the prompt box and select **Plugins** to see your installed plugins and their skills. To add a plugin, select **Add plugin** from the submenu to open the plugin browser, which shows available plugins from your configured [marketplaces](</docs/en/plugins/overview>) including the official Anthropic marketplace. Select **Manage plugins** to enable, disable, or uninstall plugins. You can scope plugins to your user account, a specific project, or local-only. If your organization manages plugins centrally, those plugins are available in desktop sessions the same way they are in the CLI, except the ones the desktop app [withholds under `disableSideloadFlags`](</docs/en/settings-reference#disablesideloadflags>). The plugin browser is not available in cloud sessions, and plugins you install from the desktop app aren’t available for cloud sessions. A cloud session also doesn’t install plugins that the repository’s `.claude/settings.json` declares, as [What carries over from your setup](</docs/en/cloud-environments#what-carries-over-from-your-setup>) explains. Plugins aren’t available in WSL sessions. For the full plugin reference including creating your own plugins, see [plugins](</docs/en/plugins/overview>).
###
@@ -875,7 +875,11 @@
Coming from the CLI?
-If you already use the Claude Code CLI, Desktop runs the same underlying engine with a graphical interface. You can run both simultaneously on the same machine, even on the same project. Each keeps its own session list, and you can bring a CLI session into Desktop. They share configuration and project memory via CLAUDE.md files. To move a CLI session into Desktop, run `/desktop` in the terminal. Claude saves your session and opens it in the desktop app, then exits the CLI. This command is available on macOS and x64 Windows when you are signed in with a Claude subscription. It is not available with API key authentication or on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. You can also pick up a CLI session from inside Desktop with `/resume`. The command is available in local sessions, not in SSH, WSL, or cloud sessions. To continue a terminal session in Desktop:
+If you already use the Claude Code CLI, Desktop runs the same underlying engine with a graphical interface. You can run both simultaneously on the same machine, even on the same project. Each keeps its own session list, and you can bring a CLI session into Desktop. They share configuration and project memory via CLAUDE.md files. To move a CLI session into Desktop, run `/desktop` in the terminal. Claude saves your session and opens it in the desktop app, then exits the CLI. This command is available on macOS and x64 Windows when you are signed in with a Claude subscription. It is not available with API key authentication or on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. From your shell, [`claude --desktop`](</docs/en/cli-reference#cli-flags>) opens Desktop directly without starting a terminal session. It requires Claude Code v2.1.285 or later and has the same platform and sign-in requirements as `/desktop`. With no other arguments, it opens Desktop on the current directory. To open an existing CLI session in Desktop, add `--continue` for the most recent conversation in this directory, or `--resume` with the session ID that `/status` shows:
+
+ claude --desktop --resume <session-id>
+
+Claude Code prints `Opening session <session-id> in Claude Desktop`, the session opens in the app, and the command exits. A session name doesn’t work in place of the ID. Claude Code doesn’t move a session that is open in another terminal or still running in the background. If Claude Desktop isn’t installed, the command prints a download link and exits. You can also pick up a CLI session from inside Desktop with `/resume`. The command is available in local sessions, not in SSH, WSL, or cloud sessions. To continue a terminal session in Desktop:
1. Close the session in the terminal.
2. In the Desktop prompt box, type `/resume`. Desktop lists the sessions you started from the CLI on this computer. Search by title, folder, or branch, and preview where each one left off.
--- a/env-vars.md
+++ b/env-vars.md
@@ -42,7 +42,7 @@
To set it for every session, run `setx API_TIMEOUT_MS "1200000"` and open a new terminal.
-The assignment line prints nothing on success, so confirm the variable is set by printing it in the same shell before you run `claude`:
+The assignment line prints nothing on success. To confirm the variable is set, print it in the same shell:
* macOS, Linux, WSL
@@ -100,7 +100,7 @@
Numeric variables such as timeouts, token budgets, and retry counts accept scientific notation and digit-separator spellings in addition to plain digits, except where a variable’s row notes it takes plain digits only. For example, Claude Code reads `2e3` as 2000 and `64_000` as 64000. Before v2.1.211, these spellings could silently set a much smaller value, such as `1e6` setting a timeout to 1.
-For variables that turn a behavior on or off, set `1` or `true` to turn it on and `0` or `false` to turn it off, in any casing.Some variables read only whether you set them at all, so any non-empty value including `0` turns the behavior on, and you turn the behavior off by unsetting the variable or setting it to an empty value. These variables work that way:
+For variables that turn a behavior on or off, set `1`, `true`, `yes`, or `on` to turn it on and `0`, `false`, `no`, or `off` to turn it off, in any casing.Some variables read only whether you set them at all, so any non-empty value including `0` turns the behavior on, and you turn the behavior off by unsetting the variable or setting it to an empty value. These variables work that way:
* `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`
* `DISABLE_TELEMETRY`
@@ -162,9 +162,9 @@
`API_FORCE_IDLE_TIMEOUT`| Override the 5-minute body idle timeout that aborts a streaming model response when no bytes arrive. Set to `0` to turn the timeout off, for example when a slow [gateway](</docs/en/llm-gateway>) or local model pauses longer than 5 minutes between chunks, or `1` to keep it on for every provider. When unset, the timeout is active on providers other than the direct Anthropic API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), and Amazon Bedrock with `CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCK=1` set. The [stream watchdogs](</docs/en/network-config#streaming-idle-watchdogs>) run independently of it and abort a long silent pause even when you set `0` here
`API_TIMEOUT_MS`| Timeout for API requests in milliseconds (default: 600000, or 10 minutes; maximum: 2147483647). Increase this when requests time out on slow networks or when routing through a proxy. Values above the maximum overflow the underlying timer and cause requests to fail immediately
`AWS_BEARER_TOKEN_BEDROCK`| Amazon Bedrock API key for authentication (see [Amazon Bedrock API keys](<https://aws.amazon.com/blogs/machine-learning/accelerate-ai-development-with-amazon-bedrock-api-keys/>))
-`BASH_DEFAULT_TIMEOUT_MS`| Default timeout for long-running bash commands (default: 120000, or 2 minutes)
+`BASH_DEFAULT_TIMEOUT_MS`| Default timeout for a foreground Bash or PowerShell tool command, in milliseconds (default: 120000, or 2 minutes). A default longer than 30 minutes also becomes the default [time limit for background commands](</docs/en/tools-reference#time-limit-for-background-commands>). The background time limit requires Claude Code v2.1.285 or later
`BASH_MAX_OUTPUT_LENGTH`| Maximum number of characters of bash output that Claude Code reads back into a command’s result (default: 30000; maximum: 150000). If you set the [`bashOutputMaxChars`](</docs/en/settings-reference#bashoutputmaxchars>) setting, Claude Code ignores this variable. See [Output limits](</docs/en/tools-reference#output-limits>)
-`BASH_MAX_TIMEOUT_MS`| Maximum timeout the model can set for long-running bash commands (default: 600000, or 10 minutes). The effective ceiling is the larger of this and `BASH_DEFAULT_TIMEOUT_MS`
+`BASH_MAX_TIMEOUT_MS`| Maximum timeout the model can set for a foreground Bash or PowerShell tool command, in milliseconds (default: 600000, or 10 minutes). The effective ceiling is the larger of this and `BASH_DEFAULT_TIMEOUT_MS`. An effective ceiling longer than 2 hours also becomes the maximum [time limit for background commands](</docs/en/tools-reference#time-limit-for-background-commands>). The background time limit requires Claude Code v2.1.285 or later
`BETA_TRACING_ENDPOINT`| OTLP endpoint for [detailed beta tracing](</docs/en/monitoring-usage#traces-beta>): with `ENABLE_BETA_TRACING_DETAILED=1`, logs and traces go there instead of to the configured exporters. Set it in your shell, user settings, or managed settings. Ignored in [project and local settings](</docs/en/settings-reference#variables-claude-code-ignores-in-env>)
`CCR_FORCE_BUNDLE`| Set to `1` to force [`claude --cloud`](</docs/en/claude-code-on-the-web#send-local-repositories-without-github>) to bundle and upload your local repository instead of cloning from its remote
`CLAUDECODE`| Set to `1` in subprocesses Claude Code spawns (Bash and PowerShell tools, tmux sessions, [hook](</docs/en/hooks>) commands, [status line](</docs/en/statusline>) commands, stdio [MCP server](</docs/en/mcp>) subprocesses). IDE extensions also set this in their integrated terminals. Use to detect when a script is running inside a subprocess spawned by Claude Code. To check whether the current process was spawned directly by a tool call or hook, rather than inside a stdio MCP server that Claude Code started, use `CLAUDE_CODE_CHILD_SESSION` instead
@@ -233,6 +233,7 @@
`CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING`| Set to `1` to disable file [checkpointing](</docs/en/checkpointing>). The `/rewind` command will not be able to restore code changes. Overrides the [`fileCheckpointingEnabled`](</docs/en/settings-reference#filecheckpointingenabled>) setting
`CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS`| Set to `1` to remove built-in commit and PR workflow instructions and the git status snapshot from Claude’s context. Useful when using your own git workflow skills. Takes precedence over the [`includeGitInstructions`](</docs/en/settings-reference#includegitinstructions>) setting when set
`CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP`| Set to `1` to prevent automatic remapping of Opus 4.0 and 4.1 to the current Opus version on the Anthropic API. Use when you intentionally want to pin an older model. The remap does not run on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry
+`CLAUDE_CODE_DISABLE_MODEL_ACCESS_FALLBACK`| Set to `1` to stop Claude Code on [Amazon Bedrock](</docs/en/amazon-bedrock#when-a-model-is-disabled-mid-session>) and [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai#when-a-model-is-disabled-mid-session>) from switching to an older model when your account loses access to a session’s model mid-session; the refused request fails at once instead. A [fallback model chain](</docs/en/model-config#fallback-model-chains>) you configure still switches on that refusal, and the [startup model checks](</docs/en/amazon-bedrock#startup-model-checks>) still fall back at launch. Requires Claude Code v2.1.285 or later
`CLAUDE_CODE_DISABLE_MOUSE`| Set to `1` to disable mouse tracking in [fullscreen rendering](</docs/en/fullscreen>). Keyboard scrolling with `PgUp` and `PgDn` still works. Use this to keep your terminal’s native copy-on-select behavior
`CLAUDE_CODE_DISABLE_MOUSE_CLICKS`| Set to `1` to disable click, drag, and hover handling in [fullscreen rendering](</docs/en/fullscreen>) while keeping mouse-wheel scrolling. Use this when you want wheel scroll to work inside Claude Code but don’t want clicks to position the cursor, expand tool output, or open links. `CLAUDE_CODE_DISABLE_MOUSE` takes precedence when both are set. Requires Claude Code v2.1.195 or later
`CLAUDE_CODE_DISABLE_MTLS_RELOAD_ON_STALE_CONNECTION`| Set to `1` to stop Claude Code from re-reading the [mTLS client certificate and key](</docs/en/network-config#mtls-authentication>) when an API request fails with a connection-level error, such as a connection reset or a TLS handshake error. With the reload disabled, Claude Code loads rotated files only when it next applies settings or at the next startup. Requires Claude Code v2.1.232 or later
@@ -351,6 +352,7 @@
`CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK`| Set to `1` to skip the client-side [fast mode](</docs/en/fast-mode#use-fast-mode-behind-proxies-and-llm-gateways>) availability check, for proxies that intercept the check’s request rather than refuse it. The API still rejects fast mode requests when your organization has fast mode disabled
`CLAUDE_CODE_SKIP_FOUNDRY_AUTH`| Skip Azure authentication for Microsoft Foundry, for a proxy or gateway that injects its own `Authorization` header. Claude Code sends requests without an Azure credential and preserves the `Authorization` header you supply, for example through `ANTHROPIC_CUSTOM_HEADERS`. Ignored when `ANTHROPIC_FOUNDRY_API_KEY` or `ANTHROPIC_FOUNDRY_AUTH_TOKEN` is set. Before v2.1.203, this variable left the Microsoft Foundry client unable to send requests unless an API key was also set
`CLAUDE_CODE_SKIP_MANTLE_AUTH`| Skip AWS authentication for Amazon Bedrock Mantle (for example, when using an LLM gateway)
+`CLAUDE_CODE_SKIP_MODEL_ACCESS_MEMORY`| The [startup model checks](</docs/en/amazon-bedrock#startup-model-checks>) on [Amazon Bedrock](</docs/en/amazon-bedrock>) and [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>) remember on this machine which models they found your account can’t invoke, for up to a day. Set to `1` to turn that memory off. Requires Claude Code v2.1.285 or later
`CLAUDE_CODE_SKIP_PROMPT_HISTORY`| Set to `1` to skip writing prompt history and session transcripts to disk. Sessions started with this variable set do not appear in `--resume`, `--continue`, or up-arrow history. Useful for ephemeral scripted sessions
`CLAUDE_CODE_SKIP_VERTEX_AUTH`| Skip Google authentication for Google Cloud’s Agent Platform (for example, when using an LLM gateway)
`CLAUDE_CODE_STARTUP_FAILURE_RESULTS`| Set to `1` to have a session started with `--output-format stream-json` write a [result message naming why Claude Code refused to start](</docs/en/agent-sdk/typescript#startup_failure_reason>) for startup failures that otherwise end with stderr alone. Requires Claude Code v2.1.274 or later
Show diff (299 lines)
--- a/errors.md
+++ b/errors.md
@@ -86,7 +86,9 @@
`rejected the credential from its headersHelper` / `rejected the Authorization header in its config`| Authentication
`MCP server "<name>" needs additional permissions (scope: "<scope>") — run /mcp to re-authenticate`| Authentication
`MCP server "<name>" requires re-authorization (token expired)`| Authentication
+`This server's URL is missing or not a valid URL, so sign-in can't start`| Authentication
`Issuer mismatch in authorization response (RFC 9207)`| Authentication
+`Refusing to send credentials to non-https token endpoint` / `<short-name> from the MCP SDK for <server-url>`| Authentication
`Cloud gateway session expired — run /login to reconnect.`| Authentication
`Cloud gateway <url> no longer accepts this session`| Authentication
`Sign-in timed out while waiting for you to continue. Try again.`| Authentication
@@ -193,6 +195,8 @@
`Cannot add MCP server to scope: managed`| Command-line errors
`is Anthropic-hosted and doesn't support local OAuth`| Command-line errors
`Can't read .mcp.json: it isn't a regular file or is larger than 2097152 bytes`| Command-line errors
+`MCP server "<name>" was not saved to` / `was not removed from`| Command-line errors
+`MCP server "<name>" may not have been saved` / `may not have been removed`| Command-line errors
`Server rejected the Authorization header minted by the configured headersHelper`| Command-line errors
`Error: MCP tool <name> (passed via --permission-prompt-tool) not found`| Command-line errors
`OAuth callback port <port> is already in use — another process may be holding it`| Command-line errors
@@ -308,7 +312,7 @@
`Transcript writes are failing (...)`| Session saving warnings
`Transcript saving is off — CLAUDE_CODE_SKIP_PROMPT_HISTORY is set`| Session saving warnings
`Transcript saving is off — inherited CLAUDE_CODE_CHILD_SESSION marker`| Session saving warnings
-`Claude Code's fullscreen renderer didn't finish starting last time on this machine` / `Claude Code's fullscreen renderer has repeatedly failed to start on this machine`| Configuration warnings
+`Claude Code's fullscreen renderer didn't finish starting last time on this machine` / `Claude Code's fullscreen renderer has repeatedly failed to start on this machine`| [Fullscreen rendering](</docs/en/fullscreen#fullscreen-renderer-didnt-finish-starting>)
`Claude Code exited after an unrecoverable interface error (...)`| Configuration warnings
`Agent descriptions are over the 15.0k-token limit`| Configuration warnings
`Not loaded: rename <path>, then restart — its name uses "<name>", a name reserved for the skills synced from your claude.ai account`| Configuration warnings
@@ -317,9 +321,12 @@
`Remote managed settings failed to load (<cause>)`| Configuration warnings
`Managed settings were not approved; exiting without applying them.`| Configuration warnings
`Claude Code can't start: your organization's managed settings block the default model` / `Claude Code can't start: your organization allows only the models listed in "availableModels"`| Configuration warnings
+`Your organization's managed settings allow Claude Code to use: <providers>`| Configuration warnings
+`Your organization's managed settings allow Claude Code to use no API provider at all`| Configuration warnings
`MCP server <name> is blocked by enterprise managed policy`| Configuration warnings
`Managed settings document could not be parsed as a JSON object; none of its settings are in effect. Fix or remove it.`| Configuration warnings
`Managed settings drop-in directory could not be read`| Configuration warnings
+`Unable to read managed policy settings`| Configuration warnings
`otelHeadersHelper failed; telemetry is not being exported. See /status: ...`| Configuration warnings
`"crossSessionInbound" must be one of "accept", "hold", "refuse"`| Configuration warnings
`headersHelper not run — this workspace has no persisted trust`| Configuration warnings
@@ -1321,6 +1328,20 @@
+MCP server URL is missing or not a valid URL
+
+Claude Code refused to start an OAuth sign-in for a remote MCP server because the server’s configured `url` doesn’t parse as a URL. Unless Claude Code has a more specific configuration problem to report for the server, running [`claude mcp login <name>`](</docs/en/mcp#authenticate-from-the-command-line>) in your shell prints the refusal as:
+
+ Couldn't complete authentication for "<name>": This server's URL is missing or not a valid URL, so sign-in can't start. Fix the URL in its MCP config (or set the environment variable it uses) and try again.
+
+**What to do:**
+
+ * Set the entry’s `url` to the server’s real endpoint where the server is configured, or set the environment variable that its [`${VAR}` reference](</docs/en/mcp#environment-variable-expansion-in-mcp-json>) names, then run the sign-in again.
+
+###
+
+
+
Issuer mismatch in authorization response
During an [MCP OAuth sign-in](</docs/en/mcp#authenticate-with-remote-mcp-servers>), the authorization server redirected back to Claude Code with an `iss` parameter that doesn’t name the issuer that Claude Code expected from the server’s OAuth metadata. A wrong issuer at this step is how an authorization server mix-up attack looks, so Claude Code fails the sign-in instead of exchanging the authorization code. Claude Code shows the error in the `/mcp` server menu after the browser sign-in:
@@ -1334,6 +1355,21 @@
* To connect while the server is being fixed, start Claude Code with [`MCP_SDK_GENERATION=v1`](</docs/en/env-vars>), whose [runtime](</docs/en/mcp#mcp-client-runtimes>) doesn’t run this check. This removes a protection against mix-up attacks, so prefer the server-side fix
Before v2.1.232, Claude Code used the v2 runtime only in a gradual rollout or when you set `MCP_SDK_GENERATION=v2`.
+
+###
+
+
+
+Refusing to send credentials to non-https token endpoint
+
+On the [v2 runtime](</docs/en/mcp#mcp-client-runtimes>), Claude Code sends an [MCP OAuth](</docs/en/mcp#authenticate-with-remote-mcp-servers>) token request only to a token endpoint served over HTTPS or at `localhost`, `127.0.0.1`, or `::1`. This message means the server’s token endpoint is neither, so Claude Code stopped before sending the request. That happens after the browser sign-in, so the browser step succeeds first, and again whenever Claude Code refreshes the server’s token. In its full form, the message comes from the MCP SDK and quotes the token endpoint it refused. In the debug log, it follows `Error during auth completion:` for a sign-in or `Token refresh failed:` for a refresh. In your shell, `claude mcp login <name>` prints it after `Couldn't complete authentication for "<name>":`, and in a session, `/mcp` shows it under the server’s menu:
+
+ Refusing to send credentials to non-https token endpoint 'http://192.168.1.50:8123/oauth/token'. OAuth token requests MUST use TLS (localhost / 127.0.0.1 / ::1 are exempt).
+
+Claude Code treats a server URL that has a query string or a long random-looking path segment as possibly secret. For such a server, it redacts the sign-in errors the MCP SDK raises before it shows or logs them. This error then reads as a short name that can change between releases, such as `io`, followed by `from the MCP SDK for` and the redacted server URL. Other errors from the MCP SDK take the same shape there. The redacted message can be this error only when the server’s token endpoint is plain `http://` at an address other than `localhost`, `127.0.0.1`, or `::1`. **What to do:**
+
+ * Serve that token endpoint over HTTPS, for example by putting the server behind a reverse proxy or tunnel that terminates TLS and configuring the server to advertise the `https://` address
+ * To connect without changing the server, start Claude Code with [`MCP_SDK_GENERATION=v1`](</docs/en/env-vars>), whose [runtime](</docs/en/mcp#mcp-client-runtimes>) doesn’t apply this rule and sends the token request over plain HTTP. That choice lasts until you exit and applies to every server. The v1 runtime also skips the issuer check, so prefer serving the endpoint over HTTPS
###
@@ -1684,7 +1720,7 @@
* Open the routine for editing, or start a cloud session. Select the cloud icon showing your environment’s name, such as **Default** , to open the selector. Hover over your environment and click the settings icon.
* In the **Update cloud environment** dialog, change **Network access** from **Trusted** to **Custom** , then add the blocked domain to **Allowed domains**. Enter one domain per line. Check **Also include default list of common package managers** to keep the [default allowlist](</docs/en/cloud-environments#default-allowed-domains>) alongside your custom domains. Select **Full** instead if you want unrestricted access.
- * Click **Save changes**. The next run uses the updated allowlist.
+ * Click **Save changes**. The next run uses the updated allowlist. For a cloud session that’s already open, see [when a network access change reaches existing sessions](</docs/en/cloud-environments#network-access>).
See [Network access](</docs/en/cloud-environments#network-access>) for access levels and the default allowlist. Local CLI sessions are not affected by this policy.
@@ -2711,13 +2747,42 @@
+MCP server was not saved or removed
+
+You ran `claude mcp add`, `claude mcp add-json`, or `claude mcp remove` for a server in the `user` or `local` [scope](</docs/en/mcp#mcp-installation-scopes>). Both scopes are stored in `~/.claude.json`, and the change isn’t in that file when Claude Code reads it back after writing. The command exits with this error instead of its success line.
+
+ MCP server "example" was not saved to /home/user/.claude.json. If that file is read-only or protected by a sandbox, make it writable or run the command outside the sandbox, then add the server again.
+
+After a remove, the message reads `was not removed from` and ends with `then remove the server again`. For a `local`-scope server, the path is followed by the project directory the entry belongs to, as `(local scope for /path/to/project)`. Before v2.1.283, `claude mcp add`, `claude mcp add-json`, and `claude mcp remove` reported success even when the change didn’t reach the file. **What to do:**
+
+ * Make the file the message names writable, or run the command outside the sandbox, then run the same add or remove command again.
+
+###
+
+
+
+MCP server may not have been saved or removed
+
+You ran `claude mcp add`, `claude mcp add-json`, or `claude mcp remove` for a server in the `user` or `local` [scope](</docs/en/mcp#mcp-installation-scopes>), and Claude Code couldn’t read `~/.claude.json` back to confirm the change. The change may or may not be on disk. The text in parentheses is the error from that read.
+
+ MCP server "example" may not have been saved: /home/user/.claude.json could not be read to confirm the change (EACCES: permission denied, open '/home/user/.claude.json'). Run `claude mcp get example` to check, then add the server again if it is missing.
+
+After a remove, the message reads `may not have been removed` and ends with `then remove the server again if it is still listed`. Before v2.1.283, the commands reported success even when the change couldn’t be confirmed. **What to do:**
+
+ * Run `claude mcp get <name>` to check whether the change is on disk. For a `local`-scope server, run it from the project directory the server belongs to, since local scope is per project.
+ * If the server is missing after an add, or still listed after a remove, run the same add or remove command again.
+
+###
+
+
+
Server is Anthropic-hosted and doesn’t support local OAuth
You started a sign-in for an MCP server whose URL points at an Anthropic-hosted connector host that authenticates through a third-party identity provider. These hosts include `microsoft365.mcp.claude.com`, `gmail.mcp.claude.com`, and `gcal.mcp.claude.com`. Claude Code refuses to start its local OAuth flow for these hosts from both the `/mcp` panel and `claude mcp login`, because [their sign-in works only through claude.ai](</docs/en/mcp#use-mcp-servers-from-claude-ai>).
"gmail" is Anthropic-hosted and doesn't support local OAuth. Connect it via Settings → Connectors on claude.ai (requires `claude login`), then it'll be available here automatically.
-Claude Code matches these hosts by URL, so the message appears when a server you added with `claude mcp add` or in `.mcp.json` points at one of them. **What to do:**
+**What to do:**
* Remove your entry with `claude mcp remove <name>`, so it can’t hide the claude.ai connector at the same URL
* After removing it, connect the service at [claude.ai/customize/connectors](<https://claude.ai/customize/connectors>), while signed in to the account you use in Claude Code. Once connected, [the connector appears in Claude Code automatically](</docs/en/mcp#use-mcp-servers-from-claude-ai>) if your active authentication method is a claude.ai subscription login
@@ -3130,16 +3195,16 @@
Couldn’t open Claude Desktop
-You ran [`/desktop`](</docs/en/desktop#coming-from-the-cli>), or its alias `/app`, and the system command Claude Code uses to open Claude Desktop failed. The session stays in the terminal.
-
- Error: Couldn't open Claude Desktop (`open` exited 1: LSOpenURLsWithRole() failed for the URL claude://resume?session=<session-id> with error -10814). Open Claude Desktop and run /desktop again.
-
-**What to do:**
-
- * Open Claude Desktop yourself, then run `/desktop` again
- * To read that command’s full error output, turn on debug logging with `/debug`, run `/desktop` again, and check the debug log
-
-Before v2.1.275, the message was `Failed to open Claude Desktop. Please try opening it manually.` and didn’t say what failed.
+You ran [`/desktop`](</docs/en/desktop#coming-from-the-cli>) or its alias `/app` in a session, or [`claude --desktop`](</docs/en/cli-reference#cli-flags>) in your shell, and the system command Claude Code uses to open Claude Desktop failed. After `/desktop`, the session stays in the terminal; `claude --desktop` prints the message without the `Error:` prefix and exits with status 1. The text in parentheses names the command that failed, with its exit status and the first line of its error output when it produced them. On macOS that command is `open`, as in this example; on Windows it is `rundll32`:
+
+ Error: Couldn't open Claude Desktop (`open` exited 1: LSOpenURLsWithRole() failed for the URL claude://resume?session=<session-id> with error -10814). Open Claude Desktop and try again.
+
+**What to do:**
+
+ * Open Claude Desktop yourself, then run `/desktop` or `claude --desktop` again
+ * To read the failed command’s full error output, turn on debug logging with `/debug` and run `/desktop` again, or run `claude --desktop --debug-file <path>`, then check the debug log
+
+Before v2.1.285, the message ended `Open Claude Desktop and run /desktop again.` Before v2.1.275, it was `Failed to open Claude Desktop. Please try opening it manually.` and didn’t say what failed.
###
@@ -3364,7 +3429,7 @@
commands path escapes plugin directory: ./commands\deploy.md — its path contains a backslash, which is not resolved reliably on this platform
-Before v2.1.251, Claude Code loaded a `commands` path declared in a marketplace entry even when it pointed outside the plugin directory. Claude Code already rejected paths declared in `plugin.json` and the other component paths in a marketplace entry. Before v2.1.257, the check looked only at the path’s spelling, not at where a symlink leads. **What to do:**
+Before v2.1.251, Claude Code loaded a `commands` path declared in a marketplace entry even when it pointed outside the plugin directory. Before v2.1.257, the check looked only at the path’s spelling, not at where a symlink leads. **What to do:**
* Move the referenced file inside the plugin directory and point the path at it with a `./` relative path
* If the path is a symlink to a file outside the plugin, replace the symlink with a copy of the file
@@ -3435,10 +3500,10 @@
Claude Code keeps the plugin marketplaces you’ve added in a registry file at `~/.claude/plugins/known_marketplaces.json`. A plugin command that needs the registry, such as `claude plugin install`, fails with one of two messages when Claude Code can’t use the file:
- * `Failed to load marketplace configuration`: the file isn’t valid JSON, or can’t be read. An empty file fails this way too.
+ * `Failed to load marketplace configuration`: the file exists but isn’t valid JSON or can’t be read. An empty file fails this way too.
* `Marketplace configuration file is corrupted`: the file is valid JSON but its contents don’t match the registry schema.
-A missing file isn’t a failure: Claude Code treats it as a registry with no marketplaces. With an empty file, `claude plugin install` reports:
+With an empty file, `claude plugin install` reports:
✘ Failed to install plugin "my-plugin": Failed to load marketplace configuration: JSON Parse error: Unexpected EOF
@@ -3995,7 +4060,7 @@
terminal host process died — press Enter to restart
-If you open the row before the check runs, the footer shows `This session's terminal host process died (the conversation is saved) — press Enter to restart it` and the row turns failed. From the shell, `claude attach <id>` restarts a session already marked failed for a dead host, and otherwise prints the cause and exits:
+From the shell, `claude attach <id>` restarts a session already marked failed for a dead host, and otherwise prints the cause and exits:
Couldn't attach to <id> — This session's terminal host process died (the conversation is saved) — run `claude attach <id>` again to restart it on a fresh host.
@@ -4342,25 +4407,6 @@
-Fullscreen renderer didn’t finish starting
-
-A previous [fullscreen](</docs/en/fullscreen>) session on this machine exited before it finished starting, so Claude Code starts this session on the classic renderer and prints one of these notices:
-
- Claude Code's fullscreen renderer didn't finish starting last time on this machine, so this launch is using the classic renderer. It will try fullscreen again next launch; /tui default keeps the classic renderer.
-
- Claude Code's fullscreen renderer has repeatedly failed to start on this machine, so it has been turned off here. Run /tui fullscreen to try it again (this also resets after an update).
-
-**What to do:**
-
- * Follow [Fullscreen rendering](</docs/en/fullscreen#fullscreen-renderer-didnt-finish-starting>). It says which notice you get, what Claude Code does in later sessions, and how to try fullscreen again or keep the classic renderer.
- * If the session that died printed an exit message, see Claude Code exited after an unrecoverable interface error for what it names.
-
-Before v2.1.236, Claude Code printed no notice and kept starting sessions in fullscreen rendering after a failed start.
-
-###
-
-
-
Claude Code exited after an unrecoverable interface error
Claude Code prints this message when it exits because its terminal interface hit an error it can’t recover from, in either renderer. The second sentence appears only when the error happened while the [fullscreen](</docs/en/fullscreen>) renderer was starting:
@@ -4497,6 +4543,25 @@
* If you administer the settings, add a model your users can run to `availableModels`, or narrow the `deniedModels` entries that block every fallback. [Block specific models or versions](</docs/en/model-config#block-specific-models-or-versions>) describes how the Default option steps down
* If you don’t administer them, send the message to your administrator. Your own settings files can’t widen a managed `availableModels` or `deniedModels` list
+
+###
+
+
+
+Managed settings don’t allow this API provider
+
+Your organization’s [managed settings](</docs/en/managed-settings>) set an [`allowedProviders`](</docs/en/settings-reference#allowedproviders>) list, and the session’s API provider isn’t on it or the session uses an endpoint that isn’t pinned the way that entry requires. Claude Code refuses at startup, before a login, or when the session next contacts the API. The message begins with the permitted providers:
+
+ Your organization's managed settings allow Claude Code to use: Anthropic API, Amazon Bedrock.
+
+When the list is empty, the message reads instead:
+
+ Your organization's managed settings allow Claude Code to use no API provider at all (allowedProviders is an empty list), so it cannot start on this machine.
+
+When every entry is unrecognized, the parenthetical reads `(allowedProviders lists only unrecognized entries)` instead. **What to do:**
+
+ * Follow the message’s `To continue:` steps
+ * If you administer the settings, the message’s lines starting `Admins:` name the entry to add or the value to pin, and the [`allowedProviders`](</docs/en/settings-reference#allowedproviders>) entry says which source’s `env` block can pin it
###
@@ -4542,6 +4607,27 @@
* If you administer the machine, fix the named document so it parses as a JSON object, or remove the file, profile, or registry value. An empty `managed-settings.json` counts as `{}` and doesn’t block launch.
* If you don’t, ask your administrator to fix the deployed document. Nothing in your own settings files causes or clears this error.
+
+###
+
+
+
+Unable to read managed policy settings
+
+Your organization deploys [managed settings](</docs/en/managed-settings>), and one of the deployed sources exists but couldn’t be read, for a reason such as an I/O error rather than the operating system denying the read. With no other admin source supplying a policy, Claude Code exits at startup rather than run without the policy the source may carry:
+
+ Unable to read managed policy settings.
+ This machine may require organization login enforcement, but the policy file failed to load.
+ Contact your administrator.
+
+ Detail: <source>: <reason>
+
+In the same state, sign-in flows, API requests from a session that is already running, and the [`claude gateway`](</docs/en/claude-apps-gateway>) server are refused with a variant of the first line that names [`allowedProviders`](</docs/en/settings-reference#allowedproviders>). A read that the operating system denied, such as on a root-only file, doesn’t produce this exit: [the session starts without that source’s policies](</docs/en/managed-settings#find-entries-claude-code-dropped>). For a source that can’t be parsed, Claude Code exits with a different message naming the source. **What to do:**
+
+ * If you administer the machine, fix the problem the `Detail:` line names so the deployed source can be read, or remove the source
+ * If you don’t, send the message to your administrator. Nothing in your own settings files causes or clears this error
+
+Before v2.1.285, only sessions signed in with claude.ai or Claude Console credentials exited with this message, and a read that the operating system denied produced it too.
###
@@ -4631,7 +4717,7 @@
* Fix the rule at the source the warning names in parentheses: a settings file path, or the `--allowed-tools` flag itself. A `claude-settings-<hash>.json` path that doesn’t exist on disk stands for an inline `--settings` value. Fix the JSON you pass to that flag.
* If the source reads `managed policy settings`, forward the warning to whoever maintains your managed settings, since you can’t clear it yourself.
-Claude Code doesn’t warn about deny and ask rules with the same shape: it refuses or prompts for the extra commands they match rather than approving them. It also doesn’t warn about rules whose subcommand comes before the first `*`, such as `Bash(git commit *)`, or rules in which no word other than an option follows the `*`, such as `Bash(git *)`, or about `:*` prefix rules such as `Bash(git:*)`. In a [background session](</docs/en/agent-view>) or with `--output-format json` or `stream-json`, Claude Code writes the warning to the debug log instead of stderr, so machine-read output stays clean. Run with `--debug` to capture it at `~/.claude/debug/<session-id>.txt`. Before v2.1.246, Claude Code accepted these rules without a warning.
+In a [background session](</docs/en/agent-view>) or with `--output-format json` or `stream-json`, Claude Code writes the warning to the debug log instead of stderr, so machine-read output stays clean. Run with `--debug` to capture it at `~/.claude/debug/<session-id>.txt`. Before v2.1.246, Claude Code accepted these rules without a warning.
###
@@ -4733,10 +4819,10 @@
Responses seem lower quality than usual
-If Claude’s answers seem less capable than you expect but no error is shown, the cause is usually conversation state rather than the model itself. Claude Code doesn’t silently change model versions. It can switch to a fallback model in three specific cases:
+If Claude’s answers seem less capable than you expect but no error is shown, the cause is usually conversation state rather than the model itself. Claude Code doesn’t silently change model versions. It can switch to a fallback model in these cases:
* A configured [`--fallback-model`](</docs/en/cli-reference#cli-flags>) takes over after an availability error, for that turn only, with a notice in the transcript
- * An Amazon Bedrock or Google Cloud’s Agent Platform startup check finds your default model unavailable
+ * An Amazon Bedrock or Google Cloud’s Agent Platform startup check finds your default model unavailable, or your account [loses access to it mid-session](</docs/en/amazon-bedrock#when-a-model-is-disabled-mid-session>)
* [Automatic model fallback](</docs/en/model-config#automatic-model-fallback>) on Fable 5.1, Fable 5, Opus 5.5, Sonnet 5.5, and Opus 5 moves the session to the flagged category’s fallback model, when that category has one, and shows a notice in the transcript
The Model selection check below catches the second and third cases; the first appears as a transcript notice rather than a `/model` change. [Model configuration](</docs/en/model-config>) explains when each fallback applies. Check these first:
--- a/glossary.md
+++ b/glossary.md
@@ -487,6 +487,14 @@
+Transcript
+
+The stored record of a session. The conversation is what you and Claude exchange; the transcript is that conversation kept as a file, by default at `~/.claude/projects/<project>/<session-id>.jsonl`. Claude Code reads the file back when you resume, which is how a conversation continues after the session ends. For the on-screen view of the same conversation, see the [transcript viewer](</docs/en/interactive-mode#transcript-viewer>). Learn more: [Where transcripts are stored](</docs/en/sessions#where-transcripts-are-stored>)
+
+###
+
+
+
Turn
One complete response from Claude within a session. A turn begins when you send a message and ends when Claude finishes responding, with any number of tool calls in between. Stop hooks fire at the end of each turn. A session consists of many turns, and the agentic loop describes what happens inside one. Learn more: [How Claude Code works](</docs/en/how-claude-code-works#the-agentic-loop>)
--- a/google-vertex-ai.md
+++ b/google-vertex-ai.md
@@ -193,7 +193,15 @@
Startup model checks
-When Claude Code starts with Google Cloud’s Agent Platform configured, it verifies that the models it intends to use are accessible in your project. If you have pinned a model version that is older than the current Claude Code default, and your project can invoke the newer version, Claude Code prompts you to update the pin. Accepting writes the new model ID to your [user settings file](</docs/en/settings>) and restarts Claude Code. Declining is remembered until the next default version change. If you have not pinned a model and the current default is unavailable in your project, Claude Code falls back for the current session and shows a notice. It tries earlier versions of the default model first and, when the default is an Opus model and no Opus version is available, falls back to the default Sonnet model. The fallback is not persisted. Enable the newer model in [Model Garden](<https://console.cloud.google.com/vertex-ai/model-garden>) or pin a version to make the choice permanent. When you start the session on a specific Sonnet or Opus version, for example with `--model`, `ANTHROPIC_MODEL`, or the [`model` setting](</docs/en/settings-reference#model>), that version acts as the session’s pinned default for the matching `sonnet` or `opus` alias. Claude Code skips the availability check for the built-in default your model replaces and starts on the model you configured, with no fallback notice. Model aliases such as `opus` don’t act as pins, and neither does a model ID Claude Code doesn’t recognize.
+When Claude Code starts with Google Cloud’s Agent Platform configured, it verifies that the models it intends to use are accessible in your project. If you have pinned a model version that is older than the current Claude Code default, and your project can invoke the newer version, Claude Code prompts you to update the pin. Accepting writes the new model ID to your [user settings file](</docs/en/settings>) and restarts Claude Code. Declining is remembered until the next default version change. If you have not pinned a model and the current default is unavailable in your project, Claude Code falls back for the current session and shows a notice. It tries earlier versions of the default model first and, when the default is an Opus model and no Opus version is available, falls back to the default Sonnet model. The fallback is not persisted. Enable the newer model in [Model Garden](<https://console.cloud.google.com/vertex-ai/model-garden>) or pin a version to make the choice permanent. When you start the session on a specific Sonnet or Opus version, for example with `--model`, `ANTHROPIC_MODEL`, or the [`model` setting](</docs/en/settings-reference#model>), that version acts as the session’s pinned default for the matching `sonnet` or `opus` alias. Claude Code skips the availability check for the built-in default your model replaces and starts on the model you configured, with no fallback notice. Model aliases such as `opus` don’t act as pins, and neither does a model ID Claude Code doesn’t recognize. When these checks find a model your project can’t invoke, Claude Code remembers the refusal on this machine for up to a day, and launches during that time skip the remembered model without asking Agent Platform again. Claude Code checks a remembered refusal of a current default model again at launch once ten minutes have passed since the last check, so a default your administrator re-enables comes back. To turn the memory off, set [`CLAUDE_CODE_SKIP_MODEL_ACCESS_MEMORY=1`](</docs/en/env-vars>).
+
+###
+
+
+
+When a model is disabled mid-session
+
+If your project loses access to the model your session is running on, for example because an administrator disables it in [Model Garden](<https://console.cloud.google.com/vertex-ai/model-garden>), Claude Code switches the session to another model instead of failing each request, and shows `Switched to <fallback> because <model> is not available`. It tries the same models as the startup fallback: earlier versions of the same tier first and, for an Opus session with no Opus version available, the default Sonnet model. The switch applies only to a tier you haven’t pinned, the same condition as the startup fallback. A session on a specific version you picked keeps its model and, without a fallback model chain, the request fails instead. In [auto mode](</docs/en/permission-modes#enable-auto-mode-on-bedrock-agent-platform-or-foundry>), Claude Code switches only to a model auto mode supports on Agent Platform. If none of those models is available either, the request fails. A [fallback model chain](</docs/en/model-config#fallback-model-chains>) you configure replaces the tier switch: on these refusals Claude Code switches to your configured fallback instead. To have refused requests fail rather than switch, set [`CLAUDE_CODE_DISABLE_MODEL_ACCESS_FALLBACK=1`](</docs/en/env-vars>). A fallback chain you configured still switches on these refusals; remove the chain as well if you want every refused request to fail.
##
--- a/headless.md
+++ b/headless.md
@@ -258,12 +258,12 @@
Auto-approve tools
-Use `--allowedTools` to let Claude use certain tools without prompting. This example runs a test suite and fixes failures, allowing Claude to execute Bash commands and read/edit files without asking for permission:
+Use `--allowedTools` to let Claude use certain tools without prompting. Listing `Read` and `Edit` lets Claude read and edit files without asking for permission. Listing `Bash` does the same for shell commands, except in a run that starts in [auto mode](</docs/en/permission-modes#how-auto-mode-evaluates-actions>), where Claude Code drops a bare `Bash` entry as a broad allow rule and auto mode evaluates each command instead. This example runs a test suite and fixes failures with those three tools listed:
claude -p "Run the test suite and fix any failures" \
--allowedTools "Bash,Read,Edit"
-To set a baseline for the whole session instead of listing individual tools, pass a [permission mode](</docs/en/permission-modes>). For `-p`, the [built-in starting permission mode](</docs/en/permission-modes#which-mode-a-session-starts-in>) is Manual on every plan, so pass the permission mode you want:
+To set a baseline for the whole session instead of listing individual tools, pass a [permission mode](</docs/en/permission-modes>). A run where nothing sets a permission mode takes the [built-in starting permission mode](</docs/en/permission-modes#which-mode-a-session-starts-in>), which can be `auto`, so pass the one you want:
* **`auto`** : pass `--permission-mode auto` to have a classifier review most actions instead of you
* **`dontAsk`** : Claude Code denies every call that would otherwise prompt, which is useful for locked-down CI runs. Actions that need no approval in Manual mode still run, such as file reads in your working directories and the [read-only command set](</docs/en/permissions#read-only-commands>), and so do actions your `--allowedTools` entries or `permissions.allow` rules cover. `AskUserQuestion`, connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), and MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) are denied even when an allow rule matches
--- a/hooks.md
+++ b/hooks.md
@@ -419,6 +419,8 @@
return {};
};
+To confirm the block, register the callback under `PreToolUse` with a `Write|Edit` matcher and ask the agent to create a file under `/etc`: the Write tool’s result in the message stream contains `Writing to /etc is not allowed`, and no file is created.
+
###
@@ -469,7 +471,7 @@
Register multiple hooks
-When an event fires, all matching hooks run in parallel. For permission decisions, the most restrictive result applies: a single `deny` blocks the tool call regardless of what the other hooks return. Because completion order is non-deterministic, write each hook to act independently rather than relying on another hook having run first. The example below registers three independent checks for every tool call:
+When an event fires, all matching hooks run in parallel. For permission decisions, the most restrictive result applies: a single `deny` blocks the tool call regardless of what the other hooks return. Because completion order is non-deterministic, write each hook to act independently rather than relying on another hook having run first. The example below registers three independent checks for every tool call. The hook names in it, such as `audit_logger` in Python or `auditLogger` in TypeScript, stand in for callbacks you define:
Python
@@ -501,7 +503,7 @@
Filter with multi-tool matchers
-Use multi-tool matchers to share one callback across related tools. This example registers three matchers with different scopes:
+Use multi-tool matchers to share one callback across related tools. This example registers three matchers with different scopes, and each hook it names stands in for a callback you define:
* A pipe-separated exact list (`Write|Edit|NotebookEdit`) triggers `file_security_hook` only for file modification tools.
* A regex (`^mcp__`) triggers `mcp_audit_hook` for any MCP tool whose name starts with `mcp__`.
@@ -582,6 +584,8 @@
SubagentStop: [{ hooks: [subagentTracker] }]
}
};
+
+To confirm the hook fires, register the callback and ask the agent to delegate a small task to a subagent, such as listing the files in the current directory: when the subagent finishes, the callback prints the `[SUBAGENT] Completed:` lines with the subagent’s ID and transcript path.
###
--- a/install.md
+++ b/install.md
@@ -66,6 +66,7 @@
The last sentence of the summary tells you whether the plugin is usable in this session yet:
* **Active now** : `Plugin is now active.` No reload is needed.
+ * **Active, but a server needs setup** : `Plugin is now active.` is followed by `Its bundled MCP server needs configuration before it can start`. The plugin’s [bundled MCP server](</docs/en/plugins/components#include-a-packaged-mcpb-server>) can’t start until you set its options. Select the plugin on the **Installed** tab in `/plugin` and choose **Configure** to set the server’s options.
* **Reload needed** : `Run /reload-plugins to activate.` The panel closes and Claude Code runs that reload for you. If the reload would [invalidate the prompt cache](</docs/en/prompt-caching#enabling-or-disabling-a-plugin>), it warns and leaves the plugin pending instead. Run `/reload-plugins --force` to activate it anyway, which costs one uncached request.
* **Load failed** : `The plugin couldn't be loaded`. Open the **Errors** tab in `/plugin` for the reason, then see [After install: plugin not working](</docs/en/plugins/troubleshooting#plugin-installed-but-not-working>).
@@ -230,7 +231,7 @@
A private marketplace is one in a repository you need credentials to clone, on GitHub or any other git host. You add it with the same `/plugin marketplace add` or `claude plugin marketplace add` command as a public one. Claude Code clones it with the git credentials already on your machine and never prompts, so each way of connecting has a requirement:
* **HTTPS** : your git credential helpers apply, so access you set up with `gh auth login`, the macOS Keychain, or `git-credential-store` works. Interactive prompts are suppressed, so a host you have never authenticated to fails instead of asking for a password.
- * **SSH** : the host must already be in your `known_hosts` file and the key must work without a passphrase prompt, because the host-fingerprint and passphrase prompts are suppressed too.
+ * **SSH** : the host must already be in your `known_hosts` file and the key must work without a passphrase prompt. If your git setup names an SSH program in `GIT_SSH_COMMAND`, `GIT_SSH`, or your git config’s `core.sshCommand`, Claude Code runs that program.
* **GitHub`owner/repo` shorthand**: Claude Code checks whether your SSH key authenticates to `github.com`, then clones over SSH if it does and over HTTPS if it doesn’t. Set [`CLAUDE_CODE_PLUGIN_PREFER_HTTPS=1`](</docs/en/env-vars#variables>) to skip that check and always clone over HTTPS.
The same credentials apply when you run `/plugin install`, `/plugin marketplace update`, and `claude plugin update`. On a GitHub Enterprise Server host, see [Plugin marketplaces on GHES](</docs/en/github-enterprise-server#plugin-marketplaces-on-ghes>) for the credentials each operation needs. If your organization registers the marketplace for you through managed settings, you don’t add it yourself. See [Pre-install and require plugins](</docs/en/plugins/org#pre-install-and-require-plugins>).
@@ -262,7 +263,12 @@
* Type to filter by name or description.
* Press **Space** to enable or disable the selected plugin, and **f** to favorite it.
- * Press **Enter** to open a plugin’s details. The menu there offers **Disable plugin** or **Enable plugin** , **Update now** , and **Uninstall**. Plugins that take settings also offer **Configure options**.
+ * Press **Enter** to open a plugin’s details.
+
+A plugin’s details menu offers **Disable plugin** or **Enable plugin** , **Update now** , and **Uninstall**. Two more items appear for plugins that take settings, and a plugin can show both:
+
+ * **Configure options** : shown when the plugin’s manifest declares [`userConfig` options](</docs/en/plugins/manifest-reference#user-configuration>). Opens the dialog for those options
+ * **Configure** : shown when the plugin includes a [bundled MCP server](</docs/en/plugins/components#include-a-packaged-mcpb-server>). Sets that server’s own `user_config` settings
The tab can also show plugins at **Managed** scope. Your organization installed those through [managed settings](</docs/en/settings#settings-files>), and you can’t enable, disable, or uninstall them here. For a synced plugin that your organization requires on claude.ai, see Manage plugins synced from claude.ai. When you close the `/plugin` panel with pending changes you made in it, Claude Code runs `/reload-plugins` for you to apply them. If the reload would [invalidate the prompt cache](</docs/en/prompt-caching#enabling-or-disabling-a-plugin>), it warns and leaves the changes pending instead. Run `/reload-plugins --force` to apply them anyway.
--- a/interactive-mode.md
+++ b/interactive-mode.md
@@ -348,7 +348,7 @@
* Prompt Claude Code to run a command in the background
* Press `Ctrl+B` to move a regular Bash tool invocation to the background. Tmux users must press `Ctrl+B` twice due to tmux’s prefix key.
-When a command reaches its timeout before it finishes, Claude Code automatically [moves it to the background](</docs/en/tools-reference#background-commands>) instead of stopping it, unless the command starts with `sleep`. To change how long commands run before that happens, set the [Bash timeout environment variables](</docs/en/tools-reference#timeout-and-output-limits>). **Key features:**
+When a command reaches its timeout before it finishes, Claude Code automatically [moves it to the background](</docs/en/tools-reference#foreground-commands-that-move-to-the-background>) instead of stopping it, unless the command starts with `sleep`. If you’ve turned background tasks off with [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`](</docs/en/env-vars#variables>) or by starting in [bare mode](</docs/en/headless#start-faster-with-bare-mode>), the command stops at its timeout. To change the timeout, set the [Bash timeout environment variables](</docs/en/tools-reference#timeout-and-output-limits>). **Key features:**
* Output is written to a file and Claude can retrieve it using the Read tool
* Background tasks have unique IDs for tracking and output retrieval
@@ -358,9 +358,10 @@
* On macOS and Linux, Claude Code stops your running background tasks when the operating system reports critical memory pressure, provided the session has been idle for at least 30 minutes and no turn or subagent is running. Requires Claude Code v2.1.193 or later
* The [debug log](</docs/en/debug-your-config>) says why tasks were stopped, or why a pressure event left them running
* Set [`CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP`](</docs/en/env-vars>) to `1` to turn off memory-pressure stops
- * Background commands owned by a [subagent](</docs/en/sub-agents>) have no time limit, except that a command owned by a subagent running in the foreground ends when that subagent gives its final response; see [Background commands](</docs/en/tools-reference#background-commands>) in the tools reference. Before v2.1.218, neither the memory-pressure reap nor the former 60-minute limit on subagent commands covered commands moved to the background with `Ctrl+B`
-
-To disable all background task functionality, set the `CLAUDE_CODE_DISABLE_BACKGROUND_TASKS` environment variable to `1`. See [Environment variables](</docs/en/env-vars>) for details. **Common backgrounded commands:**
+ * Background Bash and PowerShell commands have a time limit, counted from the moment the command enters the background: 30 minutes, or the `timeout` Claude asks for when it starts a command in the background, up to a maximum of 2 hours. A command that moves to the background while it runs, for example with `Ctrl+B`, gets 30 minutes from the move. When a command reaches its limit, Claude Code stops it and tells Claude why, and Claude can start it again with a longer `timeout` if the work still needs it. To lengthen the limits, see [Raise the time limit for background commands](</docs/en/tools-reference#raise-the-time-limit-for-background-commands>) in the tools reference
+ * A background command that a foreground [subagent](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) started ends when that subagent’s run ends, whether it finished, failed, or was interrupted; see [When a background command stops](</docs/en/tools-reference#when-a-background-command-stops>) in the tools reference
+
+To disable all background task functionality, set the [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`](</docs/en/env-vars#variables>) environment variable to `1`. Starting in [bare mode](</docs/en/headless#start-faster-with-bare-mode>) turns it off as well. **Common backgrounded commands:**
* Build tools (webpack, vite, make)
* Package managers (npm, yarn, pnpm)
--- a/keybindings.md
+++ b/keybindings.md
@@ -560,8 +560,6 @@
* Under a non-Latin layout such as Cyrillic, Claude Code matches Ctrl shortcuts by the key’s US-layout position when the terminal uses the Kitty keyboard protocol and reports that position. In such a terminal, with a Russian layout active, pressing Ctrl and the physical W key triggers `ctrl+w`. In a terminal that doesn’t report the position, Claude Code matches whatever the terminal sends for the keypress: an ASCII control code triggers the Latin shortcut, and a keypress that arrives as the Cyrillic character matches no binding
* Under layouts that rearrange Latin letters, such as AZERTY, Claude Code matches the letter that the key types, so pressing Ctrl and the key labeled A triggers `ctrl+a`
-
-Before v2.1.247, pressing a Ctrl shortcut under a non-Latin layout didn’t trigger its binding in terminals that use the Kitty keyboard protocol, such as Ghostty, Kitty, WezTerm, and iTerm2.
###
@@ -717,7 +715,7 @@
* Misspelled modifiers, such as `ctl+k`. Claude Code drops the part it doesn’t recognize and applies the binding to the keystroke that remains, `k` in this example.
* Invalid context names
* Invalid action values, such as an action that isn’t a string or `null`
- * Unknown action names, such as a typo of a registered action. Claude Code skips the binding and keeps any default binding for that key in effect. Before v2.1.246, a binding with an unknown action name silently disabled that key
+ * Unknown action names, such as a typo of a registered action. Claude Code skips the binding and keeps any default binding for that key in effect.
* Reserved shortcut conflicts
* Duplicate bindings in the same context
--- a/llm-gateway.md
+++ b/llm-gateway.md
@@ -35,7 +35,7 @@
3. Distribute the configuration through a [managed settings file](</docs/en/managed-settings#delivery-mechanisms>) and your secrets tooling, so every machine receives the base URL and a credential. When both are distributed, developers don’t configure anything. If you don’t have settings distribution in place, developers follow the [connect page](</docs/en/llm-gateway-connect>) to set the variables themselves.
4. Have each developer [check for the configuration in Claude Code](</docs/en/llm-gateway-connect#check-for-an-existing-configuration>), so distribution problems surface before they depend on the gateway.
-[Roll out an LLM gateway for your organization](</docs/en/llm-gateway-rollout>) walks each step and shows the configuration files to distribute at each one. The gateway is one part of organization setup; for policy enforcement, usage visibility, and data handling decisions, see [Set up Claude Code for your organization](</docs/en/admin-setup>).
+[Roll out an LLM gateway for your organization](</docs/en/llm-gateway-rollout>) walks each step and shows the configuration files to distribute at each one. The gateway is one part of organization setup; for policy enforcement, usage visibility, and data handling decisions, see [Set up Claude Code for your organization](</docs/en/admin-setup>). To make a gateway reached through `ANTHROPIC_BASE_URL` the only destination a managed machine may use, set [`allowedProviders`](</docs/en/settings-reference#allowedproviders>) to `["customEndpoint"]` in the same managed settings file and put the gateway’s `ANTHROPIC_BASE_URL` in that file’s `env` block. Claude Code then refuses a session pointed anywhere else, including at Anthropic directly or at a developer’s own proxy, and accepts `ANTHROPIC_BASE_URL` only with the value you set there. For a gateway reached through a provider-specific endpoint variable such as `ANTHROPIC_BEDROCK_BASE_URL`, the `allowedProviders` entry says which variable to pin. Requires Claude Code v2.1.285 or later.
##
--- a/llm-gateway-protocol.md
+++ b/llm-gateway-protocol.md
@@ -290,7 +290,7 @@
The request is `GET /v1/models?limit=1000` with a timeout of 3 seconds by default, and any redirect is treated as failure so the credential can’t leak to a redirect target. A gateway that responds slower than the timeout, or one that redirects `/v1/models`, even `http` to `https`, fails discovery silently; serve the endpoint directly at the configured base URL. To give a slow gateway longer, set [`CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS`](</docs/en/env-vars#variables>). The variable requires Claude Code v2.1.269 or later. Claude Code sends the discovery request with both credential headers below and omits a header whose value doesn’t resolve. Sending both headers requires Claude Code v2.1.248 or later. Earlier versions send only `Authorization` when `ANTHROPIC_AUTH_TOKEN` is set and only `x-api-key` otherwise.
- * `Authorization`: `ANTHROPIC_AUTH_TOKEN` as a bearer token, otherwise the [`apiKeyHelper`](</docs/en/llm-gateway-connect#rotate-credentials-with-apikeyhelper>) value as a bearer token. In that case Claude Code waits for the helper to return before sending the request.
+ * `Authorization`: `ANTHROPIC_AUTH_TOKEN` as a bearer token, otherwise the [`apiKeyHelper`](</docs/en/llm-gateway-connect#rotate-credentials-with-apikeyhelper>) value as a bearer token.
* `x-api-key`: the API key Claude Code resolved, such as `ANTHROPIC_API_KEY`. When a helper value is the only credential, this header carries it too, so the value arrives in both headers.
Claude Code also sends any headers from `ANTHROPIC_CUSTOM_HEADERS`. When a custom header has a non-empty value, Claude Code sends it in place of a built-in header of the same name, matching names case-insensitively. When neither credential header’s value resolves, Claude Code skips discovery and writes a `[gatewayDiscovery] skipped` line to the debug log of a `claude --debug` session. If you supply a credential only through `ANTHROPIC_CUSTOM_HEADERS`, Claude Code still skips discovery. Claude Code reads `id`, the optional `display_name`, and the optional `description` from each entry in the response’s `data` array:
--- a/managed-settings.md
+++ b/managed-settings.md
@@ -165,7 +165,7 @@
* [`forceRemoteSettingsRefresh`](</docs/en/server-managed-settings>)
* `env`, merged per variable across the admin sources: each variable comes from the highest-priority source that defines it, so lower sources fill in variables the higher ones leave unset. A few variables follow their own rules; [Per-key exceptions across managed sources](</docs/en/server-managed-settings#per-key-exceptions-across-managed-sources>) names each one. Requires Claude Code v2.1.223 or later. Before v2.1.223, Claude Code applied the selected source’s whole `env` block only
-The gateway login keys follow a separate rule. Claude Code never reads them from server-managed settings, so while server-managed settings are the selected source, the highest-ranked admin source on the machine that carries a policy key still supplies them. A value in an admin source ranked below that one, or in the HKCU registry, is ignored. When an admin source sets `allowManagedMcpServersOnly` or an `allowedMcpServers` list and that value isn’t the one in force, `/status` and `claude doctor` name that source and key.
+The gateway login keys follow a separate rule. Claude Code never reads them from server-managed settings, so while server-managed settings are the selected source, the highest-ranked admin source on the machine that carries a policy key still supplies them. A value in an admin source ranked below that one, or in the HKCU registry, is ignored. [`allowedProviders`](</docs/en/settings-reference#allowedproviders>) has its own rule: its entry’s Scope note says how a list set on the machine combines with a server-managed one. Requires Claude Code v2.1.285 or later. When an admin source sets `allowManagedMcpServersOnly` or an `allowedMcpServers` list and that value isn’t the one in force, `/status` and `claude doctor` name that source and key.
###
@@ -295,7 +295,12 @@
* An empty managed settings file counts as `{}`.
* A malformed value in the user-writable HKCU registry key never blocks launch. Claude Code reports it as a notice in `/status` and `claude doctor` instead.
-If a managed settings file, drop-in file, or `managed-settings.d/` directory can’t be read and no admin source supplies a policy, sessions signed in with claude.ai or Claude Console credentials exit at startup with a message to contact an administrator. To find a dropped entry, look in one of three places:
+When a managed settings file, drop-in file, `managed-settings.d/` directory, MDM profile, or HKLM registry value exists but can’t be read, and no admin source supplies a policy, what happens depends on why the read failed:
+
+ * If the operating system denied the read, for example on a root-only file, every session starts without that source’s policies. `/status` and `claude doctor` record the failure, and a run with `-p` also prints it to stderr.
+ * For any other read failure, such as an I/O error, every session exits at startup with [a message to contact an administrator](</docs/en/errors#unable-to-read-managed-policy-settings>).
+
+To find a dropped entry, look in one of three places:
* Interactive sessions show a dialog at startup listing the invalid entries.
* Non-interactive runs with `-p` print a summary to stderr.
@@ -325,6 +330,7 @@
Field| Behavior when present but invalid
---|---
`allowedMcpServers`| Enforced as an empty allowlist until the value is fixed, so no MCP servers that users add are admitted. Servers your organization delivers through [`managedMcpServers`](</docs/en/settings-reference#managedmcpservers>) still load, and `managed-mcp.json` servers load per [How a server is evaluated](</docs/en/managed-mcp#how-a-server-is-evaluated>). An individual invalid entry is stripped and the valid subset is enforced.
+[`allowedProviders`](</docs/en/settings-reference#allowedproviders>)| Enforced as an empty allowlist until the value is fixed, so every API provider is refused and Claude Code doesn’t start on the machine. If only an individual entry isn’t a known provider name, Claude Code drops and reports that entry and enforces the rest.
`allowedHttpHookUrls`| Claude Code enforces an empty managed [allowlist](</docs/en/settings-reference#allowedhttphookurls>) until you fix the value, so an HTTP hook runs only if another settings file lists its URL. If only an individual entry is invalid, Claude Code strips that entry and enforces the rest.
`httpHookAllowedEnvVars`| Claude Code enforces an empty managed [allowlist](</docs/en/settings-reference#httphookallowedenvvars>) until you fix the value, so a header variable is interpolated only if another settings file names it. If only an individual entry is invalid, Claude Code strips that entry and enforces the rest.
`allowedChannelPlugins`| Claude Code enforces an empty allowlist until you fix the value, so no channel plugin passed to `--channels` is admitted. If only an individual entry is invalid, it strips that entry and enforces the rest.
@@ -365,7 +371,7 @@
Keys only a managed source can set
-Claude Code reads the following keys only from a managed source; placing them in user or project settings files has no effect. Most of them are locks: the value a lock governs, such as permission rules or `sandbox.network.allowedDomains`, is an ordinary key that any level can set, and the lock tells Claude Code to honor only the managed value. The table covers the permission, plugin, and delivery controls. For any key not listed here, the Scope column of the [settings reference](</docs/en/settings-reference#all-settings>) index says whether it’s managed-only; the remaining managed-only keys there include the gateway login URL, version, browser, mobile-simulator, SSH host, Desktop local-session, sandbox binary path, model pricing, model restriction, and CLAUDE.md controls.
+Claude Code reads the following keys only from a managed source; placing them in user or project settings files has no effect. Most of them are locks: the value a lock governs, such as permission rules or `sandbox.network.allowedDomains`, is an ordinary key that any level can set, and the lock tells Claude Code to honor only the managed value. The table covers the permission, plugin, and delivery controls. For any key not listed here, the Scope column of the [settings reference](</docs/en/settings-reference#all-settings>) index says whether it’s managed-only.
Setting| Description
---|---
--- a/mcp-quickstart.md
+++ b/mcp-quickstart.md
@@ -322,7 +322,7 @@
What happens next tells you where the problem is:
- * The command starts and waits for input: the server itself works. Run `claude mcp get <name>` and confirm the command shown there matches what you just ran. If the command shown differs from what you typed, you likely omitted the `--` separator before the server command. Remove the server and re-add it with `--` in place. If you wrote `.mcp.json` by hand, check its syntax and location.
+ * The command starts and waits for input: the server itself works. Run `claude mcp get <name>` and confirm the command shown there matches what you just ran. If the command shown differs from what you typed, you likely omitted the `--` separator before the server command. Remove the server and re-add it with `--` in place. If you wrote `.mcp.json` by hand, check its syntax and location. Before v2.1.285, `claude mcp get` printed no `Command` line for a stdio entry saved without a `type` field, such as a hand-written `.mcp.json` entry. On those versions, run `claude mcp list` instead, which prints the command line either way.
* The command errors: the message names what’s missing, such as Node.js or a browser.
Connection timed out at startup
--- a/model-config.md
+++ b/model-config.md
@@ -33,7 +33,7 @@
**`sonnet`**| Uses the latest Sonnet model for daily coding tasks
**`opus`**| Uses the latest Opus model for complex reasoning tasks
**`haiku`**| Uses the fast and efficient Haiku model for simple tasks
-**`sonnet[1m]`**| Uses Sonnet with a [1 million token context window](<https://platform.claude.com/docs/en/build-with-claude/context-windows#context-window-sizes-by-model>) for long sessions. No effect when `sonnet` already resolves to Sonnet 5.5 or Sonnet 5 with their native 1M window; behind an [LLM gateway](</docs/en/llm-gateway>), selects the 1M window for that model
+**`sonnet[1m]`**| Uses Sonnet with a [1 million token context window](<https://platform.claude.com/docs/en/build-with-claude/context-windows#context-window-sizes-by-model>) for long sessions. No effect when `sonnet` already resolves to Sonnet 5.5 or Sonnet 5 with their native 1M window
**`opus[1m]`**| Uses Opus with a [1 million token context window](<https://platform.claude.com/docs/en/build-with-claude/context-windows#context-window-sizes-by-model>) for long sessions
**`opusplan`**| Special mode that uses `opus` during plan mode, then switches to `sonnet` for execution
@@ -407,7 +407,7 @@
Fallback model chains
-When the primary model is overloaded, unavailable, or returns another non-retryable server error, Claude Code can switch to a fallback model instead of failing the request. Authentication, billing, rate-limit, request-size, and transport errors, and a [denial by your organization’s policy check](</docs/en/errors#automatic-retries>), never trigger a switch; those follow their normal retry and error handling. Configure one or more fallback models and Claude Code tries them in order, showing a notice when it switches. The switch lasts for the current turn only, so your next message tries the primary model first again. Claude Code caps chains at three models after duplicate removal and ignores extra entries. Set a chain for one session with the `--fallback-model` flag, which accepts a comma-separated list:
+When the primary model is overloaded, unavailable, or returns another non-retryable server error, Claude Code can switch to a fallback model instead of failing the request. Authentication, billing, rate-limit, request-size, and transport errors, and a [denial by your organization’s policy check](</docs/en/errors#automatic-retries>), never trigger a switch; those follow their normal retry and error handling. It does switch when [Amazon Bedrock](</docs/en/amazon-bedrock#when-a-model-is-disabled-mid-session>) or [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai#when-a-model-is-disabled-mid-session>) refuses a model your account can’t invoke, which Claude Code treats as the model being unavailable rather than as an authentication error. Configure one or more fallback models and Claude Code tries them in order, showing a notice when it switches. The switch lasts for the current turn only, so your next message tries the primary model first again. Claude Code caps chains at three models after duplicate removal and ignores extra entries. Set a chain for one session with the `--fallback-model` flag, which accepts a comma-separated list:
claude --fallback-model sonnet,haiku
@@ -611,7 +611,7 @@
Pro| Requires [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>)| Requires [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>)
API and pay-as-you-go| Full access| Full access
-Claude Code checks these plan requirements only when it connects to the Anthropic API directly. If you point `ANTHROPIC_BASE_URL` at an [LLM gateway](</docs/en/llm-gateway#subscriptions-and-gateways>) and your saved claude.ai login stays the active credential, Claude Code doesn’t check your plan’s usage credits. The `[1m]` options stay available in `/model`, and the gateway decides whether the request succeeds. Before v2.1.229, Claude Code rejected `/model sonnet[1m]` in that configuration when it couldn’t confirm usage credits on the account. To turn off 1M context, set `CLAUDE_CODE_DISABLE_1M_CONTEXT=1`. Claude Code removes 1M model variants from the model picker. On models with a native 1M window, such as Sonnet 5 and the Fable models, it also treats the model as having a 200K context window:
+Claude Code checks these plan requirements only when it connects to the Anthropic API directly. If you point `ANTHROPIC_BASE_URL` at an [LLM gateway](</docs/en/llm-gateway#subscriptions-and-gateways>) and your saved claude.ai login stays the active credential, Claude Code doesn’t check your plan’s usage credits. The `[1m]` options stay available in `/model`, and the gateway decides whether the request succeeds. Before v2.1.229, Claude Code rejected `/model sonnet[1m]` in that configuration when it couldn’t confirm usage credits on the account. If you set `ANTHROPIC_BASE_URL` to an [LLM gateway](</docs/en/llm-gateway>) or another proxy, Claude Code gives each model it recognizes the same context window the model has on the Anthropic API. Fable 5.1, Fable 5, Sonnet 5 and later, and Opus 4.7 and later get the 1M window with no `[1m]` variant to select, and a model that reaches 1M only through its `[1m]` variant, such as Opus 4.6, runs at 200K without it. Claude Code can’t detect a lower limit that the gateway or the server behind it enforces. If your gateway rejects requests above 200K tokens, run `/autocompact 200k` so sessions compact at that boundary. To turn off 1M context, set `CLAUDE_CODE_DISABLE_1M_CONTEXT=1`. Claude Code removes 1M model variants from the model picker. On models with a native 1M window, such as Sonnet 5 and the Fable models, it also treats the model as having a 200K context window:
* With auto-compaction on, sessions compact at the 200K boundary through auto-compaction. Setting the auto-compact window above 200K doesn’t lift the hold, because Claude Code caps that window at the model’s context window.
* With auto-compaction off, sessions stop at the 200K boundary with the [context-limit error](</docs/en/errors#prompt-is-too-long>) instead of compacting.
@@ -631,9 +631,8 @@
Sonnet 5.5 and Sonnet 5 context window
-On the Anthropic API, Sonnet 5.5 and Sonnet 5 always run with the 1M context window. There is no 200K variant, no `[1m]` suffix to select, and no usage credits required on any plan. Sessions auto-compact before the window fills, at about 967K tokens by default; set [`CLAUDE_CODE_AUTO_COMPACT_WINDOW`](</docs/en/env-vars>) to choose a different threshold. Two configurations budget the window at 200K instead:
-
- * **LLM gateway** : when `ANTHROPIC_BASE_URL` points at a [gateway](</docs/en/llm-gateway>), Claude Code can’t verify 1M support. To use the full window, select Sonnet 5.5 (1M context) in the model picker, which maps to `sonnet[1m]`, or run `/model claude-sonnet-5[1m]` for Sonnet 5.
+On the Anthropic API, Sonnet 5.5 and Sonnet 5 always run with the 1M context window. There is no 200K variant, no `[1m]` suffix to select, and no usage credits required on any plan. Sessions auto-compact before the window fills, at about 967K tokens by default; set [`CLAUDE_CODE_AUTO_COMPACT_WINDOW`](</docs/en/env-vars>) to choose a different threshold. Claude Code gives Sonnet 5.5 and Sonnet 5 the same 1M window behind an [LLM gateway](</docs/en/llm-gateway>) or another custom `ANTHROPIC_BASE_URL`. If your gateway enforces a lower limit, see the context window behind a gateway. This setting budgets the window at 200K instead:
+
* **`CLAUDE_CODE_DISABLE_1M_CONTEXT=1`** : holds sessions on every model with a native 1M window to a 200K window; see Extended context for how the hold is enforced. Useful for deployments that need to cap context.
##
@@ -675,7 +674,7 @@
* [Cloud sessions](</docs/en/claude-code-on-the-web>) compact as the conversation approaches the model’s limit
* Sonnet 4.6 and Opus 4.6 without extended context compact at the 200K boundary, and so do Opus 4.8 and later when they run with a 200K context window, such as on Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry
* When you set [`CLAUDE_CODE_DISABLE_1M_CONTEXT=1`](</docs/en/env-vars>), models with a native 1M window, such as Sonnet 5 and the Fable models, compact at the 200K boundary
- * Models running with a native 1M window, such as Sonnet 5, the Fable models, and Opus 4.7 and later on the Anthropic API, compact before the window fills, at about 967K tokens by default. On Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, Pin models for third-party deployments says which models run with that window; for the configurations that budget Sonnet 5.5 and Sonnet 5 at 200K instead, see Sonnet 5.5 and Sonnet 5 context window
+ * Models running with a native 1M window compact before the window fills, at about 967K tokens by default. On the Anthropic API, these include Sonnet 5, the Fable models, and Opus 4.7 and later. On Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, see Pin models for third-party deployments for which models run with that window. Behind a custom `ANTHROPIC_BASE_URL`, see the context window behind a gateway
* Sessions on a model ID Claude Code doesn’t recognize, such as an [LLM gateway](</docs/en/llm-gateway>) alias, compact at the context window Claude Code assumes for the ID; see Correct the window for a gateway or custom model ID
###
--- a/monitoring-usage.md
+++ b/monitoring-usage.md
@@ -1281,7 +1281,8 @@
* `managed_settings.trigger`: `"startup"` for the session-start event, `"change"` when the managed settings or the policy helper’s state changed later in the session, or `"refused"` when a managed settings policy stopped the session. Claude Code sends a `change` event only when an attribute differs from the last event it sent, and a changed setting value counts even when `OTEL_LOG_MANAGED_SETTINGS` is off
* `error.type`: why Claude Code stopped the session. Present only on `refused` events:
* `"helper_failed"`: a [policy helper run failed](</docs/en/settings-reference#helper-failures>)
- * `"policy_invalid"`: the managed settings contain an error that stops Claude Code from starting, or an admin source failed to load, so Claude Code can’t check organization login enforcement
+ * `"policy_invalid"`: the managed settings contain an error that stops Claude Code from starting, or an admin source failed to load for a reason other than a denied read, so Claude Code can’t check organization login or provider enforcement
+ * `"provider_not_allowed"`: the session would use an API provider, or send a provider’s traffic to a host, that the managed [`allowedProviders`](</docs/en/settings-reference#allowedproviders>) list doesn’t allow. Requires Claude Code v2.1.285 or later
* `"consent_rejected"`: the user rejected the [security approval dialog](</docs/en/server-managed-settings#security-approval-dialogs>) for server-managed settings
* `"force_refresh_failed"`: the settings fetch that [`forceRemoteSettingsRefresh`](</docs/en/settings-reference#forceremotesettingsrefresh>) requires failed
* `"gateway_rejected"`: a [Claude apps gateway](</docs/en/claude-apps-gateway>) answered the managed settings load with HTTP 403
--- a/network-config.md
+++ b/network-config.md
@@ -202,7 +202,7 @@
`storage.googleapis.com`| Native installer and native auto-updater on versions prior to 2.1.116
`registry.npmjs.org`| Plugin installs (fetching npm-source plugin packages and installing plugins’ Node.js package dependencies), `npx`-launched MCP servers, and the package registry for npm and bun installs of Claude Code itself
`bridge.claudeusercontent.com`| [Claude in Chrome](</docs/en/chrome>) extension WebSocket bridge
-`*.frame.claudeusercontent.com`| [Artifact](</docs/en/artifacts>) content reads. The CLI fetches an artifact’s files from this host when Claude opens one, and only when the Artifact tool is [available](</docs/en/artifacts#availability>) for your account. To turn the tool off and drop this requirement, set [`"enableArtifact": false`](</docs/en/settings-reference#enableartifact>) or [`CLAUDE_CODE_DISABLE_ARTIFACT=1`](</docs/en/env-vars>); Claude Code also honors the deprecated [`disableArtifact`](</docs/en/settings-reference#disableartifact>) setting. See [Disable artifacts](</docs/en/artifacts#disable-artifacts>) for how these settings interact
+`*.frame.claudeusercontent.com`| [Artifact](</docs/en/artifacts>) content reads. The CLI fetches an artifact’s files from this host when Claude opens one, and only when the Artifact tool is [available](</docs/en/artifacts#availability>) for your account. To turn the tool off and drop this requirement, set [`"enableArtifact": false`](</docs/en/settings-reference#enableartifact>) or [`CLAUDE_CODE_DISABLE_ARTIFACT=1`](</docs/en/env-vars>)
`github.com`| Cloning GitHub-hosted [plugin marketplaces](</docs/en/plugins/overview>) and plugins, including the official Anthropic marketplace, over HTTPS or SSH. To clone GitHub `owner/repo` sources over HTTPS only, set [`CLAUDE_CODE_PLUGIN_PREFER_HTTPS=1`](</docs/en/env-vars>)
`raw.githubusercontent.com`| Changelog feed for [`/release-notes`](</docs/en/commands>). In interactive sessions, Claude Code also fetches it in the background at startup when its cached changelog doesn’t yet cover the running version, such as the first start after an update; non-interactive and cloud sessions never fetch it
`*-review.googlesource.com`| Gerrit change lookup on `googlesource.com` checkouts. When a Claude Desktop Code tab session starts or resumes on a [trusted](</docs/en/permissions#project-allow-rules-and-workspace-trust>) checkout whose `origin` is a `googlesource.com` host, Claude Code asks that host’s `-review` server anonymously for the open change matching HEAD’s `Change-Id`, once per start or resume. Other session types skip the lookup, and no other Gerrit host is contacted. Optional: disable with [`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`](</docs/en/env-vars>)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -70,7 +70,7 @@
How you run Claude Code| Built-in starting permission mode
---|---
Any settings file sets `disableAutoMode` to `"disable"`| `default`
-`claude -p` or the [Agent SDK](</docs/en/agent-sdk/permissions>)| `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
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, and your next session matches the table. 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:
@@ -78,7 +78,7 @@
* In a terminal, once, at the top of the session
* In the VS Code extension, as a card on the new-conversation screen that stays until you dismiss it
-On Pro, Max, and Team plans, if your `~/.claude/settings.json` sets a `defaultMode` other than `auto` and no other settings file sets one, your sessions keep starting in that mode. Claude Code asks once, in the terminal or in the VS Code extension, whether to change the setting to auto mode. If you decline, your setting stays as it is.
+If your `~/.claude/settings.json` sets a `defaultMode` other than `auto` and no other settings file sets one, your sessions keep starting in that mode. On Pro, Max, and Team plans, and in sessions that [don’t fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), Claude Code asks once, in the terminal or in the VS Code extension, whether to change the setting to auto mode. If you decline, your setting stays as it is.
###
@@ -250,7 +250,7 @@
Auto mode on Bedrock, Agent Platform, or Foundry
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode is available by default. With Claude Code v2.1.283 or later, it’s also the built-in starting permission mode for interactive terminal and [VS Code](</docs/en/vs-code>) sessions. To choose the starting permission mode yourself, set `permissions.defaultMode` as Start in a different permission mode describes, or pick a permission mode from the VS Code extension’s mode indicator. Only Claude Sonnet 5 or later, Opus 4.7 or later, and the Fable models are supported on these providers. On any other model, the session starts in Manual instead. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode is available by default. When nothing else sets a permission mode, it’s also the built-in starting permission mode, on the versions that section’s table lists. To choose the starting permission mode yourself, set `permissions.defaultMode` as Start in a different permission mode describes, or pick a permission mode from the VS Code extension’s mode indicator. Only Claude Sonnet 5 or later, Opus 4.7 or later, and the Fable models are supported on these providers. On any other model, the session starts in Manual instead. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
###
@@ -453,12 +453,12 @@
The classifier checks [subagent](</docs/en/sub-agents>) work at three points:
1. Before a subagent starts, the delegated task description is evaluated, so a dangerous-looking task is blocked at spawn time.
- 2. While the subagent runs, each of its actions goes through the classifier with the same rules as the parent session, and any `permissionMode` in the subagent’s frontmatter is ignored.
+ 2. While the subagent runs, each of its actions goes through the same decision order as in the parent session, with the same block and allow rules. Any `permissionMode` in the subagent’s frontmatter is ignored.
3. When the subagent finishes, the classifier reviews its work and its final report before the parent reads the report. When the classifier flags the subagent’s work or report, or a separate API safety check refuses the review, the report is still delivered, prepended with a security warning. When the classifier is unavailable for the review, the report arrives with a note to verify the subagent’s work before acting on it.
Cost and latency
-The classifier runs on Claude Sonnet 5 by default rather than on your `/model` selection. A classifier model that Anthropic configures server-side takes precedence over that default. When your session’s model is Claude Sonnet 4.6, or when [`availableModels`](</docs/en/model-config#restrict-model-selection>) excludes Sonnet 5, the classifier runs on the session’s model instead, or on an Opus model when the session runs on a [Fable model](</docs/en/model-config#work-with-fable>); on providers other than the Anthropic API, that Opus fallback is the provider’s default Opus model.The session’s first auto-mode request validates the Sonnet 5 default: if the request succeeds, Sonnet 5 stays the session’s classifier model, and if it fails because the model isn’t available, the session uses the fallback instead. After that validation settles, the classifier’s model doesn’t change for the session.On Enterprise plans and on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations. Where the server reviews the actions as part of the session’s model requests, there are no separate classifier calls to count; see Server-side classifier review.Sandboxed network access adds no per-connection classifier requests. The classifier judges [the hosts a command names](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) together with the command in one review, and Claude Code checks each connection against the approved list without calling the classifier again.
+The classifier runs on Claude Sonnet 5 by default rather than on your `/model` selection. A classifier model that Anthropic configures server-side takes precedence over that default. When your session’s model is Claude Sonnet 4.6, or when [`availableModels`](</docs/en/model-config#restrict-model-selection>) excludes Sonnet 5, the classifier runs on the session’s model instead, or on an Opus model when the session runs on a [Fable model](</docs/en/model-config#work-with-fable>); on providers other than the Anthropic API, that Opus fallback is the provider’s default Opus model.The session’s first auto-mode request validates the Sonnet 5 default: if the request succeeds, Sonnet 5 stays the session’s classifier model, and if it fails because the model isn’t available, the session uses the fallback instead.On Enterprise plans and on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations. Where the server reviews the actions as part of the session’s model requests, there are no separate classifier calls to count; see Server-side classifier review.Sandboxed network access adds no per-connection classifier requests. The classifier judges [the hosts a command names](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) together with the command in one review, and Claude Code checks each connection against the approved list without calling the classifier again.
##
--- a/permissions.md
+++ b/permissions.md
@@ -97,7 +97,12 @@
Permission modes
-Permission modes provide global control over how Claude uses tools. You can set the permission mode when calling `query()` or change it dynamically during streaming sessions.
+Permission modes provide global control over how Claude uses tools. You can set the permission mode when calling `query()` or change it dynamically during streaming sessions. If you don’t set one, Claude Code picks the starting permission mode by the rules in [Which mode a session starts in](</docs/en/permission-modes#which-mode-a-session-starts-in>):
+
+ * A `permissions.defaultMode` from the session’s [settings files](</docs/en/settings#where-settings-live>) when one applies
+ * Otherwise the built-in default, which can be [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>)
+
+A session that starts in auto mode drops broad allow rules such as a bare `Bash` entry, as [How auto mode evaluates actions](</docs/en/permission-modes#how-auto-mode-evaluates-actions>) describes. If your application relies on the `default` mode or on such a rule, pass `default` explicitly. Before TypeScript Agent SDK v0.3.286, omitting `permissionMode` was the same as passing `default`.
###
@@ -114,7 +119,7 @@
`acceptEdits`| Auto-accept file edits| File edits and filesystem operations (`mkdir`, `rm`, `mv`, etc.) are automatically approved
`bypassPermissions`| Bypass permission checks| Tools run without permission prompts, except for the [actions no mode auto-approves](</docs/en/permission-modes#actions-no-mode-auto-approves>). Use with caution
`plan`| Planning mode| Claude explores and plans without editing your source files; file edits are never auto-approved and prompt through your `canUseTool` callback
-`auto`| Model-classified approvals| A model classifier approves or denies permission prompts. See [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) for availability
+`auto`| Model-classified approvals| A model classifier reviews actions such as shell commands and network requests, allowing or blocking each one it reviews. See [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) for availability and the decision order
**Subagent inheritance:** A subagent runs in the parent session’s permission mode unless you set `permissionMode` on its [`AgentDefinition`](</docs/en/agent-sdk/typescript#agentdefinition>) and the parent session is in `default`, `dontAsk`, or `plan` mode. Even then, Claude Code never applies a `"bypassPermissions"` value. A subagent runs in `bypassPermissions` mode only when the parent session itself does. The `bypassPermissions` exception requires Claude Code v2.1.267 or later.Subagents may have different system prompts and less constrained behavior than your main agent, so inheriting `bypassPermissions` grants them full, autonomous system access. The [actions no mode auto-approves](</docs/en/permission-modes#actions-no-mode-auto-approves>) still apply.
Show diff (433 lines)
--- a/python.md
+++ b/python.md
@@ -555,7 +555,7 @@
`rewind_files(user_message_id)`| Restore files to their state at the specified user message. Requires `enable_file_checkpointing=True`. See [File checkpointing](</docs/en/agent-sdk/file-checkpointing>)
`get_mcp_status()`| Get the status of all configured MCP servers. Returns `McpStatusResponse`
`reconnect_mcp_server(server_name)`| Retry connecting to an MCP server that failed or was disconnected
-`toggle_mcp_server(server_name, enabled)`| Enable or disable an MCP server mid-session. Disabling removes its tools
+`toggle_mcp_server(server_name, enabled)`| Enable or disable an MCP server mid-session. Disabling a stdio, SSE, or HTTP server removes its tools
`stop_task(task_id)`| Stop a running background task. A `TaskNotificationMessage` with status `"stopped"` follows in the message stream
`get_server_info()`| Get the server’s initialization info, including available commands and output styles
`disconnect()`| Disconnect from Claude
@@ -628,24 +628,21 @@
Example - Streaming input with ClaudeSDKClient
+`query()` also accepts an async iterable of user message dicts, so you can assemble the prompt at send time or include content blocks such as images. Claude Code starts responding to the first yielded message as soon as it arrives, without waiting for the iterable to finish, and `receive_response()` stops at the `ResultMessage` that ends that response. Put everything Claude should read before answering into one message, as this generator does, and pair each `query()` call with its own `receive_response()` loop.
+
import asyncio
from claude_agent_sdk import ClaudeSDKClient
async def message_stream():
- """Generate messages dynamically."""
+ """Assemble the prompt at send time and yield it as one user message."""
+ readings = {"Temperature": "25°C", "Humidity": "60%"}
+ data = ", ".join(f"{name}: {value}" for name, value in readings.items())
yield {
"type": "user",
- "message": {"role": "user", "content": "Analyze the following data:"},
- }
- await asyncio.sleep(0.5)
- yield {
- "type": "user",
- "message": {"role": "user", "content": "Temperature: 25°C, Humidity: 60%"},
- }
- await asyncio.sleep(0.5)
- yield {
- "type": "user",
- "message": {"role": "user", "content": "What patterns do you see?"},
+ "message": {
+ "role": "user",
+ "content": f"Analyze the following sensor data and describe any patterns you see: {data}",
+ },
}
async def main():
@@ -2659,7 +2656,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.
+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.
###
@@ -2814,11 +2811,11 @@
Bash
-**Tool name:** `Bash` **Input:**
+**Tool name:** `Bash` For what sets the foreground ceiling, see [Timeout and output limits](</docs/en/tools-reference#timeout-and-output-limits>). For the background time limit, see [Time limit for background commands](</docs/en/tools-reference#time-limit-for-background-commands>). **Input:**
{
"command": str, # The command to execute
- "timeout": int | None, # Optional timeout in milliseconds (max 600000; higher values are clamped to the max)
+ "timeout": int | None, # Milliseconds. Foreground: capped at 600000 by default, higher values are clamped. With run_in_background (Claude Code v2.1.285 or later): the background time limit, 1800000 when omitted, capped at 7200000 unless raised
"description": str | None, # Clear, concise description (5-10 words)
"run_in_background": bool | None, # Set to true to run in background
}
@@ -2874,9 +2871,30 @@
**Output:**
{
- "message": str, # Confirmation message
- "replacements": int, # Number of replacements made
- "file_path": str, # File path that was edited
+ "filePath": str, # The file that was edited
+ "oldString": str, # The text that was replaced
+ "newString": str, # The text that replaced it
+ "originalFile": str | None, # File contents before the edit
+ "structuredPatch": [ # Diff hunks for the change
+ {
+ "oldStart": int,
+ "oldLines": int,
+ "newStart": int,
+ "newLines": int,
+ "lines": list[str],
+ }
+ ],
+ "userModified": bool, # Whether the user changed the proposed edit before accepting it
+ "replaceAll": bool, # Whether all occurrences were replaced
+ "gitDiff": { # Optional git diff summary for the file
+ "filename": str,
+ "status": "modified" | "added",
+ "additions": int,
+ "deletions": int,
+ "changes": int,
+ "patch": str,
+ "repository": str | None, # GitHub owner/repo when available
+ } | None,
}
###
@@ -2893,20 +2911,79 @@
"limit": int | None, # The number of lines to read
}
-**Output (Text files):**
-
- {
- "content": str, # File contents with line numbers
- "total_lines": int, # Total number of lines in file
- "lines_returned": int, # Lines actually returned
- }
-
-**Output (Images):**
-
- {
- "image": str, # Base64 encoded image data
- "mime_type": str, # Image MIME type
- "file_size": int, # File size in bytes
+The output takes one of the following shapes depending on what Claude read. Check the `type` key to tell them apart. **Output (type:`"text"`):**
+
+ {
+ "type": "text",
+ "file": {
+ "filePath": str, # The file that was read
+ "content": str, # The returned content
+ "numLines": int, # Number of lines in the returned content
+ "startLine": int, # Line number the content starts at
+ "totalLines": int, # Total number of lines in the file
+ "truncatedByTokenCap": bool | None, # Present and True when a whole-file read exceeded the token cap and content is the first page
+ },
+ }
+
+**Output (type:`"image"`):**
+
+ {
+ "type": "image",
+ "file": {
+ "base64": str, # Base64-encoded image data
+ "type": "image/jpeg" | "image/png" | "image/gif" | "image/webp", # Image MIME type
+ "originalSize": int, # Original file size in bytes
+ "dimensions": { # Optional sizing info for coordinate mapping
+ "originalWidth": int | None, # Optional; original width in pixels
+ "originalHeight": int | None, # Optional; original height in pixels
+ "displayWidth": int | None, # Optional; width after resizing
+ "displayHeight": int | None, # Optional; height after resizing
+ } | None,
+ },
+ }
+
+**Output (type:`"notebook"`):**
+
+ {
+ "type": "notebook",
+ "file": {
+ "filePath": str, # The notebook that was read
+ "cells": list, # Notebook cells
+ },
+ }
+
+**Output (type:`"pdf"`):**
+
+ {
+ "type": "pdf",
+ "file": {
+ "filePath": str, # The PDF that was read
+ "base64": str, # Base64-encoded PDF data
+ "originalSize": int, # File size in bytes
+ },
+ }
+
+**Output (type:`"parts"`):**
+
+ {
+ "type": "parts",
+ "file": {
+ "filePath": str, # The PDF that was read
+ "originalSize": int, # File size in bytes
+ "count": int, # Number of pages extracted as images
+ "outputDir": str, # Directory containing the extracted page images
+ },
+ "firstPage": int | None, # Optional document page number of the first extracted page
+ }
+
+**Output (type:`"file_unchanged"`):**
+
+ {
+ "type": "file_unchanged", # The file is unchanged since Claude last read it in this session, so the content isn't repeated
+ "file": {
+ "filePath": str,
+ },
+ "source": "seeded" | None, # Present when the earlier copy came from a CLAUDE.md or memory file loaded at startup rather than a Read call
}
###
@@ -2925,9 +3002,29 @@
**Output:**
{
- "message": str, # Success message
- "bytes_written": int, # Number of bytes written
- "file_path": str, # File path that was written
+ "type": "create" | "update", # Whether the write created a new file or overwrote an existing one
+ "filePath": str, # The file that was written
+ "content": str, # The content that was written
+ "structuredPatch": [ # Diff hunks; empty for a new file, when nothing changed, or when Claude Code skipped the diff
+ {
+ "oldStart": int,
+ "oldLines": int,
+ "newStart": int,
+ "newLines": int,
+ "lines": list[str],
+ }
+ ],
+ "originalFile": str | None, # Previous content; None for a new file or when the previous content was too large to include
+ "gitDiff": { # Optional git diff summary for the file
+ "filename": str,
+ "status": "modified" | "added",
+ "additions": int,
+ "deletions": int,
+ "changes": int,
+ "patch": str,
+ "repository": str | None, # GitHub owner/repo when available
+ } | None,
+ "userModified": bool | None, # Optional; whether the user edited the proposed content before accepting it
}
###
@@ -2946,10 +3043,15 @@
**Output:**
{
- "matches": list[str], # Array of matching file paths
- "count": int, # Number of matches found
- "search_path": str, # Search directory used
- }
+ "durationMs": int, # Time taken to run the search, in milliseconds
+ "numFiles": int, # Number of paths returned, after any truncation
+ "filenames": list[str], # Matching file paths
+ "truncated": bool, # Whether the results were truncated at the 100-file limit
+ "totalMatches": int | None, # Optional total number of matching files before truncation; a lower bound when countIsComplete is False
+ "countIsComplete": bool | None, # Optional; whether totalMatches is exact
+ }
+
+`totalMatches` and `countIsComplete` require Claude Code v2.1.191 or later.
###
@@ -2970,31 +3072,29 @@
"-B": int | None, # Lines to show before each match
"-A": int | None, # Lines to show after each match
"-C": int | None, # Lines to show before and after
+ "context": int | None, # Lines to show before and after; -C is an alias
+ "-o": bool | None, # Print only the matched parts of each line
"head_limit": int | None, # Limit output to first N lines/entries
+ "offset": int | None, # Skip first N lines/entries before applying head_limit
"multiline": bool | None, # Enable multiline mode
}
-**Output (content mode):**
-
- {
- "matches": [
- {
- "file": str,
- "line_number": int | None,
- "line": str,
- "before_context": list[str] | None,
- "after_context": list[str] | None,
- }
- ],
- "total_matches": int,
- }
-
-**Output (files_with_matches mode):**
-
- {
- "files": list[str], # Files containing matches
- "count": int, # Number of files with matches
- }
+**Output:**
+
+ {
+ "mode": "content" | "files_with_matches" | "count" | None, # The output mode that was used
+ "numFiles": int, # Number of files in the result; always 0 in content mode
+ "filenames": list[str], # Matching files in files_with_matches mode; empty in the other modes
+ "content": str | None, # Matching lines in content mode, or per-file counts in count mode
+ "numLines": int | None, # Number of lines in content, present in content mode
+ "numMatches": int | None, # Total match count, present in count mode
+ "totalFiles": int | None, # Optional total before head_limit and offset, in files_with_matches mode
+ "totalLines": int | None, # Optional total before head_limit and offset, in content mode
+ "appliedLimit": int | None, # Present when head_limit truncated the result
+ "appliedOffset": int | None, # Present when an offset was applied
+ }
+
+Grep returns this dict shape in each output mode. Which optional keys are present depends on `output_mode`. `totalFiles` requires Claude Code v2.1.208 or later. `totalLines` requires Claude Code v2.1.210 or later.
###
@@ -3015,10 +3115,16 @@
**Output:**
{
- "message": str, # Success message
- "edit_type": "replaced" | "inserted" | "deleted", # Type of edit performed
- "cell_id": str | None, # Cell ID that was affected
- "total_cells": int, # Total cells in notebook after edit
+ "new_source": str, # The source written to the cell
+ "old_source": str | None, # Previous cell source, present for replace and delete
+ "cell_id": str | None, # ID of the edited cell, when available
+ "cell_type": "code" | "markdown", # The cell type
+ "language": str, # The notebook's programming language
+ "edit_mode": str, # The edit mode that was used
+ "error": str | None, # Error message when the operation failed
+ "notebook_path": str, # The notebook file
+ "original_file": str, # Notebook content before the edit
+ "updated_file": str, # Notebook content after the edit
}
###
@@ -3100,8 +3206,20 @@
**Output:**
{
- "message": str, # Success message
- "stats": {"total": int, "pending": int, "in_progress": int, "completed": int},
+ "oldTodos": [ # The todo list before the update
+ {
+ "content": str,
+ "status": "pending" | "in_progress" | "completed",
+ "activeForm": str,
+ }
+ ],
+ "newTodos": [ # The todo list after the update
+ {
+ "content": str,
+ "status": "pending" | "in_progress" | "completed",
+ "activeForm": str,
+ }
+ ],
}
###
@@ -3249,8 +3367,13 @@
**Output:**
{
- "message": str, # Confirmation message
- "approved": bool | None, # Whether user approved the plan
+ "plan": str | None, # The plan that was presented to the user
+ "isAgent": bool, # True when a subagent called the tool
+ "filePath": str | None, # Present when the plan was saved to a file
+ "hasTaskTool": bool | None, # Optional; whether the Agent tool is available in the current context
+ "planWasEdited": bool | None, # Present and True when the user edited the plan before approving
+ "awaitingLeaderApproval": bool | None, # Present and True when a teammate sent the plan to the team lead for approval
+ "requestId": str | None, # Optional ID of that approval request
}
###
@@ -3265,41 +3388,43 @@
"server": str | None # Optional server name to filter resources by
}
+The result is a list rather than a dict, so `tool_use_result` holds a `list` for this tool. **Output:**
+
+ [ # One entry per resource
+ {
+ "uri": str, # Resource URI
+ "name": str, # Resource name
+ "mimeType": str | None, # Optional MIME type
+ "description": str | None, # Optional description
+ "server": str, # Server that provides this resource
+ }
+ ]
+
+###
+
+
+
+ReadMcpResource
+
+**Tool name:** `ReadMcpResourceTool` **Input:**
+
+ {
+ "server": str, # The MCP server name
+ "uri": str, # The resource URI to read
+ }
+
**Output:**
{
- "resources": [
+ "contents": [
{
- "uri": str,
- "name": str,
- "description": str | None,
- "mimeType": str | None,
- "server": str,
+ "uri": str, # Resource URI
+ "mimeType": str | None, # Optional MIME type
+ "text": str | None, # Text content, or a note about the binary content
+ "blobSavedTo": str | None, # Present when Claude Code saved binary content to disk; path of the saved file
}
],
- "total": int,
- }
-
-###
-
-
-
-ReadMcpResource
-
-**Tool name:** `ReadMcpResourceTool` **Input:**
-
- {
- "server": str, # The MCP server name
- "uri": str, # The resource URI to read
- }
-
-**Output:**
-
- {
- "contents": [
- {"uri": str, "mimeType": str | None, "text": str | None, "blob": str | None}
- ],
- "server": str,
+ "error": str | None, # Present when the server couldn't read the resource
}
##
--- a/remote-control.md
+++ b/remote-control.md
@@ -48,7 +48,7 @@
claude remote-control
-Until you accept Remote Control’s one-time confirmation, `claude remote-control` explains what it does and asks `Enable Remote Control? (y/n)` before starting the server. Answer `y` to accept and start the server. If you decline, Claude Code exits without starting the server and asks again the next time you run the command.The process stays running in your terminal in server mode, waiting for remote connections. It displays a session URL you can use to connect from another device, and you can press spacebar to show a QR code for quick access from your phone. While a remote session is active, the terminal shows connection status and tool activity.Available flags:
+Until you accept Remote Control’s one-time confirmation, `claude remote-control` explains what it does and asks `Enable Remote Control? (y/n)` before starting the server. Answer `y` to accept and start the server. If you decline, Claude Code exits without starting the server and asks again the next time you run the command.The process stays running in your terminal in server mode, waiting for remote connections. It displays a session URL you can use to connect from another device, and you can press spacebar to show a QR code for quick access from your phone. While a remote session is active, the terminal shows connection status and tool activity.Pass any of these flags after `remote-control`:
Flag| Description
---|---
@@ -68,9 +68,8 @@
`-d`, `--debug[=<filter>]`| Turn on debug logging for the server, optionally filtered by category. Pass a filter only in the `=` form, such as `--debug=api,hooks`. Requires Claude Code v2.1.282 or later.
`--debug-file <path>`| Write debug logs to the given file.
`--verbose`| Show detailed connection and session logs.
-`--sandbox` / `--no-sandbox`| Enable or disable [sandboxing](</docs/en/sandboxing>) for filesystem and network isolation. Off by default.
-
-Give these flags after `remote-control`.If you pass a global `claude` flag before `remote-control`, or a wrapper script adds one, Claude Code doesn’t carry the flag over to the sessions the server creates. Claude Code lets the flag through only when dropping it is known not to change what those sessions can do, such as `--verbose` or `--model`. For any other flag, such as `--settings`, Claude Code [refuses to start](</docs/en/errors#not-carried-over-to-the-sessions-remote-control-starts>) and names the flag to remove.Claude Code checks Remote Control eligibility before printing help, so `claude remote-control --help` returns an error instead of this flag list when you aren’t signed in with an eligible account.
+
+If you pass a global `claude` flag before `remote-control`, or a wrapper script adds one, Claude Code doesn’t carry the flag over to the sessions the server creates. Claude Code lets the flag through only when dropping it is known not to change what those sessions can do, such as `--verbose` or `--model`. For any other flag, such as `--settings`, Claude Code [refuses to start](</docs/en/errors#not-carried-over-to-the-sessions-remote-control-starts>) and names the flag to remove.To sandbox the sessions the server starts, turn on [sandboxing](</docs/en/sandboxing>) in a settings file.Claude Code checks Remote Control eligibility before printing help, so `claude remote-control --help` returns an error instead of this flag list when you aren’t signed in with an eligible account.
To start a normal interactive Claude Code session with Remote Control enabled, use the `--remote-control` flag (or `--rc`):
@@ -90,7 +89,7 @@
/remote-control My Project
-This starts a Remote Control session that carries over your current conversation history.Until you accept Remote Control’s one-time confirmation, a dialog appears before `/remote-control` connects. Select **Enable Remote Control** to accept and connect. If you select **Never mind** or press Esc, Claude Code doesn’t connect and asks again the next time you run `/remote-control`.The `--verbose`, `--sandbox`, and `--no-sandbox` flags are not available with this command.
+This starts a Remote Control session that carries over your current conversation history.Until you accept Remote Control’s one-time confirmation, a dialog appears before `/remote-control` connects. Select **Enable Remote Control** to accept and connect. If you select **Never mind** or press Esc, Claude Code doesn’t connect and asks again the next time you run `/remote-control`.The `--verbose` flag is not available with this command.
In the [Claude Code VS Code extension](</docs/en/vs-code>), type `/remote-control` or `/rc` in the prompt box.
--- a/scheduled-tasks.md
+++ b/scheduled-tasks.md
@@ -1,4 +1,4 @@
-Scheduled tasks let Claude re-run a prompt automatically on an interval. Use them to poll a deployment, babysit a PR, check back on a long-running build, or remind yourself to do something later in the session. To react to events as they happen instead of polling, see [Channels](</docs/en/channels>): your CI can push the failure into the session directly. To keep the session working turn after turn toward a condition rather than on an interval, see [`/goal`](</docs/en/goal>). Tasks are session-scoped: they live in the current conversation and stop when you start a new one. When you resume with `--resume` or `--continue`, Claude Code restores tasks that haven’t expired, except those listed under Limitations. For scheduling that survives independently of any session, use [Routines](</docs/en/routines>) to create a routine on the cloud, set up a [Desktop scheduled task](</docs/en/desktop-scheduled-tasks>), or use [GitHub Actions](</docs/en/github-actions>).
+Scheduled tasks let Claude re-run a prompt automatically on an interval. Use them to poll a deployment, babysit a PR, check back on a long-running build, or remind yourself to do something later in the session. To react to events as they happen instead of polling, see [Channels](</docs/en/channels>): your CI can push the failure into the session directly. To keep the session working turn after turn toward a condition rather than on an interval, see [`/goal`](</docs/en/goal>). Tasks are session-scoped. When you resume with `--resume` or `--continue`, Claude Code restores tasks that haven’t expired, except those listed under Limitations. For scheduling that survives independently of any session, use [Routines](</docs/en/routines>) to create a routine on the cloud, set up a [Desktop scheduled task](</docs/en/desktop-scheduled-tasks>), or use [GitHub Actions](</docs/en/github-actions>).
##
@@ -67,7 +67,7 @@
In a session where the [Monitor tool is available](</docs/en/tools-reference#monitor-tool>), Claude may use it directly when you ask for a dynamic `/loop` schedule. Monitor runs a background script and streams each output line back, which avoids polling altogether and is often more token-efficient and responsive than re-running a prompt on an interval. A dynamically scheduled loop appears in your scheduled task list like any other task, so you can list or cancel it the same way. The jitter rules don’t apply to it, but the seven-day expiry does.
-Dynamically chosen intervals and the built-in maintenance prompt work on every provider, and with [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) turned off. On Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, and Microsoft Foundry, or with fetching turned off, both require Claude Code v2.1.248 or later. In those cases, on earlier versions, a prompt with no interval runs on a fixed 10-minute schedule, and a `/loop` with no prompt prints the usage message.
+Dynamically chosen intervals and the built-in maintenance prompt work on every provider, and with [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) turned off. On Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, and Microsoft Foundry, or with fetching turned off, both require Claude Code v2.1.248 or later.
###
@@ -221,7 +221,7 @@
* Tasks only fire while Claude Code is running and idle. Closing the terminal or letting the session exit stops them firing. [Backgrounding the session](</docs/en/agent-view#from-inside-a-session>) carries `/loop` tasks over to a background session, which keeps running without a terminal.
* No catch-up for missed fires. If a task’s scheduled time passes while Claude is busy on a long-running request, it fires once when Claude becomes idle, not once per missed interval.
- * Starting a fresh conversation clears all session-scoped tasks. When you resume a session with `claude --resume` or `claude --continue`, Claude Code restores the tasks scheduled with `CronCreate`, except recurring tasks that have expired and one-shot tasks whose scheduled time has passed. A self-paced `/loop` isn’t restored, so run `/loop` again to restart it. Background Bash and monitor tasks are never restored on resume.
+ * When you resume a session with `claude --resume` or `claude --continue`, Claude Code restores the tasks scheduled with `CronCreate`, except recurring tasks that have expired and one-shot tasks whose scheduled time has passed. A self-paced `/loop` isn’t restored, so run `/loop` again to restart it. Background Bash and monitor tasks are never restored on resume.
* With [feature-flag fetching off](</docs/en/env-vars#features-that-need-feature-flag-fetching>), Claude Code stores a task you asked to keep across sessions in the project’s `.claude/scheduled_tasks.json` file. When the `.claude` directory or that file is a symlink, Claude Code returns an error instead of scheduling the task. A saved task runs only in the project folder where you created it. If you copy the file into another folder, such as a new worktree, sessions there list the copied tasks but don’t run them, so create the task again in that folder.
For cron-driven automation that needs to run unattended:
--- a/self-hosted-environments.md
+++ b/self-hosted-environments.md
@@ -71,7 +71,7 @@
In API fields, token claims, and metric names, the environment appears as `pool`, and the environment ID is the `pool_id`. The [reference](</docs/en/self-hosted-environments-reference>) maps the two spellings, including the deprecated `pool` flag names. A runner serves one owner at a time. The first session a runner picks up locks the runner to that session’s owner, and the runner then runs sessions only for that owner, up to a configured capacity. Who the owner is depends on how the session started:
* **Sessions a user starts** : the owner is that user’s account.
- * **Claude Tag channel sessions** : Claude runs them with no user account attached, so the owner is the [Claude Tag agent](<https://claude.com/docs/claude-tag/concepts/glossary#agent-identity>) that started the session. Every channel session that agent starts has the same owner, whoever sent the Slack message, so a runner locked to it serves sessions that different people started when you run it at a `--capacity` above one or with a positive `--drain-grace-sec`. A runner locked to a user never picks these up, and a runner locked to a Claude Tag agent never picks up a user’s sessions.
+ * **Claude Tag channel sessions** : Claude runs them with no user account attached, so the owner is the [Claude Tag agent](<https://claude.com/docs/claude-tag/concepts/glossary#agent-identity>) that started the session. Every channel session that agent starts has the same owner, whoever sent the Slack message, so a runner locked to it serves sessions that different people started when you run it at a `--capacity` above one or with a positive `--drain-grace-sec`.
The minimum fleet size is therefore the number of owners you expect to be active at once, counting users and Claude Tag agents.
--- a/server-managed-settings.md
+++ b/server-managed-settings.md
@@ -151,12 +151,13 @@
Per-key exceptions across managed sources
-Three kinds of keys are exceptions to the no-merge rule:
+These keys are exceptions to the no-merge rule:
* **Cross-source lock keys** : a small set of keys, such as the sandbox allowlist locks, [listed on the managed settings page](</docs/en/managed-settings#precedence-within-the-managed-tier>). Claude Code honors them when any admin-controlled managed source sets them; the user-writable HKCU registry tier is excluded. When a [`policyHelper`](</docs/en/settings-reference#policyhelper>) supplies managed settings, its output is the only source these checks read, apart from [`forceRemoteSettingsRefresh`](</docs/en/settings-reference#forceremotesettingsrefresh>), which Claude Code reads from the admin sources directly at startup.
* **The`env` block**: apart from the telemetry unit and routing variables paired with a credential key, both covered below, it merges per key across the admin-controlled sources. For each environment variable, the highest-priority source defining it wins, and lower admin sources fill in variables the higher sources leave unset. An endpoint-managed `env` entry therefore applies whenever the server-managed configuration leaves that variable unset, or while a cached server value for it is withheld pending server confirmation. Requires Claude Code v2.1.223 or later. Before v2.1.223, Claude Code applies the selected source’s whole `env` block only.
* **Telemetry unit** : the `OTEL_EXPORTER_OTLP_*` exporter keys, the `OTEL_LOG_*` content-capture toggles, `OTEL_LOGS_EXPORTER`, and the beta tracing variables `ENABLE_BETA_TRACING_DETAILED` and `BETA_TRACING_ENDPOINT` follow the highest source that sets any of them as a unit. A source that delivers the `otelHeadersHelper` credential key claims the unit too, but lands these variables only when it is the selected source: a source that isn’t selected but delivers the key contributes none of them and still blocks lower sources from filling them in. Either way, an exporter endpoint from one source can never pair with credentials from another.
* **Credential-paired routing** : a source that pairs routing variables with a selected-source-only credential key, such as `apiKeyHelper` or `otelHeadersHelper`, contributes those routing variables only when it wins the slot.
+ * **`allowedProviders`** : a list set on the machine and a server-managed list combine as [its entry’s Scope note](</docs/en/settings-reference#allowedproviders>) states. Requires Claude Code v2.1.285 or later
* **Gateway sign-in keys** : Claude Code never reads [`forceLoginGatewayUrl`](</docs/en/settings-reference#forcelogingatewayurl>), [`gatewayInternalNetworks`](</docs/en/settings-reference#gatewayinternalnetworks>), or the `"gateway"` value of [`forceLoginMethod`](</docs/en/settings-reference#forceloginmethod>) from server-managed settings, so a value there neither applies nor hides one set in an MDM policy or managed settings file. The [`managedSourcesBehavior` entry](</docs/en/settings-reference#managedsourcesbehavior>) says which admin source on the machine supplies them.
###
Show diff (136 lines)
--- a/settings-reference.md
+++ b/settings-reference.md
@@ -18,6 +18,7 @@
`allowedChannelPlugins`| Replace the default allowlist of [channel plugins](</docs/en/channels#restrict-which-channel-plugins-can-run>) that can push messages| Plugins and skills| Managed
`allowedHttpHookUrls`| Limit which URLs [HTTP hooks](</docs/en/hooks>) can target| Hooks and automation| Any file
`allowedMcpServers`| Allowlist which [MCP servers](</docs/en/mcp>) users can add| MCP| Any file
+`allowedProviders`| Limit which [API providers](</docs/en/third-party-integrations>) a machine may use| Authentication and providers| Managed
`allowManagedHooksOnly`| Run only the [hooks](</docs/en/hooks>) your organization deploys| Hooks and automation| Managed
`allowManagedMcpServersOnly`| Make the managed [MCP](</docs/en/mcp>) allowlist the only one that applies| MCP| Managed
`allowManagedPermissionRulesOnly`| Make [managed settings](</docs/en/managed-settings>) the only settings source of [permission rules](</docs/en/permissions#managed-settings>)| Permission settings| Managed
@@ -3206,13 +3207,13 @@
`spinnerTipsOverride`
-Add your own tips to the spinner tips that Claude Code shows while Claude works, or replace the built-in tips with yours. Claude Code puts your tips in the same rotation as the built-in ones: it picks the tip that has gone unshown the longest, skips tips still in their cooldown, and breaks ties by priority. If you set `spinnerTipsEnabled` to `false`, Claude Code hides all tips, yours included.
+Add your own tips to the spinner tips that Claude Code shows while Claude works, or replace the built-in tips with yours. Claude Code puts your tips in the same rotation as the built-in ones. If you set `spinnerTipsEnabled` to `false`, Claude Code hides all tips, yours included.
* **Scope** : `Any file`. Claude Code honors tip objects, `tipsFile`, `label`, and `excludeDefault` from user settings, the `--settings` flag, and managed settings; from project and local settings it reads plain string tips only.
* **Type** : object with `tips`, `tipsFile`, `label`, and `excludeDefault` fields, each optional
* **Default** : unset, so Claude Code shows only the built-in tips
-Tip objects, `tipsFile`, `label`, and the Scope line’s rule that project and local settings contribute plain strings only require Claude Code v2.1.247 or later. On earlier versions, a project or local file’s `excludeDefault` applies too. Each `tips` entry is a plain string or an object with these fields:
+Tip objects, `tipsFile`, `label`, and the Scope line’s rule that project and local settings contribute plain strings only require Claude Code v2.1.247 or later. Each `tips` entry is a plain string or an object with these fields:
Field| Required| Description
---|---|---
@@ -5284,7 +5285,7 @@
* **Scope** : `Any file`
* **Type** : Boolean
- * `true`: Claude Code turns the Artifact tool off for every session the file applies to, and no other file turns it back on. Before v2.1.242, a higher-precedence file could override a lower file’s `true` rather than the key acting as a lock
+ * `true`: Claude Code turns the Artifact tool off for every session the file applies to, and no other file turns it back on
* `false`: ignored; to leave the tool on, remove the key
* **Default** : unset, so the tool follows your account’s [availability](</docs/en/artifacts#availability>)
* **Per-session overrides** : [`CLAUDE_CODE_DISABLE_ARTIFACT`](</docs/en/env-vars>) set to `1` turns the tool off for one session
@@ -5377,7 +5378,7 @@
"enableArtifact": false
}
-While a source other than your own user settings keeps the tool turned off, Claude Code hides the **Artifacts** row in `/config`, because turning it on there wouldn’t change anything. [Disable artifacts](</docs/en/artifacts#disable-artifacts>) lists every way to turn the tool off. Before v2.1.242, Claude Code ignored this key in project and local settings, and a file higher in the [precedence stack](</docs/en/settings#settings-precedence>) could turn the tool back on over a lower file’s off.
+While a source other than your own user settings keeps the tool turned off, Claude Code hides the **Artifacts** row in `/config`, because turning it on there wouldn’t change anything. [Disable artifacts](</docs/en/artifacts#disable-artifacts>) lists every way to turn the tool off.
###
@@ -5532,6 +5533,53 @@
+`allowedProviders`
+
+List the services a machine may reach Claude through, such as the Anthropic API, Amazon Bedrock, or an LLM gateway. A session on a provider that isn’t listed is refused at startup, at login, and when it next contacts the API, so switching to an unlisted provider mid-session is refused too. The [refusal message](</docs/en/errors#managed-settings-dont-allow-this-api-provider>) names what selected the provider and the steps to continue. Requires Claude Code v2.1.285 or later.
+
+ * **Scope** : `Managed`. A list that the machine’s own admin sources set, MDM policies and managed settings files, keeps applying when server-managed settings also deliver one: a session may then use only the providers on both lists, so a server-managed list can narrow what the machine allows but never widen it. Which machine source’s `allowedProviders` counts follows [how Claude Code combines managed sources](</docs/en/managed-settings#how-claude-code-combines-managed-sources>). A list delivered through server-managed settings alone reaches only the sessions that [fetch server-managed settings](</docs/en/server-managed-settings#platform-availability>).
+ * **Type** : array of strings, each one of:
+ * `"anthropic"`: the Anthropic API on Anthropic’s own host, through a claude.ai or Console sign-in or an API key. Pair it with `forceLoginMethod` or `forceLoginOrgUUID` to also restrict the sign-in
+ * `"bedrock"`: [Amazon Bedrock](</docs/en/amazon-bedrock>)
+ * `"vertex"`: [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), formerly Vertex AI
+ * `"foundry"`: [Microsoft Foundry](</docs/en/microsoft-foundry>)
+ * `"anthropicAws"`: [Claude Platform on AWS](</docs/en/claude-platform-on-aws>)
+ * `"mantle"`: the Amazon Bedrock [Mantle endpoint](</docs/en/amazon-bedrock#use-the-mantle-endpoint>). A session that [runs Mantle alongside the Invoke API](</docs/en/amazon-bedrock#run-mantle-alongside-the-invoke-api>) uses both providers, so list `"bedrock"` and `"mantle"` together for it
+ * `"customEndpoint"`: the Anthropic API or a cloud provider’s API sent to another host, such as an [LLM gateway](</docs/en/llm-gateway>) named by `ANTHROPIC_BASE_URL`, a provider’s `ANTHROPIC_*_BASE_URL` variable, or an `ANTHROPIC_FOUNDRY_RESOURCE` value that isn’t a bare resource name. Claude Code admits it only for the exact value a managed `env` block pins
+ * `"gateway"`: a [Cloud gateway](</docs/en/claude-apps-gateway>) sign-in
+ * **Default** : unset, so any provider can be used
+
+managed-settings.json
+
+ {
+ "allowedProviders": ["anthropic", "bedrock"]
+ }
+
+Each cloud provider’s entry means that provider’s own service, including its regional, FIPS, and private endpoints. An entry Claude Code doesn’t recognize as a provider name is dropped and reported, and the rest of the list stays enforced. With an empty list, or one whose every entry is unrecognized, Claude Code refuses every provider and doesn’t start on the machine.
+
+####
+
+
+
+Endpoints that need a pin in managed `env`
+
+A pin is an endpoint variable’s value set in a managed `env` block. When a session sends a provider’s traffic somewhere other than that provider’s own service, Claude Code admits it only if the session’s value is the same as the pin. These endpoints need one:
+
+ * **`"customEndpoint"` sessions**: the variable that names the host, such as `ANTHROPIC_BASE_URL`
+ * **Amazon Bedrock** : the AWS SDK’s `AWS_ENDPOINT_URL`, `AWS_ENDPOINT_URL_BEDROCK`, and `AWS_ENDPOINT_URL_BEDROCK_RUNTIME` variables when they point outside Bedrock’s own service. The session stays under `"bedrock"` rather than `"customEndpoint"`
+ * **A gateway sign-in’s URL** : the session stays under `"gateway"`, and `forceLoginGatewayUrl` also counts as the pin
+
+Which `env` blocks count as pins depends on where the list is set:
+
+ * **An administrator source on the machine sets a list** : only the `env` blocks of the machine’s own administrator sources count
+ * **Only server-managed settings set a list** : an `env` value in those server-managed settings counts too
+
+The list doesn’t judge a cloud provider’s credential and tenancy variables or the network path, such as `HTTPS_PROXY` and certificate settings. Set those for the fleet in the managed `env` block.
+
+###
+
+
+
`apiKeyHelper`
Run your own command to produce the credential Claude Code sends with model requests. Claude Code runs the command through the system shell, `/bin/sh` on macOS and Linux and `cmd` on Windows, and sends its output as both the `X-Api-Key` and `Authorization: Bearer` headers. Use it for dynamic or rotating credentials, such as short-lived tokens fetched from a vault.
@@ -6011,7 +6059,7 @@
`disableSideloadFlags`
-Reject the `--plugin-dir`, `--plugin-url`, `--agents`, and `--mcp-config` CLI flags at startup, which users could otherwise pass to bypass `strictKnownMarketplaces` for a single run. Claude Code exits with an error naming the rejected flags, and applies the same check to surfaces that start the CLI with these flags internally, currently [Cowork](</docs/en/desktop>) local sessions in the desktop app. In [cloud sessions](</docs/en/claude-code-on-the-web>), Claude Code instead starts the session and drops every server-delivered `--mcp-config` entry except in-process `type: "sdk"` entries and a [Claude Tag](</docs/en/claude-tag>) session’s Slack tools. Requires Claude Code v2.1.193 or later.
+Reject the `--plugin-dir`, `--plugin-url`, `--agents`, and `--mcp-config` CLI flags at startup, which users could otherwise pass to bypass `strictKnownMarketplaces` for a single run. Claude Code exits with an error naming the rejected flags. In [cloud sessions](</docs/en/claude-code-on-the-web>), Claude Code instead starts the session and drops every server-delivered `--mcp-config` entry except in-process `type: "sdk"` entries and a [Claude Tag](</docs/en/claude-tag>) session’s Slack tools. Requires Claude Code v2.1.193 or later.
* **Scope** : `Managed`
* **Type** : Boolean
@@ -6025,7 +6073,10 @@
"disableSideloadFlags": true
}
-Claude Code still accepts a `--mcp-config` whose servers are all in-process `type: "sdk"` entries, so the Agent SDK and VS Code extension keep working. Users can still add servers with `claude mcp add` or a `.mcp.json` file; for per-server control, set [`allowedMcpServers`](</docs/en/managed-mcp>) as well. Requires Claude Code v2.1.193 or later. The same check covers plugin folders named in the [`CLAUDE_CODE_PLUGIN_DIRS`](</docs/en/env-vars#variables>) environment variable, which requires Claude Code v2.1.280 or later. When the variable names a folder, Claude Code exits with the same error, and the error says to unset the variable. In cloud sessions, Claude Code also ignores server-delivered mid-session MCP updates, the path behind cloud session configuration and SDK `setMcpServers()` calls that reach those sessions. In-process `type: "sdk"` entries and a Claude Tag session’s Slack tools stay exempt there too. Before v2.1.268, both this drop and the startup drop also removed a Claude Tag session’s Slack tools. Before v2.1.239, a server-delivered `--mcp-config` blocked a cloud session from starting.
+Claude Code still accepts a `--mcp-config` whose servers are all in-process `type: "sdk"` entries, so the Agent SDK and VS Code extension keep working. Users can still add servers with `claude mcp add` or a `.mcp.json` file; for per-server control, set [`allowedMcpServers`](</docs/en/managed-mcp>) as well. Requires Claude Code v2.1.193 or later. The same check covers plugin folders named in the [`CLAUDE_CODE_PLUGIN_DIRS`](</docs/en/env-vars#variables>) environment variable, which requires Claude Code v2.1.280 or later. When the variable names a folder, Claude Code exits with the same error, and the error says to unset the variable. In cloud sessions, Claude Code also ignores server-delivered mid-session MCP updates, the path behind cloud session configuration and SDK `setMcpServers()` calls that reach those sessions. In-process `type: "sdk"` entries and a Claude Tag session’s Slack tools stay exempt there too. Before v2.1.268, both this drop and the startup drop also removed a Claude Tag session’s Slack tools. Before v2.1.239, a server-delivered `--mcp-config` blocked a cloud session from starting. The desktop app manages some plugins itself, including plugins synced from claude.ai and plugins your organization deploys through the app. If you deploy this key to a device through MDM, OS-level policy, or a managed settings file, the desktop app doesn’t pass those plugins to the following sessions on that device:
+
+ * **[Code sessions on the user’s machine](</docs/en/desktop#environment-configuration>)** : they also start without the skills enabled for the user’s claude.ai account. Plugins that Claude Code installs from marketplaces in your managed settings still load. In [Claude Desktop on 3P](<https://claude.com/docs/third-party/claude-desktop/overview>), MCP servers from plugins you deploy to the device’s `org-plugins` directory stay available too, because the desktop app connects to them itself. Before Claude Desktop v1.37937.0, these sessions failed at startup instead.
+ * **[Cowork sessions on the user’s machine](</docs/en/managed-settings#where-and-when-a-policy-applies>)** : the skills inside those plugins and the skills enabled for the user’s claude.ai account stay available. In [Claude Desktop on 3P](<https://claude.com/docs/third-party/claude-desktop/overview>), MCP servers from plugins you deploy to the device’s `org-plugins` directory stay available too, because the desktop app connects to them itself. Before Claude Desktop v1.44121.0, these sessions failed at startup instead.
###
@@ -6075,7 +6126,7 @@
---|---|---
Lists| Combines entries from every source| `permissions.allow`, `sandbox.network.allowedDomains`, and other list keys
Locks| Applies the strictest value any source sets. When no source sets a strict value, applies a looser value only from the highest source| `allowManagedPermissionRulesOnly`, `permissions.disableBypassPermissionsMode`, and other boolean or enum locks
-Restriction allowlists| Takes the list whole from the highest source that sets it, without adding entries from lower sources. When the highest source doesn’t set one, takes it whole from the next source down| `availableModels`, `allowedMcpServers`, `strictKnownMarketplaces`, `allowedChannelPlugins`, and the `fallbackModel` chain
+Restriction allowlists| Takes the list whole from the highest source that sets it, without adding entries from lower sources. When the highest source doesn’t set one, takes it whole from the next source down| `availableModels`, `allowedMcpServers`, `allowedProviders`, `strictKnownMarketplaces`, `allowedChannelPlugins`, and the `fallbackModel` chain
Values taken whole| Takes the value whole from the highest source that sets it, without combining entries or fields from lower sources. When the highest source doesn’t set it, takes it whole from the next source down| `sandbox.credentials.awsPairs`, `sandbox.ripgrep`
Provided MCP servers| Combines the server names from every source. When two sources set the same name, applies the higher source’s whole entry| `managedMcpServers`
Read from the highest-priority source only| Reads the key only from the highest-priority source that carries a policy key, so a lower source’s value is ignored even when the highest source sets none| `apiKeyHelper`, `awsAuthRefresh`, `awsCredentialExport`, `gcpAuthRefresh`, `otelHeadersHelper`, `proxyAuthHelper`, `forceLoginOrgUUID`, the `"claudeai"` and `"console"` values of `forceLoginMethod`, `parentSettingsBehavior`, `modelPicker`, `policyHelper`, `permissions.defaultMode`
@@ -6087,6 +6138,7 @@
* **`policyHelper`** : Claude Code honors it only when the highest source that carries a policy key is an MDM policy or a managed settings file, so under server-managed settings it doesn’t apply.
* **`modelOverrides`** : pairs with `availableModels`. Claude Code takes `modelOverrides` from the highest source that sets it, unless a higher source sets `availableModels` without `modelOverrides`. In that case it ignores `modelOverrides` from every source.
* **`forceLoginGatewayUrl`, `gatewayInternalNetworks`, and the `"gateway"` value of `forceLoginMethod`**: Claude Code never reads any of them from server-managed settings, so a value there neither applies nor hides one set in an MDM policy or managed settings file. Among the admin sources on the machine, only the highest-ranked one that carries a policy key supplies them, whether or not server-managed settings are also present.
+ * **`allowedProviders`** : after the table’s rule, the machine’s own list still limits the result, as its entry’s Scope note states.
To confirm which sources combined on a machine, run `/status` and [read the `Setting sources` line](</docs/en/managed-settings#read-the-source-in-/status>).
--- a/third-party-integrations.md
+++ b/third-party-integrations.md
@@ -86,7 +86,7 @@
Configure security policies
-Security teams can configure managed permissions for what Claude Code is and is not allowed to do, which cannot be overwritten by local configuration. [Learn more](</docs/en/security>).
+Security teams can configure managed permissions for what Claude Code is and is not allowed to do, which cannot be overwritten by local configuration. [Learn more](</docs/en/security>). To limit which of these deployment options a managed machine may use, set [`allowedProviders`](</docs/en/settings-reference#allowedproviders>) in managed settings. For example, `["bedrock"]` allows Amazon Bedrock and nothing else; a Bedrock fleet that also enables the Mantle endpoint lists `"mantle"` too. The entry says which endpoint variables also need a managed `env` pin. Requires Claude Code v2.1.285 or later.
###
--- a/tools-reference.md
+++ b/tools-reference.md
@@ -145,10 +145,12 @@
Timeout and output limits
-Each command runs under a timeout, and Claude manages it: when it wants longer than the default for a command, it passes the `timeout` parameter with that call — you never set a per-command timeout. Two [environment variables](</docs/en/env-vars>) bound what Claude gets:
+Each command runs under a timeout, and Claude manages it: when it wants longer than the default for a command, it passes the `timeout` parameter with that call. You never set a per-command timeout. Two [environment variables](</docs/en/env-vars>) control what Claude gets for a command that runs in the foreground:
* `BASH_DEFAULT_TIMEOUT_MS` — the default when Claude passes no timeout; two minutes out of the box
* `BASH_MAX_TIMEOUT_MS` — with the default, sets the ceiling that caps whatever Claude requests: the effective ceiling is the larger of the two, ten minutes out of the box
+
+For a command that Claude starts in the background, `timeout` instead sets how long the command may run there, with the separate default and maximum described under Time limit for background commands. The PowerShell tool follows the same timeout rules and reads the same two variables.
####
@@ -171,7 +173,47 @@
Background commands
-For long-running processes such as dev servers or watch builds, Claude can set `run_in_background: true` to start the command as a background task and continue working while it runs. List and stop background tasks with `/tasks`. After you stop one there, or from a connected client such as the desktop app, Claude moves on instead of waiting for it. If a subagent started the command, it’s that subagent that moves on. A command that a [foreground subagent](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) started stops when that subagent gives its final response. A command that the main conversation or a background subagent started keeps running after a final response. In non-interactive mode with the `-p` flag, [background commands end shortly after the run’s final result](</docs/en/headless#background-tasks-at-exit>). When a command reaches its timeout without finishing, Claude Code moves it to the background instead of stopping it, unless the command starts with `sleep`. Claude keeps working while the command continues. Claude Code applies the same lifetime rules to a moved command as to any other background command, so it still ends a foreground subagent’s command at that subagent’s final response. Setting [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1`](</docs/en/env-vars#variables>) disables auto-backgrounding along with the rest of the background task functionality. The result of a command moved to the background states what happened:
+For long-running processes such as dev servers or watch builds, Claude can set `run_in_background: true` to start the command as a background task and continue working while it runs. List and stop background tasks with `/tasks`. After you stop one there, or from a connected client such as the desktop app, Claude moves on instead of waiting for it. If a subagent started the command, it’s that subagent that moves on.
+
+####
+
+
+
+When a background command stops
+
+A command that a [foreground subagent](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) started stops when that subagent’s run ends, whether it finished, failed, or was interrupted. A command that the main conversation or a background subagent started keeps running after a final response, until it exits, is stopped, or reaches its time limit. In non-interactive mode with the `-p` flag, [background commands end shortly after the run’s final result](</docs/en/headless#background-tasks-at-exit>).
+
+####
+
+
+
+Time limit for background commands
+
+Background Bash and PowerShell commands have a time limit, counted from the moment the command enters the background:
+
+ * A command that Claude starts in the background gets 30 minutes, or the `timeout` Claude passes with `run_in_background`, up to a maximum of 2 hours
+ * A command that starts in the foreground and then moves to the background, for example with `Ctrl+B` or at its timeout, gets 30 minutes from the move
+
+When a background command reaches its time limit, Claude Code stops it and tells Claude why, and Claude can start the command again with a longer `timeout` if the work still needs it. The stop notice reads `Background command "<description>" was stopped after reaching its background time limit`.
+
+####
+
+
+
+Raise the time limit for background commands
+
+Two [environment variables](</docs/en/env-vars>) raise these limits, for Bash and PowerShell commands alike. Both take milliseconds, and neither can shorten a limit: a lower value leaves the 30-minute default and the 2-hour maximum in place.
+
+ * Set `BASH_DEFAULT_TIMEOUT_MS` above `1800000` to replace the 30-minute default with that value, both for commands Claude starts without a `timeout` and for moved commands
+ * Set `BASH_MAX_TIMEOUT_MS` above `7200000` to raise the 2-hour maximum to that value. Setting `BASH_DEFAULT_TIMEOUT_MS` above `7200000` raises the maximum the same way
+
+####
+
+
+
+Foreground commands that move to the background
+
+When a foreground command reaches its timeout without finishing, Claude Code moves it to the background instead of stopping it, unless the command starts with `sleep`. A moved command’s time limit counts from the move, and a foreground subagent’s moved command still stops when that subagent’s run ends. Setting [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1`](</docs/en/env-vars#variables>) disables auto-backgrounding along with the rest of the background task functionality. The result of a command moved to the background states what happened:
* When the timeout triggers the move, the result reports it explicitly: `Command did not complete within its 120s timeout and was moved to the background`, with the seconds matching the timeout that applied, followed by the task ID and the path of the file the output is being written to.
* A `cd`, `pushd`, `popd`, or `chdir` inside a command that is moved to the background never carries over: the result states `Session cwd remains <dir>; directory changes made by the backgrounded command do not apply to subsequent commands.`, so Claude doesn’t act on a directory change that didn’t happen.
@@ -202,7 +244,6 @@
Whatever you list, these rules apply:
* **Unknown names** : Claude Code ignores names it doesn’t recognize
- * **Bash, PowerShell, and Monitor** : Claude Code keeps Bash, PowerShell, and Monitor tool commands under the cap whatever you list
* **Variable unset** : Claude Code takes the set of other capped kinds from configuration Anthropic delivers from the server, and that set can change over time, so set the variable when you need a set that doesn’t change
* **Permission-gating hooks** : even with every kind capped, Claude Code excludes from the cap a hook that can block or change the outcome of an action, and any MCP server that such a hook calls, so the kernel killing a permission-gating hook can’t allow the action it was blocking
--- a/typescript.md
+++ b/typescript.md
@@ -302,7 +302,7 @@
`summary`| `string`| Display title: custom title, most recent prompt, auto-generated summary, or first prompt
`lastModified`| `number`| Last modified time in milliseconds since epoch
`fileSize`| `number | undefined`| Session file size in bytes. Only populated for local JSONL storage
-`customTitle`| `string | undefined`| User-set session title (via `/rename`)
+`customTitle`| `string | undefined`| The session’s custom title when one is set, for example with `--name`, `/rename`, a hook’s `sessionTitle` output, or `renameSession()`. Otherwise the AI-generated session title, if the session has one
`firstPrompt`| `string | undefined`| First meaningful user prompt in the session
`gitBranch`| `string | undefined`| Git branch at the end of the session
`cwd`| `string | undefined`| Working directory for the session
@@ -585,7 +585,7 @@
`outputFormat`| `{ type: 'json_schema', schema: JSONSchema }`| `undefined`| Define output format for agent results. See [Structured outputs](</docs/en/agent-sdk/structured-outputs>) for details
`outputStyle`| `string`| `undefined`| Not an `Options` field. Set `outputStyle` in the inline [`settings`](</docs/en/settings>) object or a settings file instead. See [Activate an output style](</docs/en/agent-sdk/modifying-system-prompts#activate-an-output-style>)
`pathToClaudeCodeExecutable`| `string`| Auto-resolved from bundled native binary| Path to Claude Code executable. Only needed if optional dependencies were skipped during install or your platform isn’t in the supported set
-`permissionMode`| `PermissionMode`| `'default'`| Permission mode for the session
+`permissionMode`| `PermissionMode`| `undefined`| Permission mode for the session. If you omit it, the session can start in auto mode. See [Permission modes](</docs/en/agent-sdk/permissions#permission-modes>) for how Claude Code picks the starting permission mode
`permissionPromptToolName`| `string`| `undefined`| MCP tool name for permission prompts
`permissionPrompts`| `'host' | 'none'`| `'host'`| Who answers permission prompts: `'host'` routes them to your `canUseTool` callback or the `permissionPromptToolName` tool, and `'none'` [denies the calls that would have prompted](</docs/en/agent-sdk/permissions#how-permissions-are-evaluated>). Requires Claude Code v2.1.259 or later
`persistSession`| `boolean`| `true`| When `false`, disables session persistence to disk. Sessions cannot be resumed later
@@ -724,7 +724,7 @@
`reloadOutputStyles()`| Re-reads [output styles](</docs/en/output-styles>) from disk, so a style file you add or edit mid-session becomes available to the running session. Resolves with an `SDKControlReloadOutputStylesResponse` listing the style names available after the reload. Requires Agent SDK v0.3.261 or later
`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 disconnects the server
+`toggleMcpServer(serverName, enabled)`| Enable or disable an MCP server by name, with the same name resolution as `reconnectMcpServer()`. Disabling a stdio, SSE, or HTTP server disconnects it and removes its tools; for a server you added mid-session with `setMcpServers()`, tool removal requires Claude Code v2.1.285 or later
`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
`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
@@ -1248,7 +1248,7 @@
| "bypassPermissions" // Bypass permission checks; explicit ask rules still prompt
| "plan" // Planning mode - explore without editing
| "dontAsk" // Don't prompt for permissions, deny if not pre-approved
- | "auto"; // Model classifier approves or denies permission prompts
+ | "auto"; // A model classifier reviews actions such as shell commands and network requests
###
@@ -1758,6 +1758,7 @@
type SDKStartupFailureReason =
| "org_pin_api_key_conflict"
+ | "provider_not_allowed"
| "org_verify_failed"
| "org_pin_mismatch"
| "managed_settings_invalid"
@@ -1779,6 +1780,7 @@
Value| What stopped the session
---|---
`org_pin_api_key_conflict`| Managed settings [require a first-party or Cloud gateway sign-in](</docs/en/authentication#restrict-login-to-your-organization>), and an Anthropic API key, auth token, or `apiKeyHelper` is configured instead
+`provider_not_allowed`| Managed settings [list the API providers this machine may use](</docs/en/settings-reference#allowedproviders>), and the session is set up for a provider that isn’t listed, or for an endpoint the settings don’t pin. Requires Claude Code v2.1.285 or later
`org_verify_failed`| The sign-in’s organization couldn’t be verified against the pin, for example because of a network failure or a revoked token
`org_pin_mismatch`| The sign-in belongs to an organization the pin doesn’t allow
`managed_settings_invalid`| Managed policy settings couldn’t be read, the pin names no organization, or [managed model restrictions](</docs/en/errors#managed-settings-block-the-default-model>) leave no permitted model for the Default option
@@ -3111,13 +3113,13 @@
type BashInput = {
command: string;
- timeout?: number; // milliseconds, max 600000; higher values are clamped to the max
+ timeout?: number; // milliseconds. Foreground: capped at 600000 by default, higher values are clamped. With run_in_background (Claude Code v2.1.285 or later): the background time limit, 1800000 when omitted, capped at 7200000 unless raised
description?: string;
run_in_background?: boolean;
dangerouslyDisableSandbox?: boolean;
};
-Executes Bash commands with optional timeout and background execution. The working directory persists between commands, including commands run in later turns of a multi-turn session; shell state such as exported environment variables doesn’t. For the limits on which directory changes carry over, see [What persists between commands](</docs/en/tools-reference#what-persists-between-commands>).
+Executes Bash commands with optional timeout and background execution. The working directory persists between commands, including commands run in later turns of a multi-turn session; shell state such as exported environment variables doesn’t. For the limits on which directory changes carry over, see [What persists between commands](</docs/en/tools-reference#what-persists-between-commands>). For what sets the foreground ceiling, see [Timeout and output limits](</docs/en/tools-reference#timeout-and-output-limits>). For the background time limit, see [Time limit for background commands](</docs/en/tools-reference#time-limit-for-background-commands>).
###
@@ -3531,7 +3533,7 @@
durable?: boolean;
};
-Schedules a prompt to run on a 5-field cron schedule in local time. Set `recurring` to `false` to fire once at the next match. Jobs are session-scoped by default: starting a fresh conversation clears them, and resuming with `--resume` or `--continue` restores jobs that haven’t expired. See [Scheduled tasks](</docs/en/scheduled-tasks>). Setting `durable` to `true` requests persistence to `.claude/scheduled_tasks.json` so the job survives restarts. Durable scheduling isn’t available in every session: when it isn’t, Claude Code accepts `durable: true` but creates the job session-only. Read the output’s `durable` field to see whether the job persisted.
+Schedules a prompt to run on a 5-field cron schedule in local time. Set `recurring` to `false` to fire once at the next match. Jobs are session-scoped by default, and resuming with `--resume` or `--continue` restores jobs that haven’t expired. See [Scheduled tasks](</docs/en/scheduled-tasks>). Setting `durable` to `true` requests persistence to `.claude/scheduled_tasks.json` so the job survives restarts. Durable scheduling isn’t available in every session: when it isn’t, Claude Code accepts `durable: true` but creates the job session-only. Read the output’s `durable` field to see whether the job persisted.
###
@@ -3985,7 +3987,7 @@
`stderr`| Notices the tool itself adds, such as a shell working-directory reset, not the command’s stderr
`backgroundTaskId`| Present for background commands
-`timedOutAfterMs` is the timeout in milliseconds, set when the command reached its timeout and moved to the background rather than starting there explicitly. `backgroundCwdHint` is set when the backgrounded command contained a directory-change builtin such as `cd`, `pushd`, `popd`, or `chdir`, and notes that the session working directory didn’t change. Both fields require Claude Code v2.1.210 or later. When a subagent running in the foreground owns a backgrounded command, Claude Code terminates the command when that subagent gives its final response. Claude Code sets `backgroundEndsWithFinalResponse` to `true` on such commands, and omits the field when the command survives the turn, as commands started by the main conversation or by background subagents do. The field requires Claude Code v2.1.227 or later. Claude Code sets `gitOperation.commit.branch` to the branch named in git’s commit summary line, and omits it for a commit made on a detached HEAD. The field requires Agent SDK v0.3.227 or later. Claude Code reports a `gh pr reopen` command as the `reopened` PR action, which requires Agent SDK v0.3.234 or later.
+`timedOutAfterMs` is the timeout in milliseconds, set when the command reached its timeout and moved to the background rather than starting there explicitly. `backgroundCwdHint` is set when the backgrounded command contained a directory-change builtin such as `cd`, `pushd`, `popd`, or `chdir`, and notes that the session working directory didn’t change. Both fields require Claude Code v2.1.210 or later. When a subagent running in the foreground owns a backgrounded command, the command [ends when that subagent’s run ends](</docs/en/tools-reference#when-a-background-command-stops>). Claude Code sets `backgroundEndsWithFinalResponse` to `true` on such commands, and omits the field when the command survives the turn, as commands started by the main conversation or by background subagents do. The field requires Claude Code v2.1.227 or later. Claude Code sets `gitOperation.commit.branch` to the branch named in git’s commit summary line, and omits it for a commit made on a detached HEAD. The field requires Agent SDK v0.3.227 or later. Claude Code reports a `gh pr reopen` command as the `reopened` PR action, which requires Agent SDK v0.3.234 or later.
###
--- a/ultrareview.md
+++ b/ultrareview.md
@@ -42,7 +42,7 @@
/code-review ultra 1234
-The command also accepts `#1234`, `PR 1234`, and pasted PR URLs; a pasted URL must point to the repository in your current directory. In PR mode, the cloud sandbox clones the pull request directly from the host rather than bundling your local working tree. PR mode works with repositories on `github.com` and on [GitHub Enterprise Server](</docs/en/github-enterprise-server>) instances that an Owner has connected to Claude Code. For repositories on `github.com`, the sandbox clones with the GitHub account connected to your Claude account, so the account must be able to read the PR’s repository. Claude Code checks this before creating the cloud session, unless you’ve set [`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`](</docs/en/env-vars#variables>), and refuses the launch when [no account is connected](</docs/en/errors#no-github-account-is-connected-to-your-claude-account>) or [the account can’t see the repository](</docs/en/errors#your-connected-github-account-cant-see-the-repository>); the refusal names the fix. Before v2.1.248, Claude Code didn’t check this before launch. Run [`/web-setup`](</docs/en/web-quickstart#connect-from-your-terminal>) to connect your GitHub CLI login to your Claude account.
+The command also accepts `#1234`, `PR 1234`, and pasted PR URLs; a pasted URL must point to the repository in your current directory. In PR mode, the cloud sandbox clones the pull request directly from the host rather than bundling your local working tree. PR mode works with repositories on `github.com` and on [GitHub Enterprise Server](</docs/en/github-enterprise-server>) instances that an Owner has connected to Claude Code. For repositories on `github.com`, the sandbox clones with the GitHub account connected to your Claude account, so the account must be able to read the PR’s repository. Run [`/web-setup`](</docs/en/web-quickstart#connect-from-your-terminal>) to connect your GitHub CLI login to your Claude account.
###
--- a/vs-code.md
+++ b/vs-code.md
@@ -44,7 +44,7 @@
* **Activity Bar** : click the Spark icon in the left sidebar to open the sessions list. Click any session to open it in your preferred location, or start a new one. This icon is always visible in the Activity Bar.
* **Command Palette** : `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux), type “Claude Code”, and select an option like “Open in New Tab”
- * **Status Bar** : if you’ve set `preferredLocation` to `sidebar`, or opened Claude with **Claude Code: Open in Side Bar** , click **✻ Claude Code** in the bottom-right corner of the window. This works even when no file is open.
+ * **Status Bar** : click **✻ Claude Code** in the bottom-right corner of the window. This works even when no file is open.
You can drag the Claude panel to reposition it anywhere in VS Code. See Customize your workflow for details.
@@ -300,7 +300,8 @@
The plugin dialog shows two tabs: **Plugins** and **Marketplaces**. In the Plugins tab:
- * **Installed plugins** appear at the top with toggle switches to enable or disable them
+ * **Installed plugins** appear at the top with toggle switches to enable or disable them.
+ * If you turn off a plugin that your project’s shared `.claude/settings.json` turns on, the extension asks first: **Disable for me** turns it off only for you, while **Disable for everyone** changes the shared file.
* **Available plugins** from your configured marketplaces appear below
* Search to filter plugins by name or description
* Click **Install** on any available plugin
@@ -310,6 +311,19 @@
* **Install for you** : available in all your projects (user scope)
* **Install for this project** : shared with project collaborators (project scope)
* **Install locally** : only for you, only in this repository (local scope)
+
+Once the install finishes, a form asks for any of the plugin’s [configuration options](</docs/en/plugins/components#user-configuration>) that aren’t set yet. To review or change the options later, click the gear icon on the plugin’s row. Sensitive text fields are masked, and a secret you saved earlier shows **(unchanged)**. Leave the field blank to keep the saved value. After you save changes, the open sessions reload their plugins and the dialog shows **Restart Claude to apply plugin changes**.
+
+###
+
+
+
+Uninstall plugins
+
+Each installed row names the [scope](</docs/en/plugins/install#choose-an-install-scope>) it’s installed at. To uninstall that installation, click the row’s trash icon. A dimmed trash icon marks a row you can’t uninstall from this workspace, such as a plugin your organization manages or one installed for another project. The extension asks first in two cases:
+
+ * **A plugin your project’s shared`.claude/settings.json` turns on**: choose **Disable for me** , which keeps the plugin installed for your collaborators, or **Uninstall for everyone** , which removes the project’s installation with [`--keep-data`](</docs/en/plugins/cli-reference#what-an-uninstall-deletes-and-keeps>), so the plugin’s saved data directory stays. If you already turned the plugin off for yourself, the trash icon removes your own installation without the question.
+ * **Otherwise, the last installation of a plugin with saved data** : choose whether to keep or delete the data; **Keep** is the default
###
@@ -345,7 +359,7 @@
* Enter a GitHub repo, URL, or local path to add a new marketplace
* Click the refresh icon to update a marketplace’s plugin list
- * Click the trash icon to remove a marketplace
+ * Click the trash icon to remove a marketplace. Removing it [uninstalls every plugin you installed from it](</docs/en/plugins/install#manage-marketplaces>), so a confirmation names those plugins first
Plugin changes you make in the dialog apply right away to the Claude Code sessions open in that VS Code window. If the session you opened the dialog from can’t reload its plugins, the dialog offers to try again or to restart Claude in that session.
@@ -694,7 +708,7 @@
4. **Disable conflicting extensions** : Temporarily disable other AI extensions (Cline, Continue, etc.)
5. **Check workspace trust** : The extension doesn’t work in Restricted Mode
-Alternatively, if you’ve set `preferredLocation` to `sidebar`, or opened Claude with **Claude Code: Open in Side Bar** , click ”✻ Claude Code” in the **Status Bar** (bottom-right corner). This works even without a file open. You can also use the **Command Palette** (`Cmd+Shift+P` / `Ctrl+Shift+P`) and type “Claude Code”.
+Alternatively, click **✻ Claude Code** in the **Status Bar** at the bottom-right corner of the window. This works even without a file open. You can also use the **Command Palette** (`Cmd+Shift+P` / `Ctrl+Shift+P`) and type “Claude Code”.
###
--- a/worktrees.md
+++ b/worktrees.md
@@ -117,7 +117,7 @@
* The worktree belongs to a `--worktree` session you haven’t backgrounded, whatever its age.
* You created the worktree yourself with `git worktree add`, even if you then ran a `--worktree <name>` session in it and backgrounded that session.
-Claude Code writes a marker into the git metadata of every worktree it creates with git, and the sweep keeps any worktree without one, including a worktree a `WorktreeCreate` hook created. Before v2.1.246, the sweep didn’t check for the marker, and could remove a worktree you created yourself when an old background-session record pointed at it. While an agent is running, Claude Code holds a `git worktree lock` on its worktree so that concurrent cleanup can’t remove it, and releases the lock when the agent finishes. Claude Code holds the same lock on the worktree it created for a backgrounded session while the session runs, so the sweep leaves the worktree in place and `git worktree remove` refuses to remove it. The sweep also releases a lock Claude Code set for a session whose process has exited, so a killed background session doesn’t leave its worktree permanently locked. The sweep never releases a lock you set yourself with `git worktree lock`. Before v2.1.210, a lock left by a killed session stayed in place until you ran `git worktree unlock`. To clean up a worktree that the sweep keeps, run `git worktree remove`, adding `--force` if the worktree has uncommitted changes or untracked files. If git refuses because the worktree is locked, run `git worktree unlock` on it first.
+Claude Code writes a marker into the git metadata of every worktree it creates with git, and the sweep keeps any worktree without one, including a worktree a `WorktreeCreate` hook created. While an agent is running, Claude Code holds a `git worktree lock` on its worktree so that concurrent cleanup can’t remove it, and releases the lock when the agent finishes. Claude Code holds the same lock on the worktree it created for a backgrounded session while the session runs, so the sweep leaves the worktree in place and `git worktree remove` refuses to remove it. The sweep also releases a lock Claude Code set for a session whose process has exited, so a killed background session doesn’t leave its worktree permanently locked. The sweep never releases a lock you set yourself with `git worktree lock`. Before v2.1.210, a lock left by a killed session stayed in place until you ran `git worktree unlock`. To clean up a worktree that the sweep keeps, run `git worktree remove`, adding `--force` if the worktree has uncommitted changes or untracked files. If git refuses because the worktree is locked, run `git worktree unlock` on it first.
##